gwenhywfar 5.12.0
dialog.c File Reference
#include "dialog_p.h"
#include "widget_l.h"
#include "gui_l.h"
#include <gwenhywfar/text.h>
#include <gwenhywfar/pathmanager.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/i18n.h>
#include <assert.h>
#include <ctype.h>
#include <strings.h>
Include dependency graph for dialog.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG

Functions

int GWEN_Dialog__ReadXmlWidget (GWEN_DIALOG *dlg, GWEN_WIDGET *wparent, GWEN_XMLNODE *node)
void GWEN_Dialog_AddMediaPath (GWEN_DIALOG *dlg, const char *s)
void GWEN_Dialog_AddMediaPathsFromPathManager (GWEN_DIALOG *dlg, const char *destlib, const char *pathName, const char *relPath)
int GWEN_Dialog_AddSubDialog (GWEN_DIALOG *dlg, const char *parentName, GWEN_DIALOG *subdlg)
void GWEN_Dialog_AddWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl)
GWEN_DIALOGGWEN_Dialog_CreateAndLoadWithPath (const char *dialogId, const char *pmLibName, const char *pmDataDir, const char *fileName)
void GWEN_Dialog_Dump (const GWEN_DIALOG *dlg, FILE *f, unsigned int indent)
static void GWEN_Dialog_DumpWidget (const GWEN_WIDGET *w, FILE *f, unsigned int indent)
int GWEN_Dialog_EmitSignal (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
int GWEN_Dialog_EmitSignal2 (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender, int intArg, const char *stringArg)
int GWEN_Dialog_EmitSignalToAll (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
int GWEN_Dialog_EmitSignalToAll2 (GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender, int intArg, const char *stringArg)
GWEN_WIDGETGWEN_Dialog_FindWidgetByImplData (const GWEN_DIALOG *dlg, int index, const void *ptr)
GWEN_WIDGETGWEN_Dialog_FindWidgetByName (const GWEN_DIALOG *dlg, const char *name)
void GWEN_Dialog_free (GWEN_DIALOG *dlg)
const char * GWEN_Dialog_GetCharProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultProperty)
uint32_t GWEN_Dialog_GetGuiId (const GWEN_DIALOG *dlg)
const char * GWEN_Dialog_GetI18nDomain (const GWEN_DIALOG *dlg)
const char * GWEN_Dialog_GetId (const GWEN_DIALOG *dlg)
int GWEN_Dialog_GetIntProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int defaultProperty)
GWEN_STRINGLISTGWEN_Dialog_GetMediaPaths (const GWEN_DIALOG *dlg)
GWEN_DIALOGGWEN_Dialog_GetParentDialog (const GWEN_DIALOG *dlg)
GWEN_DB_NODEGWEN_Dialog_GetPreferences (const GWEN_DIALOG *dlg)
int GWEN_Dialog_GetWidgetColumns (const GWEN_DIALOG *dlg, const char *name)
uint32_t GWEN_Dialog_GetWidgetFlags (const GWEN_DIALOG *dlg, const char *name)
int GWEN_Dialog_GetWidgetRows (const GWEN_DIALOG *dlg, const char *name)
GWEN_WIDGET_TREE * GWEN_Dialog_GetWidgets (const GWEN_DIALOG *dlg)
const char * GWEN_Dialog_GetWidgetText (const GWEN_DIALOG *dlg, const char *name)
char * GWEN_Dialog_ListGetFirstColumnData (GWEN_DIALOG *dlg, const char *widgetName, int row)
int GWEN_Dialog_ListGetItemMatchingFirstColumn (GWEN_DIALOG *dlg, const char *widgetName, const char *dataToMatch)
void GWEN_Dialog_ListReadColumnSettings (GWEN_DIALOG *dlg, const char *widgetName, const char *variablePrefix, int maxColumns, int minColumnSize, GWEN_DB_NODE *dbPrefs)
void GWEN_Dialog_ListWriteColumnSettings (GWEN_DIALOG *dlg, const char *widgetName, const char *variablePrefix, int maxColumns, int minColumnSize, GWEN_DB_NODE *dbPrefs)
GWEN_DIALOGGWEN_Dialog_new (const char *dialogId)
int GWEN_Dialog_ReadXml (GWEN_DIALOG *dlg, GWEN_XMLNODE *node)
int GWEN_Dialog_ReadXmlFile (GWEN_DIALOG *dlg, const char *fname)
int GWEN_Dialog_RemoveWidget (GWEN_DIALOG *dlg, const char *name)
int GWEN_Dialog_SetCharProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
GWEN_DIALOG_GETCHARPROPERTY_FN GWEN_Dialog_SetGetCharPropertyFn (GWEN_DIALOG *dlg, GWEN_DIALOG_GETCHARPROPERTY_FN fn)
GWEN_DIALOG_GETINTPROPERTY_FN GWEN_Dialog_SetGetIntPropertyFn (GWEN_DIALOG *dlg, GWEN_DIALOG_GETINTPROPERTY_FN fn)
void GWEN_Dialog_SetGuiId (GWEN_DIALOG *dlg, uint32_t guiid)
void GWEN_Dialog_SetI18nDomain (GWEN_DIALOG *dlg, const char *s)
int GWEN_Dialog_SetIntProperty (GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
GWEN_DIALOG_SETCHARPROPERTY_FN GWEN_Dialog_SetSetCharPropertyFn (GWEN_DIALOG *dlg, GWEN_DIALOG_SETCHARPROPERTY_FN fn)
GWEN_DIALOG_SETINTPROPERTY_FN GWEN_Dialog_SetSetIntPropertyFn (GWEN_DIALOG *dlg, GWEN_DIALOG_SETINTPROPERTY_FN fn)
GWEN_DIALOG_SIGNALHANDLER GWEN_Dialog_SetSignalHandler (GWEN_DIALOG *dlg, GWEN_DIALOG_SIGNALHANDLER fn)
GWEN_DIALOG_SIGNALHANDLER2 GWEN_Dialog_SetSignalHandler2 (GWEN_DIALOG *dlg, GWEN_DIALOG_SIGNALHANDLER2 fn)
void GWEN_Dialog_SetWidgetColumns (GWEN_DIALOG *dlg, const char *name, int i)
void GWEN_Dialog_SetWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl)
void GWEN_Dialog_SetWidgetRows (GWEN_DIALOG *dlg, const char *name, int i)
void GWEN_Dialog_SetWidgetText (GWEN_DIALOG *dlg, const char *name, const char *t)
void GWEN_Dialog_SubWidgetFlags (GWEN_DIALOG *dlg, const char *name, uint32_t fl)
const char * GWEN_Dialog_TranslateString (const GWEN_DIALOG *dlg, const char *s)

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 30 of file dialog.c.

