]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dialog.h
doc view code inteprets wxSTREAM_EOF as correct,
[wxWidgets.git] / include / wx / gtk1 / dialog.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dialog.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created:
6 // Id: $Id$
7 // Copyright: (c) 1998 Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __GTKDIALOGH__
12 #define __GTKDIALOGH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/panel.h"
20 #include "wx/icon.h"
21
22 //-----------------------------------------------------------------------------
23 // classes
24 //-----------------------------------------------------------------------------
25
26 class wxDialog;
27
28 //-----------------------------------------------------------------------------
29 // global data
30 //-----------------------------------------------------------------------------
31
32 extern const wxChar *wxDialogNameStr;
33
34 //-----------------------------------------------------------------------------
35 // wxDialog
36 //-----------------------------------------------------------------------------
37
38 class wxDialog: public wxDialogBase
39 {
40 public:
41 wxDialog() { Init(); }
42 wxDialog( wxWindow *parent, wxWindowID id,
43 const wxString &title,
44 const wxPoint &pos = wxDefaultPosition,
45 const wxSize &size = wxDefaultSize,
46 long style = wxDEFAULT_DIALOG_STYLE,
47 const wxString &name = wxDialogNameStr );
48 bool Create( wxWindow *parent, wxWindowID id,
49 const wxString &title,
50 const wxPoint &pos = wxDefaultPosition,
51 const wxSize &size = wxDefaultSize,
52 long style = wxDEFAULT_DIALOG_STYLE,
53 const wxString &name = wxDialogNameStr );
54 ~wxDialog();
55
56 void SetTitle(const wxString& title);
57 wxString GetTitle() const;
58
59 void OnApply( wxCommandEvent &event );
60 void OnCancel( wxCommandEvent &event );
61 void OnOK( wxCommandEvent &event );
62 void OnPaint( wxPaintEvent& event );
63 void OnSize( wxSizeEvent &event );
64 void OnCloseWindow( wxCloseEvent& event );
65 /*
66 void OnCharHook( wxKeyEvent& event );
67 */
68
69 bool Destroy();
70
71 virtual bool Show( bool show );
72 virtual int ShowModal();
73 virtual void EndModal( int retCode );
74 virtual bool IsModal() const;
75 void SetModal( bool modal );
76
77 virtual void InitDialog(void);
78
79 virtual void SetIcon( const wxIcon &icon );
80 virtual void Iconize( bool WXUNUSED(iconize)) { }
81 virtual bool IsIconized() const { return FALSE; }
82 bool Iconized() const { return IsIconized(); }
83 virtual void Maximize() { }
84 virtual void Restore() { }
85
86 virtual bool IsTopLevel() const { return TRUE; }
87
88 // implementation
89
90 virtual void GtkOnSize( int x, int y, int width, int height );
91 virtual void OnInternalIdle();
92
93 bool m_modalShowing;
94 wxString m_title;
95 wxIcon m_icon;
96
97 protected:
98 // common part of all ctors
99 void Init();
100
101 virtual void DoSetSize(int x, int y,
102 int width, int height,
103 int sizeFlags = wxSIZE_AUTO);
104
105 private:
106 DECLARE_EVENT_TABLE()
107 DECLARE_DYNAMIC_CLASS(wxDialog)
108 };
109
110 #endif // __GTKDIALOGH__