Handles VT100 pseudo GUI operations.
More...
The type for storing number of column or width of cursor position.
- Note
- This type cannot store 0 value!
Definition at line 368 of file oc_tgui.h.
The types stores pointer to a function, that draws a list element. It is called by the TGUI module, when element of the list is visible on the screen.
- Parameters
-
Position | Position of the list element, where it should be drawn |
ElementHandle | Handler to a list element |
Width | Maximum width for the element |
- See also
- oC_TGUI_DrawListMenu
- Note
- The terminal style is set before call of this function
Definition at line 421 of file oc_tgui.h.
typedef void(* oC_TGUI_EditBoxSaveValueHandler_t) (char *Buffer, uint32_t Size, void *Parameter) |
The function is called, when the value in edit box is changed.
- Parameters
-
Buffer | Buffer with string of EditBox |
Size | Size of the Buffer |
Parameter | Optional Parameter |
- See also
- oC_TGUI_DrawEditBox
Definition at line 451 of file oc_tgui.h.
The type for storing number of line or height of cursor position.
- Note
- This type cannot store 0 value!
Definition at line 356 of file oc_tgui.h.
typedef void(* oC_TGUI_MenuHandler_t) (void *Parameter) |
The type for storing pointer to a function, that should be called when one of menu entries is activated.
- Parameters
-
Parameter | Optional parameter, that can be used by a user |
- See also
- oC_TGUI_DrawMenu oC_TGUI_MenuEntry_t
Definition at line 401 of file oc_tgui.h.
typedef bool(* oC_TGUI_PushButtonHandler_t) (void *Parameter) |
Pointer to the function that is called, when the push button is pressed.
- Parameters
-
Parameter | Optional parameter |
- Returns
- true if waiting for push button should ends, false if the TGUI should still wait for a key
Definition at line 481 of file oc_tgui.h.
typedef void(* oC_TGUI_QuickEditBoxSaveValueHandler_t) (char *Buffer, uint32_t Size, void *Parameter) |
The function is called, when the value in quick edit box is changed.
- Parameters
-
Buffer | Buffer with string of QuickEditBox |
Size | Size of the Buffer |
Parameter | Optional Parameter |
- See also
- oC_TGUI_DrawQuickEditBox
Definition at line 467 of file oc_tgui.h.
typedef void(* oC_TGUI_SelectionHandler_t) (const char *SelectedValue, uint32_t SelectedIndex, void *Parameter) |
Pointer of the function, that is called, when selected value in SelectionBox is changed.
- Parameters
-
SelectedValue | String with selected value |
SelectedIndex | Index of selected value |
Parameter | Optional parameter |
Definition at line 495 of file oc_tgui.h.
The type stores handler to the function, that is called, when the list element is selected.
- See also
- oC_TGUI_DrawListMenu
- Parameters
-
ListElement | Selected element |
Definition at line 435 of file oc_tgui.h.
This is the type for storing terminal colors. You can use functions #oC_TGUI_SetBackgroundColor to set background color and #oC_TGUI_SetForegroundColor to set foreground color. Look at the oC_TGUI_Style_t type to see how to set them all with one function.
Here is a list of available combinations of terminal colors:
Terminal Colors
- See also
- oC_TGUI_GetColorFromName oC_TGUI_GetNameFromColor
List of available color definitions:
Enumerator |
---|
oC_TGUI_Color_Default |
Default
|
oC_TGUI_Color_Black |
Black
|
oC_TGUI_Color_Red |
Red
|
oC_TGUI_Color_Green |
Green
|
oC_TGUI_Color_Yellow |
Yellow
|
oC_TGUI_Color_Blue |
Blue
|
oC_TGUI_Color_Magenda |
Magenda
|
oC_TGUI_Color_Cyan |
Cyan
|
oC_TGUI_Color_LightGray |
Light Gray
|
oC_TGUI_Color_DarkGray |
Dark Gray
|
oC_TGUI_Color_LightRed |
Light Red
|
oC_TGUI_Color_LightGreen |
Light Green
|
oC_TGUI_Color_LightYellow |
Light Yellow
|
oC_TGUI_Color_LightBlue |
Light Blue
|
oC_TGUI_Color_LightMagenda |
Light Magenda
|
oC_TGUI_Color_LightCyan |
Light Cyan
|
oC_TGUI_Color_White |
White
|
Definition at line 140 of file oc_tgui.h.
This is the type for storing keys. Special keys are defined as enumeration values (for example oC_TGUI_Key_Enter). All other characters are represented with their ASCII code.
When you need to detect some key pressed with CTRL key, you should expect value: 'ASCII' - oC_TGUI_Key_Control . For example:
oC_TGUI_WaitForKeyPress(&key);
{
printf("You pressed Ctrl+D!\n");
}
{
printf("You pressed Ctrl+C!\n");
}
List of predefined keys:
Enumerator |
---|
oC_TGUI_Key_Enter |
ENTER key.
|
oC_TGUI_Key_Backspace |
Backspace key.
|
oC_TGUI_Key_Tab |
Tab key.
|
oC_TGUI_Key_Control |
Special value for detecting CTRL.
|
oC_TGUI_Key_ControlC |
Ctrl+C keys.
|
oC_TGUI_Key_SpecialKeysId |
Special value - minimum ID for special keys.
|
oC_TGUI_Key_ESC |
ESC key.
|
oC_TGUI_Key_ArrowUp |
Arrow UP key.
|
oC_TGUI_Key_ArrowDown |
Arrow DOWN key.
|
oC_TGUI_Key_ArrowRight |
Arrow RIGHT key.
|
oC_TGUI_Key_ArrowLeft |
Arrow LEFT key.
|
oC_TGUI_Key_F1 |
F1 key.
|
oC_TGUI_Key_F2 |
F2 key.
|
oC_TGUI_Key_F3 |
F3 key.
|
oC_TGUI_Key_F4 |
F4 key.
|
oC_TGUI_Key_F5 |
F5 key.
|
oC_TGUI_Key_F6 |
F6 key.
|
oC_TGUI_Key_F7 |
F7 key.
|
oC_TGUI_Key_F8 |
F8 key.
|
oC_TGUI_Key_F9 |
F9 key.
|
oC_TGUI_Key_F10 |
F10 key.
|
oC_TGUI_Key_F11 |
F11 key.
|
oC_TGUI_Key_F12 |
F12 key.
|
Definition at line 96 of file oc_tgui.h.
The type for storing style of the text. If you want default style, set it as 0 or oC_TGUI_TextStyle_Default. Attributes can be joined by 'OR'.
- Note
- Not all attributes are supported by all terminals. For example in PuTTY, blinking text must be enabled in the configuration before.
To set text style use function #oC_TGUI_SetTextStyle
List of defined attributes:
Enumerator |
---|
oC_TGUI_TextStyle_Default |
Default style for a text.
|
oC_TGUI_TextStyle_Bold |
Text will be bold
|
oC_TGUI_TextStyle_Dim |
Foreground and background will be lighter.
|
oC_TGUI_TextStyle_Underline |
Text will be underlined.
|
oC_TGUI_TextStyle_Blink |
Text will blink.
|
oC_TGUI_TextStyle_Inverted |
Invert foreground with background colors.
|
oC_TGUI_TextStyle_Hidden |
Text will be hidden.
|
Definition at line 178 of file oc_tgui.h.
- See also
- oC_TGUI_Property_t
Enumerator |
---|
oC_TGUI_ValueType_UINT |
Value of type oC_UInt_t.
|
oC_TGUI_ValueType_U32 |
Value of type uint32_t.
|
oC_TGUI_ValueType_U64 |
Value of type uint64_t.
|
oC_TGUI_ValueType_I32 |
Value of type int32_t.
|
oC_TGUI_ValueType_I64 |
Value of type int64_t.
|
oC_TGUI_ValueType_ValueFloat |
Value of type float.
|
oC_TGUI_ValueType_ValueDouble |
Value of type double.
|
oC_TGUI_ValueType_ValueChar |
Value of type char.
|
oC_TGUI_ValueType_ValueString |
Value of type string.
|
Definition at line 545 of file oc_tgui.h.