Function Documentation

◆ GWEN_Dialog__ReadXmlWidget()

int GWEN_Dialog__ReadXmlWidget ( GWEN_DIALOG * dlg,
GWEN_WIDGET * wparent,
GWEN_XMLNODE * node )

Definition at line 466 of file dialog.c.

References DBG_INFO, GWEN_Dialog__ReadXmlWidget(), GWEN_LOGDOMAIN, GWEN_Widget_free(), GWEN_Widget_new(), GWEN_Widget_ReadXml(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), and NULL.

Referenced by GWEN_Dialog__ReadXmlWidget(), and GWEN_Dialog_ReadXml().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_AddMediaPath()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_AddMediaPathsFromPathManager()

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.

Parameters
dlgdialog to which media paths are to be added
destlibsee the argument of the same name in GWEN_PathManager_GetPaths
pathNamesee the argument of the same name in GWEN_PathManager_GetPaths
relPathoptional 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().

Here is the call graph for this function:

◆ GWEN_Dialog_AddSubDialog()

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.

Here is the call graph for this function:

◆ GWEN_Dialog_AddWidgetFlags()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_CreateAndLoadWithPath()

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.

Returns
pointer to dialog object created and loaded
Parameters
dialogIdname of the dialog to create
pmLibNamelibrary name as registered with GWEN_PATHMANAGER (used for GWEN_PathManager_FindFile)
pmDataDirdatapath name as registered with GWEN_PATHMANAGER (used for GWEN_PathManager_FindFile)
fileNamename 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_Dump()

