]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/dialog.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDialog class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "dialog.h"
21 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
23 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
25 class WXDLLEXPORT wxMacToolTip
;
28 class WXDLLEXPORT wxDialog
: public wxDialogBase
30 DECLARE_DYNAMIC_CLASS(wxDialog
)
33 wxDialog() { Init(); }
35 // Constructor with a modal flag, but no window id - the old convention
36 wxDialog(wxWindow
*parent
,
37 const wxString
& title
, bool modal
,
38 int x
= -1, int y
= -1, int width
= 500, int height
= 500,
39 long style
= wxDEFAULT_DIALOG_STYLE
,
40 const wxString
& name
= wxDialogNameStr
)
43 m_isModalStyle
= modal
;
44 Create(parent
, -1, title
, wxPoint(x
, y
), wxSize(width
, height
),
48 // Constructor with no modal flag - the new convention.
49 wxDialog(wxWindow
*parent
, wxWindowID id
,
50 const wxString
& title
,
51 const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
,
53 long style
= wxDEFAULT_DIALOG_STYLE
,
54 const wxString
& name
= wxDialogNameStr
)
57 Create(parent
, id
, title
, pos
, size
, style
, name
);
60 bool Create(wxWindow
*parent
, wxWindowID id
,
61 const wxString
& title
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
64 long style
= wxDEFAULT_DIALOG_STYLE
,
65 const wxString
& name
= wxDialogNameStr
);
69 // virtual bool Destroy();
70 bool Show(bool show
= true);
72 void SetModal(bool flag
);
73 virtual bool IsModal() const;
75 // For now, same as Show(TRUE) but returns return code
76 virtual int ShowModal();
78 // may be called to terminate the dialog with the given return code
79 virtual void EndModal(int retCode
);
81 // returns TRUE if we're in a modal loop
82 bool IsModalShowing() const;
88 void OnCharHook(wxKeyEvent
& event
);
89 void OnCloseWindow(wxCloseEvent
& event
);
92 void OnOK(wxCommandEvent
& event
);
93 void OnApply(wxCommandEvent
& event
);
94 void OnCancel(wxCommandEvent
& event
);
96 // Responds to colour changes
97 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
99 // show modal dialog and enter modal loop
105 DECLARE_EVENT_TABLE()