]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dialog.h
1 /////////////////////////////////////////////////////////////////////////////
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 // Constructor with no modal flag - the new convention.
26 wxDialog(wxWindow
*parent
, wxWindowID id
,
27 const wxString
& title
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxDEFAULT_DIALOG_STYLE
,
31 const wxString
& name
= wxDialogNameStr
)
33 Create(parent
, id
, title
, pos
, size
, style
, name
);
36 bool Create(wxWindow
*parent
, wxWindowID id
,
37 const wxString
& title
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 long style
= wxDEFAULT_DIALOG_STYLE
,
41 const wxString
& name
= wxDialogNameStr
);
45 virtual bool Destroy();
47 virtual bool Show(bool show
= true);
49 void SetTitle(const wxString
& title
);
51 void SetModal(bool flag
);
53 virtual bool IsModal() const
54 { return ((GetWindowStyleFlag() & wxDIALOG_MODAL
) == wxDIALOG_MODAL
); }
56 virtual int ShowModal();
57 virtual void EndModal(int retCode
);
60 virtual void ChangeFont(bool keepOriginalSize
= true);
61 virtual void ChangeBackgroundColour();
62 virtual void ChangeForegroundColour();
63 inline WXWidget
GetTopWidget() const { return m_mainWidget
; }
64 inline WXWidget
GetClientWidget() const { return m_mainWidget
; }
67 void OnOK(wxCommandEvent
& event
);
68 void OnApply(wxCommandEvent
& event
);
69 void OnCancel(wxCommandEvent
& event
);
71 // Responds to colour changes
72 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
74 void OnCharHook(wxKeyEvent
& event
);
75 void OnCloseWindow(wxCloseEvent
& event
);
78 virtual bool XmDoCreateTLW(wxWindow
* parent
,
80 const wxString
& title
,
84 const wxString
& name
);
89 wxEventLoop
* m_eventLoop
;
92 virtual void DoSetSize(int x
, int y
,
93 int width
, int height
,
94 int sizeFlags
= wxSIZE_AUTO
);
96 virtual void DoSetClientSize(int width
, int height
);
100 DECLARE_EVENT_TABLE()