1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/dialog.h
3 // Purpose: wxDialog class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 WXDLLEXPORT_DATA(extern const wxChar
) wxDialogNameStr
[];
19 class WXDLLEXPORT wxDialogModalData
;
22 class WXDLLEXPORT wxDialog
: public wxDialogBase
25 wxDialog() { Init(); }
28 wxDialog(wxWindow
*parent
, wxWindowID id
,
29 const wxString
& title
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxDEFAULT_DIALOG_STYLE
,
33 const wxString
& name
= wxDialogNameStr
)
37 (void)Create(parent
, id
, title
, pos
, size
, style
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID id
,
41 const wxString
& title
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxDEFAULT_DIALOG_STYLE
,
45 const wxString
& name
= wxDialogNameStr
);
49 // return true if we're showing the dialog modally
50 virtual bool IsModal() const { return m_modalData
!= NULL
; }
52 // show the dialog modally and return the value passed to EndModal()
53 virtual int ShowModal();
55 // may be called to terminate the dialog with the given return code
56 virtual void EndModal(int retCode
);
58 // implementation only from now on
59 // -------------------------------
61 // override some base class virtuals
62 virtual bool Show(bool show
= true);
67 // find the window to use as parent for this dialog if none has been
68 // specified explicitly by the user
71 wxWindow
*FindSuitableParent() const;
73 // common part of all ctors
78 bool m_endModalCalled
; // allow for closing within InitDialog
80 // this pointer is non-NULL only while the modal event loop is running
81 wxDialogModalData
*m_modalData
;
84 DECLARE_DYNAMIC_CLASS(wxDialog
)
86 DECLARE_NO_COPY_CLASS(wxDialog
)