]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/classic/dialog.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDialog class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
19 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
21 class WXDLLEXPORT wxMacToolTip
;
24 class WXDLLEXPORT wxDialog
: public wxDialogBase
26 DECLARE_DYNAMIC_CLASS(wxDialog
)
29 wxDialog() { Init(); }
31 // Constructor with a modal flag, but no window id - the old convention
32 wxDialog(wxWindow
*parent
,
33 const wxString
& title
, bool modal
,
34 int x
= -1, int y
= -1, int width
= 500, int height
= 500,
35 long style
= wxDEFAULT_DIALOG_STYLE
,
36 const wxString
& name
= wxDialogNameStr
)
39 m_isModalStyle
= modal
;
40 Create(parent
, -1, title
, wxPoint(x
, y
), wxSize(width
, height
),
44 // Constructor with no modal flag - the new convention.
45 wxDialog(wxWindow
*parent
, wxWindowID id
,
46 const wxString
& title
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 long style
= wxDEFAULT_DIALOG_STYLE
,
50 const wxString
& name
= wxDialogNameStr
)
53 Create(parent
, id
, title
, pos
, size
, style
, name
);
56 bool Create(wxWindow
*parent
, wxWindowID id
,
57 const wxString
& title
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 long style
= wxDEFAULT_DIALOG_STYLE
,
61 const wxString
& name
= wxDialogNameStr
);
65 // virtual bool Destroy();
66 virtual bool Show(bool show
= true);
68 void SetModal(bool flag
);
69 virtual bool IsModal() const;
71 // For now, same as Show(TRUE) but returns return code
72 virtual int ShowModal();
74 // may be called to terminate the dialog with the given return code
75 virtual void EndModal(int retCode
);
77 // returns TRUE if we're in a modal loop
78 bool IsModalShowing() const;
84 void OnCharHook(wxKeyEvent
& event
);
85 void OnCloseWindow(wxCloseEvent
& event
);
88 void OnOK(wxCommandEvent
& event
);
89 void OnApply(wxCommandEvent
& event
);
90 void OnCancel(wxCommandEvent
& event
);
92 // Responds to colour changes
93 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
95 // show modal dialog and enter modal loop
101 DECLARE_EVENT_TABLE()