Choco OS  V.0.16.9.0
Join to the chocolate world
oc_tgui.h
Go to the documentation of this file.
1 
31 #ifndef SYSTEM_CORE_SRC_GUI_OC_TGUI_H_
32 #define SYSTEM_CORE_SRC_GUI_OC_TGUI_H_
33 
34 #include <oc_stdtypes.h>
35 #include <stdbool.h>
36 #include <oc_stdlib.h>
37 #include <oc_vt100.h>
38 #include <oc_list.h>
39 #include <oc_null.h>
40 #include <oc_string.h>
41 
47 #define _________________________________________MACROS_SECTION_____________________________________________________________________________
48 
49 #define oC_TGUI_Color_IsCorrect(Color) ( (Color) <= (oC_TGUI_Color_White) && (Color) >= (oC_TGUI_Color_Black) )
50 #define oC_TGUI_Position_IsCorrect(Pos) ( (Pos.Line > 0) && (Pos.Column > 0) )
51 #define oC_TGUI_Position_AreEqual(P1,P2) ( oC_TGUI_Position_Compare(P1,P2) == 0 )
52 #define oC_TGUI_Position_IsSmaller(P1,P2) ( oC_TGUI_Position_Compare(P1,P2) < 0 )
53 #define oC_TGUI_Position_IsGreater(P1,P2) ( oC_TGUI_Position_Compare(P1,P2) > 0 )
54 #define oC_TGUI_Position_IsLower(P1,P2) ( (P1.Line > P2.Line) )
55 #define oC_TGUI_Position_IsHigher(P1,P2) ( (P1.Line < P2.Line) )
56 
57 #define oC_TGUI_DefaultScreenWidth 80
58 #define oC_TGUI_DefaultScreenHeight 24
59 
60 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________
61 
62 
68 #define _________________________________________TYPES_SECTION______________________________________________________________________________
69 
70 //==========================================================================================================================================
95 //==========================================================================================================================================
96 typedef enum
97 {
109  oC_TGUI_Key_F1 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '1' + '~' ,
110  oC_TGUI_Key_F2 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '2' + '~' ,
111  oC_TGUI_Key_F3 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '3' + '~' ,
112  oC_TGUI_Key_F4 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '4' + '~' ,
113  oC_TGUI_Key_F5 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '5' + '~' ,
114  oC_TGUI_Key_F6 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '6' + '~' ,
115  oC_TGUI_Key_F7 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '7' + '~' ,
116  oC_TGUI_Key_F8 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '8' + '~' ,
117  oC_TGUI_Key_F9 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '9' + '~' ,
118  oC_TGUI_Key_F10 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '1' + '0' + '~' ,
119  oC_TGUI_Key_F11 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '1' + '1' + '~' ,
120  oC_TGUI_Key_F12 = oC_TGUI_Key_SpecialKeysId + '[' + '1' + '1' + '2' + '~' ,
121 } oC_TGUI_Key_t;
122 
123 //==========================================================================================================================================
139 //==========================================================================================================================================
140 typedef enum
141 {
160 
161 //==========================================================================================================================================
177 //==========================================================================================================================================
178 typedef enum
179 {
188 
189 //==========================================================================================================================================
199 //==========================================================================================================================================
200 typedef int32_t oC_TGUI_EntryIndex_t;
201 
202 //==========================================================================================================================================
228 //==========================================================================================================================================
229 typedef struct
230 {
234  bool DontDraw;
236 
237 //==========================================================================================================================================
273 //==========================================================================================================================================
274 typedef struct
275 {
280 
281 //==========================================================================================================================================
291 //==========================================================================================================================================
292 typedef struct
293 {
297 
298 //==========================================================================================================================================
336 //==========================================================================================================================================
337 typedef struct
338 {
344 
345 //==========================================================================================================================================
355 //==========================================================================================================================================
356 typedef uint16_t oC_TGUI_Line_t;
357 //==========================================================================================================================================
367 //==========================================================================================================================================
368 typedef uint16_t oC_TGUI_Column_t;
369 
370 //==========================================================================================================================================
381 //==========================================================================================================================================
382 typedef struct
383 {
384  oC_TGUI_Line_t Line;
385  oC_TGUI_Column_t Column;
387 
388 //==========================================================================================================================================
400 //==========================================================================================================================================
401 typedef void (*oC_TGUI_MenuHandler_t)( void * Parameter );
402 //==========================================================================================================================================
420 //==========================================================================================================================================
421 typedef void (*oC_TGUI_DrawListHandler_t)( oC_TGUI_Position_t Position , oC_List_ElementHandle_t ElementHandle , oC_TGUI_Column_t Width );
422 //==========================================================================================================================================
434 //==========================================================================================================================================
436 //==========================================================================================================================================
450 //==========================================================================================================================================
451 typedef void (*oC_TGUI_EditBoxSaveValueHandler_t)( char * Buffer , uint32_t Size , void * Parameter );
452 //==========================================================================================================================================
466 //==========================================================================================================================================
467 typedef void (*oC_TGUI_QuickEditBoxSaveValueHandler_t)( char * Buffer , uint32_t Size , void * Parameter );
468 //==========================================================================================================================================
480 //==========================================================================================================================================
481 typedef bool (*oC_TGUI_PushButtonHandler_t)( void * Parameter );
482 //==========================================================================================================================================
494 //==========================================================================================================================================
495 typedef void (*oC_TGUI_SelectionHandler_t)( const char * SelectedValue , uint32_t SelectedIndex , void * Parameter );
496 
497 //==========================================================================================================================================
507 //==========================================================================================================================================
508 typedef struct
509 {
510  const char * Title;
511  const char * Help;
513  void * Parameter;
517 
518 //==========================================================================================================================================
528 //==========================================================================================================================================
529 typedef struct
530 {
535 
536 //==========================================================================================================================================
544 //==========================================================================================================================================
545 typedef enum
546 {
557 
558 typedef struct
559 {
560  const char * Description;
561  const char * Format;
562  oC_TGUI_ValueType_t Type;
563  union
564  {
565  oC_UInt_t ValueUINT;
566  uint32_t ValueU32;
567  uint64_t ValueU64;
568  int32_t ValueI32;
569  int64_t ValueI64;
570  float ValueFloat;
571  double ValueDouble;
572  char ValueChar;
573  const char * ValueString;
574  };
576 
577 typedef struct
578 {
579  oC_TGUI_Style_t DescriptionStyle;
580  oC_TGUI_Style_t ValueStyle;
582 
583 typedef struct
584 {
585  oC_TGUI_Position_t StartPosition;
586  oC_TGUI_Column_t Width;
587  oC_TGUI_Line_t Height;
588  oC_TGUI_Column_t DescriptionWidth;
589  const oC_TGUI_Property_t * Properties;
590  oC_TGUI_EntryIndex_t NumberOfProperties;
591  const oC_TGUI_PropertyStyle_t * Style;
593 
594 typedef struct
595 {
596  oC_TGUI_Position_t TopLeft;
597  oC_TGUI_Column_t Width;
598  oC_TGUI_Line_t Height;
599  oC_List_t List;
600  oC_TGUI_DrawListHandler_t DrawHandler;
601  oC_TGUI_SelectListHandler_t SelectHandler;
602  void * SelectHandlerParameter;
603  const oC_TGUI_MenuStyle_t * Style;
605 
606 typedef enum
607 {
608  oC_TGUI_InputType_Disabled = 0 ,
609  oC_TGUI_InputType_Password = (1<<0),
610  oC_TGUI_InputType_Digits = (1<<1),
611  oC_TGUI_InputType_Characters = (1<<2),
612  oC_TGUI_InputType_SpecialChars = (1<<3),
613  oC_TGUI_InputType_Default = oC_TGUI_InputType_Digits |
614  oC_TGUI_InputType_Characters |
615  oC_TGUI_InputType_SpecialChars ,
616 } oC_TGUI_InputType_t;
617 
618 typedef struct
619 {
620  oC_TGUI_Style_t ActiveBorder;
621  oC_TGUI_Style_t Text;
622  oC_TGUI_Style_t DisabledText;
623  oC_TGUI_Style_t NotActiveBorder;
625 
626 typedef struct
627 {
628  oC_TGUI_Style_t ActiveBorder;
629  oC_TGUI_Style_t NotActiveBorder;
630  oC_TGUI_Style_t ActiveText;
631  oC_TGUI_Style_t NotActiveText;
633 
634 typedef struct
635 {
636  char * Buffer;
637  uint32_t BufferSize;
638  oC_TGUI_InputType_t InputType;
640  void * SaveParameter;
641  const oC_TGUI_EditBoxStyle_t* Style;
643 
644 typedef struct
645 {
646  char * Buffer;
647  uint32_t BufferSize;
648  oC_TGUI_InputType_t InputType;
650  void * SaveParameter;
651  const oC_TGUI_QuickEditBoxStyle_t* Style;
653 
654 typedef enum
655 {
656  oC_TGUI_ActiveObjecType_EditBox ,
657  oC_TGUI_ActiveObjecType_PushButton ,
658  oC_TGUI_ActiveObjecType_QuickEdit ,
659  oC_TGUI_ActiveObjecType_SelectionBox ,
660 } oC_TGUI_ActiveObjecType_t;
661 
662 typedef struct
663 {
664  oC_TGUI_Style_t ActiveBorder;
665  oC_TGUI_Style_t Active;
666  oC_TGUI_Style_t NotActive;
668 
669 typedef struct
670 {
671  const char * Text;
672  oC_TGUI_PushButtonHandler_t PressHandler;
673  void * PressParameter;
674  const oC_TGUI_PushButtonStyle_t * Style;
676 
677 typedef struct
678 {
679  oC_TGUI_Style_t Arrow;
680  oC_TGUI_Style_t Active;
681  oC_TGUI_Style_t NotActive;
683 
684 typedef struct
685 {
686  uint32_t* SelectedIndex;
687  const oC_String_t* Options;
688  uint32_t NumberOfOptions;
689  const oC_TGUI_SelectionBoxStyle_t * Style;
690  oC_TGUI_SelectionHandler_t OnChangeHandler;
691  void * OnChangeParameter;
693 
694 typedef struct
695 {
696  oC_TGUI_ActiveObjecType_t Type;
697  oC_TGUI_Position_t Position;
698  oC_TGUI_Column_t Width;
699  oC_TGUI_Line_t Height;
700  oC_TGUI_Position_t LabelPosition;
701  const char * LabelText;
702  oC_TGUI_Column_t LabelWidth;
703  const oC_TGUI_Style_t * LabelStyle;
704  union
705  {
706  oC_TGUI_EditBox_t EditBox;
707  oC_TGUI_PushButton_t PushButton;
708  oC_TGUI_QuickEditBox_t QuickEdit;
709  oC_TGUI_SelectionBox_t SelectionBox;
710  };
712 
713 typedef struct
714 {
715  uint8_t SignIndex;
717 
718 typedef struct
719 {
720  oC_TGUI_Color_t Color;
721  const char * Name;
723 
724 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
725 
731 #define _________________________________________VARIABLES_SECTION__________________________________________________________________________
732 
733 static const oC_TGUI_ColorData_t oC_TGUI_Colors[] = {
734  { .Color = oC_TGUI_Color_Default , .Name = "Default" } ,
735  { .Color = oC_TGUI_Color_Black , .Name = "Black" } ,
736  { .Color = oC_TGUI_Color_Red , .Name = "Red" } ,
737  { .Color = oC_TGUI_Color_Green , .Name = "Green" } ,
738  { .Color = oC_TGUI_Color_Yellow , .Name = "Yellow" } ,
739  { .Color = oC_TGUI_Color_Blue , .Name = "Blue" } ,
740  { .Color = oC_TGUI_Color_Magenda , .Name = "Magenda" } ,
741  { .Color = oC_TGUI_Color_Cyan , .Name = "Cyan" } ,
742  { .Color = oC_TGUI_Color_LightGray , .Name = "LightGray" } ,
743  { .Color = oC_TGUI_Color_DarkGray , .Name = "DarkGray" } ,
744  { .Color = oC_TGUI_Color_LightRed , .Name = "LightRed" } ,
745  { .Color = oC_TGUI_Color_LightGreen , .Name = "LightGreen" } ,
746  { .Color = oC_TGUI_Color_LightYellow , .Name = "LightYellow" } ,
747  { .Color = oC_TGUI_Color_LightBlue , .Name = "LightBlue" } ,
748  { .Color = oC_TGUI_Color_LightMagenda , .Name = "LightMagenda" } ,
749  { .Color = oC_TGUI_Color_LightCyan , .Name = "LightCyan" } ,
750  { .Color = oC_TGUI_Color_White , .Name = "White" } ,
751 };
752 
753 #undef _________________________________________VARIABLES_SECTION__________________________________________________________________________
754 
755 
761 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
762 
763 extern oC_TGUI_Color_t oC_TGUI_GetColorFromName ( const char * Name );
764 extern const char * oC_TGUI_GetNameFromColor ( oC_TGUI_Color_t Color );
765 
766 extern bool oC_TGUI_ClearScreen ( void );
767 extern bool oC_TGUI_ResetDevice ( void );
768 extern bool oC_TGUI_SetCursorPosition ( oC_TGUI_Position_t CursorPosition );
769 extern bool oC_TGUI_ReadCursorPosition ( oC_TGUI_Position_t * outCursorPosition );
770 extern bool oC_TGUI_SetBackgroundColor ( oC_TGUI_Color_t Color );
771 extern bool oC_TGUI_SetForegroundColor ( oC_TGUI_Color_t Color );
772 extern bool oC_TGUI_SetTextStyle ( oC_TGUI_TextStyle_t TextStyle );
773 extern bool oC_TGUI_SetStyle ( const oC_TGUI_Style_t * Style );
774 extern bool oC_TGUI_SaveAttributes ( void );
775 extern bool oC_TGUI_RestoreAttributes ( void );
776 extern int oC_TGUI_Position_Compare ( oC_TGUI_Position_t P1 , oC_TGUI_Position_t P2 );
777 extern oC_TGUI_Position_t oC_TGUI_Position_Increment ( oC_TGUI_Position_t TopPosition , oC_TGUI_Position_t BottomRight , oC_TGUI_Position_t Position );
778 extern oC_TGUI_Position_t oC_TGUI_Position_Decrement ( oC_TGUI_Position_t TopPosition , oC_TGUI_Position_t BottomRight , oC_TGUI_Position_t Position );
779 
780 extern bool oC_TGUI_DrawLine ( oC_TGUI_Position_t StartPosition , oC_TGUI_Position_t EndPosition );
781 extern bool oC_TGUI_DrawBorder ( oC_TGUI_Position_t TopLeft , oC_TGUI_Position_t BottomRight );
782 extern bool oC_TGUI_DrawAtPosition ( oC_TGUI_Position_t StartPosition , const char * String );
783 extern bool oC_TGUI_DrawAtPositionWithSize ( oC_TGUI_Position_t StartPosition , const char * String , int Size );
784 extern bool oC_TGUI_DrawCharAtPosition ( oC_TGUI_Position_t StartPosition , char C );
785 extern bool oC_TGUI_DrawNCharAtPosition ( oC_TGUI_Position_t StartPosition , char C , int N );
786 extern bool oC_TGUI_DrawFillBetween ( oC_TGUI_Position_t StartPosition , oC_TGUI_Position_t EndPosition , char C );
787 extern bool oC_TGUI_ClearPartOfScreen ( oC_TGUI_Position_t StartPosition , oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , oC_TGUI_Color_t Color );
788 extern bool oC_TGUI_DrawMultiLineText ( oC_TGUI_Position_t StartPosition , oC_TGUI_Position_t EndPosition , const char * String , bool AsPassword );
789 extern bool oC_TGUI_DrawFormatAtPosition ( oC_TGUI_Position_t StartPosition , const char * Format , ... );
790 extern bool oC_TGUI_FindPositionInBuffer ( oC_TGUI_Position_t TopLeft , oC_TGUI_Position_t * Position ,oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , const char * String , uint32_t * outIndex );
791 extern void oC_TGUI_DrawSpiner ( oC_TGUI_Spiner_t * outSpanner );
792 
793 extern bool oC_TGUI_DrawProgressBar ( oC_TGUI_Position_t Position , oC_TGUI_Column_t Width , uint32_t CurrentValue , uint32_t MaximumValue , const oC_TGUI_ProgressBarStyle_t * Style );
794 
795 extern bool oC_TGUI_DrawTextBox ( const char * String , oC_TGUI_Position_t Position , oC_TGUI_Column_t FixedWidth , const oC_TGUI_TextBoxStyle_t * Style );
796 extern bool oC_TGUI_DrawBox ( const char * Title , const char * InsideText , oC_TGUI_Position_t TopLeft , oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , const oC_TGUI_BoxStyle_t * Style );
797 extern bool oC_TGUI_DrawProperties ( const oC_TGUI_DrawPropertyConfig_t * Config );
798 
799 extern oC_TGUI_EntryIndex_t oC_TGUI_DrawMenu ( oC_TGUI_Position_t TopLeft , oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , const oC_TGUI_MenuEntry_t * MenuEntries , oC_TGUI_EntryIndex_t NumberOfEntries , const oC_TGUI_MenuStyle_t * Style );
800 extern bool oC_TGUI_DrawListMenu ( const oC_TGUI_DrawListMenuConfig_t * Config );
801 extern oC_TGUI_Key_t oC_TGUI_DrawPushButton ( oC_TGUI_Position_t Position , oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , const oC_TGUI_PushButton_t * PushButton , bool Active );
802 extern oC_TGUI_Key_t oC_TGUI_DrawEditBox ( oC_TGUI_Position_t Position , oC_TGUI_Column_t Width , oC_TGUI_Line_t Height , oC_TGUI_EditBox_t * EditBox , bool Active );
803 extern oC_TGUI_Key_t oC_TGUI_DrawQuickEditBox ( oC_TGUI_Position_t Position , oC_TGUI_Column_t Width , oC_TGUI_QuickEditBox_t * QuickEditBox , bool Active );
804 extern oC_TGUI_Key_t oC_TGUI_DrawSelectionBox ( oC_TGUI_Position_t Position , oC_TGUI_Column_t Width , const oC_TGUI_SelectionBox_t * SelectionBox , bool Active );
805 extern oC_TGUI_Key_t oC_TGUI_DrawActiveObject ( oC_TGUI_ActiveObject_t * ActiveObject , bool Active );
806 extern bool oC_TGUI_DrawActiveObjects ( oC_TGUI_ActiveObject_t * ActiveObjects, uint32_t NumberOfObjects );
807 
808 extern bool oC_TGUI_WaitForKeyPress ( oC_TGUI_Key_t * outKey );
809 extern bool oC_TGUI_CheckKeyPressed ( oC_TGUI_Key_t * outKey );
810 
811 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
812 
813 
814 #endif /* SYSTEM_CORE_SRC_GUI_OC_TGUI_H_ */
Definition: oc_list.h:63
F2 key.
Definition: oc_tgui.h:110
oC_TGUI_Color_t NonActiveColor
Color of the not filled part of progress bar.
Definition: oc_tgui.h:276
Value of type uint32_t.
Definition: oc_tgui.h:548
oC_TGUI_Style_t TextStyle
Style of the text inside the box.
Definition: oc_tgui.h:294
Default style for a text.
Definition: oc_tgui.h:180
Value of type string.
Definition: oc_tgui.h:555
Value of type char.
Definition: oc_tgui.h:554
Text will be bold
Definition: oc_tgui.h:181
char Name[30]
Name of the screen - useful for screen identification.
Definition: oc_screen.c:47
oC_TGUI_MenuHandler_t Handler
Handler of function, that will be called, when the menu is selected.
Definition: oc_tgui.h:512
oC_TGUI_Line_t Line
Number of line.
Definition: oc_tgui.h:384
Special value for detecting CTRL.
Definition: oc_tgui.h:101
void(* oC_TGUI_QuickEditBoxSaveValueHandler_t)(char *Buffer, uint32_t Size, void *Parameter)
Function for saving value of quick edit box.
Definition: oc_tgui.h:467
bool oC_TGUI_DrawBox(const char *Title, const char *InsideText, oC_TGUI_Position_t TopLeft, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, const oC_TGUI_BoxStyle_t *Style)
draws a box
Definition: oc_tgui.c:770
const char * Help
Help string for the menu entry.
Definition: oc_tgui.h:511
Tab key.
Definition: oc_tgui.h:100
Special value - minimum ID for special keys.
Definition: oc_tgui.h:103
bool oC_TGUI_DrawActiveObjects(oC_TGUI_ActiveObject_t *ActiveObjects, uint32_t NumberOfObjects)
draws array of active objects and handles it
Definition: oc_tgui.c:1684
F8 key.
Definition: oc_tgui.h:116
The file with interface for VT100 terminal standard.
bool oC_TGUI_ResetDevice(void)
function for reseting a terminal
Definition: oc_tgui.c:152
stores style of elements
Definition: oc_tgui.h:229
oC_TGUI_Style_t InsideStyle
Style of text inside.
Definition: oc_tgui.h:342
Style of the menu.
Definition: oc_tgui.h:529
oC_TGUI_Style_t BorderStyle
Style of the border.
Definition: oc_tgui.h:278
Foreground and background will be lighter.
Definition: oc_tgui.h:182
Value of type uint64_t.
Definition: oc_tgui.h:549
Text will blink.
Definition: oc_tgui.h:184
bool DontDraw
Additional field for TGUI functions.
Definition: oc_tgui.h:234
oC_TGUI_Color_t Background
Color of the background.
Definition: oc_tgui.h:231
oC_TGUI_Style_t BorderStyle
Style of the border (set DontDraw to true if you do not want it)
Definition: oc_tgui.h:295
F5 key.
Definition: oc_tgui.h:113
F12 key.
Definition: oc_tgui.h:120
oC_TGUI_Style_t ShadowStyle
Shadow (right down and right bottom)
Definition: oc_tgui.h:341
oC_TGUI_Color_t
stores terminal colors
Definition: oc_tgui.h:140
oC_TGUI_TextStyle_t
text attributes
Definition: oc_tgui.h:178
stores cursor position
Definition: oc_tgui.h:382
Arrow UP key.
Definition: oc_tgui.h:105
Invert foreground with background colors.
Definition: oc_tgui.h:185
oC_TGUI_Color_t ActiveColor
Color of the filled part of progress bar.
Definition: oc_tgui.h:277
oC_TGUI_Color_t Foreground
Color of the foreground.
Definition: oc_tgui.h:232
ENTER key.
Definition: oc_tgui.h:98
const char * Title
Title of the menu entry.
Definition: oc_tgui.h:510
Value of type float.
Definition: oc_tgui.h:552
ESC key.
Definition: oc_tgui.h:104
F9 key.
Definition: oc_tgui.h:117
oC_TGUI_Style_t NotActiveEntry
Style of not selected item.
Definition: oc_tgui.h:532
style for box
Definition: oc_tgui.h:337
Arrow RIGHT key.
Definition: oc_tgui.h:107
F6 key.
Definition: oc_tgui.h:114
F10 key.
Definition: oc_tgui.h:118
oC_TGUI_Style_t Border
Style of border.
Definition: oc_tgui.h:533
style for text box
Definition: oc_tgui.h:292
oC_TGUI_MenuHandler_t OnHoverHandler
Handler of the function, that will be called, when the menu is hovered.
Definition: oc_tgui.h:514
style for progress bar
Definition: oc_tgui.h:274
Arrow LEFT key.
Definition: oc_tgui.h:108
The file with list library.
F3 key.
Definition: oc_tgui.h:111
oC_TGUI_Style_t BorderStyle
Style of the box border.
Definition: oc_tgui.h:339
oC_TGUI_TextStyle_t TextStyle
Text attributes (bold/underline,etc)
Definition: oc_tgui.h:233
Light Magenda
Definition: oc_tgui.h:156
bool oC_TGUI_ClearPartOfScreen(oC_TGUI_Position_t StartPosition, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, oC_TGUI_Color_t Color)
clears selected part of the screen
Definition: oc_tgui.c:468
Value of type int32_t.
Definition: oc_tgui.h:550
Arrow DOWN key.
Definition: oc_tgui.h:106
void(* oC_TGUI_MenuHandler_t)(void *Parameter)
Menu entry activated function.
Definition: oc_tgui.h:401
oC_TGUI_Style_t ActiveEntry
Style of selected item.
Definition: oc_tgui.h:531
Value of type oC_UInt_t.
Definition: oc_tgui.h:547
F7 key.
Definition: oc_tgui.h:115
int32_t oC_TGUI_EntryIndex_t
stores index for menu
Definition: oc_tgui.h:200
The file with interface for string library.
Ctrl+C keys.
Definition: oc_tgui.h:102
Definition of the null pointer.
void(* oC_TGUI_SelectListHandler_t)(oC_List_ElementHandle_t ListElement)
List element selected function.
Definition: oc_tgui.h:435
Entry in menu.
Definition: oc_tgui.h:508
void * OnHoverParameter
Optional parameter for the OnHoverHandler.
Definition: oc_tgui.h:515
void(* oC_TGUI_EditBoxSaveValueHandler_t)(char *Buffer, uint32_t Size, void *Parameter)
Function for saving value of edit box.
Definition: oc_tgui.h:451
oC_TGUI_Style_t TitleStyle
Title style.
Definition: oc_tgui.h:340
void * Parameter
Optional parameter for the Handler.
Definition: oc_tgui.h:513
Text will be underlined.
Definition: oc_tgui.h:183
Value of type int64_t.
Definition: oc_tgui.h:551
uint16_t oC_TGUI_Column_t
stores column or width of terminal cursor position
Definition: oc_tgui.h:368
oC_TGUI_Key_t
stores pressed key
Definition: oc_tgui.h:96
void(* oC_TGUI_SelectionHandler_t)(const char *SelectedValue, uint32_t SelectedIndex, void *Parameter)
Function called when value is changed.
Definition: oc_tgui.h:495
Value of type double.
Definition: oc_tgui.h:553
Text will be hidden.
Definition: oc_tgui.h:186
F4 key.
Definition: oc_tgui.h:112
F11 key.
Definition: oc_tgui.h:119
void * Config
Pointer to the screen configuration.
Definition: oc_screen.c:48
oC_TGUI_ValueType_t
stores type of property value
Definition: oc_tgui.h:545
oC_TGUI_Column_t Column
Number of column.
Definition: oc_tgui.h:385
Backspace key.
Definition: oc_tgui.h:99
F1 key.
Definition: oc_tgui.h:109
uint16_t oC_TGUI_Line_t
stores line or height of terminal cursor position
Definition: oc_tgui.h:356
FILE__DESCRIPTION
bool(* oC_TGUI_PushButtonHandler_t)(void *Parameter)
Function called when push button is pressed.
Definition: oc_tgui.h:481
oC_TGUI_EntryIndex_t oC_TGUI_DrawMenu(oC_TGUI_Position_t TopLeft, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, const oC_TGUI_MenuEntry_t *MenuEntries, oC_TGUI_EntryIndex_t NumberOfEntries, const oC_TGUI_MenuStyle_t *Style)
draws a menu
Definition: oc_tgui.c:941
void(* oC_TGUI_DrawListHandler_t)(oC_TGUI_Position_t Position, oC_List_ElementHandle_t ElementHandle, oC_TGUI_Column_t Width)
Function for drawing list menu element.
Definition: oc_tgui.h:421