|
gwenhywfar 5.12.0
|
#include <gwenhywfar/inherit.h>#include <gwenhywfar/list1.h>#include <gwenhywfar/list2.h>#include <gwenhywfar/xml.h>#include <gwenhywfar/db.h>
Go to the source code of this file.
Typedefs | |
| typedef struct GWEN_DIALOG | GWEN_DIALOG |
| typedef int GWENHYWFAR_CB(* | GWEN_DIALOG_SIGNALHANDLER) (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender) |
| typedef int GWENHYWFAR_CB(* | GWEN_DIALOG_SIGNALHANDLER2) (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender, int intArg, const char *stringArg) |
Functions | |
| GWENHYWFAR_API void | GWEN_Dialog_AddMediaPath (GWEN_DIALOG *dlg, const char *s) |
| GWENHYWFAR_API void | GWEN_Dialog_AddMediaPathsFromPathManager (GWEN_DIALOG *dlg, const char *destlib, const char *pathName, const char *relPath) |
| GWENHYWFAR_API int | GWEN_Dialog_AddSubDialog (GWEN_DIALOG *dlg, const char *parentWidgetName, GWEN_DIALOG *subdlg) |
| GWENHYWFAR_API GWEN_DIALOG * | GWEN_Dialog_CreateAndLoadWithPath (const char *dialogId, const char *pmLibName, const char *pmDataDir, const char *fileName) |
| GWENHYWFAR_API void | GWEN_Dialog_free (GWEN_DIALOG *dlg) |
| GWENHYWFAR_API uint32_t | GWEN_Dialog_GetGuiId (const GWEN_DIALOG *dlg) |
| GWENHYWFAR_API const char * | GWEN_Dialog_GetId (const GWEN_DIALOG *dlg) |
| GWENHYWFAR_API GWEN_DIALOG * | GWEN_Dialog_new (const char *dialogId) |
| GWENHYWFAR_API int | GWEN_Dialog_ReadXml (GWEN_DIALOG *dlg, GWEN_XMLNODE *node) |
| GWENHYWFAR_API int | GWEN_Dialog_ReadXmlFile (GWEN_DIALOG *dlg, const char *fname) |
| GWENHYWFAR_API int | GWEN_Dialog_RemoveWidget (GWEN_DIALOG *dlg, const char *name) |
| GWENHYWFAR_API GWEN_DIALOG_SIGNALHANDLER | GWEN_Dialog_SetSignalHandler (GWEN_DIALOG *dlg, GWEN_DIALOG_SIGNALHANDLER fn) |
| GWENHYWFAR_API GWEN_DIALOG_SIGNALHANDLER2 | GWEN_Dialog_SetSignalHandler2 (GWEN_DIALOG *dlg, GWEN_DIALOG_SIGNALHANDLER2 fn) |
Functions Available After Init Event | |
Functions in this group can only be called while in a GWEN_Gui_ExecDialog loop or between calls to GWEN_Gui_OpenDialog() and GWEN_Gui_CloseDialog() because these functions directly manipulate GUI widgets which are only valid in the intervals mentioned above. | |
| GWENHYWFAR_API const char * | GWEN_Dialog_GetCharProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) |
| GWENHYWFAR_API int | GWEN_Dialog_GetIntProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue) |
| GWENHYWFAR_API int | GWEN_Dialog_SetCharProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal) |
| GWENHYWFAR_API int | GWEN_Dialog_SetIntProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal) |
Functions Available After Construction | |
These functions manipulate the descriptions of dialogs and widgets, the don't operate on the GUI widgets. That's why they are immediately available after construction. | |
| GWENHYWFAR_API void | GWEN_Dialog_AddWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl) |
| GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Dialog_GetPreferences (const GWEN_DIALOG *dlg) |
| GWENHYWFAR_API int | GWEN_Dialog_GetWidgetColumns (const GWEN_DIALOG *dlg, const char *name) |
| GWENHYWFAR_API uint32_t | GWEN_Dialog_GetWidgetFlags (const GWEN_DIALOG *dlg, const char *name) |
| GWENHYWFAR_API int | GWEN_Dialog_GetWidgetRows (const GWEN_DIALOG *dlg, const char *name) |
| GWENHYWFAR_API const char * | GWEN_Dialog_GetWidgetText (const GWEN_DIALOG *dlg, const char *name) |
| GWENHYWFAR_API void | GWEN_Dialog_SetWidgetColumns (GWEN_DIALOG *dlg, const char *name, int i) |
| GWENHYWFAR_API void | GWEN_Dialog_SetWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl) |
| GWENHYWFAR_API void | GWEN_Dialog_SetWidgetRows (GWEN_DIALOG *dlg, const char *name, int i) |
| GWENHYWFAR_API void | GWEN_Dialog_SetWidgetText (GWEN_DIALOG *dlg, const char *name, const char *t) |
| GWENHYWFAR_API void | GWEN_Dialog_SubWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl) |
Localisation | |
| GWENHYWFAR_API const char * | GWEN_Dialog_GetI18nDomain (const GWEN_DIALOG *dlg) |
| GWENHYWFAR_API void | GWEN_Dialog_SetI18nDomain (GWEN_DIALOG *dlg, const char *s) |
| GWENHYWFAR_API const char * | GWEN_Dialog_TranslateString (const GWEN_DIALOG *dlg, const char *s) |
Convenience Functions | |
| GWENHYWFAR_API char * | GWEN_Dialog_ListGetFirstColumnData (GWEN_DIALOG *dlg, const char *widgetName, int row) |
| GWENHYWFAR_API int | GWEN_Dialog_ListGetItemMatchingFirstColumn (GWEN_DIALOG *dlg, const char *widgetName, const char *dataToMatch) |
| GWENHYWFAR_API void | GWEN_Dialog_ListReadColumnSettings (GWEN_DIALOG *dlg, const char *widgetName, const char *variablePrefix, int maxColumns, int minColumnSize, GWEN_DB_NODE *dbPrefs) |
| GWENHYWFAR_API void | GWEN_Dialog_ListWriteColumnSettings (GWEN_DIALOG *dlg, const char *widgetName, const char *variablePrefix, int maxColumns, int minColumnSize, GWEN_DB_NODE *dbPrefs) |
| #define GWEN_WIDGET_FLAGS_DECOR_CLOSE 0x00400000L |
Definition at line 71 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DECOR_MAXIMIZE 0x00800000L |
Definition at line 70 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DECOR_MENU 0x00200000L |
Definition at line 72 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DECOR_MINIMIZE 0x01000000L |
Definition at line 69 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DECOR_SHRINKABLE 0x04000000L |
Definition at line 67 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DECOR_STRETCHABLE 0x02000000L |
Definition at line 68 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_DEFAULT_WIDGET 0x08000000L |
Definition at line 65 of file dialog.h.
Referenced by GWEN_DlgMessage_new(), GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_EQUAL_HEIGHT 0x00020000L |
Definition at line 77 of file dialog.h.
Referenced by Gtk2Gui_WVLayout_Setup(), GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_EQUAL_WIDTH 0x00040000L |
Definition at line 76 of file dialog.h.
Referenced by Gtk2Gui_WHLayout_Setup(), GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FILLX 0x80000000L |
Definition at line 61 of file dialog.h.
Referenced by CocoaGui_Dialog_SetupTree(), CocoaGui_WCheckBox_Setup(), CocoaGui_WComboBox_Setup(), CocoaGui_WGridLayout_Setup(), CocoaGui_WGroupBox_Setup(), CocoaGui_WHLayout_Setup(), CocoaGui_WHLine_Setup(), CocoaGui_WHSpacer_Setup(), CocoaGui_WLabel_Setup(), CocoaGui_WLineEdit_Setup(), CocoaGui_WListBox_Setup(), CocoaGui_WProgressBar_Setup(), CocoaGui_WPushButton_Setup(), CocoaGui_WRadioButton_Setup(), CocoaGui_WScrollArea_Setup(), CocoaGui_WSpinBox_Setup(), CocoaGui_WStack_Setup(), CocoaGui_WTabBook_Setup(), CocoaGui_WTextBrowser_Setup(), CocoaGui_WTextEdit_Setup(), CocoaGui_WVLayout_Setup(), CocoaGui_WVLine_Setup(), CocoaGui_WVSpacer_Setup(), Gtk2Gui_Dialog_SetupTree(), Gtk2Gui_WGridLayout_AddChildGuiWidget(), Gtk2Gui_WHLayout_AddChildGuiWidget(), Gtk2Gui_WHSpacer_Setup(), Gtk3Gui_Dialog_SetupTree(), Gtk3Gui_WHLayout_AddChildGuiWidget(), Gtk3Gui_WHSpacer_Setup(), GWEN_Widget_Flags_fromString(), Qt4_W_CheckBox::setup(), Qt4_W_ComboBox::setup(), Qt4_W_Dialog::setup(), Qt4_W_GridLayout::setup(), Qt4_W_GroupBox::setup(), Qt4_W_HLayout::setup(), Qt4_W_HLine::setup(), Qt4_W_Label::setup(), Qt4_W_LineEdit::setup(), Qt4_W_ListBox::setup(), Qt4_W_ProgressBar::setup(), Qt4_W_PushButton::setup(), Qt4_W_RadioButton::setup(), Qt4_W_ScrollArea::setup(), Qt4_W_SpinBox::setup(), Qt4_W_TabBook::setup(), Qt4_W_TextBrowser::setup(), Qt4_W_TextEdit::setup(), Qt4_W_VLayout::setup(), Qt4_W_VLine::setup(), Qt4_W_Widget::setup(), Qt4_W_WidgetStack::setup(), Qt5_W_CheckBox::setup(), Qt5_W_ComboBox::setup(), Qt5_W_Dialog::setup(), Qt5_W_GridLayout::setup(), Qt5_W_GroupBox::setup(), Qt5_W_HLayout::setup(), Qt5_W_HLine::setup(), Qt5_W_Label::setup(), Qt5_W_LineEdit::setup(), Qt5_W_ListBox::setup(), Qt5_W_ProgressBar::setup(), Qt5_W_PushButton::setup(), Qt5_W_RadioButton::setup(), Qt5_W_ScrollArea::setup(), Qt5_W_SpinBox::setup(), Qt5_W_TabBook::setup(), Qt5_W_TextBrowser::setup(), Qt5_W_TextEdit::setup(), Qt5_W_VLayout::setup(), Qt5_W_VLine::setup(), Qt5_W_Widget::setup(), Qt5_W_WidgetStack::setup(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FILLY 0x40000000L |
Definition at line 62 of file dialog.h.
Referenced by CocoaGui_Dialog_SetupTree(), CocoaGui_WCheckBox_Setup(), CocoaGui_WComboBox_Setup(), CocoaGui_WGridLayout_Setup(), CocoaGui_WGroupBox_Setup(), CocoaGui_WHLayout_Setup(), CocoaGui_WHLine_Setup(), CocoaGui_WHSpacer_Setup(), CocoaGui_WLabel_Setup(), CocoaGui_WLineEdit_Setup(), CocoaGui_WListBox_Setup(), CocoaGui_WProgressBar_Setup(), CocoaGui_WPushButton_Setup(), CocoaGui_WRadioButton_Setup(), CocoaGui_WScrollArea_Setup(), CocoaGui_WSpinBox_Setup(), CocoaGui_WStack_Setup(), CocoaGui_WTabBook_Setup(), CocoaGui_WTextBrowser_Setup(), CocoaGui_WTextEdit_Setup(), CocoaGui_WVLayout_Setup(), CocoaGui_WVLine_Setup(), CocoaGui_WVSpacer_Setup(), Gtk2Gui_Dialog_SetupTree(), Gtk2Gui_WGridLayout_AddChildGuiWidget(), Gtk2Gui_WGroupBox_AddChildGuiWidget(), Gtk2Gui_WScrollArea_AddChildGuiWidget(), Gtk2Gui_WVLayout_AddChildGuiWidget(), Gtk2Gui_WVSpacer_Setup(), Gtk3Gui_Dialog_SetupTree(), Gtk3Gui_WGroupBox_AddChildGuiWidget(), Gtk3Gui_WScrollArea_AddChildGuiWidget(), Gtk3Gui_WVLayout_AddChildGuiWidget(), Gtk3Gui_WVSpacer_Setup(), GWEN_Widget_Flags_fromString(), Qt4_W_CheckBox::setup(), Qt4_W_ComboBox::setup(), Qt4_W_Dialog::setup(), Qt4_W_GridLayout::setup(), Qt4_W_GroupBox::setup(), Qt4_W_HLayout::setup(), Qt4_W_HLine::setup(), Qt4_W_Label::setup(), Qt4_W_LineEdit::setup(), Qt4_W_ListBox::setup(), Qt4_W_ProgressBar::setup(), Qt4_W_PushButton::setup(), Qt4_W_RadioButton::setup(), Qt4_W_ScrollArea::setup(), Qt4_W_SpinBox::setup(), Qt4_W_TabBook::setup(), Qt4_W_TextBrowser::setup(), Qt4_W_TextEdit::setup(), Qt4_W_VLayout::setup(), Qt4_W_VLine::setup(), Qt4_W_Widget::setup(), Qt4_W_WidgetStack::setup(), Qt5_W_CheckBox::setup(), Qt5_W_ComboBox::setup(), Qt5_W_Dialog::setup(), Qt5_W_GridLayout::setup(), Qt5_W_GroupBox::setup(), Qt5_W_HLayout::setup(), Qt5_W_HLine::setup(), Qt5_W_Label::setup(), Qt5_W_LineEdit::setup(), Qt5_W_ListBox::setup(), Qt5_W_ProgressBar::setup(), Qt5_W_PushButton::setup(), Qt5_W_RadioButton::setup(), Qt5_W_ScrollArea::setup(), Qt5_W_SpinBox::setup(), Qt5_W_TabBook::setup(), Qt5_W_TextBrowser::setup(), Qt5_W_TextEdit::setup(), Qt5_W_VLayout::setup(), Qt5_W_VLine::setup(), Qt5_W_Widget::setup(), Qt5_W_WidgetStack::setup(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FIXED_HEIGHT 0x00080000L |
Definition at line 75 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString().
| #define GWEN_WIDGET_FLAGS_FIXED_WIDTH 0x00100000L |
Definition at line 74 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString().
| #define GWEN_WIDGET_FLAGS_FRAME_GROOVE 0x00000020L |
Definition at line 93 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FRAME_RAISED 0x00000080L |
Definition at line 91 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FRAME_SUNKEN 0x00000100L |
Definition at line 90 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_FRAME_THICK 0x00000040L |
Definition at line 92 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_BOTTOM 0x00002000L |
Definition at line 82 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERX 0x00001000L |
Definition at line 83 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_CENTERY 0x00000800L |
Definition at line 84 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_LEFT 0x00010000L |
Definition at line 79 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_RIGHT 0x00008000L |
Definition at line 80 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_JUSTIFY_TOP 0x00004000L |
Definition at line 81 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_NO_WORDWRAP 0x00000400L |
Definition at line 86 of file dialog.h.
Referenced by GWEN_Widget_Flags_fromString(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_PASSWORD 0x10000000L |
Definition at line 64 of file dialog.h.
Referenced by CocoaGui_WLineEdit_Setup(), Gtk2Gui_WLineEdit_Setup(), Gtk3Gui_WLineEdit_Setup(), GWEN_DlgInput_new(), GWEN_Widget_Flags_fromString(), Qt4_W_LineEdit::setup(), Qt5_W_LineEdit::setup(), and FOX16_GuiDialog::setupTree().
| #define GWEN_WIDGET_FLAGS_READONLY 0x20000000L |
Definition at line 63 of file dialog.h.
Referenced by CocoaGui_WComboBox_Setup(), Gtk2Gui_WComboBox_Setup(), Gtk3Gui_WComboBox_Setup(), GWEN_Widget_Flags_fromString(), Qt4_W_ComboBox::setup(), Qt5_W_ComboBox::setup(), and FOX16_GuiDialog::setupTree().
| typedef struct GWEN_DIALOG GWEN_DIALOG |
| typedef int GWENHYWFAR_CB(* GWEN_DIALOG_SIGNALHANDLER) (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender) |
The signal handler should return one of the event result code (see GWEN_DialogEvent_ResultHandled and following) or a GWEN_ERROR code.
| typedef int GWENHYWFAR_CB(* GWEN_DIALOG_SIGNALHANDLER2) (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender, int intArg, const char *stringArg) |
| anonymous enum |
These are the predefined result codes to be returned by a signal handler. (Note: this is not a typedef because the signal handler has to be able to return GWEN_ERROR codes as well).
| Enumerator | |
|---|---|
| GWEN_DialogEvent_ResultHandled | |
| GWEN_DialogEvent_ResultNotHandled | |
| GWEN_DialogEvent_ResultAccept | |
| GWEN_DialogEvent_ResultReject | |
| enum GWEN_DIALOG_PROPERTY |
| GWENHYWFAR_API void GWEN_Dialog_AddMediaPath | ( | GWEN_DIALOG * | dlg, |
| const char * | s ) |
Add a path where to find media such as icons, images etc when used e.g. with pushbuttons or images.
Definition at line 246 of file dialog.c.
References GWEN_StringList_AppendString().
Referenced by Dlg_Test1_new(), and Dlg_Test2_new().


| GWENHYWFAR_API void GWEN_Dialog_AddMediaPathsFromPathManager | ( | GWEN_DIALOG * | dlg, |
| const char * | destlib, | ||
| const char * | pathName, | ||
| const char * | relPath ) |
Add paths from the given path manager. For each entry of the given path managers path list that entry is concatenated with the relPath argument (if not NULL) and added to the dialogs list of media paths.
| dlg | dialog to which media paths are to be added |
| destlib | see the argument of the same name in GWEN_PathManager_GetPaths |
| pathName | see the argument of the same name in GWEN_PathManager_GetPaths |
| relPath | optional relative path to be added to each entry of the given path manager's entry to form a media path for this dialog |
Definition at line 256 of file dialog.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_DIR_SEPARATOR_S, GWEN_PathManager_GetPaths(), GWEN_StringList_AppendString(), GWEN_StringList_FirstEntry(), GWEN_StringList_free(), GWEN_StringListEntry_Data(), and GWEN_StringListEntry_Next().

| GWENHYWFAR_API int GWEN_Dialog_AddSubDialog | ( | GWEN_DIALOG * | dlg, |
| const char * | parentWidgetName, | ||
| GWEN_DIALOG * | subdlg ) |
Inserts a sub-dialog into the given dialog. The widgets of the subdialog become children of the main dialog below the widget referenced to by parentName. Please take care that the subdialog doesn't contain widgets with the same name as the main dialog. This only works if GWEN_Gui_ExecDialog has not been called yet! Takes over ownership of the given subdialog.
Definition at line 426 of file dialog.c.
References DBG_ERROR, GWEN_Dialog_FindWidgetByName(), GWEN_Dialog_List_Add(), GWEN_ERROR_NOT_FOUND, GWEN_LOGDOMAIN, and NULL.

| GWENHYWFAR_API void GWEN_Dialog_AddWidgetFlags | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| uint32_t | fl ) |
Definition at line 862 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_AddFlags().
Referenced by GWEN_DlgInput_new(), and GWEN_DlgMessage_new().


| GWENHYWFAR_API GWEN_DIALOG * GWEN_Dialog_CreateAndLoadWithPath | ( | const char * | dialogId, |
| const char * | pmLibName, | ||
| const char * | pmDataDir, | ||
| const char * | fileName ) |
Create a dialog and try to load its definition file.
| dialogId | name of the dialog to create |
| pmLibName | library name as registered with GWEN_PATHMANAGER (used for GWEN_PathManager_FindFile) |
| pmDataDir | datapath name as registered with GWEN_PATHMANAGER (used for GWEN_PathManager_FindFile) |
| fileName | name of the file to load (relative to the destination, e.g. "aqbanking/backends/aqhbci/dialogs/dlg_ddvcard.dlg") |
Definition at line 90 of file dialog.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Dialog_free(), GWEN_Dialog_new(), GWEN_Dialog_ReadXmlFile(), GWEN_LOGDOMAIN, GWEN_PathManager_FindFile(), and NULL.
Referenced by GWEN_DlgMessage_new(), and GWEN_DlgProgress_new().


| GWENHYWFAR_API void GWEN_Dialog_free | ( | GWEN_DIALOG * | dlg | ) |
Definition at line 137 of file dialog.c.
References DBG_WARN, GWEN_DB_Group_free(), GWEN_Dialog_List_free(), GWEN_FREE_OBJECT, GWEN_Gui_WriteDialogPrefs(), GWEN_INHERIT_FINI, GWEN_LIST_FINI, GWEN_LOGDOMAIN, and GWEN_StringList_free().
Referenced by Dlg_Test1_new(), Dlg_Test2_new(), GWEN_Dialog_CreateAndLoadWithPath(), GWEN_DlgInput_new(), GWEN_DlgShowBox_new(), GWEN_Gui_DialogBased_HideBox(), GWEN_Gui_DialogBased_InputBox(), GWEN_Gui_DialogBased_MessageBox(), GWEN_Gui_DialogBased_ProgressEnd(), GWEN_Gui_DialogBased_ShowBox(), and GWEN_Gui_ShowProgress().


| GWENHYWFAR_API const char * GWEN_Dialog_GetCharProperty | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| GWEN_DIALOG_PROPERTY | prop, | ||
| int | index, | ||
| const char * | defaultValue ) |
Returns a string property.
If the pointer returned is not the defaultValue but rather a pointer generated by the dialog framework implementation then the pointer is only guaranteed to be valid until the next call with the same values of name and property.
Example: If you cycle through all entries of a listbox (by modifying index) each successive call overwrites the string previously returned. However, when you call this function once with the property GWEN_DialogProperty_Title and next time with a property of GWEN_DialogProperty_Value those two pointers will not influence each other.
| dlg | pointer to the dialog to be inspected |
| name | name of the widget of the dialog whose property is to be read. Use NULL or an empty string to select the dialog itself |
| prop | property to read (see GWEN_DialogProperty_Title ff) |
| index | (see GWEN_Dialog_SetIntProperty for an explanation) |
| defaultValue | default value to be returned if the real value is unavailable (e.g. if the current value is an empty string) |
Definition at line 792 of file dialog.c.
References DBG_ERROR, GWEN_Dialog_FindWidgetByName(), and GWEN_LOGDOMAIN.
Referenced by _gwenGuiSignalHandler(), GWEN_Dialog_ListGetFirstColumnData(), GWEN_Dialog_ListGetItemMatchingFirstColumn(), GWEN_DlgInput_CheckInput(), and GWEN_DlgInput_Fini().


| GWENHYWFAR_API uint32_t GWEN_Dialog_GetGuiId | ( | const GWEN_DIALOG * | dlg | ) |
Definition at line 192 of file dialog.c.
Referenced by GWEN_Gui_DialogBased_HideBox().

| GWENHYWFAR_API const char * GWEN_Dialog_GetI18nDomain | ( | const GWEN_DIALOG * | dlg | ) |
Returns the I18N domain of the dialog. This is normally taken from the dialog description file (attribute "i18n" of the "dialog" element). This domain is used to localize strings of the dialog description file by using it as first argument to GWEN_I18N_Translate(). This allows for translation within the context of the dialog. AqBanking's dialogs use "aqbanking" as I18N domain, so the translation for its dialogs also appear in its pot files.
| GWENHYWFAR_API const char * GWEN_Dialog_GetId | ( | const GWEN_DIALOG * | dlg | ) |
The dialog id is in most cases hardcoded into the describing XML file. It is the unique name of the dialog. This name is used to read/write dialog preferences.
Definition at line 182 of file dialog.c.
Referenced by GWEN_Dialog_DumpWidget().

| GWENHYWFAR_API int GWEN_Dialog_GetIntProperty | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| GWEN_DIALOG_PROPERTY | prop, | ||
| int | index, | ||
| int | defaultValue ) |
This function returns the value of an integer property.
| dlg | pointer to the dialog to be inspected |
| name | name of the widget of the dialog whose property is to be read. Use NULL or an empty string to select the dialog itself |
| prop | property to read (see GWEN_DialogProperty_Title ff) |
| index | (see GWEN_Dialog_SetIntProperty for an explanation) |
| defaultValue | default value to be returned if the real value is unavailable |
Definition at line 733 of file dialog.c.
References DBG_ERROR, GWEN_Dialog_FindWidgetByName(), and GWEN_LOGDOMAIN.
Referenced by _gwenGuiSignalHandler(), _gwenGuiSignalHandler(), GWEN_Dialog_ListWriteColumnSettings(), GWEN_DlgInput_Fini(), GWEN_DlgMessage_Fini(), GWEN_DlgProgress_Fini(), and GWEN_DlgShowBox_Fini().