void GWEN_Dialog_Dump ( const GWEN_DIALOG * dlg,
FILE * f,
unsigned int indent )

Definition at line 989 of file dialog.c.

References GWEN_Dialog_DumpWidget().

Here is the call graph for this function:

◆ GWEN_Dialog_DumpWidget()

void GWEN_Dialog_DumpWidget ( const GWEN_WIDGET * w,
FILE * f,
unsigned int indent )
static

Definition at line 964 of file dialog.c.

References GWEN_Dialog_DumpWidget(), GWEN_Dialog_GetId(), GWEN_Widget_GetDialog(), GWEN_Widget_GetName(), GWEN_Widget_GetType(), and NULL.

Referenced by GWEN_Dialog_Dump(), and GWEN_Dialog_DumpWidget().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_EmitSignal()

int GWEN_Dialog_EmitSignal ( GWEN_DIALOG * dlg,
GWEN_DIALOG_EVENTTYPE t,
const char * sender )

Sends a signal to the signal handler of the given dialog. This does not send the signal to sub-dialogs. Use GWEN_Dialog_EmitSignalToAll for that.

Definition at line 321 of file dialog.c.

References GWEN_Dialog_EmitSignal2(), and NULL.

Referenced by changed_handler(), changed_handler(), QT4_DialogBox::closeEvent(), QT5_DialogBox::closeEvent(), CocoaGui_WCheckBox_Toggled_handler(), CocoaGui_WComboBox_Changed_handler(), CocoaGui_WLineEdit_Changed_text_handler(), CocoaGui_WLineEdit_End_Editing_text_handler(), CocoaGui_WListBox_Changed_handler(), CocoaGui_WPushButton_Clicked_handler(), CocoaGui_WRadioButton_Toggled_handler(), CocoaGui_WSpinBox_Changed_handler(), CocoaGui_WTextEdit_Changed_text_handler(), CocoaGui_WTextEdit_End_Editing_text_handler(), CppDialog::emitSignal(), Gtk2Gui_WCheckBox_Toggled_handler(), Gtk2Gui_WLineEdit_Deleted_text_handler(), Gtk2Gui_WLineEdit_Inserted_text_handler(), Gtk2Gui_WListBox_CursorChanged_handler(), Gtk2Gui_WPushButton_Clicked_handler(), Gtk2Gui_WRadioButton_Toggled_handler(), Gtk2Gui_WSpinBox_Changed_handler(), Gtk2Gui_WTextEdit_Changed_handler(), Gtk3Gui_WCheckBox_Toggled_handler(), Gtk3Gui_WLineEdit_Deleted_text_handler(), Gtk3Gui_WLineEdit_Inserted_text_handler(), Gtk3Gui_WListBox_CursorChanged_handler(), Gtk3Gui_WPushButton_Clicked_handler(), Gtk3Gui_WRadioButton_Toggled_handler(), Gtk3Gui_WSpinBox_Changed_handler(), Gtk3Gui_WTextEdit_Changed_handler(), FOX16_GuiDialog::onSelChanged(), FOX16_GuiDialog::onSelCommand(), QT4_DialogBox::slotActivated(), QT5_DialogBox::slotActivated(), QT4_DialogBox::slotValueChanged(), and QT5_DialogBox::slotValueChanged().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_EmitSignal2()

int GWEN_Dialog_EmitSignal2 ( GWEN_DIALOG * dlg,
GWEN_DIALOG_EVENTTYPE t,
const char * sender,
int intArg,
const char * stringArg )

Definition at line 355 of file dialog.c.

