]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/mdi.h
fix warnings in EventsSuppressor ctor from gcc with -O option
[wxWidgets.git] / include / wx / gtk / mdi.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
cb8cc250 2// Name: wx/gtk/mdi.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_MDI_H_
11#define _WX_GTK_MDI_H_
c801d85f 12
0416c418 13#include "wx/frame.h"
c801d85f 14
cca410b3
PC
15class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
16class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
17
c801d85f
KB
18//-----------------------------------------------------------------------------
19// wxMDIParentFrame
20//-----------------------------------------------------------------------------
21
20123d49 22class WXDLLIMPEXP_CORE wxMDIParentFrame: public wxFrame
c801d85f 23{
ab2b3dd4 24public:
f6bcfd97
BP
25 wxMDIParentFrame() { Init(); }
26 wxMDIParentFrame(wxWindow *parent,
27 wxWindowID id,
28 const wxString& title,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
32 const wxString& name = wxFrameNameStr)
33 {
34 Init();
35
36 (void)Create(parent, id, title, pos, size, style, name);
37 }
38
d3c7fc99 39 virtual ~wxMDIParentFrame();
8487f887 40 bool Create( wxWindow *parent,
40d432c4
VZ
41 wxWindowID id,
42 const wxString& title,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
46 const wxString& name = wxFrameNameStr );
c801d85f 47
ab2b3dd4 48 wxMDIChildFrame *GetActiveChild() const;
f6bcfd97
BP
49
50 wxMDIClientWindow *GetClientWindow() const;
ab2b3dd4 51 virtual wxMDIClientWindow *OnCreateClient();
f6bcfd97 52
ab2b3dd4 53 virtual void Cascade() {}
0d97c090 54 virtual void Tile(wxOrientation WXUNUSED(orient) = wxHORIZONTAL) {}
ab2b3dd4
RR
55 virtual void ArrangeIcons() {}
56 virtual void ActivateNext();
57 virtual void ActivatePrevious();
716b7364 58
f6bcfd97 59 // implementation
ab2b3dd4
RR
60
61 wxMDIClientWindow *m_clientWindow;
62 bool m_justInserted;
63
ab2b3dd4 64 virtual void OnInternalIdle();
f6bcfd97
BP
65
66protected:
67 void Init();
cca410b3 68 virtual void DoGetClientSize(int* width, int* height) const;
f6bcfd97 69
8487f887
RR
70private:
71 friend class wxMDIChildFrame;
f6bcfd97 72
8487f887 73 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
c801d85f
KB
74};
75
76//-----------------------------------------------------------------------------
77// wxMDIChildFrame
78//-----------------------------------------------------------------------------
79
20123d49 80class WXDLLIMPEXP_CORE wxMDIChildFrame: public wxFrame
c801d85f 81{
8487f887 82public:
ab2b3dd4 83 wxMDIChildFrame();
c801d85f 84 wxMDIChildFrame( wxMDIParentFrame *parent,
885df446
VZ
85 wxWindowID id,
86 const wxString& title,
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 long style = wxDEFAULT_FRAME_STYLE,
90 const wxString& name = wxFrameNameStr );
91
92 virtual ~wxMDIChildFrame();
c801d85f 93 bool Create( wxMDIParentFrame *parent,
885df446
VZ
94 wxWindowID id,
95 const wxString& title,
96 const wxPoint& pos = wxDefaultPosition,
97 const wxSize& size = wxDefaultSize,
98 long style = wxDEFAULT_FRAME_STYLE,
99 const wxString& name = wxFrameNameStr );
f6bcfd97 100
8487f887
RR
101 virtual void SetMenuBar( wxMenuBar *menu_bar );
102 virtual wxMenuBar *GetMenuBar() const;
c801d85f 103
8487f887 104 virtual void AddChild( wxWindowBase *child );
debe6624 105
8487f887 106 virtual void Activate();
f6bcfd97 107
dcf924a3 108#if wxUSE_STATUSBAR
cf4219e7 109 // no status bars
8487f887 110 virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number) = 1,
f6bcfd97 111 long WXUNUSED(style) = 1,
e90c1d2a
VZ
112 wxWindowID WXUNUSED(id) = 1,
113 const wxString& WXUNUSED(name) = wxEmptyString)
8487f887 114 { return (wxStatusBar*)NULL; }
e90c1d2a 115
8487f887
RR
116 virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
117 virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
118 virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
dcf924a3 119#endif
cf4219e7
RR
120
121 // no size hints
571f6981 122 virtual void DoSetSizeHints( int WXUNUSED(minW),
cb8cc250
WS
123 int WXUNUSED(minH),
124 int WXUNUSED(maxW) = wxDefaultCoord,
125 int WXUNUSED(maxH) = wxDefaultCoord,
126 int WXUNUSED(incW) = wxDefaultCoord,
127 int WXUNUSED(incH) = wxDefaultCoord) {}
f6bcfd97 128
dcf924a3 129#if wxUSE_TOOLBAR
05c3f0fc 130 // no toolbar
885df446
VZ
131 virtual wxToolBar* CreateToolBar( long WXUNUSED(style),
132 wxWindowID WXUNUSED(id),
133 const wxString& WXUNUSED(name) )
134 { return (wxToolBar*)NULL; }
8487f887 135 virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
d11e8786 136#endif // wxUSE_TOOLBAR
f6bcfd97 137
cf4219e7 138 // no icon
05c3f0fc
VZ
139 virtual void SetIcons(const wxIconBundle& icons )
140 { wxTopLevelWindowBase::SetIcons(icons); }
f6bcfd97
BP
141
142 // no title
cb8cc250 143 virtual void SetTitle( const wxString &title );
f6bcfd97 144
cf4219e7 145 // no maximize etc
d11e8786
VZ
146 virtual void Maximize( bool WXUNUSED(maximize) = true ) { }
147 virtual bool IsMaximized() const { return true; }
148 virtual void Iconize(bool WXUNUSED(iconize) = true) { }
149 virtual bool IsIconized() const { return false; }
8487f887 150 virtual void Restore() {}
f6bcfd97 151
d11e8786 152 virtual bool IsTopLevel() const { return false; }
f6bcfd97 153
3811dacb
RR
154 virtual bool Destroy();
155
f6bcfd97
BP
156 void OnActivate( wxActivateEvent& event );
157 void OnMenuHighlight( wxMenuEvent& event );
158
159 // implementation
160
716b7364 161 wxMenuBar *m_menuBar;
716b7364 162 GtkNotebookPage *m_page;
ab2b3dd4 163 bool m_justInserted;
f6bcfd97 164
885df446 165protected:
ac0c857a
RR
166 // override wxFrame methods to not do anything
167 virtual void DoSetSize(int x, int y,
168 int width, int height,
169 int sizeFlags = wxSIZE_AUTO);
885df446 170
8487f887 171private:
f6bcfd97 172 DECLARE_EVENT_TABLE()
8487f887 173 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
c801d85f
KB
174};
175
176//-----------------------------------------------------------------------------
177// wxMDIClientWindow
178//-----------------------------------------------------------------------------
179
20123d49 180class WXDLLIMPEXP_CORE wxMDIClientWindow: public wxWindow
c801d85f 181{
ab2b3dd4 182public:
fd9811b1 183 wxMDIClientWindow();
debe6624 184 wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
d3c7fc99 185 virtual ~wxMDIClientWindow();
debe6624 186 virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
8487f887
RR
187
188private:
189 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
c801d85f
KB
190};
191
0416c418 192#endif // _WX_GTK_MDI_H_