| GWENHYWFAR_API GWEN_DB_NODE * GWEN_Dialog_GetPreferences | ( | const GWEN_DIALOG * | dlg | ) |
Returns a DB which can be used to read and store preference for the dialog. Most dialogs in AqBanking use this to remember the dialog geometry or the widths of columns in lists etc. This DB is automatically read from within the constructor (GWEN_Dialog_new) and written from within the destructor (GWEN_Dialog_free). This is achieved by calling the virtual functions GWEN_Gui_ReadDialogPrefs and GWEN_Gui_WriteDialogPrefs respectively. However, the current GWEN_GUI implementation must implement these functions. Fortunately, AqBanking's GUI implementation (use it with AB_Gui_Extend) does that. It reads/writes those dialog settings from/into its shared settings database.
Definition at line 1002 of file dialog.c.
Referenced by GWEN_DlgInput_Fini(), GWEN_DlgInput_Init(), GWEN_DlgMessage_Fini(), GWEN_DlgMessage_Init(), GWEN_DlgProgress_Fini(), GWEN_DlgProgress_Init(), GWEN_DlgShowBox_Fini(), and GWEN_DlgShowBox_Init().

| GWENHYWFAR_API int GWEN_Dialog_GetWidgetColumns | ( | const GWEN_DIALOG * | dlg, |
| const char * | name ) |
This is another attribute from the dialog description file. It is used with widgets like GWEN_Widget_TypeLineEdit to specify the widget width in number of characters. It is also used for GWEN_Widget_TypeGridLayout to specify the number of columns.
| dlg | pointer to the dialog to be inspected |
| name | name of the widget of the dialog whose attribute is to be read. |
Definition at line 886 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_GetColumns().

