]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
Build fixes
[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
fb1585ae
RR
67 virtual void SetSize( int x, int y, int width, int height,
68 int sizeFlags = wxSIZE_AUTO );
43a18898 69 virtual void SetSize( int width, int height );
fb1585ae 70
e3e65dac
RR
71 virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
72 const wxString& name = "statusBar");
362c6693
RR
73 virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
74 const wxString& name );
75 virtual wxStatusBar *GetStatusBar() const;
8a9523f2 76 inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
ab16f4a3 77 virtual void SetStatusText( const wxString &text, int number = 0 );
362c6693 78 virtual void SetStatusWidths( int n, const int widths_field[] );
ab16f4a3 79
324511ce 80 virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
e3e65dac 81 const wxString& name = wxToolBarNameStr);
362c6693
RR
82 virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
83 virtual wxToolBar *GetToolBar(void) const;
8a9523f2 84 inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
324511ce 85
46dc76ba 86 virtual void SetMenuBar( wxMenuBar *menuBar );
362c6693 87 virtual wxMenuBar *GetMenuBar() const;
ab16f4a3 88
cf4219e7
RR
89 virtual void SetTitle( const wxString &title );
90 virtual wxString GetTitle() const { return m_title; }
324511ce 91
cf4219e7 92 virtual void SetIcon( const wxIcon &icon );
c33c4050
RR
93 virtual void Iconize( bool WXUNUSED(iconize)) { }
94 virtual bool IsIconized(void) const { return FALSE; }
95 bool Iconized(void) const { return IsIconized(); }
324511ce 96 virtual void Maximize(bool WXUNUSED(maximize)) {}
c33c4050 97 virtual void Restore(void) {}
c801d85f 98
46dc76ba 99 void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
ab16f4a3
VZ
100 void OnSize( wxSizeEvent &event );
101 void OnCloseWindow( wxCloseEvent& event );
102 void OnIdle(wxIdleEvent& event);
103
58614078
RR
104 // implementation
105
ab16f4a3 106 virtual void GtkOnSize( int x, int y, int width, int height );
6ca41e57 107 virtual wxPoint GetClientAreaOrigin() const;
ab16f4a3
VZ
108 void DoMenuUpdates();
109 void DoMenuUpdates(wxMenu* menu);
110
ab16f4a3
VZ
111 wxMenuBar *m_frameMenuBar;
112 wxStatusBar *m_frameStatusBar;
46dc76ba 113 wxToolBar *m_frameToolBar;
ab16f4a3 114 wxString m_title;
d355d3fe 115 wxIcon m_icon;
ab16f4a3 116
c801d85f 117 DECLARE_EVENT_TABLE()
c801d85f
KB
118};
119
120#endif // __GTKFRAMEH__