]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
1c067fe3 | 2 | // Name: wx/motif/dialog.h |
9b6dbb09 JS |
3 | // Purpose: wxDialog class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
9b6dbb09 | 7 | // Copyright: (c) Julian Smart |
65571936 | 8 | // Licence: wxWindows licence |
9b6dbb09 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_DIALOG_H_ | |
12 | #define _WX_DIALOG_H_ | |
13 | ||
b5dbe15d | 14 | class WXDLLIMPEXP_FWD_CORE wxEventLoop; |
7e1bcfa8 | 15 | |
9b6dbb09 | 16 | // Dialog boxes |
53a2db12 | 17 | class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase |
9b6dbb09 | 18 | { |
9b6dbb09 | 19 | public: |
bfc6fde4 | 20 | wxDialog(); |
798a4529 | 21 | |
bfc6fde4 | 22 | wxDialog(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
23 | const wxString& title, |
24 | const wxPoint& pos = wxDefaultPosition, | |
25 | const wxSize& size = wxDefaultSize, | |
26 | long style = wxDEFAULT_DIALOG_STYLE, | |
27 | const wxString& name = wxDialogNameStr) | |
bfc6fde4 VZ |
28 | { |
29 | Create(parent, id, title, pos, size, style, name); | |
30 | } | |
e30285ab | 31 | |
bfc6fde4 | 32 | bool Create(wxWindow *parent, wxWindowID id, |
96be256b | 33 | const wxString& title, |
83df96d6 JS |
34 | const wxPoint& pos = wxDefaultPosition, |
35 | const wxSize& size = wxDefaultSize, | |
36 | long style = wxDEFAULT_DIALOG_STYLE, | |
37 | const wxString& name = wxDialogNameStr); | |
e30285ab | 38 | |
d3c7fc99 | 39 | virtual ~wxDialog(); |
e30285ab | 40 | |
bfc6fde4 | 41 | virtual bool Destroy(); |
798a4529 | 42 | |
96be256b | 43 | virtual bool Show(bool show = true); |
798a4529 | 44 | |
bfc6fde4 | 45 | void SetTitle(const wxString& title); |
e30285ab | 46 | |
bfc6fde4 | 47 | void SetModal(bool flag); |
e30285ab | 48 | |
dfe1eee3 | 49 | virtual bool IsModal() const |
1c067fe3 | 50 | { return m_modalShowing; } |
e30285ab | 51 | |
bfc6fde4 VZ |
52 | virtual int ShowModal(); |
53 | virtual void EndModal(int retCode); | |
e30285ab | 54 | |
dfe1eee3 | 55 | // Implementation |
96be256b | 56 | virtual void ChangeFont(bool keepOriginalSize = true); |
dfe1eee3 VZ |
57 | virtual void ChangeBackgroundColour(); |
58 | virtual void ChangeForegroundColour(); | |
2158f4d7 VZ |
59 | WXWidget GetTopWidget() const { return m_mainWidget; } |
60 | WXWidget GetClientWidget() const { return m_mainWidget; } | |
e30285ab | 61 | |
798a4529 | 62 | private: |
02bcd285 | 63 | virtual bool XmDoCreateTLW(wxWindow* parent, |
f58585c0 VZ |
64 | wxWindowID id, |
65 | const wxString& title, | |
66 | const wxPoint& pos, | |
67 | const wxSize& size, | |
68 | long style, | |
69 | const wxString& name); | |
70 | ||
798a4529 | 71 | |
bfc6fde4 VZ |
72 | //// Motif-specific |
73 | bool m_modalShowing; | |
7e1bcfa8 | 74 | wxEventLoop* m_eventLoop; |
798a4529 | 75 | |
bfc6fde4 VZ |
76 | protected: |
77 | virtual void DoSetSize(int x, int y, | |
2158f4d7 VZ |
78 | int width, int height, |
79 | int sizeFlags = wxSIZE_AUTO); | |
e30285ab | 80 | |
bfc6fde4 | 81 | virtual void DoSetClientSize(int width, int height); |
e30285ab | 82 | |
219ee9ba | 83 | |
bfc6fde4 | 84 | private: |
0be27418 | 85 | DECLARE_DYNAMIC_CLASS(wxDialog) |
9b6dbb09 JS |
86 | }; |
87 | ||
0be27418 | 88 | #endif // _WX_DIALOG_H_ |