]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dialog.h
wxWindow::IsShown() made 'const'
[wxWidgets.git] / include / wx / gtk / dialog.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dialog.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKDIALOGH__
13 #define __GTKDIALOGH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/string.h"
22 #include "wx/event.h"
23 #include "wx/window.h"
24
25 //-----------------------------------------------------------------------------
26 // forward decls
27 //-----------------------------------------------------------------------------
28
29 class wxRadioBox;
30
31 //-----------------------------------------------------------------------------
32 // classes
33 //-----------------------------------------------------------------------------
34
35 class wxDialog;
36
37 //-----------------------------------------------------------------------------
38 // global data
39 //-----------------------------------------------------------------------------
40
41 extern const char *wxDialogNameStr;
42
43 //-----------------------------------------------------------------------------
44 // wxDialog
45 //-----------------------------------------------------------------------------
46
47 class wxDialog: public wxWindow
48 {
49 DECLARE_DYNAMIC_CLASS(wxDialog)
50
51 public:
52
53 wxDialog(void);
54 wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
55 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
56 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
57 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
58 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
59 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
60 ~wxDialog(void);
61 void SetTitle(const wxString& title);
62 wxString GetTitle(void) const;
63 bool OnClose(void);
64 void OnApply( wxCommandEvent &event );
65 void OnCancel( wxCommandEvent &event );
66 void OnOk( wxCommandEvent &event );
67 void OnPaint(wxPaintEvent& event);
68 void OnCloseWindow(wxCloseEvent& event);
69 /*
70 void OnCharHook(wxKeyEvent& event);
71 */
72 virtual bool Show( bool show );
73 virtual int ShowModal(void);
74 virtual void EndModal(int retCode);
75 virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
76 virtual void InitDialog(void);
77 /*
78 void OnOK(wxCommandEvent& event);
79 void OnApply(wxCommandEvent& event);
80 void OnCancel(wxCommandEvent& event);
81 */
82
83 private:
84
85 friend wxWindow;
86 friend wxDC;
87 friend wxRadioBox;
88 bool m_modalShowing;
89 wxString m_title;
90
91 DECLARE_EVENT_TABLE()
92
93 };
94
95 #endif // __GTKDIALOGH__