]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
Added some tentative wxMotif clipboard code; did some file formatting
[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"
ac57418f 21#include "wx/icon.h"
c801d85f
KB
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
716b7364 27class wxMDIChildFrame;
cf4219e7
RR
28class wxMDIClientWindow;
29class wxMenu;
30class wxMenuBar;
31class wxToolBar;
32class wxStatusBar;
c801d85f
KB
33
34class wxFrame;
35
36//-----------------------------------------------------------------------------
37// global data
38//-----------------------------------------------------------------------------
39
40extern const char *wxFrameNameStr;
cf4219e7 41extern const char *wxToolBarNameStr;
c801d85f
KB
42
43//-----------------------------------------------------------------------------
44// wxFrame
45//-----------------------------------------------------------------------------
46
47class wxFrame: public wxWindow
48{
46dc76ba 49 DECLARE_DYNAMIC_CLASS(wxFrame)
ab16f4a3 50public:
46dc76ba 51
ab16f4a3
VZ
52 wxFrame();
53 wxFrame( 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 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
57 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
58 long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
59 ~wxFrame();
60 bool Destroy();
61
ab16f4a3 62 virtual bool Show( bool show );
903f689b 63 virtual void Centre( int direction = wxHORIZONTAL );
ab16f4a3 64
ab16f4a3 65 virtual void GetClientSize( int *width, int *height ) const;
f3855ef0
RR
66 wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
67
b593568e 68 virtual void SetClientSize( int const width, int const height );
324511ce 69
fb1585ae
RR
70 virtual void SetSize( int x, int y, int width, int height,
71 int sizeFlags = wxSIZE_AUTO );
43a18898 72 virtual void SetSize( int width, int height );
fb1585ae 73
e3e65dac
RR
74 virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
75 const wxString& name = "statusBar");
362c6693
RR
76 virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
77 const wxString& name );
78 virtual wxStatusBar *GetStatusBar() const;
8a9523f2 79 inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
ab16f4a3 80 virtual void SetStatusText( const wxString &text, int number = 0 );
362c6693 81 virtual void SetStatusWidths( int n, const int widths_field[] );
ab16f4a3 82
324511ce 83 virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
e3e65dac 84 const wxString& name = wxToolBarNameStr);
362c6693
RR
85 virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
86 virtual wxToolBar *GetToolBar(void) const;
8a9523f2 87 inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
324511ce 88
46dc76ba 89 virtual void SetMenuBar( wxMenuBar *menuBar );
362c6693 90 virtual wxMenuBar *GetMenuBar() const;
ab16f4a3 91
cf4219e7
RR
92 virtual void SetTitle( const wxString &title );
93 virtual wxString GetTitle() const { return m_title; }
324511ce 94
cf4219e7 95 virtual void SetIcon( const wxIcon &icon );
c33c4050
RR
96 virtual void Iconize( bool WXUNUSED(iconize)) { }
97 virtual bool IsIconized(void) const { return FALSE; }
98 bool Iconized(void) const { return IsIconized(); }
324511ce 99 virtual void Maximize(bool WXUNUSED(maximize)) {}
c33c4050 100 virtual void Restore(void) {}
c801d85f 101
46dc76ba 102 void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
ab16f4a3
VZ
103 void OnSize( wxSizeEvent &event );
104 void OnCloseWindow( wxCloseEvent& event );
b2b3ccc5 105 void OnIdle(wxIdleEvent& event );
ab16f4a3 106
58614078
RR
107 // implementation
108
ab16f4a3 109 virtual void GtkOnSize( int x, int y, int width, int height );
6ca41e57 110 virtual wxPoint GetClientAreaOrigin() const;
ab16f4a3
VZ
111 void DoMenuUpdates();
112 void DoMenuUpdates(wxMenu* menu);
113
ab16f4a3
VZ
114 wxMenuBar *m_frameMenuBar;
115 wxStatusBar *m_frameStatusBar;
46dc76ba 116 wxToolBar *m_frameToolBar;
ab16f4a3 117 wxString m_title;
d355d3fe 118 wxIcon m_icon;
b2b3ccc5 119 int m_miniEdge,m_miniTitle;
ab16f4a3 120
c801d85f 121 DECLARE_EVENT_TABLE()
c801d85f
KB
122};
123
124#endif // __GTKFRAMEH__