gwenhywfar  5.10.1
Macros | Functions
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_LOGDOMAIN, GWEN_Widget_free(), GWEN_Widget_new(), GWEN_Widget_ReadXml(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), and NULL.

Referenced by GWEN_Dialog_ReadXml().

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

static 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_GetId(), GWEN_Widget_GetDialog(), GWEN_Widget_GetName(), GWEN_Widget_GetType(), and NULL.

Referenced by GWEN_Dialog_Dump().

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(), 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_WIDGET* GWEN_Dialog_FindWidgetByName ( const GWEN_DIALOG dlg,
const char *  name 
)

◆ 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_GetWidgets()

GWEN_WIDGET_TREE* GWEN_Dialog_GetWidgets ( const GWEN_DIALOG dlg)

◆ GWEN_Dialog_SetGetCharPropertyFn()

GWEN_DIALOG_GETCHARPROPERTY_FN GWEN_Dialog_SetGetCharPropertyFn ( GWEN_DIALOG dlg,
GWEN_DIALOG_GETCHARPROPERTY_FN  fn 
)

◆ GWEN_Dialog_SetGetIntPropertyFn()

GWEN_DIALOG_GETINTPROPERTY_FN GWEN_Dialog_SetGetIntPropertyFn ( GWEN_DIALOG dlg,
GWEN_DIALOG_GETINTPROPERTY_FN  fn 
)

◆ 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_SetSetCharPropertyFn()

GWEN_DIALOG_SETCHARPROPERTY_FN GWEN_Dialog_SetSetCharPropertyFn ( GWEN_DIALOG dlg,
GWEN_DIALOG_SETCHARPROPERTY_FN  fn 
)

◆ GWEN_Dialog_SetSetIntPropertyFn()

GWEN_DIALOG_SETINTPROPERTY_FN GWEN_Dialog_SetSetIntPropertyFn ( GWEN_DIALOG dlg,
GWEN_DIALOG_SETINTPROPERTY_FN  fn 
)