| GWENHYWFAR_API uint32_t GWEN_Dialog_GetWidgetFlags | ( | const GWEN_DIALOG * | dlg, |
| const char * | name ) |
Definition at line 836 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_GetFlags().

| GWENHYWFAR_API int GWEN_Dialog_GetWidgetRows | ( | const GWEN_DIALOG * | dlg, |
| const char * | name ) |
This is another attribute from the dialog description file. It is used with widgets GWEN_Widget_TypeGridLayout to specify the number of rows.
| dlg | pointer to the dialog to be inspected |
| name | name of the widget of the dialog whose attribute is to be read. |
Definition at line 912 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_GetRows().

| GWENHYWFAR_API const char * GWEN_Dialog_GetWidgetText | ( | const GWEN_DIALOG * | dlg, |
| const char * | name ) |
Definition at line 950 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), GWEN_Widget_GetText(), and NULL.

| GWENHYWFAR_API char * GWEN_Dialog_ListGetFirstColumnData | ( | GWEN_DIALOG * | dlg, |
| const char * | widgetName, | ||
| int | row ) |
Get the content of the first column of a given list entry (or whole content if only single column).
| dlg | dialog containing the widget to handle |
| widgetName | name of the widget to handle |
| row | index of the list item (beginning with 0) |
Definition at line 1106 of file dialog.c.
References GWEN_Dialog_GetCharProperty(), GWEN_DialogProperty_Value, and NULL.

