]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
Second try at doing Set/GetClient right
[wxWidgets.git] / include / wx / gtk / frame.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: frame.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling, Julian Smart
ab16f4a3 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKFRAMEH__
12#define __GTKFRAMEH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/window.h"
c801d85f
KB
21
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
25
716b7364 26class wxMDIChildFrame;
cf4219e7
RR
27class wxMDIClientWindow;
28class wxMenu;
29class wxMenuBar;
30class wxToolBar;
31class wxStatusBar;
c801d85f
KB
32
33class wxFrame;
34
35//-----------------------------------------------------------------------------
36// global data
37//-----------------------------------------------------------------------------
38
39extern const char *wxFrameNameStr;
cf4219e7 40extern const char *wxToolBarNameStr;
c801d85f
KB
41
42//-----------------------------------------------------------------------------
43// wxFrame
44//-----------------------------------------------------------------------------
45
46class wxFrame: public wxWindow
47{
46dc76ba 48 DECLARE_DYNAMIC_CLASS(wxFrame)
ab16f4a3 49public:
46dc76ba 50
ab16f4a3
VZ
51 wxFrame();
52 wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
53 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
54 long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
55 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
56 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
57 long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
58 ~wxFrame();
59 bool Destroy();
60
ab16f4a3 61 virtual bool Show( bool show );
903f689b 62 virtual void Centre( int direction = wxHORIZONTAL );
ab16f4a3 63
ab16f4a3 64 virtual void GetClientSize( int *width, int *height ) const;
b593568e 65 virtual void SetClientSize( int const width, int const height );
324511ce 66
e3e65dac
RR
67 virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
68 const wxString& name = "statusBar");
362c6693
RR
69 virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
70 const wxString& name );
71 virtual wxStatusBar *GetStatusBar() const;
8a9523f2 72 inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
ab16f4a3 73 virtual void SetStatusText( const wxString &text, int number = 0 );
362c6693 74 virtual void SetStatusWidths( int n, const int widths_field[] );
ab16f4a3 75
324511ce 76 virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
e3e65dac 77 const wxString& name = wxToolBarNameStr);
362c6693
RR
78 virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
79 virtual wxToolBar *GetToolBar(void) const;
8a9523f2 80 inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
324511ce 81
46dc76ba 82 virtual void SetMenuBar( wxMenuBar *menuBar );
362c6693 83 virtual wxMenuBar *GetMenuBar() const;
ab16f4a3 84
cf4219e7
RR
85 virtual void SetTitle( const wxString &title );
86 virtual wxString GetTitle() const { return m_title; }
324511ce 87
cf4219e7 88 virtual void SetIcon( const wxIcon &icon );
c33c4050
RR
89 virtual void Iconize( bool WXUNUSED(iconize)) { }
90 virtual bool IsIconized(void) const { return FALSE; }
91 bool Iconized(void) const { return IsIconized(); }
324511ce 92 virtual void Maximize(bool WXUNUSED(maximize)) {}
c33c4050 93 virtual void Restore(void) {}
c801d85f 94
46dc76ba 95 void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
ab16f4a3
VZ
96 void OnSize( wxSizeEvent &event );
97 void OnCloseWindow( wxCloseEvent& event );
98 void OnIdle(wxIdleEvent& event);
99
58614078
RR
100 // implementation
101
ab16f4a3 102 virtual void GtkOnSize( int x, int y, int width, int height );
6ca41e57
RR
103 virtual void ImplementSetPosition();
104 virtual wxPoint GetClientAreaOrigin() const;
ab16f4a3
VZ
105 void DoMenuUpdates();
106 void DoMenuUpdates(wxMenu* menu);
107
ab16f4a3
VZ
108 wxMenuBar *m_frameMenuBar;
109 wxStatusBar *m_frameStatusBar;
46dc76ba 110 wxToolBar *m_frameToolBar;
ab16f4a3 111 wxString m_title;
d355d3fe 112 wxIcon m_icon;
ab16f4a3 113
c801d85f 114 DECLARE_EVENT_TABLE()
c801d85f
KB
115};
116
117#endif // __GTKFRAMEH__