]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "dialog.h"
19 class WXDLLEXPORT wxEventLoop
;
22 class WXDLLEXPORT wxDialog
: public wxDialogBase
24 DECLARE_DYNAMIC_CLASS(wxDialog
)
29 // Constructor with no modal flag - the new convention.
30 wxDialog(wxWindow
*parent
, wxWindowID id
,
31 const wxString
& title
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 long style
= wxDEFAULT_DIALOG_STYLE
,
35 const wxString
& name
= wxDialogNameStr
)
37 Create(parent
, id
, title
, pos
, size
, style
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID id
,
41 const wxString
& title
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxDEFAULT_DIALOG_STYLE
,
45 const wxString
& name
= wxDialogNameStr
);
49 virtual bool Destroy();
51 virtual bool Show(bool show
= true);
53 void SetTitle(const wxString
& title
);
55 void SetModal(bool flag
);
57 virtual bool IsModal() const
58 { return ((GetWindowStyleFlag() & wxDIALOG_MODAL
) == wxDIALOG_MODAL
); }
60 virtual int ShowModal();
61 virtual void EndModal(int retCode
);
64 virtual void ChangeFont(bool keepOriginalSize
= true);
65 virtual void ChangeBackgroundColour();
66 virtual void ChangeForegroundColour();
67 inline WXWidget
GetTopWidget() const { return m_mainWidget
; }
68 inline WXWidget
GetClientWidget() const { return m_mainWidget
; }
71 void OnOK(wxCommandEvent
& event
);
72 void OnApply(wxCommandEvent
& event
);
73 void OnCancel(wxCommandEvent
& event
);
75 // Responds to colour changes
76 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
78 void OnCharHook(wxKeyEvent
& event
);
79 void OnCloseWindow(wxCloseEvent
& event
);
82 virtual bool XmDoCreateTLW(wxWindow
* parent
,
84 const wxString
& title
,
88 const wxString
& name
);
93 wxEventLoop
* m_eventLoop
;
96 virtual void DoSetSize(int x
, int y
,
97 int width
, int height
,
98 int sizeFlags
= wxSIZE_AUTO
);
100 virtual void DoSetClientSize(int width
, int height
);
103 DECLARE_EVENT_TABLE()