]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dialog.h
189ad1540084ec4ae606dbbbbca4a59c283315bb
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/dialog.h
3 // Purpose: wxDialog class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 class WXDLLEXPORT wxEventLoop
;
18 class WXDLLEXPORT wxDialog
: public wxDialogBase
23 wxDialog(wxWindow
*parent
, wxWindowID id
,
24 const wxString
& title
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
27 long style
= wxDEFAULT_DIALOG_STYLE
,
28 const wxString
& name
= wxDialogNameStr
)
30 Create(parent
, id
, title
, pos
, size
, style
, name
);
33 bool Create(wxWindow
*parent
, wxWindowID id
,
34 const wxString
& title
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
,
37 long style
= wxDEFAULT_DIALOG_STYLE
,
38 const wxString
& name
= wxDialogNameStr
);
42 virtual bool Destroy();
44 virtual bool Show(bool show
= true);
46 void SetTitle(const wxString
& title
);
48 void SetModal(bool flag
);
50 virtual bool IsModal() const
51 { return m_modalShowing
; }
53 virtual int ShowModal();
54 virtual void EndModal(int retCode
);
57 virtual void ChangeFont(bool keepOriginalSize
= true);
58 virtual void ChangeBackgroundColour();
59 virtual void ChangeForegroundColour();
60 inline WXWidget
GetTopWidget() const { return m_mainWidget
; }
61 inline WXWidget
GetClientWidget() const { return m_mainWidget
; }
64 void OnOK(wxCommandEvent
& event
);
65 void OnApply(wxCommandEvent
& event
);
66 void OnCancel(wxCommandEvent
& event
);
68 // Responds to colour changes
69 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
71 void OnCloseWindow(wxCloseEvent
& event
);
74 virtual bool XmDoCreateTLW(wxWindow
* parent
,
76 const wxString
& title
,
80 const wxString
& name
);
85 wxEventLoop
* m_eventLoop
;
88 virtual void DoSetSize(int x
, int y
,
89 int width
, int height
,
90 int sizeFlags
= wxSIZE_AUTO
);
92 virtual void DoSetClientSize(int width
, int height
);
97 DECLARE_DYNAMIC_CLASS(wxDialog
)
100 #endif // _WX_DIALOG_H_