]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dialog.h
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
20 DECLARE_DYNAMIC_CLASS(wxDialog
)
25 wxDialog(wxWindow
*parent
, wxWindowID id
,
26 const wxString
& title
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxDEFAULT_DIALOG_STYLE
,
30 const wxString
& name
= wxDialogNameStr
)
32 Create(parent
, id
, title
, pos
, size
, style
, name
);
35 bool Create(wxWindow
*parent
, wxWindowID id
,
36 const wxString
& title
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
39 long style
= wxDEFAULT_DIALOG_STYLE
,
40 const wxString
& name
= wxDialogNameStr
);
44 virtual bool Destroy();
46 virtual bool Show(bool show
= true);
48 void SetTitle(const wxString
& title
);
50 void SetModal(bool flag
);
52 virtual bool IsModal() const
53 { return m_modalShowing
; }
55 virtual int ShowModal();
56 virtual void EndModal(int retCode
);
59 virtual void ChangeFont(bool keepOriginalSize
= true);
60 virtual void ChangeBackgroundColour();
61 virtual void ChangeForegroundColour();
62 inline WXWidget
GetTopWidget() const { return m_mainWidget
; }
63 inline WXWidget
GetClientWidget() const { return m_mainWidget
; }
66 void OnOK(wxCommandEvent
& event
);
67 void OnApply(wxCommandEvent
& event
);
68 void OnCancel(wxCommandEvent
& event
);
70 // Responds to colour changes
71 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
73 void OnCharHook(wxKeyEvent
& event
);
74 void OnCloseWindow(wxCloseEvent
& event
);
77 virtual bool XmDoCreateTLW(wxWindow
* parent
,
79 const wxString
& title
,
83 const wxString
& name
);
88 wxEventLoop
* m_eventLoop
;
91 virtual void DoSetSize(int x
, int y
,
92 int width
, int height
,
93 int sizeFlags
= wxSIZE_AUTO
);
95 virtual void DoSetClientSize(int width
, int height
);