]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/dialog.h
Build fix.
[wxWidgets.git] / include / wx / motif / dialog.h
CommitLineData
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
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DIALOG_H_
13#define _WX_DIALOG_H_
14
7e1bcfa8
MB
15class WXDLLEXPORT wxEventLoop;
16
9b6dbb09 17// Dialog boxes
dfe1eee3 18class WXDLLEXPORT wxDialog : public wxDialogBase
9b6dbb09 19{
83df96d6 20 DECLARE_DYNAMIC_CLASS(wxDialog)
e30285ab 21
9b6dbb09 22public:
bfc6fde4 23 wxDialog();
798a4529 24
bfc6fde4 25 wxDialog(wxWindow *parent, wxWindowID id,
83df96d6
JS
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)
bfc6fde4
VZ
31 {
32 Create(parent, id, title, pos, size, style, name);
33 }
e30285ab 34
bfc6fde4 35 bool Create(wxWindow *parent, wxWindowID id,
96be256b 36 const wxString& title,
83df96d6
JS
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxDEFAULT_DIALOG_STYLE,
40 const wxString& name = wxDialogNameStr);
e30285ab 41
bfc6fde4 42 ~wxDialog();
e30285ab 43
bfc6fde4 44 virtual bool Destroy();
798a4529 45
96be256b 46 virtual bool Show(bool show = true);
798a4529 47
bfc6fde4 48 void SetTitle(const wxString& title);
e30285ab 49
bfc6fde4 50 void SetModal(bool flag);
e30285ab 51
dfe1eee3 52 virtual bool IsModal() const
1c067fe3 53 { return m_modalShowing; }
e30285ab 54
bfc6fde4
VZ
55 virtual int ShowModal();
56 virtual void EndModal(int retCode);
e30285ab 57
dfe1eee3 58 // Implementation
96be256b 59 virtual void ChangeFont(bool keepOriginalSize = true);
dfe1eee3
VZ
60 virtual void ChangeBackgroundColour();
61 virtual void ChangeForegroundColour();
62 inline WXWidget GetTopWidget() const { return m_mainWidget; }
63 inline WXWidget GetClientWidget() const { return m_mainWidget; }
e30285ab 64
bfc6fde4
VZ
65 // Standard buttons
66 void OnOK(wxCommandEvent& event);
67 void OnApply(wxCommandEvent& event);
68 void OnCancel(wxCommandEvent& event);
e30285ab 69
bfc6fde4
VZ
70 // Responds to colour changes
71 void OnSysColourChanged(wxSysColourChangedEvent& event);
e30285ab 72
dfe1eee3
VZ
73 void OnCharHook(wxKeyEvent& event);
74 void OnCloseWindow(wxCloseEvent& event);
e30285ab 75
798a4529 76private:
02bcd285 77 virtual bool XmDoCreateTLW(wxWindow* parent,
f58585c0
VZ
78 wxWindowID id,
79 const wxString& title,
80 const wxPoint& pos,
81 const wxSize& size,
82 long style,
83 const wxString& name);
84
798a4529 85
bfc6fde4
VZ
86 //// Motif-specific
87 bool m_modalShowing;
7e1bcfa8 88 wxEventLoop* m_eventLoop;
798a4529 89
bfc6fde4
VZ
90protected:
91 virtual void DoSetSize(int x, int y,
83df96d6
JS
92 int width, int height,
93 int sizeFlags = wxSIZE_AUTO);
e30285ab 94
bfc6fde4 95 virtual void DoSetClientSize(int width, int height);
e30285ab 96
219ee9ba 97
bfc6fde4
VZ
98private:
99 DECLARE_EVENT_TABLE()
9b6dbb09
JS
100};
101
102#endif
83df96d6 103// _WX_DIALOG_H_