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