| GWENHYWFAR_API int GWEN_Dialog_ListGetItemMatchingFirstColumn | ( | GWEN_DIALOG * | dlg, |
| const char * | widgetName, | ||
| const char * | dataToMatch ) |
Return index of list element whose content of the first column matches the given string.
The idea is to have the first column of a list entry contain a unique id by which the list can be searched.
| dlg | dialog containing the widget to handle |
| widgetName | name of the widget to handle |
| dataToMatch | string to match against |
Definition at line 1139 of file dialog.c.
References GWEN_Dialog_GetCharProperty(), GWEN_DialogProperty_Value, and NULL.

| GWENHYWFAR_API void GWEN_Dialog_ListReadColumnSettings | ( | GWEN_DIALOG * | dlg, |
| const char * | widgetName, | ||
| const char * | variablePrefix, | ||
| int | maxColumns, | ||
| int | minColumnSize, | ||
| GWEN_DB_NODE * | dbPrefs ) |
Definition at line 1067 of file dialog.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_Crop(), GWEN_Buffer_free(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_GetIntValue(), GWEN_Dialog_SetIntProperty(), GWEN_DialogProperty_ColumnWidth, and GWEN_DialogProperty_SortDirection.

| GWENHYWFAR_API void GWEN_Dialog_ListWriteColumnSettings | ( | GWEN_DIALOG * | dlg, |
| const char * | widgetName, | ||
| const char * | variablePrefix, | ||
| int | maxColumns, | ||
| int | minColumnSize, | ||
| GWEN_DB_NODE * | dbPrefs ) |
Write current config of a list widget supporting columns (like GWEN_Widget_TypeListBox).
| dlg | dialog containing the widget to handle |
| widgetName | name of the widget to handle |
| variablePrefix | prefix for the different settings, this will be prepended to the variable names used in the given dbPrefs settings. The following variable names will be used:
|
| maxColumns | maximum number of columns to handle |
| minColumnSize | minimum width of each column |
| dbPrefs | GWEN_DB_NODE to store the settings in |
Definition at line 1014 of file dialog.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_Crop(), GWEN_Buffer_free(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_DeleteVar(), GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetIntValue(), GWEN_Dialog_GetIntProperty(), GWEN_DialogProperty_ColumnWidth, GWEN_DialogProperty_SortDirection, GWEN_DialogSortDirection_None, and GWEN_DialogSortDirection_Up.

| GWENHYWFAR_API GWEN_DIALOG * GWEN_Dialog_new | ( | const char * | dialogId | ) |
Definition at line 54 of file dialog.c.
References DBG_WARN, GWEN_DB_Group_new(), GWEN_Dialog_List_new(), GWEN_Dialog_new(), GWEN_Gui_ReadDialogPrefs(), GWEN_INHERIT_INIT, GWEN_LIST_INIT, GWEN_LOGDOMAIN, GWEN_NEW_OBJECT, GWEN_StringList_new(), and NULL.
Referenced by Dlg_Test1_new(), Dlg_Test2_new(), GWEN_Dialog_CreateAndLoadWithPath(), GWEN_Dialog_new(), GWEN_DlgInput_new(), and GWEN_DlgShowBox_new().


| GWENHYWFAR_API int GWEN_Dialog_ReadXml | ( | GWEN_DIALOG * | dlg, |
| GWEN_XMLNODE * | node ) |
Read dialog description from the given XML element.
Definition at line 503 of file dialog.c.
References DBG_INFO, GWEN_Dialog__ReadXmlWidget(), GWEN_Dialog_SetI18nDomain(), GWEN_LOGDOMAIN, GWEN_XMLNode_GetProperty(), and NULL.
Referenced by GWEN_Dialog_ReadXmlFile().


| GWENHYWFAR_API int GWEN_Dialog_ReadXmlFile | ( | GWEN_DIALOG * | dlg, |
| const char * | fname ) |
Read dialog description from the given XML file.
Definition at line 531 of file dialog.c.
References DBG_ERROR, DBG_INFO, GWEN_Dialog_ReadXml(), GWEN_LOGDOMAIN, GWEN_XML_FLAGS_DEFAULT, GWEN_XML_FLAGS_HANDLE_HEADERS, GWEN_XML_ReadFile(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_free(), GWEN_XMLNode_new(), GWEN_XMLNodeTypeTag, and NULL.
Referenced by Dlg_Test1_new(), Dlg_Test2_new(), GWEN_Dialog_CreateAndLoadWithPath(), GWEN_DlgInput_new(), and GWEN_DlgShowBox_new().


| GWENHYWFAR_API int GWEN_Dialog_RemoveWidget | ( | GWEN_DIALOG * | dlg, |
| const char * | name ) |
Definition at line 821 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), GWEN_ERROR_NOT_FOUND, and GWEN_Widget_free().
Referenced by GWEN_DlgInput_new(), and GWEN_DlgMessage_new().


| GWENHYWFAR_API int GWEN_Dialog_SetCharProperty | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| GWEN_DIALOG_PROPERTY | prop, | ||
| int | index, | ||
| const char * | value, | ||
| int | doSignal ) |
Modify a string property.
This might invalidate a pointer previously returned via GWEN_Dialog_GetCharProperty.
Definition at line 762 of file dialog.c.
References DBG_ERROR, GWEN_Dialog_FindWidgetByName(), GWEN_ERROR_NOT_FOUND, GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_LOGDOMAIN.
Referenced by _gwenGuiSignalHandler(), _gwenGuiSignalHandler(), GWEN_DlgInput_Init(), GWEN_DlgMessage_Init(), GWEN_DlgProgress_AddLogText(), GWEN_DlgProgress_Init(), GWEN_DlgProgress_SetFirstProgress(), and GWEN_DlgShowBox_Init().


| GWENHYWFAR_API void GWEN_Dialog_SetI18nDomain | ( | GWEN_DIALOG * | dlg, |
| const char * | s ) |
Set the I18N domain (see GWEN_Dialog_GetI18nDomain).
Definition at line 212 of file dialog.c.
Referenced by GWEN_Dialog_ReadXml().

| GWENHYWFAR_API int GWEN_Dialog_SetIntProperty | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| GWEN_DIALOG_PROPERTY | prop, | ||
| int | index, | ||
| int | value, | ||
| int | doSignal ) |
This function sets the value of an integer property.
| dlg | pointer to the dialog to be manipulated |
| name | name of the widget of the dialog whose property is to be manipulated. Use NULL or an empty string to select the dialog itself |
| prop | property to modify (see GWEN_DialogProperty_Title ff) |
| index | for widgets with array like data this is the index into that array. Normally this value is 0. However, there are examples when this parameter does not equal 0. The property GWEN_DialogProperty_ColumnWidth of a GWEN_Widget_TypeListBox is such an example. Here the index selects the column whose width is to be changed. |
| value | the value to set |
| doSignal | some implementations send the GWEN_DialogEvent_TypeValueChanged signal when values are manipulated. Set this parameter to 0 if you don't need that. However, this is just a hint for the implementation, you should not rely on it actually being regarded by the implementation. So you might or might not get such a signal upon manipulation of a property. |
Definition at line 703 of file dialog.c.
References DBG_ERROR, GWEN_Dialog_FindWidgetByName(), GWEN_ERROR_NOT_FOUND, GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_LOGDOMAIN.
Referenced by _gwenGuiSignalHandler(), _gwenGuiSignalHandler(), GWEN_Dialog_ListReadColumnSettings(), GWEN_DlgInput_HandleValueChanged(), GWEN_DlgInput_Init(), GWEN_DlgMessage_Init(), GWEN_DlgProgress_Advanced(), GWEN_DlgProgress_HandleActivated(), GWEN_DlgProgress_Init(), GWEN_DlgProgress_SetAllowClose(), GWEN_DlgProgress_SetFirstProgress(), GWEN_DlgProgress_SetSecondProgress(), GWEN_DlgProgress_SetShowLog(), GWEN_DlgProgress_TotalChanged(), and GWEN_DlgShowBox_Init().


