Reference Codebot.Platform.pas
Part of the Codebot package
Codebot.Platform defines interfaces for the platform details that scenes and applications need: bitmaps, the keyboard, the clipboard, windows, dialogs, and system colors. This unit does not depend on the LCL, SDL, or any other backend.
The routines and services below are assigned when the unit implementing a backend is initialized: Codebot.Platform.LCL in codebot_controls or Codebot.Platform.SDL in codebot_render_sdl. Until then they hold defaults which are safe to call: bitmaps hold pixels but cannot load or save, no keys are down, the clipboard is kept in memory, and dialogs close as soon as they are shown.
The Codebot.Platform unit declares the interfaces that scenes and applications need from the platform they run on, without depending on the LCL, SDL, or any other backend. It defines the VK_ virtual key codes, IBitmapData, IClipboard, and IWindow, as well as the dialogs IMessageDialog, IFileDialog, and IPictureDialog. Each dialog has a base class that holds its properties, which a backend can descend from.
The routines that create these objects are assigned when the unit of a backend is initialized, which is either Codebot.Platform.LCL or Codebot.Platform.SDL. Until then, safe defaults are used. PlatformDispatch delivers the OnClose events of dialogs that were closed on another thread.
Items 207 items
| Name | Kind | Line |
|---|---|---|
| IBitmapData | interface | 173 |
| LoadFromFile | procedure | 183 |
| LoadFromStream | procedure | 185 |
| SaveToFile | procedure | 187 |
| SaveToStream | procedure | 189 |
| SetSize | procedure | 181 |
| Height | property | 193 |
| Pixels | property | 195 |
| Width | property | 191 |
| IClipboard | interface | 201 |
| HasText | function | 208 |
| Text | property | 210 |
| IDialog | interface | 258 |
| Execute | procedure | 267 |
| Accepted | property | 271 |
| Showing | property | 273 |
| Title | property | 269 |
| IFileDialog | interface | 317 |
| DefaultExt | property | 349 |
| FileName | property | 339 |
| Files | property | 341 |
| Filter | property | 343 |
| FilterIndex | property | 345 |
| InitialDir | property | 347 |
| Kind | property | 337 |
| MultiSelect | property | 351 |
| IMessageDialog | interface | 284 |
| ButtonIndex | property | 302 |
| Buttons | property | 300 |
| Kind | property | 298 |
| Message | property | 296 |
| IPictureDialog | interface | 358 |
| LoadBitmap | function | 361 |
| IWindow | interface | 221 |
| Close | procedure | 231 |
| Fullscreen | property | 235 |
| Scale | property | 237 |
| Title | property | 233 |
| NewBitmapData | variable | 475 |
| NewFileDialog | variable | 479 |
| NewMessageDialog | variable | 477 |
| NewPictureDialog | variable | 481 |
| PictureFilter | constant | 464 |
| PlatformClipboard | variable | 483 |
| PlatformDispatch | procedure | 469 |
| SystemColorToRGB | variable | 486 |
| TCustomDialog | class | 370 |
| Close | procedure | 382 |
| Execute | procedure | 391 |
| Show | procedure | 380 |
| TCustomFileDialog | class | 418 |
| FDefaultExt | field | 426 |
| FFileName | field | 421 |
| FFiles | field | 422 |
| FFilter | field | 423 |
| FFilterIndex | field | 424 |
| FInitialDir | field | 425 |
| FKind | field | 420 |
| FMultiSelect | field | 427 |
| CloseFiles | procedure | 429 |
| Create | constructor | 432 |
| TCustomMessageDialog | class | 396 |
| FButtonIndex | field | 401 |
| FButtons | field | 400 |
| FKind | field | 399 |
| FMessage | field | 398 |
| CloseButton | procedure | 403 |
| TCustomPictureDialog | class | 454 |
| Create | constructor | 457 |
| LoadBitmap | function | 459 |
| TDialogCloseEvent | procedural | 256 |
| TFileDialogKind | enum | 315 |
| fdOpen | enum value | 315 |
| fdSave | enum value | 315 |
| TMessageKind | enum | 282 |
| mkInformation | enum value | 282 |
| mkWarning | enum value | 282 |
| mkError | enum value | 282 |
| VK_0 | constant | 77 |
| VK_1 | constant | 78 |
| VK_2 | constant | 79 |
| VK_3 | constant | 80 |
| VK_4 | constant | 81 |
| VK_5 | constant | 82 |
| VK_6 | constant | 83 |
| VK_7 | constant | 84 |
| VK_8 | constant | 85 |
| VK_9 | constant | 86 |
| VK_A | constant | 87 |
| VK_ACCEPT | constant | 59 |
| VK_ADD | constant | 128 |
| VK_APPS | constant | 115 |
| VK_B | constant | 88 |
| VK_BACK | constant | 41 |
| VK_C | constant | 89 |
| VK_CANCEL | constant | 37 |
| VK_CAPITAL | constant | 49 |
| VK_CLEAR | constant | 43 |
| VK_CONTROL | constant | 46 |
| VK_CONVERT | constant | 57 |
| VK_D | constant | 90 |
| VK_DECIMAL | constant | 131 |
| VK_DELETE | constant | 75 |
| VK_DIVIDE | constant | 132 |
| VK_DOWN | constant | 69 |
| VK_E | constant | 91 |
| VK_END | constant | 64 |
| VK_ESCAPE | constant | 56 |
| VK_EXECUTE | constant | 72 |
| VK_F | constant | 92 |
| VK_F1 | constant | 133 |
| VK_F10 | constant | 142 |
| VK_F11 | constant | 143 |
| VK_F12 | constant | 144 |
| VK_F2 | constant | 134 |
| VK_F3 | constant | 135 |
| VK_F4 | constant | 136 |
| VK_F5 | constant | 137 |
| VK_F6 | constant | 138 |
| VK_F7 | constant | 139 |
| VK_F8 | constant | 140 |
| VK_F9 | constant | 141 |
| VK_FINAL | constant | 53 |
| VK_G | constant | 93 |
| VK_H | constant | 94 |
| VK_HANGUL | constant | 51 |
| VK_HANJA | constant | 54 |
| VK_HELP | constant | 76 |
| VK_HOME | constant | 65 |
| VK_I | constant | 95 |
| VK_INSERT | constant | 74 |
| VK_J | constant | 96 |
| VK_JUNJA | constant | 52 |
| VK_K | constant | 97 |
| VK_KANA | constant | 50 |
| VK_KANJI | constant | 55 |
| VK_L | constant | 98 |
| VK_LBUTTON | constant | 35 |
| VK_LCONTROL | constant | 149 |
| VK_LEFT | constant | 66 |
| VK_LMENU | constant | 151 |
| VK_LSHIFT | constant | 147 |
| VK_LWIN | constant | 113 |
| VK_M | constant | 99 |
| VK_MBUTTON | constant | 38 |
| VK_MENU | constant | 47 |
| VK_MODECHANGE | constant | 60 |
| VK_MULTIPLY | constant | 127 |
| VK_N | constant | 100 |
| VK_NEXT | constant | 63 |
| VK_NONCONVERT | constant | 58 |
| VK_NUMLOCK | constant | 145 |
| VK_NUMPAD0 | constant | 117 |
| VK_NUMPAD1 | constant | 118 |
| VK_NUMPAD2 | constant | 119 |
| VK_NUMPAD3 | constant | 120 |
| VK_NUMPAD4 | constant | 121 |
| VK_NUMPAD5 | constant | 122 |
| VK_NUMPAD6 | constant | 123 |
| VK_NUMPAD7 | constant | 124 |
| VK_NUMPAD8 | constant | 125 |
| VK_NUMPAD9 | constant | 126 |
| VK_O | constant | 101 |
| VK_OEM_1 | constant | 153 |
| VK_OEM_2 | constant | 158 |
| VK_OEM_3 | constant | 159 |
| VK_OEM_4 | constant | 160 |
| VK_OEM_5 | constant | 161 |
| VK_OEM_6 | constant | 162 |
| VK_OEM_7 | constant | 163 |
| VK_OEM_COMMA | constant | 155 |
| VK_OEM_MINUS | constant | 156 |
| VK_OEM_PERIOD | constant | 157 |
| VK_OEM_PLUS | constant | 154 |
| VK_P | constant | 102 |
| VK_PAUSE | constant | 48 |
| VK_PRINT | constant | 71 |
| VK_PRIOR | constant | 62 |
| VK_Q | constant | 103 |
| VK_R | constant | 104 |
| VK_RBUTTON | constant | 36 |
| VK_RCONTROL | constant | 150 |
| VK_RETURN | constant | 44 |
| VK_RIGHT | constant | 68 |
| VK_RMENU | constant | 152 |
| VK_RSHIFT | constant | 148 |
| VK_RWIN | constant | 114 |
| VK_S | constant | 105 |
| VK_SCROLL | constant | 146 |
| VK_SELECT | constant | 70 |
| VK_SEPARATOR | constant | 129 |
| VK_SHIFT | constant | 45 |
| VK_SLEEP | constant | 116 |
| VK_SNAPSHOT | constant | 73 |
| VK_SPACE | constant | 61 |
| VK_SUBTRACT | constant | 130 |
| VK_T | constant | 106 |
| VK_TAB | constant | 42 |
| VK_U | constant | 107 |
| VK_UP | constant | 67 |
| VK_V | constant | 108 |
| VK_W | constant | 109 |
| VK_X | constant | 110 |
| VK_XBUTTON1 | constant | 39 |
| VK_XBUTTON2 | constant | 40 |
| VK_Y | constant | 111 |
| VK_Z | constant | 112 |