113#define SET_SOFT_KEY_N SET_LEFT_SOFTKEY
114#define SET_SOFT_KEY_M SET_MIDDLE_SOFTKEY
118 #define MENU_FLAG2 0x5A2
120#elif defined(NEWSGOLD)
122 #define MENU_FLAG2 0x59D
126 #define MENU_FLAG2 0x578
316 union {
int _0x40000000;
int flags; };
744int MsgBoxYesNo(
int flags,
int message,
void (*callback)(
int canceled))
1358__swi_end(0x152,
CreateMenu, (style, zero, menu, header, selected_item, items_count, user_pointer, to_remove));
1741int CreateRadioButtonList(
const void *items,
int num,
const int *exclude_ids,
int exclude_count,
int selected_id,
int (*handler)(
int item_id,
int key,
int user1,
int user2),
int flags,
int header_lgp,
const int *header_icon,
int user1,
int user2)
1742__swi_end(0x22B,
CreateRadioButtonList, (items, num, exclude_ids, exclude_count, selected_id, handler, flags, header_lgp, header_icon, user1, user2));
#define __swi_end(number, func, call)
#define __swi_begin(number)
GUI description and state.
GUI GBS message for onKey callback.
int lgp_id_large
LGP ID or pointer to the C-string.
uint16_t invert
Enable invertion.
GUI_ONKEY_CALLBACK onkey
Key handler.
void * user_pointer
Custom user pointer.
void * locret
Pointer to the empty function.
GUI_GHOOK_CALLBACK global_hook_proc
Global hook handler (ghook)
int flags2
Menu options, see MenuDialogFlags.
int n_items
Number of the items.
GUI_ONKEY_CALLBACK onKey
Key handler.
GUI_ONKEY_CALLBACK onkey
Key handler.
RECT rc
Rectangular region on the screen.
RECT rc
Rectangular region on the screen.
const SOFTKEY_DESC * desc
C-array of the softkeys.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
void * proc3
Pointer to the function, see GetPBarProc3()
GUI_ONKEY_CALLBACK onkey
Key handler.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
int font
Font size, see SystemFontID.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
int * icon
Pointer to the varibale with actual header icon or NULL.
int flags
InputDialog flags, see InputDialogFlags (old name _0x40000000)
int lgp_id_small
LGP ID or pointer to the C-string.
GUI_LOCRET_CALLBACK proc3
Pointer to the empty function.
GUI_GHOOK_CALLBACK ghook
Global hook handler (ghook)
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
char dummy[16]
Unknown data.
short start_item_cbox
Index of the selected item in combo-box.
int text_attrs
Text attributes, see TextAttributesFlags (old name zero3)
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
char zero_cbox
If text input field: lang 0 - default, 2 - english.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
int time
Show timeout in clocks (1 clock = 4.615 ms)
MENUITEM_DRAW_PROC itemproc
char align
Text attributes, see TextAttributesFlags.
int font
Font size, see SystemFontID.
GUI_ONKEY_CALLBACK onKey
Key handler.
const MENUITEM_DESC * items
Called when draw item.
short maxlen
Maximum length of the value.
GUI_GHOOK_CALLBACK ghook
Global hook handler (ghook)
GUI_LOCRET_CALLBACK locret
Pointer to the empty function.
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
WSHDR * pWS
Current value.
int n
Count of the softkeys in array.
char pen[4]
RGBA text color.
char zero[32]
Unknown data.
int feature_id
Feature ID.
const MENUPROCS_DESC * procs
C-array of the default items, or NULL.
WSHDR * ws
Text of the menu item.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
int lgp_id
Header title, LGP ID or pointer to the C-string.
GUI_ONKEY_CALLBACK onKey
Key handler.
int flags2
Menu options, see MenuDialogFlags.
MENUITEM_DRAW_PROC itemproc
char font
Font id, see SystemFontID.
int * icon
Item icons array.
GUI_LOCRET_CALLBACK proc3
Pointer to the empty function.
short num_of_items_cbox
Number of the items in combo-box.
int n_lines
Number of the lines in selected item.
RECT rc
Rectangular region on the screen.
int extra_lgp_id
Extra header title, LGP ID or pointer to the C-string.
GUI_LOCRET_CALLBACK proc3
Pointer to the empty function.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
const int * softkeys
Custom softkeys mapping or NULL.
const SOFTKEYSTAB * softkeystab
Pointer to the softkeys definition.
GUI_ONKEY_CALLBACK onKey
Key handler.
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
const MENUPROCS_DESC * procs
C-array of the default items, or NULL.
const MENUITEM_DESC * items
Called when draw item.
GUI_GHOOK_CALLBACK global_hook_proc
Global hook handler (ghook)
char brush[4]
RGBA background color.
int lgp_null
Set to LGP_NULL.
GUI_GHOOK_CALLBACK global_hook_proc
Global hook handler (ghook)
int n_items
Number of the items.
const int * icons
C-array of the icons (ID from PIT or pointer to IMGHDR), last item is always 0.
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
const int * softkeys
Softkeys mapping from softkeystab, example: {0, 1, 2}.
EDITC_OPTIONS ed_options
Custom options.
char type
EditControlTypeID
int lgp_id
LGP ID or pointer to the C-string.
RECT rc
Rectangular region on the screen.
int text_attrs
Text attributes, see TextAttributesFlags (old name unk4)
GUI_LOCRET_CALLBACK locret
Pointer to the empty function.
GUI_GHOOK_CALLBACK global_hook_proc
Global hook handler (ghook)
GUI_GHOOK_CALLBACK ghook
Global hook handler (ghook)
int ExtractEditControl(void *gui, int n, EDITCONTROL *ec)
Get a copy of the edit control in the InputDialog.
void SetTextAttrToEditCOptions(EDITC_OPTIONS *options, int flags)
Set text attributes.
int EDIT_OpenOptionMenuWithUserItems(void *gui, void(*itemhandler)(USR_MENU_ITEM *item), void *user_pointer, int to_add)
void EDIT_SetFocus(void *gui, int n)
Focus given edit control.
int UpdateTab1stItem(void *gui, int unk_0)
Update content of the active tab.
void * AllocMenuItem(void *gui)
Dynamic allocation of the menu item.
void SetSoftKey(void *gui, const SOFTKEY_DESC *softkey, int softkey_id)
Add softkey to the GUI.
void ConstructComboBox(EDITCONTROL *ec, int type, int flags, WSHDR *title, int maxlen, int unk_zero, int items_count, int selected_item)
Create new edit control (ComboBox).
void EDIT_SetCursorPos(void *gui, int position)
Set cursor position in text.
void SetHeaderToMenu(void *gui, const HEADER_DESC *header, const void *malloc_fn)
Set header to the GUI.
void SetMLMenuItemText(void *gui, void *item, WSHDR *text1, WSHDR *text2, int item_n)
Set text to menu item.
int ShowPleaseWaitBox(int flags)
'Please wait' popup.
int EDIT_GetUnFocus(void *gui)
Get index of the previous focused edit control.
void * GetPopupUserPointer(void *gui)
Get user pointer from the popup.
void(* GUI_GHOOK_CALLBACK)(GUI *gui, int cmd)
GUI global hook.
int EDIT_GetItemNumInFocusedComboBox(void *gui)
Get item index in the focused ComboBox.
int CreatePopupGUI(int flags, void *user_pointer, const POPUP_DESC *popup, int lgp_id)
Create custom Popup.
void EDIT_InsertEditControl(void *gui, int n, const EDITCONTROL *ec)
Insert edit control to the InputDialog.
void Scrollbar_SetValue(WIDGET *scrollbar, int value)
Set the scrollbar's current position.
MenuDialogFlags
Menu options.
RECT * GetHeaderRECT(void)
Size of UI header.
void TViewSetUserPointer(void *gui, void *user_pointer)
Set custom user pointer to the TextView.
void * GetPBarProc3()
Get pointer for proc3 method of PBAR_DESC struct.
int CreateRadioButtonList(const void *items, int num, const int *exclude_ids, int exclude_count, int selected_id, int(*handler)(int item_id, int key, int user1, int user2), int flags, int header_lgp, const int *header_icon, int user1, int user2)
Create radio button list.
int EDIT_GetCursorPos(void *gui)
Get cursor position in text.
int GetCurMenuItem(void *gui)
Get index of the selected item in menu.
int EDIT_IsBusy(void *gui)
Check if InputDialog is busy.
int MsgBoxYesNo(int flags, int message, void(*callback)(int canceled))
Confirmation popup with Yes/No.
int CreateMenu(int style, int zero, const MENU_DESC *menu, const HEADER_DESC *header, int selected_item, int items_count, void *user_pointer, int *to_remove)
Create menu (list with items).
void TViewSetText(void *gui, const WSHDR *text, const void *malloc_fn, const void *mfree_fn)
Set text to the TextView.
void TViewSetDefinition(void *gui, const TVIEW_DESC *tv)
Attach the TextView definition to the allocated GUI.
RECT * GetOptionsHeaderRECT(void)
Size of UI options header.
int CreateInputTextDialog(const INPUTDIA_DESC *input_desc, const HEADER_DESC *header_desc, EDITQ *eq, int do_mfree, void *user_pointer)
Create InputDialog GUI.
void SetWidgetRect(void *widget, int x, int y, int x2, int y2)
Dynamically set the bounding rectangle for the widget.
void EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn)
Set list of the edit controls to the allocated GUI.
UIDialogCmdID
Ghook commands.
int MsgBoxOkCancel(int flags, int message, void(*callback)(int canceled))
Confirmation popup with Ok/Cancel.
int(* MenuSearchCallBack)(void *gui, WSHDR *search)
Menu search callback.
EDITQ * AllocEQueue(const void *malloc_func, const void *mfree_func)
List of the edit controls.
int ShowPBarBox(int flags, int message, PBAR_DESC *pbar_desc, int initial_value, WSHDR *initial_ws)
Progressbar popup.
int StoreEditControl(void *gui, int n, const EDITCONTROL *ec)
Replace the edit control in the InputDialog.
void SetBrushColorToEditCOptions(EDITC_OPTIONS *options, int brush)
Set background color.
int ShowWaitBox(int flags, int message)
Wait popup.
int SetGUIToTabGUI(void *gui, int tab_n, const int *icons, void *content_gui)
Link content gui with tab.
void AddIconToIconBar(int pic, short *num)
Push icon to the iconbar (E/EL71).
void EDIT_SetUserPointer(void *gui, void *user_pointer)
Set custom user pointer to the Input.
void * GetMenuGUI(const void *malloc_fn, const void *mfree_fn)
Allocate GUI for single-line menu.
int AddEditControlToEditQend(EDITQ *eq, const EDITCONTROL *ec, const void *malloc_func)
Add edit control to the end of the list.
void * EDIT_GetGUI(const void *malloc_fn, const void *mfree_fn)
Allocate GUI for the Input.
void DisableIconBar(int disable)
Enable or disable global iconbar on EL/E71.
int SetPBarValue(int gui_id, int value)
Set value to progressbar popup.
void SetCursorToMenuItem(void *gui, int item_n)
Scroll to the given menu item.
void EDIT_SetTextToFocused(void *gui, const WSHDR *value)
Set value to the focused edit control.
void * GetHeaderPointer(void *gui)
Get pointer to the UI header.
int(* GUI_ONKEY_CALLBACK)(GUI *gui, GUI_MSG *msg)
GUI keys handler.
int ConstructEditTime(EDITCONTROL *ec, const TTime *time)
Create new edit control (Time).
void SetMenuSearchCallBack(void *gui, const MenuSearchCallBack callback)
Set callback for the searching in the menu.
void SetMenuToGUI(void *gui, const void *menu)
Attach the menu definition to the allocated GUI (by GetMenuGUI or GetMultiLinesMenuGUI).
int EDIT_GetMarkedText(void *gui, WSHDR *selected_text)
Get value of the selected text.
void * MenuGetUserPointer(void *gui)
Get custom user pointer from menu.
WSHDR * AllocMenuWS(void *gui, int len)
Allocate WSHDR for using it in SetMenuItemText.
void GUI_SetUserPointer(void *gui, void *user_pointer)
Set custom user pointer to the GUI, like Menu.
void MenuSetUserPointer(void *gui, void *user_pointer)
Set custom user pointer to the menu.
int MsgBoxError(int flags, int message)
Show error popup.
void EDIT_SetDate(void *gui, int n, const TDate *date)
Set date value to the edit control.
void(* GUI_LOCRET_CALLBACK)(void)
GUI locret callback (empty stub).
void(* MENUITEM_DRAW_PROC)(void *gui, int item_n, void *user_pointer)
Menu item draw callback.
void RefreshGUI(void)
Force refresh current GUI.
void EDIT_GetTime(void *gui, int n, TTime *time)
Get time value from the edit control.
void SetFontToEditCOptions(EDITC_OPTIONS *options, int font)
Change text font.
void SetMenuItemIconArray(void *gui, void *item, const int *icons)
Set the icon array used by the menu.
WIDGET * CreateScrollbarWidget(const void *malloc_fn)
Allocate Scrollbar WIDGET.
void SetPenColorToEditCOptions(EDITC_OPTIONS *options, int pen)
Set text color.
int EDIT_SetTextToEditControl(void *gui, int n, const WSHDR *value)
Set value to the given edit control.
void * TViewGetUserPointer(void *gui)
Get custom user pointer from TextView.
void AttachWidget(void *gui, const void *widget, int id, const void *malloc_fn)
Attach a widget to the GUI.
void EDIT_RemoveEditControl(void *gui, int n)
Remove edit control for the InputDialog.
int ConstructEditDate(EDITCONTROL *ec, const TDate *date)
Create new edit control (Date).
void * GetTabGUI(void *malloc_fn, void *mfree_fn)
Allocate GUI for tabs.
EditControlFlags
Flags for the EditControl.
SetSoftKeyID
Softkey IDs for SetSoftKey.
void * FindItemByID(GUI *gui, int id)
Find private item in the GUI.
void SetGUIDefinition(void *gui, const void *definition)
Set UI definition to the GUI.
void SetMenuItemText(void *gui, void *item, WSHDR *text, int item_n)
Set text to menu item.
int EDIT_SetTextInvert(void *gui, int position, int len)
Invert background of the part of text.
void SetMenuSoftKey(void *gui, const SOFTKEY_DESC *softkey, int softkey_id)
Add softkey to the menu.
InputDialogFlags
InputDialog options.
void * GetMultiLinesMenuGUI(const void *malloc_fn, const void *mfree_fn)
Allocate GUI for multi-line menu.
void ConstructEditControl(EDITCONTROL *ec, int type, int flags, const WSHDR *title, int maxlen)
Create new edit control.
void SetAlignToEditCOptions(EDITC_OPTIONS *options, int flags)
Set text attributes.
void * GetGuiByTab(void *gui, int tab_n)
Get GUI of the tab content.
void * EDIT_GetUserPointer(void *gui)
Get user pointer from the InputDialog.
void SetHeaderScrollText(void *header, const WSHDR *title, const void *malloc_fn, const void *mfree_fn)
Set scolled text to the UI header.
void SetMenuItemCount(void *gui, int items_count)
Statically set items count in the menu.
void EDIT_RemoveTextInvert(void *gui)
Remove text background ivertion.
int SetCursorTab(void *gui, int tab_n)
Switch to the given tab.
int SetPBarText(int gui_id, WSHDR *ws)
Set WSHDR string to progressbar popup.
void Menu_SetItemCountDyn(void *gui, int items_count)
Dynamically set items count on the menu.
RECT * GetMainAreaRECT(void)
Size of UI main area.
void SetHeaderText(void *header, const WSHDR *title, const void *malloc_fn, const void *mfree_fn)
Set main text to the UI header.
EDITCONTROL * PrepareEditControl(EDITCONTROL *ec)
Pre-initialize EDITCONTROL structure.
void UpdateMenuCursorItem(void *gui, int item_n)
Scroll to the given menu item and refresh the menu.
void SetHeader(void *gui, const HEADER_DESC *header, const void *malloc_fn)
Set header to the GUI.
TextInputDialogCmdID
TextInputDialog ghook commands.
void * GUI_GetUserPointer(void *gui)
Get custom user pointer from standard GUI, like Menu.
void SetMenuItemIconIMGHDR(void *gui, void *item, IMGHDR *icon)
Add icon to the list item (IMGHDR).
void(* MENUPROCS_DESC)(GUI *gui)
Menu item select callback.
int IsIconBarDisabled()
Check state of iconbar (EL71/E71).
int GetMenuItemCount(void *gui)
Get count of items on the menu.
void * GetDataOfItemByID(GUI *gui, int id)
Get data of the private item in the GUI.
void SetInvertToEditCOptions(EDITC_OPTIONS *options, int invert)
Enable background inversion.
DialogFlags
Dialog windows style flags.
void CopyOptionsToEditControl(EDITCONTROL *ec, const EDITC_OPTIONS *options)
Set options to the edit control.
void * AllocMLMenuItem(void *gui)
Dynamic allocation of the menu item.
void Scrollbar_Configure(WIDGET *scrollbar, int limit, int unk1, int unk2)
Configure the scrollbar's behavior constraints.
int EDIT_IsMarkModeActive(void *gui)
Check if text selection enabled.
int ShowMSG(int flags, int message)
Show info popup.
int CreatePopupGUI_ws(int flags, void *user_pointer, const POPUP_DESC *popup, const WSHDR *message)
Create custom Popup.
int GetCursorTab(void *gui)
Get index of the active tab.
void EDIT_ExtractFocusedControl(void *gui, EDITCONTROL *ec)
Get a copy of the focused edit control in the InputDialog.
int EDIT_GetFocus(void *gui)
Get index of the focused edit control.
DialogFlags PopupDialogFlags
Popup dialog flags.
char * RamIconBar()
Pointer to the status of iconbar (EL/E71).
EDITC_OPTIONS * PrepareEditCOptions(EDITC_OPTIONS *options)
Initialize EDITC_OPTIONS structure.
int CreateMultiLinesMenu(int style, int zero, const ML_MENU_DESC *menu, const HEADER_DESC *header, int selected_item, int items_count)
Create menu with multiline items (list with items).
void * TViewGetGUI(const void *malloc_fn, const void *mfree_fn)
Allocate GUI for TextView.
DialogFlags MsgBoxFlags
Flags for ShowMSG.
void EDIT_SetTime(void *gui, int n, const TTime *time)
Set time value to the edit control.
void * RamMenuAnywhere()
Key sequence buffer of the "menu anywhere" shortcut (char[4]).
void EDIT_SetDefinition(void *gui, const INPUTDIA_DESC *input_desc)
Attach the Input definition to the allocated GUI.
void SetHeaderIcon(void *header, const int *icons, const void *malloc_fn, const void *mfree_fn)
Set icons of the UI header.
void SetHeaderExtraText(void *header, const WSHDR *ws, const void *malloc_fn, const void *mfree_fn)
Set extra text to the UI header.
EditControlTypeID
Types of the EditControl.
void SetMenuItemIcon(void *gui, int item_n, int icon)
Set icon for a menu item.
void EDIT_GetDate(void *gui, int n, TDate *date)
Get date value from the edit control.
int EDIT_StoreControlToFocused(void *gui, const EDITCONTROL *ec)
Replace focused edit control in the InputDialog.
@ MENU_FLAGS_DISABLE_BREAKLINE
@ MENU_FLAGS_DISABLE_SCROLLBAR
@ MENU_FLAGS_ENABLE_SEARCH
@ MENU_FLAGS_ENABLE_BIG_LETTERS
@ MENU_FLAGS_ENABLE_ICONS
@ MENU_FLAGS_ENABLE_TEXT_SCROLLING
@ ECF_DISABLE_BIG_LETTERS
@ ECF_DEFAULT_BIG_LETTER
Enable big letter after ". ".
@ ECF_DISABLE_EOLCHAR
In chartable.
@ ECF_DISABLE_SMALL_LETTERS
@ ECF_DISABLE_MINUS
Also disable #.
@ ECF_DISABLE_POINT
Also disable *.
@ ECF_LONGDIEZ_EQ_QUESTION
@ SET_RIGHT_SOFTKEY
Right softkey.
@ SET_LEFT_SOFTKEY
Left softkey.
@ SET_MIDDLE_SOFTKEY
Middle softkey.
@ INPUTDIA_FLAGS_SWAP_SOFTKEYS
@ INPUTDIA_FLAGS_LOCK_CURSOR
@ INPUTDIA_FLAGS_READONLY
@ DIALOG_NORMAL
Normal (small) window.
@ DIALOG_FULLSCREEN
Full-screen window.
@ DIALOG_DUMMY_CSM
Create a dummy CSM.
Custom options for EditControl.
Linked-list of the EditControl's.
Menu definition (single-line).
Menu definition (multi-line).
Scrollbar widget definition.
Custom options menu item for InputDialog.