14#include "cocoa_gui_dialog_p.h"
17#include <gwenhywfar/inherit.h>
18#include <gwenhywfar/debug.h>
19#include <gwenhywfar/gui_be.h>
20#include <gwenhywfar/i18n.h>
22#include <gwenhywfar/text.h>
23#include <gwenhywfar/mdigest.h>
24#include <gwenhywfar/debug.h>
25#include <gwenhywfar/directory.h>
29#define COCOA_DIALOG_WIDGET_REAL 0
30#define COCOA_DIALOG_WIDGET_CONTENT 1
31#define COCOA_DIALOG_WIDGET_DATA 2
33#define COCOA_DIALOG_STRING_TITLE 0
34#define COCOA_DIALOG_STRING_VALUE 1
71 COCOA_GUI_DIALOG *xdlg;
87 COCOA_GUI_DIALOG *xdlg;
105 COCOA_GUI_DIALOG *xdlg;
107 xdlg=(COCOA_GUI_DIALOG*) p;
109 if (xdlg->mainWindow) {
110 NSWindow *window = (xdlg->mainWindow);
112 xdlg->mainWindow = nil;
121 COCOA_GUI_DIALOG *xdlg;
127 return xdlg->mainWindow;
168 const char *defaultValue) {
175 COCOA_GUI_DIALOG *xdlg;
176 GWEN_WIDGET_TREE *wtree;
186 DBG_ERROR(0,
"No widget tree in dialog");
189 w=GWEN_Widget_Tree_GetFirst(wtree);
209 COCOA_GUI_DIALOG *xdlg;
223 if (xdlg->mainWindow) {
225 [xdlg->mainWindow close];
280 COCOA_GUI_DIALOG *xdlg;
295 [NSApp runModalForWindow:g];
298 NSModalSession session = [NSApp beginModalSessionForWindow:g];
300 if ([NSApp runModalSession:session] != NSRunContinuesResponse)
303 [NSApp endModalSession:session];
441 wChild=GWEN_Widget_Tree_GetFirstChild(w);
449 wChild=GWEN_Widget_Tree_GetNext(wChild);
const char * CocoaGui_Dialog_GetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
int CocoaGui_Dialog_SetupTree(GWEN_WIDGET *w)
void CocoaGui_Dialog_Extend(GWEN_DIALOG *dlg)
int CocoaGui_Dialog_Setup(GWEN_DIALOG *dlg, NSWindow *parentWindow)
int CocoaGui_Dialog_SetCharProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
#define COCOA_DIALOG_WIDGET_REAL
void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result)
void CocoaGui_Dialog_Unextend(GWEN_DIALOG *dlg)
int CocoaGui_Dialog_GetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
void GWENHYWFAR_CB CocoaGui_Dialog_FreeData(void *bp, void *p)
CocoaWindow * CocoaGui_Dialog_GetMainWidget(const GWEN_DIALOG *dlg)
int Cocoa_Gui_Dialog_Run(GWEN_DIALOG *dlg, int untilEnd)
int CocoaGui_Dialog_SetIntProperty(GWEN_DIALOG *dlg, GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
#define DBG_INFO(dbg_logger, format,...)
#define DBG_ERROR(dbg_logger, format,...)
GWEN_WIDGET_TREE * GWEN_Dialog_GetWidgets(const GWEN_DIALOG *dlg)
GWEN_DIALOG_GETINTPROPERTY_FN GWEN_Dialog_SetGetIntPropertyFn(GWEN_DIALOG *dlg, GWEN_DIALOG_GETINTPROPERTY_FN fn)
GWEN_DIALOG * GWEN_Dialog_GetParentDialog(const GWEN_DIALOG *dlg)
GWEN_DIALOG_SETINTPROPERTY_FN GWEN_Dialog_SetSetIntPropertyFn(GWEN_DIALOG *dlg, GWEN_DIALOG_SETINTPROPERTY_FN fn)
GWEN_DIALOG_GETCHARPROPERTY_FN GWEN_Dialog_SetGetCharPropertyFn(GWEN_DIALOG *dlg, GWEN_DIALOG_GETCHARPROPERTY_FN fn)
GWEN_DIALOG_SETCHARPROPERTY_FN GWEN_Dialog_SetSetCharPropertyFn(GWEN_DIALOG *dlg, GWEN_DIALOG_SETCHARPROPERTY_FN fn)
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_FILLX
struct GWEN_DIALOG GWEN_DIALOG
#define GWEN_ERROR_INVALID
#define GWEN_ERROR_NOT_FOUND
#define GWEN_INHERIT_UNLINK(bt, t, element)
#define GWEN_INHERIT_SETDATA(bt, t, element, data, fn)
#define GWEN_INHERIT(bt, t)
#define GWEN_INHERIT_GETDATA(bt, t, element)
#define GWEN_FREE_OBJECT(varname)
#define GWEN_NEW_OBJECT(typ, varname)
int CocoaGui_WCheckBox_Setup(GWEN_WIDGET *w)
int CocoaGui_WComboBox_Setup(GWEN_WIDGET *w)
int CocoaGui_WDialog_Setup(GWEN_WIDGET *w)
int CocoaGui_WGridLayout_Setup(GWEN_WIDGET *w)
int CocoaGui_WGroupBox_Setup(GWEN_WIDGET *w)
int CocoaGui_WHLayout_Setup(GWEN_WIDGET *w)
int CocoaGui_WHLine_Setup(GWEN_WIDGET *w)
int CocoaGui_WHSpacer_Setup(GWEN_WIDGET *w)
int CocoaGui_WLabel_Setup(GWEN_WIDGET *w)
int CocoaGui_WLineEdit_Setup(GWEN_WIDGET *w)
int CocoaGui_WListBox_Setup(GWEN_WIDGET *w)
int CocoaGui_WProgressBar_Setup(GWEN_WIDGET *w)
int CocoaGui_WSpinBox_Setup(GWEN_WIDGET *w)
int CocoaGui_WStack_Setup(GWEN_WIDGET *w)
int CocoaGui_WTabBook_Setup(GWEN_WIDGET *w)
int CocoaGui_WTextBrowser_Setup(GWEN_WIDGET *w)
int CocoaGui_WTextEdit_Setup(GWEN_WIDGET *w)
int CocoaGui_WVLayout_Setup(GWEN_WIDGET *w)
int CocoaGui_WVLine_Setup(GWEN_WIDGET *w)
int CocoaGui_WVSpacer_Setup(GWEN_WIDGET *w)