]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/dialog.h
b9135f14981685b7716a9c55d0c717ae2aa938ff
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 class WXDLLEXPORT wxMacToolTip
;
22 class WXDLLEXPORT wxDialog
: public wxDialogBase
24 DECLARE_DYNAMIC_CLASS(wxDialog
)
27 wxDialog() { Init(); }
29 // Constructor with a modal flag, but no window id - the old convention
30 wxDialog(wxWindow
*parent
,
31 const wxString
& title
, bool modal
,
32 int x
= -1, int y
= -1, int width
= 500, int height
= 500,
33 long style
= wxDEFAULT_DIALOG_STYLE
,
34 const wxString
& name
= wxDialogNameStr
)
37 m_isModalStyle
= modal
;
38 Create(parent
, -1, title
, wxPoint(x
, y
), wxSize(width
, height
),
42 // Constructor with no modal flag - the new convention.
43 wxDialog(wxWindow
*parent
, wxWindowID id
,
44 const wxString
& title
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
,
47 long style
= wxDEFAULT_DIALOG_STYLE
,
48 const wxString
& name
= wxDialogNameStr
)
51 Create(parent
, id
, title
, pos
, size
, style
, name
);
54 bool Create(wxWindow
*parent
, wxWindowID id
,
55 const wxString
& title
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& size
= wxDefaultSize
,
58 long style
= wxDEFAULT_DIALOG_STYLE
,
59 const wxString
& name
= wxDialogNameStr
);
63 // virtual bool Destroy();
64 virtual bool Show(bool show
= true);
66 void SetModal(bool flag
);
67 virtual bool IsModal() const;
69 // For now, same as Show(TRUE) but returns return code
70 virtual int ShowModal();
72 // may be called to terminate the dialog with the given return code
73 virtual void EndModal(int retCode
);
75 // returns TRUE if we're in a modal loop
76 bool IsModalShowing() const;
82 void OnCloseWindow(wxCloseEvent
& event
);
85 void OnOK(wxCommandEvent
& event
);
86 void OnApply(wxCommandEvent
& event
);
87 void OnCancel(wxCommandEvent
& event
);
89 // Responds to colour changes
90 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
92 // show modal dialog and enter modal loop