References DBG_WARN, GWEN_DialogEvent_ResultNotHandled, and GWEN_LOGDOMAIN.

Referenced by GWEN_Dialog_EmitSignal().

Here is the caller graph for this function:

◆ GWEN_Dialog_EmitSignalToAll()

int GWEN_Dialog_EmitSignalToAll ( GWEN_DIALOG * dlg,
GWEN_DIALOG_EVENTTYPE t,
const char * sender )

◆ GWEN_Dialog_EmitSignalToAll2()

int GWEN_Dialog_EmitSignalToAll2 ( GWEN_DIALOG * dlg,
GWEN_DIALOG_EVENTTYPE t,
const char * sender,
int intArg,
const char * stringArg )

◆ GWEN_Dialog_FindWidgetByImplData()

GWEN_WIDGET * GWEN_Dialog_FindWidgetByImplData ( const GWEN_DIALOG * dlg,
int index,
const void * ptr )

◆ GWEN_Dialog_FindWidgetByName()

◆ GWEN_Dialog_free()

◆ GWEN_Dialog_GetCharProperty()

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.

Parameters
dlgpointer to the dialog to be inspected
namename of the widget of the dialog whose property is to be read. Use NULL or an empty string to select the dialog itself
propproperty to read (see GWEN_DialogProperty_Title ff)
index(see GWEN_Dialog_SetIntProperty for an explanation)
defaultValuedefault 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_GetGuiId()

uint32_t GWEN_Dialog_GetGuiId ( const GWEN_DIALOG * dlg)

Definition at line 192 of file dialog.c.

Referenced by GWEN_Gui_DialogBased_HideBox().

Here is the caller graph for this function:

◆ GWEN_Dialog_GetI18nDomain()

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.

Definition at line 226 of file dialog.c.

◆ GWEN_Dialog_GetId()

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().

Here is the caller graph for this function:

◆ GWEN_Dialog_GetIntProperty()

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.

Parameters
dlgpointer to the dialog to be inspected
namename of the widget of the dialog whose property is to be read. Use NULL or an empty string to select the dialog itself
propproperty to read (see GWEN_DialogProperty_Title ff)
index(see GWEN_Dialog_SetIntProperty for an explanation)
defaultValuedefault 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_GetMediaPaths()

GWEN_STRINGLIST * GWEN_Dialog_GetMediaPaths ( const GWEN_DIALOG * dlg)

The dialog remains the owner of the object returned (if any).

Definition at line 295 of file dialog.c.

Referenced by CocoaGui_WPushButton_Setup(), CocoaGui_WTextBrowser_SetCharProperty(), FOX16_GuiDialog::getIcon(), Gtk2Gui_WPushButton_Setup(), Gtk3Gui_WPushButton_Setup(), and FOX16_GuiDialog::setupTree().

Here is the caller graph for this function:

◆ GWEN_Dialog_GetParentDialog()

GWEN_DIALOG * GWEN_Dialog_GetParentDialog ( const GWEN_DIALOG * dlg)

Definition at line 172 of file dialog.c.

Referenced by CocoaGui_Dialog_Leave(), CppDialog::getDialog(), Gtk2Gui_Dialog_Leave(), Gtk3Gui_Dialog_Leave(), and GWEN_Widget_GetTopDialog().

Here is the caller graph for this function:

◆ GWEN_Dialog_GetPreferences()

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().

Here is the caller graph for this function:

◆ GWEN_Dialog_GetWidgetColumns()

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.

Parameters
dlgpointer to the dialog to be inspected
namename 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().

Here is the call graph for this function:

◆ GWEN_Dialog_GetWidgetFlags()

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().

Here is the call graph for this function:

◆ GWEN_Dialog_GetWidgetRows()

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.

Parameters
dlgpointer to the dialog to be inspected
namename 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().

Here is the call graph for this function:

◆ GWEN_Dialog_GetWidgets()

GWEN_WIDGET_TREE * GWEN_Dialog_GetWidgets ( const GWEN_DIALOG * dlg)

◆ GWEN_Dialog_GetWidgetText()

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.

