![]() |
CRM64Pro GDK v0.17.0
A free cross-platform game development kit built on top of SDL 3.0
|
GUI Manager for panels, consoles and debug windows [v26.05.0].
The GUI module provides the engine-managed runtime GUI layer through the GUI Manager. It handles three object families: Panels (widget containers), Consoles (interactive command-line overlays) and Debug Windows (runtime variable monitors). Panels can optionally arrange their child widgets using horizontal or vertical flow layout while preserving their behavioral type (modeless, modal or ephemeral). GUI objects are attached to screens, support multi-screen configurations, and can be saved and loaded through the CDC GUI format. Widget lifecycle is split into visibility (show() / hide()) and interactivity (enable() / disable()), so controls can remain visible while disabled.
See Widget module for skin properties, feature flags, callbacks, state machine and update protocol.
| Panel | Container for widgets. Supports modeless, modal and time-to-live (TTL) ephemeral behavior. Panels are ref-counted: loading a panel whose name already exists returns the existing panel and increments its reference count. Optional flow layout for automatic child arrangement. |
|---|---|
| Console | Command-line interface with prompt, UTF-8 cursor navigation, command history, TAB auto-complete and custom command registration. Captures SDL text input focus while allowing other GUI interactions. Read-only mode available. |
| DebugWindow | Variable watch window for monitoring Sint32* and float* pointers in real-time. Configurable refresh interval. add/removeWatch fail gracefully when the window is disabled. |
Render pass order, from bottom to top:
| 1. Panels | Rendered back-to-front by focus vector (vPanelID). Open ComboBox popups are rendered in a second panel pass above normal panel widgets. |
|---|---|
| 2. Tooltip | Manager-owned overlay drawn above panels but below DebugWindows and Consoles. Uses the active theme shared tooltip style, optionally overridden per widget. |
| 3. DebugWindows | Rendered on top of panels and tooltips. Drag-drop capable. |
| 4. Consoles | Always on top of panels, tooltips and debug windows. |
Input/update priority is processed from topmost interactive overlays down to panels:
| 1. DebugWindows | Checked first so overlay activity can block drag/drop and lower GUI layers. |
|---|---|
| 2. Consoles | Checked before panels so text input focus and overlay activity can prevent panel interaction underneath. |
| 3. Panels | Front panel receives events first. Modal panels can block lower panels. |
| 4. Tooltip State | Resolved after object updates so tooltip ownership uses the final hover/focus state for the frame. |
Panels can automatically arrange their child widgets using a one-dimensional flow layout. The layout is selected via setLayout() and configured with setLayoutSpacing(), setLayoutPadding(), setLayoutJustify() and setLayoutAlign(). The layout re-runs (reflow()) whenever the internal dirty flag is raised: on widget creation, widget removal, widget resize, widget show/hide, panel show, and explicit invalidateLayout() calls. Widget positions under a flow layout are set by calling Widget::setPosition() with absolute pixel coordinates computed by the reflow pass.
| PL_NONE | No layout. Widgets are positioned manually. Default. |
|---|---|
| PL_HFLOW | Horizontal flow. Widgets are placed left-to-right. Main axis is X, cross axis is Y. |
| PL_VFLOW | Vertical flow. Widgets are placed top-to-bottom. Main axis is Y, cross axis is X. |
Layout justify options (eLayoutJustify) - main axis distribution
| LJ_START | Widgets packed to the start of the main axis (after padding). Default. |
|---|---|
| LJ_CENTER | Widgets centered along the main axis. If total widget size exceeds the inner dimension the cursor may go negative; widgets are silently clamped by WF_ENCLOSE. |
| LJ_END | Widgets packed to the end of the main axis. Same overflow clamp caveat as LJ_CENTER. |
| LJ_SPACE | Spacing is distributed evenly between widgets. With a single visible widget, spacing is the configured iLayoutSpacing value. |
Layout align options (eLayoutAlign) - cross axis positioning
| LA_START | Widgets aligned to the start of the cross axis (after cross padding). |
|---|---|
| LA_CENTER | Widgets centered along the cross axis. Default. |
| LA_END | Widgets aligned to the end of the cross axis. |
| LA_STRETCH | Widget cross-axis size is expanded to fill the available inner cross dimension. setSize() is called on each widget during reflow. |
| Command registration | addCmdHandler() registers user commands with a name, help text and callback. The command name must be unique and cannot be "help". |
|---|---|
| Built-in commands | 'help', 'con', 'dw' and 'cur' are always available. Parameters for auto-complete are registered internally via setCmdParams(). |
| Command history | Up/Down arrow keys recall and cycle previously executed commands. |
| TAB auto-complete | Single match: completes immediately. Multiple matches: prints list and expands to the common prefix. Repeated TAB cycles through matches. |
| Input focus | Captures SDL_EVENT_TEXT_INPUT, blocking it from reaching panels below. Read-only mode disables text input and command execution while keeping the console visible. |
| Clipboard | Ctrl+C copies the current prompt line. Ctrl+V pastes at the current cursor position. |
| Variable watch | addWatch() accepts a display name, an optional Sint32* and an optional float*. At least one pointer must be non-null. Watch names must be unique. |
|---|---|
| Refresh interval | setRefreshInterval() configures the update period in milliseconds. Default is 500 ms. The timer is driven by an explicit init flag (bRefreshTimerInit) rather than a zero-sentinel to avoid edge cases at startup. |
| Named watches | Each watch has a display name shown before its values. Format: "name integer float" or "name integer" or "name float" depending on which pointers are set. |
| Disabled guard | addWatch() and removeWatch() return -1 immediately when the DebugWindow base widget is in GS_DISABLED state. |
| Panel | Shared-name management: loading a CDC block whose panel name already exists returns the existing panel and increments its reference count. close() decrements the count and destroys the panel only when it reaches zero. |
|---|---|
| Console | Standard manager: names must be unique. The first console created (GUICONSOLE_SIGNATURE) is the default console and cannot be closed or disabled. |
| DebugWindow | Standard manager: names must be unique. |
Tooltips are driven by widget text assigned through Widget::setTooltip(). The GUI manager shows them after GUI_TOOLTIP_DELAY_MS (1000 ms) of stable hover, with a fade-in over GUI_TOOLTIP_FADEIN_MS (500 ms). Tooltip visuals use the active theme's shared tooltip style, unless the hovered widget overrides tooltip background, border or font locally. The tooltip is positioned near the cursor with GUI_TOOLTIP_OFFSET_X / GUI_TOOLTIP_OFFSET_Y and clamped to the screen bounds. Per-widget TTL is read from Widget::getTooltipTTL(); the widget default is WIDGET_TOOLTIP_DEFAULT_TTL_MS = 0, meaning the tooltip stays visible while the hover is valid. GUI_TOOLTIP_TTL_MS is only the manager's bootstrap/fallback value used before a concrete widget owner is latched. After a tooltip expires, it will not show again for the same widget until the pointer leaves and re-hovers. Tooltip display is dismissed early by keyboard input, text input events, mouse button press or mouse wheel while a tooltip is visible. Mouse button release is intentionally ignored because the press already represents the user intent to dismiss.
GUI themes define procedural widget styling per widget type and widget state. Built-in themes are available immediately through GUIMgr::getThemeDefault(), GUIMgr::getThemeDark() and GUIMgr::getThemeFlat(). Theme resolution order for any skin property: widget override, then panel theme override, then global theme, then built-in Default theme. A typical workflow is:
To customize a theme:
Custom themes created via createTheme() are pre-filled from the Default theme. Theme entries are inspected through GUITheme::getSkin() and modified through the explicit GUITheme::setSkin...() methods. Built-in fonts should use the full "@c64/font/..." name in GUIThemeSkin::sFontName to avoid name collisions with user-loaded fonts. Theme font resolution first checks FontMgr::getBuiltin(), then FontMgr::get() by name.
Classes | |
| class | CRM64Pro::Panel |
| Panel Object class. More... | |
| class | CRM64Pro::Console |
| Console Object class. More... | |
| class | CRM64Pro::DebugWindow |
| DebugWindow Object class. More... | |
| class | CRM64Pro::GUIMgr |
| GUI Manager class. More... | |
Macros | |
| #define | GUI_PANEL 0x42000000 |
| #define | GUI_CONSOLE 0x44000000 |
| #define | GUI_DEBUGWINDOW 0x48000000 |
Enumerations | |
| enum | CRM64Pro::ePanelType { CRM64Pro::PT_RETRIEVE = -1 , CRM64Pro::PT_MODELESS = 0 , CRM64Pro::PT_MODAL = 1 , CRM64Pro::PT_EPHEMERAL = 2 } |
| Panel Type. More... | |
| enum | CRM64Pro::ePanelSizeMode { CRM64Pro::PSM_MANUAL = 0 , CRM64Pro::PSM_SCREEN = 1 } |
| Panel size mode. More... | |
| enum | CRM64Pro::ePanelLayout : Uint32 { CRM64Pro::PL_NONE = 0 , CRM64Pro::PL_HFLOW = 1 , CRM64Pro::PL_VFLOW = 2 } |
| Panel layout flags. More... | |
| enum | CRM64Pro::eLayoutJustify |
| Flow layout distribution along the main axis. | |
| enum | CRM64Pro::eLayoutAlign |
| Flow layout alignment on the cross axis. | |
Functions | |
| bool | CRM64Pro::GUIMgr::info (Sint32 iMode=0) override |
| Request GUI Manager information. | |
| Sint32 | CRM64Pro::GUIMgr::create (const string &sName, Uint32 iType=GUI_PANEL) override |
| Creates a new GUI object. | |
| bool | CRM64Pro::GUIMgr::close (Sint32 idGUI) override |
| Close and destroy a GUI object. | |
| Sint32 | CRM64Pro::GUIMgr::getCount () const override |
| Get number of loaded objects. | |
| Sint32 | CRM64Pro::GUIMgr::setName (Sint32 idGUI, const string &sName) override |
| Change the object name. | |
| Panel * | CRM64Pro::GUIMgr::getPanel (Sint32 idGUI=0) |
| Get a pointer to a Panel using its handler. | |
| Sint32 | CRM64Pro::GUIMgr::getPanelFocus () const |
| Get the GUI Panel id with the focus. | |
| Sint32 | CRM64Pro::GUIMgr::setPanelFocus (Sint32 idGUI) |
| Set the focus on the given GUI Panel id. | |
| Console * | CRM64Pro::GUIMgr::getConsole (Sint32 idGUI=GUI_CONSOLE) |
| Get a pointer to a Console using its handler. | |
| DebugWindow * | CRM64Pro::GUIMgr::getDebugWindow (Sint32 idGUI=0) |
| Get a pointer to a DebugWindow using its handler. | |
| Sint32 | CRM64Pro::GUIMgr::load (const string &sCDCFile, const string &sName) |
| Load a panel and its widgets stored in a CDC file. | |
| Sint32 | CRM64Pro::GUIMgr::load (const Sint32 idCDC, const string &sName) |
| Load a panel and its widgets stored in a CDC file. | |
| Sint32 | CRM64Pro::GUIMgr::remove (Sint32 idCDC, const string &sName) |
| Remove a panel and its widgets stored in a CDC file. | |
| Sint32 | CRM64Pro::GUIMgr::getIconInfo () const |
| Get the built-in info icon. | |
| Sint32 | CRM64Pro::GUIMgr::getIconWarning () const |
| Get the built-in warning icon. | |
| Sint32 | CRM64Pro::GUIMgr::getIconQuestion () const |
| Get the built-in question icon. | |
| Sint32 | CRM64Pro::GUIMgr::getIconError () const |
| Get the built-in error icon. | |
| Sint32 | CRM64Pro::GUIMgr::createTheme (const string &sName) |
| Create a new custom theme initialized from the built-in Default theme. | |
| GUITheme * | CRM64Pro::GUIMgr::getTheme (Sint32 idTheme) |
| Get a theme by id. | |
| Sint32 | CRM64Pro::GUIMgr::setGlobalTheme (Sint32 idTheme) |
| Set the active global theme. | |
| Sint32 | CRM64Pro::GUIMgr::getGlobalTheme () const |
| Get the active global theme id. | |
| bool | CRM64Pro::GUIMgr::closeTheme (Sint32 idTheme) |
| Close and destroy a custom theme. | |
| Sint32 | CRM64Pro::GUIMgr::getThemeDefault () const |
| Get the built-in Default theme id. | |
| Sint32 | CRM64Pro::GUIMgr::getThemeDark () const |
| Get the built-in Dark theme id. | |
| Sint32 | CRM64Pro::GUIMgr::getThemeFlat () const |
| Get the built-in Flat theme id. | |
| bool | CRM64Pro::Console::info (Sint32 iMode=0) override |
| Request Console information. | |
| const string & | CRM64Pro::Console::getName () const override |
| Get the name. | |
| Uint32 | CRM64Pro::Console::getID () const override |
| Get the ID. | |
| Widget & | CRM64Pro::Console::baseWidget () |
| Get the reference to base Widget for this object. | |
| Sint32 | CRM64Pro::Console::attachTo (Sint32 idScreen) |
| Attach this console to a screen. | |
| Sint32 | CRM64Pro::Console::getScreen () const |
| Return the screen id where this console is attached to. | |
| Sint32 | CRM64Pro::Console::print (const char *format,...) |
| Print a formatted message to the console. | |
| Sint32 | CRM64Pro::Console::vPrint (const char *format, va_list args) |
| Print a formatted message to the console. | |
| Sint32 | CRM64Pro::Console::addCmdHandler (const string &sCommandName, const string &sCommandHelp, Sint32(*cmdFunc)(vector< string > *, Console *pCon)) |
| Add a new command handler to the console. | |
| Sint32 | CRM64Pro::Console::executeCmd (const string &sCmd) |
| Execute a command on this console. | |
| Sint32 | CRM64Pro::Console::setReadOnly (bool bEnable=true) |
| Enable or disable read-only mode for the console prompt. | |
| bool | CRM64Pro::Console::isReadOnly () const |
| Check whether the console prompt is in read-only mode. | |
| bool | CRM64Pro::DebugWindow::info (Sint32 iMode=0) override |
| Request DebugWindow information. | |
| const string & | CRM64Pro::DebugWindow::getName () const override |
| Get the name. | |
| Uint32 | CRM64Pro::DebugWindow::getID () const override |
| Get the ID. | |
| Widget & | CRM64Pro::DebugWindow::baseWidget () |
| Get the reference to base Widget for this object. | |
| Sint32 | CRM64Pro::DebugWindow::addWatch (const string &sName, Sint32 *iIntegerVar, float *fFloatVar=nullptr) |
| Add a watch. | |
| Sint32 | CRM64Pro::DebugWindow::removeWatch (const string &sName) |
| Remove a watch. | |
| Sint32 | CRM64Pro::DebugWindow::attachTo (Sint32 idScreen) |
| Attach this debugwindow to a screen. | |
| Sint32 | CRM64Pro::DebugWindow::getScreen () const |
| Return the screen id where this debugwindow is attached to. | |
| Sint32 | CRM64Pro::DebugWindow::setRefreshInterval (Sint32 iRefresh) |
| Set the refresh interval. | |
| Sint32 | CRM64Pro::DebugWindow::getRefreshInterval () const |
| Get the refresh interval. | |
| bool | CRM64Pro::Panel::info (Sint32 iMode=0) override |
| Request Panel information. | |
| const string & | CRM64Pro::Panel::getName () const override |
| Get the name. | |
| Uint32 | CRM64Pro::Panel::getID () const override |
| Get the ID. | |
| Widget & | CRM64Pro::Panel::baseWidget () |
| Get the reference to base Widget for this object. | |
| Sint32 | CRM64Pro::Panel::setTitle (const string &sText, const Position &posX=Position(PH_CENTER), const Position &posY=Position(PH_CENTER)) |
| Set the panel title text. | |
| Sint32 | CRM64Pro::Panel::getTitle (string &sText) const |
| Get the panel title text. | |
| Sint32 | CRM64Pro::Panel::attachTo (Sint32 idScreen) |
| Attach this panel to a screen. | |
| Sint32 | CRM64Pro::Panel::setScreenDesired (Sint32 iScreenDesired) |
| Set the desired screen index persisted for this panel. | |
| Sint32 | CRM64Pro::Panel::getScreen () const |
| Return the screen id where this panel is attached to. | |
| Sint32 | CRM64Pro::Panel::getScreenDesired () const |
| Return the desired screen index persisted for this panel. | |
| Sint32 | CRM64Pro::Panel::setTheme (Sint32 idTheme) |
| Set the panel theme. | |
| Sint32 | CRM64Pro::Panel::getTheme () const |
| Get the panel theme. | |
| Widget * | CRM64Pro::Panel::createWidgetByType (const string &sName, eWidgetType eWT, Sint32 iWID) |
| Create a widget by runtime type. | |
| eWidgetType | CRM64Pro::Panel::getWidgetType (Sint32 iWID) const |
| Return the type of a widget using its ID. | |
| Widget * | CRM64Pro::Panel::getWidgetByID (Sint32 iWID) |
| Get a pointer to a Widget using its ID. | |
| Sint32 | CRM64Pro::Panel::setWidgetName (Sint32 iWID, const string &sName) |
| Rename an owned widget. | |
| WidgetLabel * | CRM64Pro::Panel::createLabel (const string &sName, Sint32 iWID) |
| Create a Label widget and return its typed pointer. | |
| WidgetImage * | CRM64Pro::Panel::createImage (const string &sName, Sint32 iWID) |
| Create an Image widget and return its typed pointer. | |
| WidgetFrame * | CRM64Pro::Panel::createFrame (const string &sName, Sint32 iWID) |
| Create a Frame widget and return its typed pointer. | |
| WidgetButton * | CRM64Pro::Panel::createButton (const string &sName, Sint32 iWID) |
| Create a Button widget and return its typed pointer. | |
| WidgetCheckBox * | CRM64Pro::Panel::createCheckBox (const string &sName, Sint32 iWID) |
| Create a CheckBox widget and return its typed pointer. | |
| WidgetProgress * | CRM64Pro::Panel::createProgress (const string &sName, Sint32 iWID) |
| Create a Progress widget and return its typed pointer. | |
| WidgetSlider * | CRM64Pro::Panel::createSlider (const string &sName, Sint32 iWID, eSliderAxis eAxis=SA_HORIZONTAL) |
| Create a Slider widget and return its typed pointer. | |
| WidgetTextEdit * | CRM64Pro::Panel::createTextEdit (const string &sName, Sint32 iWID) |
| Create a TextEdit widget and return its typed pointer. | |
| WidgetList * | CRM64Pro::Panel::createList (const string &sName, Sint32 iWID) |
| Create a List widget and return its typed pointer. | |
| WidgetComboBox * | CRM64Pro::Panel::createComboBox (const string &sName, Sint32 iWID) |
| Create a ComboBox widget and return its typed pointer. | |
| WidgetNumberEdit * | CRM64Pro::Panel::createNumberEdit (const string &sName, Sint32 iWID) |
| Create a NumberEdit widget and return its typed pointer. | |
| WidgetLabel * | CRM64Pro::Panel::getLabel (Sint32 iWID) |
| Get a typed Label widget using its ID. | |
| WidgetImage * | CRM64Pro::Panel::getImage (Sint32 iWID) |
| Get a typed Image widget using its ID. | |
| WidgetFrame * | CRM64Pro::Panel::getFrame (Sint32 iWID) |
| Get a typed Frame widget using its ID. | |
| WidgetButton * | CRM64Pro::Panel::getButton (Sint32 iWID) |
| Get a typed Button widget using its ID. | |
| WidgetCheckBox * | CRM64Pro::Panel::getCheckBox (Sint32 iWID) |
| Get a typed CheckBox widget using its ID. | |
| WidgetProgress * | CRM64Pro::Panel::getProgress (Sint32 iWID) |
| Get a typed Progress widget using its ID. | |
| WidgetSlider * | CRM64Pro::Panel::getSlider (Sint32 iWID) |
| Get a typed Slider widget using its ID. | |
| WidgetTextEdit * | CRM64Pro::Panel::getTextEdit (Sint32 iWID) |
| Get a typed TextEdit widget using its ID. | |
| WidgetList * | CRM64Pro::Panel::getList (Sint32 iWID) |
| Get a typed List widget using its ID. | |
| WidgetComboBox * | CRM64Pro::Panel::getComboBox (Sint32 iWID) |
| Get a typed ComboBox widget using its ID. | |
| WidgetNumberEdit * | CRM64Pro::Panel::getNumberEdit (Sint32 iWID) |
| Get a typed NumberEdit widget using its ID. | |
| void | CRM64Pro::Panel::getWidgetInfoList (vector< sWidgetInfo > &vOut) const |
| Fill widget metadata of this panel. | |
| Sint32 | CRM64Pro::Panel::closeWidget (Sint32 iWID) |
| Close and destroy a Widget. | |
| Sint32 | CRM64Pro::Panel::setPanelType (ePanelType ePT, Sint32 iTime=0) |
| Set the panel type. | |
| ePanelType | CRM64Pro::Panel::getPanelType () const |
| Get the panel type. | |
| Sint32 | CRM64Pro::Panel::getPanelTTL () const |
| Get the panel time to live. | |
| Sint32 | CRM64Pro::Panel::setSizeMode (ePanelSizeMode ePSM) |
| Set the panel size mode. | |
| ePanelSizeMode | CRM64Pro::Panel::getSizeMode () const |
| Get the panel size mode. | |
| Sint32 | CRM64Pro::Panel::setLayout (ePanelLayout ePL) |
| Set the panel child layout mode. | |
| ePanelLayout | CRM64Pro::Panel::getLayout () const |
| Get the panel child layout mode. | |
| Sint32 | CRM64Pro::Panel::setLayoutSpacing (Sint32 iSpacing) |
| Set spacing between child widgets in flow layouts. | |
| Sint32 | CRM64Pro::Panel::setLayoutPadding (Sint32 iTop, Sint32 iRight, Sint32 iBottom, Sint32 iLeft) |
| Set padding inside the panel base widget for flow layouts. | |
| Sint32 | CRM64Pro::Panel::setLayoutJustify (eLayoutJustify eJustify) |
| Set flow-layout distribution along the main axis. | |
| eLayoutJustify | CRM64Pro::Panel::getLayoutJustify () const |
| Get flow-layout distribution along the main axis. | |
| Sint32 | CRM64Pro::Panel::setLayoutAlign (eLayoutAlign eAlign) |
| Set flow-layout alignment along the cross axis. | |
| eLayoutAlign | CRM64Pro::Panel::getLayoutAlign () const |
| Get flow-layout alignment along the cross axis. | |
| void | CRM64Pro::Panel::invalidateLayout () |
| Mark the flow layout dirty so child positions are recomputed on the next update/render pass. | |
| Sint32 | CRM64Pro::Panel::save (const string &sCDCFile) |
| Save the panel and all its widgets to a CDC file. | |
| Sint32 | CRM64Pro::Panel::save (const Sint32 idCDC) |
| Save the panel and all its widgets to a CDC file. | |
| #define GUI_PANEL 0x42000000 |
GUI Object: Panel.
| #define GUI_CONSOLE 0x44000000 |
GUI Object: Console.
| #define GUI_DEBUGWINDOW 0x48000000 |
GUI Object: DebugWindow.
| enum CRM64Pro::ePanelType |
Panel Type.
| Enumerator | |
|---|---|
| PT_RETRIEVE | Legacy internal sentinel. Use Panel::getPanelType() in public code. |
| PT_MODELESS | Modeless panel. When it gets the focus, it does not block the input for others panels. |
| PT_MODAL | Modal panel. When it gets the focus, it blocks the input for others panels on the same screen. |
| PT_EPHEMERAL | Ephemeral and modeless panel. Its lasts the given time duration. |
| enum CRM64Pro::ePanelLayout : Uint32 |
Panel layout flags.
| Enumerator | |
|---|---|
| PL_NONE | Manual child positioning. |
| PL_HFLOW | Arrange visible child widgets left to right. |
| PL_VFLOW | Arrange visible child widgets top to bottom. |
|
override |
Request GUI Manager information.
Writes information to the default log.
| iMode | -1 for manager information only. 0 (default) for manager information plus all GUI objects. A positive GUI id for manager information plus that specific GUI object. |
|
override |
Creates a new GUI object.
| sName | The name for the GUI object (e.g. 'myPanel'). Must be unique and max 64 characters (truncated if longer). |
| iType | GUI Object type (GUI_PANEL, GUI_CONSOLE or GUI_DEBUGWINDOW) OR'ed with version (10 = v1.0, only version supported). Default is GUI_PANEL with v1.0. |
|
override |
Close and destroy a GUI object.
| idGUI | 0 for closing all GUI objects or a specific GUI id. The default console cannot be removed. Shared Panel ids are not removed until the last owner calls this method. |
|
override |
Get number of loaded objects.
|
override |
Change the object name.
| idGUI | GUI id. Can be a Panel, Console or DebugWindow. |
| sName | The name to give to the object (e.g. 'myPanel'). Must be unique and max 64 characters (truncated if longer). |
| Panel * CRM64Pro::GUIMgr::getPanel | ( | Sint32 | idGUI = 0 | ) |
| Sint32 CRM64Pro::GUIMgr::getPanelFocus | ( | ) | const |
Get the GUI Panel id with the focus.
| Sint32 CRM64Pro::GUIMgr::setPanelFocus | ( | Sint32 | idGUI | ) |
| Console * CRM64Pro::GUIMgr::getConsole | ( | Sint32 | idGUI = GUI_CONSOLE | ) |
| DebugWindow * CRM64Pro::GUIMgr::getDebugWindow | ( | Sint32 | idGUI = 0 | ) |
Get a pointer to a DebugWindow using its handler.
| idGUI | DebugWindow GUI id. |
| Sint32 CRM64Pro::GUIMgr::load | ( | const string & | sCDCFile, |
| const string & | sName ) |
Load a panel and its widgets stored in a CDC file.
The GUI Manager can share Panel ids based on name, checking if already loaded before creating new ones.
| sCDCFile | string containing [directory]+filename. Directory separators '\' and '/' are supported. |
| sName | string with the panel name (max 64 characters). |
| Sint32 CRM64Pro::GUIMgr::load | ( | const Sint32 | idCDC, |
| const string & | sName ) |
Load a panel and its widgets stored in a CDC file.
The GUI Manager has the ability of sharing Panel ids based on the name as the key, so before trying to load a new one, it checks if it is already loaded for sharing it.
| idCDC | CDC id. |
| sName | string with the panel name (maximum size of 64 characters). |
| Sint32 CRM64Pro::GUIMgr::remove | ( | Sint32 | idCDC, |
| const string & | sName ) |
Remove a panel and its widgets stored in a CDC file.
| idCDC | CDC id. |
| sName | string with the panel name (max 64 characters). |
| Sint32 CRM64Pro::GUIMgr::getIconInfo | ( | ) | const |
Get the built-in info icon.
| Sint32 CRM64Pro::GUIMgr::getIconWarning | ( | ) | const |
Get the built-in warning icon.
| Sint32 CRM64Pro::GUIMgr::getIconQuestion | ( | ) | const |
Get the built-in question icon.
| Sint32 CRM64Pro::GUIMgr::getIconError | ( | ) | const |
Get the built-in error icon.
| Sint32 CRM64Pro::GUIMgr::createTheme | ( | const string & | sName | ) |
Create a new custom theme initialized from the built-in Default theme.
| sName | Theme name. Must be unique and max 64 characters (truncated if longer). |
| GUITheme * CRM64Pro::GUIMgr::getTheme | ( | Sint32 | idTheme | ) |
Get a theme by id.
| idTheme | Theme id. |
| Sint32 CRM64Pro::GUIMgr::setGlobalTheme | ( | Sint32 | idTheme | ) |
Set the active global theme.
| idTheme | Theme id. Use -1 to restore the built-in Default theme. |
| Sint32 CRM64Pro::GUIMgr::getGlobalTheme | ( | ) | const |
Get the active global theme id.
| bool CRM64Pro::GUIMgr::closeTheme | ( | Sint32 | idTheme | ) |
Close and destroy a custom theme.
| idTheme | Theme id. |
| Sint32 CRM64Pro::GUIMgr::getThemeDefault | ( | ) | const |
Get the built-in Default theme id.
| Sint32 CRM64Pro::GUIMgr::getThemeDark | ( | ) | const |
Get the built-in Dark theme id.
| Sint32 CRM64Pro::GUIMgr::getThemeFlat | ( | ) | const |
Get the built-in Flat theme id.
|
override |
Request Console information.
Writes information to the default log.
| iMode | currently ignored. The method always prints full console information, including the command list and base widget state. |
|
override |
Get the name.
|
override |
Get the ID.
| Widget & CRM64Pro::Console::baseWidget | ( | ) |
| Sint32 CRM64Pro::Console::attachTo | ( | Sint32 | idScreen | ) |
Attach this console to a screen.
| idScreen | a valid screen handle. Default is the default screen (0). |
| Sint32 CRM64Pro::Console::getScreen | ( | ) | const |
Return the screen id where this console is attached to.
| Sint32 CRM64Pro::Console::print | ( | const char * | format, |
| ... ) |
Print a formatted message to the console.
| format | format control, same as printf() function. |
| ... | optional arguments, same as printf() function. |
| Sint32 CRM64Pro::Console::vPrint | ( | const char * | format, |
| va_list | args ) |
Print a formatted message to the console.
| format | format control, same as printf() function. |
| args | pointer to list of arguments, same as vprintf() function. |
| Sint32 CRM64Pro::Console::addCmdHandler | ( | const string & | sCommandName, |
| const string & | sCommandHelp, | ||
| Sint32(* | cmdFunc )(vector< string > *, Console *pCon) ) |
Add a new command handler to the console.
| sCommandName | string with the command name (must be unique). Reserved commands: 'con' (Console control), 'dw' (Debug Window control), 'help' (List all commands). |
| sCommandHelp | string with a brief command description. |
| cmdFunc | pointer to the function handler. The vector<string>* parameter contains the tokenized command and Console* is the calling console. Must return 0 on success or negative on error. |
| Sint32 CRM64Pro::Console::executeCmd | ( | const string & | sCmd | ) |
Execute a command on this console.
| sCmd | string with the command plus arguments to be executed by this console. |
| Sint32 CRM64Pro::Console::setReadOnly | ( | bool | bEnable = true | ) |
Enable or disable read-only mode for the console prompt.
In read-only mode the console remains visible and can still print output, but prompt editing and command execution are blocked.
| bEnable | true to enable read-only mode, false to allow prompt input again. |
| bool CRM64Pro::Console::isReadOnly | ( | ) | const |
Check whether the console prompt is in read-only mode.
|
override |
Request DebugWindow information.
Writes information to the default log.
| iMode | currently ignored. The method always prints full debug-window information, including watch count, refresh interval and base widget state. |
|
override |
Get the name.
|
override |
Get the ID.
| Widget & CRM64Pro::DebugWindow::baseWidget | ( | ) |
| Sint32 CRM64Pro::DebugWindow::addWatch | ( | const string & | sName, |
| Sint32 * | iIntegerVar, | ||
| float * | fFloatVar = nullptr ) |
Add a watch.
| sName | watch name. Must be unique. |
| iIntegerVar | a pointer to an integer variable to be associated to this watch. nullptr for doing nothing. |
| fFloatVar | a pointer to a float variable to be associated to this watch. nullptr for doing nothing. |
| Sint32 CRM64Pro::DebugWindow::removeWatch | ( | const string & | sName | ) |
Remove a watch.
| sName | watch name. |
| Sint32 CRM64Pro::DebugWindow::attachTo | ( | Sint32 | idScreen | ) |
Attach this debugwindow to a screen.
| idScreen | a valid screen handle. Default is the default screen (0). |
| Sint32 CRM64Pro::DebugWindow::getScreen | ( | ) | const |
Return the screen id where this debugwindow is attached to.
| Sint32 CRM64Pro::DebugWindow::setRefreshInterval | ( | Sint32 | iRefresh | ) |
Set the refresh interval.
| iRefresh | time interval in milliseconds for refreshing the value of the watches. By default it is set to 500ms. |
| Sint32 CRM64Pro::DebugWindow::getRefreshInterval | ( | ) | const |
Get the refresh interval.
|
override |
Request Panel information.
Writes information to the default log.
| iMode | currently ignored. The method always prints full panel information, including the base widget and all owned widgets. |
|
override |
Get the name.
|
override |
Get the ID.
| Widget & CRM64Pro::Panel::baseWidget | ( | ) |
Get the reference to base Widget for this object.
| Sint32 CRM64Pro::Panel::setTitle | ( | const string & | sText, |
| const Position & | posX = Position(PH_CENTER), | ||
| const Position & | posY = Position(PH_CENTER) ) |
Set the panel title text.
| sText | Title text to show in the base widget. |
| posX | Title X position. Default is PH_CENTER. |
| posY | Title Y position. Default is PH_CENTER. |
| Sint32 CRM64Pro::Panel::getTitle | ( | string & | sText | ) | const |
Get the panel title text.
| sText | String reference receiving the current title. |
| Sint32 CRM64Pro::Panel::attachTo | ( | Sint32 | idScreen | ) |
Attach this panel to a screen.
| idScreen | a valid screen handle. Default is the default screen (0). |
| Sint32 CRM64Pro::Panel::setScreenDesired | ( | Sint32 | iScreenDesired | ) |
Set the desired screen index persisted for this panel.
| iScreenDesired | desired screen index. Values below 0 are clamped to 0. |
| Sint32 CRM64Pro::Panel::getScreen | ( | ) | const |
Return the screen id where this panel is attached to.
| Sint32 CRM64Pro::Panel::getScreenDesired | ( | ) | const |
Return the desired screen index persisted for this panel.
| Sint32 CRM64Pro::Panel::setTheme | ( | Sint32 | idTheme | ) |
Set the panel theme.
| idTheme | Theme id managed by GUIMgr. Use -1 to clear the panel override and fall back to the global theme. |
| Sint32 CRM64Pro::Panel::getTheme | ( | ) | const |
Get the panel theme.
| Widget * CRM64Pro::Panel::createWidgetByType | ( | const string & | sName, |
| eWidgetType | eWT, | ||
| Sint32 | iWID ) |
Create a widget by runtime type.
| sName | The short runtime widget name. Must be unique inside the panel. |
| eWT | Widget type. Check ::eWidgetType for further information. |
| iWID | unsigned integer with the unique Widget ID. |
| eWidgetType CRM64Pro::Panel::getWidgetType | ( | Sint32 | iWID | ) | const |
Return the type of a widget using its ID.
| iWID | Widget id. |
| Widget * CRM64Pro::Panel::getWidgetByID | ( | Sint32 | iWID | ) |
Get a pointer to a Widget using its ID.
| iWID | Widget id. |
| Sint32 CRM64Pro::Panel::setWidgetName | ( | Sint32 | iWID, |
| const string & | sName ) |
Rename an owned widget.
| iWID | Widget id. The base widget (0) is not handled by this method. |
| sName | New short runtime widget name. Must be unique inside this panel. |
| WidgetLabel * CRM64Pro::Panel::createLabel | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetImage * CRM64Pro::Panel::createImage | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetFrame * CRM64Pro::Panel::createFrame | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetButton * CRM64Pro::Panel::createButton | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetCheckBox * CRM64Pro::Panel::createCheckBox | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetProgress * CRM64Pro::Panel::createProgress | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetSlider * CRM64Pro::Panel::createSlider | ( | const string & | sName, |
| Sint32 | iWID, | ||
| eSliderAxis | eAxis = SA_HORIZONTAL ) |
| WidgetTextEdit * CRM64Pro::Panel::createTextEdit | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetList * CRM64Pro::Panel::createList | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetComboBox * CRM64Pro::Panel::createComboBox | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetNumberEdit * CRM64Pro::Panel::createNumberEdit | ( | const string & | sName, |
| Sint32 | iWID ) |
| WidgetLabel * CRM64Pro::Panel::getLabel | ( | Sint32 | iWID | ) |
Get a typed Label widget using its ID.
| iWID | Widget unique id. |
| WidgetImage * CRM64Pro::Panel::getImage | ( | Sint32 | iWID | ) |
| WidgetFrame * CRM64Pro::Panel::getFrame | ( | Sint32 | iWID | ) |
Get a typed Frame widget using its ID.
| iWID | Widget unique id. |
| WidgetButton * CRM64Pro::Panel::getButton | ( | Sint32 | iWID | ) |
Get a typed Button widget using its ID.
| iWID | Widget unique id. |
| WidgetCheckBox * CRM64Pro::Panel::getCheckBox | ( | Sint32 | iWID | ) |
Get a typed CheckBox widget using its ID.
| iWID | Widget unique id. |
| WidgetProgress * CRM64Pro::Panel::getProgress | ( | Sint32 | iWID | ) |
Get a typed Progress widget using its ID.
| iWID | Widget unique id. |
| WidgetSlider * CRM64Pro::Panel::getSlider | ( | Sint32 | iWID | ) |
Get a typed Slider widget using its ID.
| iWID | Widget unique id. |
| WidgetTextEdit * CRM64Pro::Panel::getTextEdit | ( | Sint32 | iWID | ) |
Get a typed TextEdit widget using its ID.
| iWID | Widget unique id. |
| WidgetList * CRM64Pro::Panel::getList | ( | Sint32 | iWID | ) |
Get a typed List widget using its ID.
| iWID | Widget unique id. |
| WidgetComboBox * CRM64Pro::Panel::getComboBox | ( | Sint32 | iWID | ) |
Get a typed ComboBox widget using its ID.
| iWID | Widget unique id. |
| WidgetNumberEdit * CRM64Pro::Panel::getNumberEdit | ( | Sint32 | iWID | ) |
Get a typed NumberEdit widget using its ID.
| iWID | Widget unique id. |
| void CRM64Pro::Panel::getWidgetInfoList | ( | vector< sWidgetInfo > & | vOut | ) | const |
Fill widget metadata of this panel.
| vOut | Output vector receiving widget id, name and type for each widget currently owned by this panel. Existing contents are cleared before writing. |
| Sint32 CRM64Pro::Panel::closeWidget | ( | Sint32 | iWID | ) |
| Sint32 CRM64Pro::Panel::setPanelType | ( | ePanelType | ePT, |
| Sint32 | iTime = 0 ) |
Set the panel type.
| ePT | Panel type. Check ::ePanelType for further information. |
| iTime | Time to live (in milliseconds) for PT_EPHEMERAL panels. Minimum is 1000ms. |
| ePanelType CRM64Pro::Panel::getPanelType | ( | ) | const |
Get the panel type.
| Sint32 CRM64Pro::Panel::getPanelTTL | ( | ) | const |
Get the panel time to live.
| Sint32 CRM64Pro::Panel::setSizeMode | ( | ePanelSizeMode | ePSM | ) |
Set the panel size mode.
| ePSM | Size mode. PSM_MANUAL keeps the stored base widget size. PSM_SCREEN tracks the attached screen size at runtime. |
| ePanelSizeMode CRM64Pro::Panel::getSizeMode | ( | ) | const |
Get the panel size mode.
| Sint32 CRM64Pro::Panel::setLayout | ( | ePanelLayout | ePL | ) |
Set the panel child layout mode.
| ePL | Layout flags. PL_NONE keeps manual child positioning. PL_HFLOW and PL_VFLOW are mutually exclusive. |
| ePanelLayout CRM64Pro::Panel::getLayout | ( | ) | const |
Get the panel child layout mode.
| Sint32 CRM64Pro::Panel::setLayoutSpacing | ( | Sint32 | iSpacing | ) |
Set spacing between child widgets in flow layouts.
| iSpacing | Spacing in pixels between adjacent children. Negative values are clamped to 0. |
| Sint32 CRM64Pro::Panel::setLayoutPadding | ( | Sint32 | iTop, |
| Sint32 | iRight, | ||
| Sint32 | iBottom, | ||
| Sint32 | iLeft ) |
Set padding inside the panel base widget for flow layouts.
| iTop | Top padding. |
| iRight | Right padding. |
| iBottom | Bottom padding. |
| iLeft | Left padding. |
| Sint32 CRM64Pro::Panel::setLayoutJustify | ( | eLayoutJustify | eJustify | ) |
Set flow-layout distribution along the main axis.
| eJustify | Justification mode. |
| eLayoutJustify CRM64Pro::Panel::getLayoutJustify | ( | ) | const |
Get flow-layout distribution along the main axis.
| Sint32 CRM64Pro::Panel::setLayoutAlign | ( | eLayoutAlign | eAlign | ) |
Set flow-layout alignment along the cross axis.
| eAlign | Alignment mode. |
| eLayoutAlign CRM64Pro::Panel::getLayoutAlign | ( | ) | const |
Get flow-layout alignment along the cross axis.
| void CRM64Pro::Panel::invalidateLayout | ( | ) |
Mark the flow layout dirty so child positions are recomputed on the next update/render pass.
Automatic invalidation already happens for child show(), hide() and setSize() changes. This method is provided for edge cases where caller-controlled reflow is still desirable.
| Sint32 CRM64Pro::Panel::save | ( | const string & | sCDCFile | ) |
Save the panel and all its widgets to a CDC file.
Widgets images/sprites will also be saved to the same CDC file.
| sCDCFile | string containing [directory]+filename+[extension]. Directory separators '\' and '/' are supported. |
| Sint32 CRM64Pro::Panel::save | ( | const Sint32 | idCDC | ) |
Save the panel and all its widgets to a CDC file.
Widgets images/sprites will also be saved in to the same CDC file.
| idCDC | CDC id. |