Reference Codebot.Platform.pas
Part of the Codebot package
The Codebot.Platform unit describes what scenes and applications need from the platform they run on, without depending on the LCL, SDL, or anything else. It gives you the VK_ virtual key codes, IBitmapData, IClipboard, IWindow, and the dialogs IMessageDialog, IFileDialog, and IPictureDialog. Each dialog has a base class holding its properties, which a backend descends from.
The routines that create these objects are set up when the unit of a backend is initialized, which is Codebot.Platform.LCL in codebot_controls or Codebot.Platform.SDL in codebot_render_sdl. Until then, safe defaults are used: bitmaps hold pixels but can't load or save, no keys are down, the clipboard is kept in memory, and dialogs close as soon as they are shown. PlatformDispatch delivers the OnClose events of dialogs that were closed on another thread.
Items 208 items
| Name | Kind | Line |
|---|---|---|
| IBitmapData | interface | 174 |
| LoadFromFile | procedure | 184 |
| LoadFromStream | procedure | 186 |
| SaveToFile | procedure | 188 |
| SaveToStream | procedure | 190 |
| SetSize | procedure | 182 |
| Height | property | 194 |
| Pixels | property | 196 |
| Width | property | 192 |
| IClipboard | interface | 202 |
| HasText | function | 209 |
| Text | property | 211 |
| IDialog | interface | 259 |
| Execute | procedure | 268 |
| Accepted | property | 272 |
| Showing | property | 274 |
| Title | property | 270 |
| IFileDialog | interface | 318 |
| DefaultExt | property | 350 |
| FileName | property | 340 |
| Files | property | 342 |
| Filter | property | 344 |
| FilterIndex | property | 346 |
| InitialDir | property | 348 |
| Kind | property | 338 |
| MultiSelect | property | 352 |
| IMessageDialog | interface | 285 |
| ButtonIndex | property | 303 |
| Buttons | property | 301 |
| Kind | property | 299 |
| Message | property | 297 |
| IPictureDialog | interface | 359 |
| LoadBitmap | function | 362 |
| IWindow | interface | 222 |
| Close | procedure | 232 |
| Fullscreen | property | 236 |
| Scale | property | 238 |
| Title | property | 234 |
| NewBitmapData | variable | 482 |
| NewFileDialog | variable | 486 |
| NewMessageDialog | variable | 484 |
| NewPictureDialog | variable | 488 |
| PictureFilter | constant | 465 |
| PlatformClipboard | variable | 490 |
| PlatformDefaults | procedure | 476 |
| PlatformDispatch | procedure | 470 |
| SystemColorToRGB | variable | 493 |
| TCustomDialog | class | 371 |
| Close | procedure | 383 |
| Execute | procedure | 392 |
| Show | procedure | 381 |
| TCustomFileDialog | class | 419 |
| FDefaultExt | field | 427 |
| FFileName | field | 422 |
| FFiles | field | 423 |
| FFilter | field | 424 |
| FFilterIndex | field | 425 |
| FInitialDir | field | 426 |
| FKind | field | 421 |
| FMultiSelect | field | 428 |
| CloseFiles | procedure | 430 |
| Create | constructor | 433 |
| TCustomMessageDialog | class | 397 |
| FButtonIndex | field | 402 |
| FButtons | field | 401 |
| FKind | field | 400 |
| FMessage | field | 399 |
| CloseButton | procedure | 404 |
| TCustomPictureDialog | class | 455 |
| Create | constructor | 458 |
| LoadBitmap | function | 460 |
| TDialogCloseEvent | procedural | 257 |
| TFileDialogKind | enum | 316 |
| fdOpen | enum value | 316 |
| fdSave | enum value | 316 |
| TMessageKind | enum | 283 |
| mkInformation | enum value | 283 |
| mkWarning | enum value | 283 |
| mkError | enum value | 283 |
| VK_0 | constant | 78 |
| VK_1 | constant | 79 |
| VK_2 | constant | 80 |
| VK_3 | constant | 81 |
| VK_4 | constant | 82 |
| VK_5 | constant | 83 |
| VK_6 | constant | 84 |
| VK_7 | constant | 85 |
| VK_8 | constant | 86 |
| VK_9 | constant | 87 |
| VK_A | constant | 88 |
| VK_ACCEPT | constant | 60 |
| VK_ADD | constant | 129 |
| VK_APPS | constant | 116 |
| VK_B | constant | 89 |
| VK_BACK | constant | 42 |
| VK_C | constant | 90 |
| VK_CANCEL | constant | 38 |
| VK_CAPITAL | constant | 50 |
| VK_CLEAR | constant | 44 |
| VK_CONTROL | constant | 47 |
| VK_CONVERT | constant | 58 |
| VK_D | constant | 91 |
| VK_DECIMAL | constant | 132 |
| VK_DELETE | constant | 76 |
| VK_DIVIDE | constant | 133 |
| VK_DOWN | constant | 70 |
| VK_E | constant | 92 |
| VK_END | constant | 65 |
| VK_ESCAPE | constant | 57 |
| VK_EXECUTE | constant | 73 |
| VK_F | constant | 93 |
| VK_F1 | constant | 134 |
| VK_F10 | constant | 143 |
| VK_F11 | constant | 144 |
| VK_F12 | constant | 145 |
| VK_F2 | constant | 135 |
| VK_F3 | constant | 136 |
| VK_F4 | constant | 137 |
| VK_F5 | constant | 138 |
| VK_F6 | constant | 139 |
| VK_F7 | constant | 140 |
| VK_F8 | constant | 141 |
| VK_F9 | constant | 142 |
| VK_FINAL | constant | 54 |
| VK_G | constant | 94 |
| VK_H | constant | 95 |
| VK_HANGUL | constant | 52 |
| VK_HANJA | constant | 55 |
| VK_HELP | constant | 77 |
| VK_HOME | constant | 66 |
| VK_I | constant | 96 |
| VK_INSERT | constant | 75 |
| VK_J | constant | 97 |
| VK_JUNJA | constant | 53 |
| VK_K | constant | 98 |
| VK_KANA | constant | 51 |
| VK_KANJI | constant | 56 |
| VK_L | constant | 99 |
| VK_LBUTTON | constant | 36 |
| VK_LCONTROL | constant | 150 |
| VK_LEFT | constant | 67 |
| VK_LMENU | constant | 152 |
| VK_LSHIFT | constant | 148 |
| VK_LWIN | constant | 114 |
| VK_M | constant | 100 |
| VK_MBUTTON | constant | 39 |
| VK_MENU | constant | 48 |
| VK_MODECHANGE | constant | 61 |
| VK_MULTIPLY | constant | 128 |
| VK_N | constant | 101 |
| VK_NEXT | constant | 64 |
| VK_NONCONVERT | constant | 59 |
| VK_NUMLOCK | constant | 146 |
| VK_NUMPAD0 | constant | 118 |
| VK_NUMPAD1 | constant | 119 |
| VK_NUMPAD2 | constant | 120 |
| VK_NUMPAD3 | constant | 121 |
| VK_NUMPAD4 | constant | 122 |
| VK_NUMPAD5 | constant | 123 |
| VK_NUMPAD6 | constant | 124 |
| VK_NUMPAD7 | constant | 125 |
| VK_NUMPAD8 | constant | 126 |
| VK_NUMPAD9 | constant | 127 |
| VK_O | constant | 102 |
| VK_OEM_1 | constant | 154 |
| VK_OEM_2 | constant | 159 |
| VK_OEM_3 | constant | 160 |
| VK_OEM_4 | constant | 161 |
| VK_OEM_5 | constant | 162 |
| VK_OEM_6 | constant | 163 |
| VK_OEM_7 | constant | 164 |
| VK_OEM_COMMA | constant | 156 |
| VK_OEM_MINUS | constant | 157 |
| VK_OEM_PERIOD | constant | 158 |
| VK_OEM_PLUS | constant | 155 |
| VK_P | constant | 103 |
| VK_PAUSE | constant | 49 |
| VK_PRINT | constant | 72 |
| VK_PRIOR | constant | 63 |
| VK_Q | constant | 104 |
| VK_R | constant | 105 |
| VK_RBUTTON | constant | 37 |
| VK_RCONTROL | constant | 151 |
| VK_RETURN | constant | 45 |
| VK_RIGHT | constant | 69 |
| VK_RMENU | constant | 153 |
| VK_RSHIFT | constant | 149 |
| VK_RWIN | constant | 115 |
| VK_S | constant | 106 |
| VK_SCROLL | constant | 147 |
| VK_SELECT | constant | 71 |
| VK_SEPARATOR | constant | 130 |
| VK_SHIFT | constant | 46 |
| VK_SLEEP | constant | 117 |
| VK_SNAPSHOT | constant | 74 |
| VK_SPACE | constant | 62 |
| VK_SUBTRACT | constant | 131 |
| VK_T | constant | 107 |
| VK_TAB | constant | 43 |
| VK_U | constant | 108 |
| VK_UP | constant | 68 |
| VK_V | constant | 109 |
| VK_W | constant | 110 |
| VK_X | constant | 111 |
| VK_XBUTTON1 | constant | 40 |
| VK_XBUTTON2 | constant | 41 |
| VK_Y | constant | 112 |
| VK_Z | constant | 113 |