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
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 };
118Item *Item_create(
Item *parent,
enum ItemType type, int32 tag, M4CALLBACK cb);
119void Item_destroy(
Item *myItem);
120Item *ItemAdd(
Item *itemList, int32 x, int32 y, int32 w, int32 h,
const char *prompt, int32 tag,
121 ItemType type, M4CALLBACK cb, int32 promptMax);
122Item *ItemFind(
Item *itemList, int32 tag);
123bool Item_SetViewBottom(
Item *i);
124void ViewCurrListItem(
Item *myItem);
125ListItem *ListItemFind(
Item *myItem, int32 searchMode,
char *searchStr, int32 parm1);
126bool ListItemSearch(
Item *myItem, int32 searchMode,
char *searchStr, int32 parm1);
127bool DoubleClickOnListBox(
Item *myItem, int32 xOffset, int32 yOffset);
128bool ClickOnListBox(
Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType);
129bool ResetDefaultListBox(
Item *myItem);
130bool Item_change_prompt(
Item *myItem,
const char *newPrompt);
131void Item_ClearOrigPrompt();
132Item *Item_RestoreTextField();
133Item *Item_CheckTextField();
134void Item_SaveTextField(
Item *myItem);
135void SetTextBlockBegin(
Item *myItem, int32 relXPos);
136void SetTextBlockEnd(
Item *myItem, int32 relXPos);
137bool Item_TextEdit(
Item *myItem, int32 parm1);
138bool GetNextListItem(
Item *myItem);
139bool GetNextPageList(
Item *myItem);
140bool GetPrevListItem(
Item *myItem);
141bool GetPrevPageList(
Item *myItem);
142bool Item_show(
Item *i,
void *bdrDialog,
Buffer *scrBuf, int32 itemType);
143void Item_format(
Item *i);
144Item *Item_set_default(
Item *itemList,
Item *currDefault, int32 tag);
145Item *Item_set_pressed(
Item *itemList,
Item *myItem, int32 tag);
146Item *Item_set_unpressed(
Item *itemList,
Item *myItem, int32 tag);
147Item *Item_set_cancel(
Item *itemList, int32 tag);
148Item *Item_set_next_default(
Item *currDefault,
Item *itemList);
149Item *Item_set_prev_default(
Item *currDefault,
Item *listBottom);
Definition: database.h:28
Definition: m4_types.h:54
Definition: gui_item.h:105
Definition: gui_item.h:82
Definition: gui_item.h:62
Definition: gui_item.h:69