| GWENHYWFAR_API GWEN_DIALOG_SIGNALHANDLER GWEN_Dialog_SetSignalHandler | ( | GWEN_DIALOG * | dlg, |
| GWEN_DIALOG_SIGNALHANDLER | fn ) |
Sets the signal handler of the dialog. Please note that this doesn't set the signal handler of any sub-dialog, so each dialog will only receive its own signals.
Definition at line 305 of file dialog.c.
Referenced by Dlg_Test1_new(), Dlg_Test2_new(), GWEN_DlgInput_new(), GWEN_DlgMessage_new(), GWEN_DlgProgress_new(), and GWEN_DlgShowBox_new().

| GWENHYWFAR_API GWEN_DIALOG_SIGNALHANDLER2 GWEN_Dialog_SetSignalHandler2 | ( | GWEN_DIALOG * | dlg, |
| GWEN_DIALOG_SIGNALHANDLER2 | fn ) |
| GWENHYWFAR_API void GWEN_Dialog_SetWidgetColumns | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| int | i ) |
Set the number of columns (see GWEN_Dialog_GetWidgetColumns).
Definition at line 900 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_SetColumns().
Referenced by GWEN_DlgInput_new().


| GWENHYWFAR_API void GWEN_Dialog_SetWidgetFlags | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| uint32_t | fl ) |
Definition at line 850 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_SetFlags().

| GWENHYWFAR_API void GWEN_Dialog_SetWidgetRows | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| int | i ) |
Set the number of columns (see GWEN_Dialog_GetWidgetRows).
Definition at line 926 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_SetRows().

| GWENHYWFAR_API void GWEN_Dialog_SetWidgetText | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| const char * | t ) |
Definition at line 938 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_SetText().
Referenced by GWEN_DlgMessage_new().


| GWENHYWFAR_API void GWEN_Dialog_SubWidgetFlags | ( | GWEN_DIALOG * | dlg, |
| const char * | name, | ||
| uint32_t | fl ) |
Definition at line 874 of file dialog.c.
References GWEN_Dialog_FindWidgetByName(), and GWEN_Widget_SubFlags().

| GWENHYWFAR_API const char * GWEN_Dialog_TranslateString | ( | const GWEN_DIALOG * | dlg, |
| const char * | s ) |
Translates a string within the I18N domain of the dialog (see GWEN_Dialog_GetI18nDomain).
Definition at line 236 of file dialog.c.
References GWEN_I18N_Translate().
Referenced by GWEN_Widget_ReadXml().

