23 #ifndef M4_GUI_GUI_ITEM_H 24 #define M4_GUI_GUI_ITEM_H 26 #include "m4/m4_types.h" 27 #include "m4/graphics/gr_font.h" 31 #define ITEM_NORMAL 0x00000 32 #define ITEM_PRESSED 0x00001 34 #define ITEM_DEFAULT 0x00001 35 #define ITEM_RETURN 0x00002 37 #define SU_PRESSED 0x0100 38 #define SD_PRESSED 0x0200 39 #define PU_PRESSED 0x0400 40 #define PD_PRESSED 0x0800 41 #define THUMB_PRESSED 0x1000 42 #define BOX_PRESSED 0x2000 43 #define AREA_PRESSED 0x3f00 45 #define NO_SCROLL 0x0000 46 #define SCROLLABLE 0x0001 47 #define PAGEABLE 0x0002 49 #define FILL_INTERIOR 1 // a flag for use by DrawTile 53 MESSAGE, PICTURE, BUTTON, LISTBOX, TEXTFIELD, REPEAT_BUTTON, DIALOGBOX
106 char *origPrompt =
nullptr;
107 char *undoPrompt =
nullptr;
108 char *undoAux =
nullptr;
109 char *undoAux2 =
nullptr;
110 Item *currTextField =
nullptr;
112 int32 buttonWidth = 0;
113 int32 buttonHeight = 0;
115 char clipBoard[100] = { 0 };
118 bool InitItems(
void);
119 Item *Item_create(
Item *parent,
enum ItemType type, int32 tag, M4CALLBACK cb);
120 void Item_destroy(
Item *myItem);
121 void Item_empty_list(
Item *myItem);
122 Item *ItemAdd(
Item *itemList, int32 x, int32 y, int32 w, int32 h,
const char *prompt, int32 tag,
123 ItemType type, M4CALLBACK cb, int32 promptMax);
124 Item *ItemFind(
Item *itemList, int32 tag);
125 bool Item_SetViewBottom(
Item *i);
126 bool ListItemExists(
Item *myItem,
char *prompt, int32 listTag);
127 bool ListItemAdd(
Item *myItem,
char *prompt, int32 listTag, int32 addMode,
ListItem *changedItem);
128 bool ListItemDelete(
Item *myItem,
ListItem *myListItem, int32 listTag);
129 bool ListItemChange(
Item *myItem,
ListItem *myListItem, int32 listTag,
130 char *newPrompt, int32 newTag, int32 changeMode);
131 void ViewCurrListItem(
Item *myItem);
132 ListItem *ListItemFind(
Item *myItem, int32 searchMode,
char *searchStr, int32 parm1);
133 bool ListItemSearch(
Item *myItem, int32 searchMode,
char *searchStr, int32 parm1);
134 bool DoubleClickOnListBox(
Item *myItem, int32 xOffset, int32 yOffset);
135 bool ClickOnListBox(
Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType);
136 bool ResetDefaultListBox(
Item *myItem);
137 bool Item_change_prompt(
Item *myItem,
const char *newPrompt);
138 void Item_ClearOrigPrompt(
void);
139 Item *Item_RestoreTextField(
void);
140 Item *Item_CheckTextField(
void);
141 void Item_SaveTextField(
Item *myItem);
142 void SetTextBlockBegin(
Item *myItem, int32 relXPos);
143 void SetTextBlockEnd(
Item *myItem, int32 relXPos);
144 bool Item_TextEdit(
Item *myItem, int32 parm1);
145 bool GetNextListItem(
Item *myItem);
146 bool GetNextPageList(
Item *myItem);
147 bool GetPrevListItem(
Item *myItem);
148 bool GetPrevPageList(
Item *myItem);
149 bool Item_show(
Item *i,
void *bdrDialog,
Buffer *scrBuf, int32 itemType);
150 void Item_format(
Item *i);
151 Item *Item_set_default(
Item *itemList,
Item *currDefault, int32 tag);
152 Item *Item_set_pressed(
Item *itemList,
Item *myItem, int32 tag);
153 Item *Item_set_unpressed(
Item *itemList,
Item *myItem, int32 tag);
154 Item *Item_set_cancel(
Item *itemList, int32 tag);
155 Item *Item_set_next_default(
Item *currDefault,
Item *itemList);
156 Item *Item_set_prev_default(
Item *currDefault,
Item *listBottom);
Definition: gui_item.h:62
Definition: gui_item.h:69
Definition: gui_item.h:82
Definition: m4_types.h:67
Definition: database.h:28
Definition: gui_item.h:105