Reference Codebot.Terminal.Controls.pas
Part of the Codebot Terminal package
The Codebot.Terminal.Controls unit gives you TTerminal, a terminal emulator control that runs the user's shell inside your form using VTE, the library of the GNOME terminal.
The shell starts the first time the control is shown. OnReady tells you when the shell has written its prompt, and OnTerminate tells you when it ends, such as when the user types exit. If you want the terminal to keep going, call Restart from OnTerminate to clear the terminal and start a new shell. HasTerminal tells you whether the control is showing a running terminal.
You can choose the font of the terminal, whether it shows a vertical scroll bar, and its colors through TTerminalColors. The colors cover the text, background, bold and dim text, cursor, and selection, along with Palette, which chooses the sixteen numbered colors programs such as ls ask for. By default the terminal shows silver text on black using the Tango palette of the GNOME terminal. Dim is not used with GTK3, and Cursor, Highlight, and HighlightText are not used with GTK2, where a selection swaps the text and background colors.
While you are designing your form there is no running terminal, so the control draws a prompt and a cursor in its colors and font instead.
The package only builds with the GTK2 and GTK3 widgetsets, and TerminalAvailable always returns True.
Items 79 items
| Name | Kind | Line |
|---|---|---|
| TCustomTerminal | class | 77 |
| Create | constructor | 116 |
| Destroy | destructor | 117 |
| DestroyWnd | procedure | 95 |
| DoReady | procedure | 103 |
| DoTerminate | procedure | 105 |
| FontChanged | procedure | 96 |
| HasTerminal | function | 119 |
| InitializeWnd | procedure | 94 |
| Paint | procedure | 99 |
| PaintWindow | procedure | 97 |
| Restart | procedure | 121 |
| WSRegisterClass | procedure | 93 |
| Colors | property | 107 |
| ControlCanvas | property | 101 |
| OnReady | property | 112 |
| OnTerminate | property | 114 |
| ScrollBar | property | 110 |
| TerminalAvailable | function | 177 |
| TTerminal | class | 126 |
| Align | property | 128 |
| Anchors | property | 129 |
| BorderSpacing | property | 130 |
| Colors | property | 131 |
| Constraints | property | 132 |
| DockSite | property | 133 |
| DragCursor | property | 134 |
| DragKind | property | 135 |
| DragMode | property | 136 |
| Enabled | property | 137 |
| Font | property | 138 |
| OnClick | property | 147 |
| OnContextPopup | property | 148 |
| OnDblClick | property | 151 |
| OnDockDrop | property | 149 |
| OnDockOver | property | 150 |
| OnDragDrop | property | 152 |
| OnDragOver | property | 153 |
| OnEndDock | property | 154 |
| OnEndDrag | property | 155 |
| OnEnter | property | 156 |
| OnExit | property | 157 |
| OnGetDockCaption | property | 159 |
| OnGetSiteInfo | property | 158 |
| OnMouseDown | property | 160 |
| OnMouseEnter | property | 161 |
| OnMouseLeave | property | 162 |
| OnMouseMove | property | 163 |
| OnMouseUp | property | 164 |
| OnMouseWheel | property | 165 |
| OnMouseWheelDown | property | 166 |
| OnMouseWheelUp | property | 167 |
| OnReady | property | 168 |
| OnResize | property | 169 |
| OnStartDock | property | 170 |
| OnStartDrag | property | 171 |
| OnTerminate | property | 173 |
| OnUnDock | property | 172 |
| ParentShowHint | property | 139 |
| PopupMenu | property | 140 |
| ScrollBar | property | 141 |
| ShowHint | property | 142 |
| TabOrder | property | 143 |
| TabStop | property | 144 |
| UseDockManager | property | 145 |
| Visible | property | 146 |
| TTerminalColors | class | 42 |
| Assign | procedure | 57 |
| Change | procedure | 52 |
| Create | constructor | 56 |
| Background | property | 62 |
| Bold | property | 63 |
| Cursor | property | 65 |
| Dim | property | 64 |
| Foreground | property | 61 |
| Highlight | property | 66 |
| HighlightText | property | 67 |
| OnChange | property | 59 |
| Palette | property | 68 |