]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/mdi.h
Fixed non-precompiled headers compilation
[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 120
dcf924a3 121#if wxUSE_TOOLBAR
05c3f0fc 122 // no toolbar
885df446
VZ
123 virtual wxToolBar* CreateToolBar( long WXUNUSED(style),
124 wxWindowID WXUNUSED(id),
125 const wxString& WXUNUSED(name) )
126 { return (wxToolBar*)NULL; }
8487f887 127 virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
d11e8786 128#endif // wxUSE_TOOLBAR
f6bcfd97 129
cf4219e7 130 // no icon
05c3f0fc
VZ
131 virtual void SetIcons(const wxIconBundle& icons )
132 { wxTopLevelWindowBase::SetIcons(icons); }
f6bcfd97
BP
133
134 // no title
cb8cc250 135 virtual void SetTitle( const wxString &title );
f6bcfd97 136
cf4219e7 137 // no maximize etc
d11e8786
VZ
138 virtual void Maximize( bool WXUNUSED(maximize) = true ) { }
139 virtual bool IsMaximized() const { return true; }
140 virtual void Iconize(bool WXUNUSED(iconize) = true) { }
141 virtual bool IsIconized() const { return false; }
8487f887 142 virtual void Restore() {}
f6bcfd97 143
d11e8786 144 virtual bool IsTopLevel() const { return false; }
f6bcfd97 145
3811dacb
RR
146 virtual bool Destroy();
147
f6bcfd97
BP
148 void OnActivate( wxActivateEvent& event );
149 void OnMenuHighlight( wxMenuEvent& event );
150
151 // implementation
152
716b7364 153 wxMenuBar *m_menuBar;
716b7364 154 GtkNotebookPage *m_page;
ab2b3dd4 155 bool m_justInserted;
f6bcfd97 156
885df446 157protected:
ac0c857a
RR
158 // override wxFrame methods to not do anything
159 virtual void DoSetSize(int x, int y,
160 int width, int height,
161 int sizeFlags = wxSIZE_AUTO);
885df446 162
b2e10dac
PC
163 // no size hints
164 virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
165 int WXUNUSED(maxW), int WXUNUSED(maxH),
166 int WXUNUSED(incW), int WXUNUSED(incH)) {}
167
8487f887 168private:
f6bcfd97 169 DECLARE_EVENT_TABLE()
8487f887 170 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
c801d85f
KB
171};
172
173//-----------------------------------------------------------------------------
174// wxMDIClientWindow
175//-----------------------------------------------------------------------------
176
20123d49 177class WXDLLIMPEXP_CORE wxMDIClientWindow: public wxWindow
c801d85f 178{
ab2b3dd4 179public:
fd9811b1 180 wxMDIClientWindow();
debe6624 181 wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
d3c7fc99 182 virtual ~wxMDIClientWindow();
debe6624 183 virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
8487f887
RR
184
185private:
48200154
PC
186 virtual void AddChildGTK(wxWindowGTK* child);
187
8487f887 188 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
c801d85f
KB
189};
190
0416c418 191#endif // _WX_GTK_MDI_H_