]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dialog.h
"const" added to wxAccelTable ctor
[wxWidgets.git] / include / wx / gtk1 / 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 #include "wx/icon.h"
25
26 //-----------------------------------------------------------------------------
27 // forward decls
28 //-----------------------------------------------------------------------------
29
30 class wxRadioBox;
31
32 //-----------------------------------------------------------------------------
33 // classes
34 //-----------------------------------------------------------------------------
35
36 class wxDialog;
37
38 //-----------------------------------------------------------------------------
39 // global data
40 //-----------------------------------------------------------------------------
41
42 extern const char *wxDialogNameStr;
43
44 //-----------------------------------------------------------------------------
45 // wxDialog
46 //-----------------------------------------------------------------------------
47
48 class wxDialog: public wxWindow
49 {
50 DECLARE_DYNAMIC_CLASS(wxDialog)
51
52 public:
53
54 wxDialog(void);
55 wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
56 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
57 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
58 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
59 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
60 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
61 ~wxDialog(void);
62 void SetTitle(const wxString& title);
63 wxString GetTitle(void) const;
64 bool OnClose(void);
65 void OnApply( wxCommandEvent &event );
66 void OnCancel( wxCommandEvent &event );
67 void OnOK( wxCommandEvent &event );
68 void OnPaint(wxPaintEvent& event);
69 bool Destroy(void);
70 void OnCloseWindow(wxCloseEvent& event);
71 /*
72 void OnCharHook(wxKeyEvent& event);
73 */
74 virtual bool Show( bool show );
75 virtual int ShowModal(void);
76 virtual void EndModal(int retCode);
77 virtual bool IsModal(void) const;
78 void SetModal( bool modal );
79 virtual void InitDialog(void);
80 virtual void Centre( int direction = wxHORIZONTAL );
81
82 virtual void SetIcon( const wxIcon &icon );
83 virtual void Iconize( bool WXUNUSED(iconize)) { }
84 virtual bool IsIconized(void) const { return FALSE; }
85 bool Iconized(void) const { return IsIconized(); }
86 virtual void Maximize(void) { }
87 virtual void Restore(void) { }
88
89 private:
90
91 friend wxWindow;
92 friend wxDC;
93 friend wxRadioBox;
94
95 bool m_modalShowing;
96 wxString m_title;
97 wxIcon m_icon;
98
99 virtual void ImplementSetPosition();
100
101 DECLARE_EVENT_TABLE()
102
103 };
104
105 #endif // __GTKDIALOGH__