1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDialog class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 WXDLLIMPEXP_DATA_CORE(extern const char) wxDialogNameStr
[];
19 class WXDLLIMPEXP_FWD_CORE wxMacToolTip
;
22 class WXDLLIMPEXP_CORE wxDialog
: public wxDialogBase
24 DECLARE_DYNAMIC_CLASS(wxDialog
)
27 wxDialog() { Init(); }
29 // Constructor with no modal flag - the new convention.
30 wxDialog(wxWindow
*parent
, wxWindowID id
,
31 const wxString
& title
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 long style
= wxDEFAULT_DIALOG_STYLE
,
35 const wxString
& name
= wxDialogNameStr
)
38 Create(parent
, id
, title
, pos
, size
, style
, name
);
41 bool Create(wxWindow
*parent
, wxWindowID id
,
42 const wxString
& title
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 long style
= wxDEFAULT_DIALOG_STYLE
,
46 const wxString
& name
= wxDialogNameStr
);
50 // virtual bool Destroy();
51 virtual bool Show(bool show
= true);
53 // return true if we're showing the dialog modally
54 virtual bool IsModal() const;
56 // show the dialog modally and return the value passed to EndModal()
57 virtual int ShowModal();
59 virtual void ShowWindowModal();
61 // may be called to terminate the dialog with the given return code
62 virtual void EndModal(int retCode
);
67 wxDialogModality
GetModality() const;
70 virtual void ModalFinishedCallback(void* WXUNUSED(panel
), int WXUNUSED(returnCode
)) {}
74 // show modal dialog and enter modal loop
77 // show modal dialog and enter modal loop
78 void DoShowWindowModal();
80 // mac also takes command-period as cancel
81 virtual bool IsEscapeKey(const wxKeyEvent
& event
);
83 // needed for cleanup on the Cocoa side.
84 void EndWindowModal();
86 wxDialogModality m_modality
;