]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dialog.h
Added event handler macro
[wxWidgets.git] / include / wx / motif / dialog.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/dialog.h
3 // Purpose: wxDialog class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DIALOG_H_
13 #define _WX_DIALOG_H_
14
15 class WXDLLIMPEXP_FWD_CORE wxEventLoop;
16
17 // Dialog boxes
18 class WXDLLEXPORT wxDialog : public wxDialogBase
19 {
20 public:
21 wxDialog();
22
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)
29 {
30 Create(parent, id, title, pos, size, style, name);
31 }
32
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);
39
40 virtual ~wxDialog();
41
42 virtual bool Destroy();
43
44 virtual bool Show(bool show = true);
45
46 void SetTitle(const wxString& title);
47
48 void SetModal(bool flag);
49
50 virtual bool IsModal() const
51 { return m_modalShowing; }
52
53 virtual int ShowModal();
54 virtual void EndModal(int retCode);
55
56 // Implementation
57 virtual void ChangeFont(bool keepOriginalSize = true);
58 virtual void ChangeBackgroundColour();
59 virtual void ChangeForegroundColour();
60 WXWidget GetTopWidget() const { return m_mainWidget; }
61 WXWidget GetClientWidget() const { return m_mainWidget; }
62
63 private:
64 virtual bool XmDoCreateTLW(wxWindow* parent,
65 wxWindowID id,
66 const wxString& title,
67 const wxPoint& pos,
68 const wxSize& size,
69 long style,
70 const wxString& name);
71
72
73 //// Motif-specific
74 bool m_modalShowing;
75 wxEventLoop* m_eventLoop;
76
77 protected:
78 virtual void DoSetSize(int x, int y,
79 int width, int height,
80 int sizeFlags = wxSIZE_AUTO);
81
82 virtual void DoSetClientSize(int width, int height);
83
84
85 private:
86 DECLARE_DYNAMIC_CLASS(wxDialog)
87 };
88
89 #endif // _WX_DIALOG_H_