Here is the call graph for this function:

◆ GWEN_Dialog_ListGetFirstColumnData()

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).

Returns
NULL or pointer to the content (caller is responsible for freeing the pointer)
Parameters
dlgdialog containing the widget to handle
widgetNamename of the widget to handle
rowindex of the list item (beginning with 0)

Definition at line 1106 of file dialog.c.

References GWEN_Dialog_GetCharProperty(), GWEN_DialogProperty_Value, and NULL.

Here is the call graph for this function:

◆ GWEN_Dialog_ListGetItemMatchingFirstColumn()

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.

Returns
-1 if none found, index otherwise (starting with 0)
Parameters
dlgdialog containing the widget to handle
widgetNamename of the widget to handle
dataToMatchstring to match against

Definition at line 1139 of file dialog.c.

References GWEN_Dialog_GetCharProperty(), GWEN_DialogProperty_Value, and NULL.

Here is the call graph for this function:

◆ GWEN_Dialog_ListReadColumnSettings()

void GWEN_Dialog_ListReadColumnSettings ( GWEN_DIALOG * dlg,
const char * widgetName,
const char * variablePrefix,
int maxColumns,
int minColumnSize,
GWEN_DB_NODE * dbPrefs )

◆ GWEN_Dialog_ListWriteColumnSettings()

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).

Parameters
dlgdialog containing the widget to handle
widgetNamename of the widget to handle
variablePrefixprefix 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:
  • columns: one value for each column stating the column width
  • sortbycolumn: Index of the column to sort the list by (in most cases indicated in the GUI)
  • sortdir: Sort direction (GWEN_DialogSortDirection_Up or GWEN_DialogSortDirection_Down)
maxColumnsmaximum number of columns to handle
minColumnSizeminimum width of each column
dbPrefsGWEN_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.

Here is the call graph for this function:

◆ GWEN_Dialog_new()

GWEN_DIALOG * GWEN_Dialog_new ( const char * dialogId)

◆ GWEN_Dialog_ReadXml()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_ReadXmlFile()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_RemoveWidget()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_SetCharProperty()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_SetGetCharPropertyFn()

◆ GWEN_Dialog_SetGetIntPropertyFn()

◆ GWEN_Dialog_SetGuiId()

void GWEN_Dialog_SetGuiId ( GWEN_DIALOG * dlg,
uint32_t guiid )

Definition at line 202 of file dialog.c.

Referenced by GWEN_Gui_DialogBased_ShowBox().

Here is the caller graph for this function:

◆ GWEN_Dialog_SetI18nDomain()

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().

Here is the caller graph for this function:

◆ GWEN_Dialog_SetIntProperty()

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.

Parameters
dlgpointer to the dialog to be manipulated
namename of the widget of the dialog whose property is to be manipulated. Use NULL or an empty string to select the dialog itself
propproperty to modify (see GWEN_DialogProperty_Title ff)
indexfor 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.
valuethe value to set
doSignalsome 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_SetSetCharPropertyFn()

◆ GWEN_Dialog_SetSetIntPropertyFn()

◆ GWEN_Dialog_SetSignalHandler()

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().

Here is the caller graph for this function:

◆ GWEN_Dialog_SetSignalHandler2()

GWEN_DIALOG_SIGNALHANDLER2 GWEN_Dialog_SetSignalHandler2 ( GWEN_DIALOG * dlg,
GWEN_DIALOG_SIGNALHANDLER2 fn )

Sets the new 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 339 of file dialog.c.

◆ GWEN_Dialog_SetWidgetColumns()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_SetWidgetFlags()

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().

Here is the call graph for this function:

◆ GWEN_Dialog_SetWidgetRows()

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().

Here is the call graph for this function:

◆ GWEN_Dialog_SetWidgetText()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Dialog_SubWidgetFlags()

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().

Here is the call graph for this function:

◆ GWEN_Dialog_TranslateString()

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().

Here is the call graph for this function:
Here is the caller graph for this function: