]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/frame.h
many fixes to wxTextCrtl, wxTreeCrtl, wxListBox,
[wxWidgets.git] / include / wx / gtk / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: frame.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 __GTKFRAMEH__
13 #define __GTKFRAMEH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/window.h"
22 #include "wx/menu.h"
23 #include "wx/statusbr.h"
24
25 //-----------------------------------------------------------------------------
26 // classes
27 //-----------------------------------------------------------------------------
28
29 class wxRadioBox;
30
31 class wxFrame;
32
33 //-----------------------------------------------------------------------------
34 // global data
35 //-----------------------------------------------------------------------------
36
37 extern const char *wxFrameNameStr;
38
39 //-----------------------------------------------------------------------------
40 // wxFrame
41 //-----------------------------------------------------------------------------
42
43 class wxFrame: public wxWindow
44 {
45 DECLARE_DYNAMIC_CLASS(wxFrame)
46
47 public:
48
49 wxFrame(void);
50 wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
51 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
52 long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
53 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
54 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
55 long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
56 ~wxFrame(void);
57 bool Destroy(void);
58 void OnCloseWindow( wxCloseEvent& event );
59 virtual bool Show( bool show );
60 virtual void Enable( bool enable );
61 virtual void GetClientSize( int *width, int *height ) const;
62 void OnSize( wxSizeEvent &event );
63 void SetMenuBar( wxMenuBar *menuBar );
64 virtual bool CreateStatusBar( int number = 1 );
65 virtual void SetStatusText( const wxString &text, int number = 0 );
66 virtual void SetStatusWidths( int n, int *width );
67 wxStatusBar *GetStatusBar(void);
68 wxMenuBar *GetMenuBar(void);
69 void SetTitle( const wxString &title );
70 wxString GetTitle(void) const;
71 void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
72 void OnIdle( wxIdleEvent &event );
73
74 //private:
75
76 void GtkOnSize( int x, int y, int width, int height );
77 void DoMenuUpdates(void);
78 void DoMenuUpdates(wxMenu* menu);
79
80 private:
81
82 friend wxWindow;
83
84 GtkWidget *m_mainWindow;
85 wxMenuBar *m_frameMenuBar;
86 wxStatusBar *m_frameStatusBar;
87 bool m_doingOnSize;
88 wxString m_title;
89
90
91 DECLARE_EVENT_TABLE()
92
93 };
94
95 #endif // __GTKFRAMEH__