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