1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_MDI_H_
11 #define _WX_GTK_MDI_H_
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxMDIParentFrame
: public wxFrame
22 wxMDIParentFrame() { Init(); }
23 wxMDIParentFrame(wxWindow
*parent
,
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
)
33 (void)Create(parent
, id
, title
, pos
, size
, style
, name
);
36 virtual ~wxMDIParentFrame();
37 bool Create( wxWindow
*parent
,
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
);
45 wxMDIChildFrame
*GetActiveChild() const;
47 wxMDIClientWindow
*GetClientWindow() const;
48 virtual wxMDIClientWindow
*OnCreateClient();
50 virtual void Cascade() {}
51 virtual void Tile(wxOrientation
WXUNUSED(orient
) = wxHORIZONTAL
) {}
52 virtual void ArrangeIcons() {}
53 virtual void ActivateNext();
54 virtual void ActivatePrevious();
58 wxMDIClientWindow
*m_clientWindow
;
61 virtual void GtkOnSize();
62 virtual void OnInternalIdle();
68 friend class wxMDIChildFrame
;
70 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
73 //-----------------------------------------------------------------------------
75 //-----------------------------------------------------------------------------
77 class WXDLLIMPEXP_CORE wxMDIChildFrame
: public wxFrame
81 wxMDIChildFrame( wxMDIParentFrame
*parent
,
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
);
89 virtual ~wxMDIChildFrame();
90 bool Create( wxMDIParentFrame
*parent
,
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
);
98 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
99 virtual wxMenuBar
*GetMenuBar() const;
101 virtual void AddChild( wxWindowBase
*child
);
103 virtual void Activate();
107 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
108 long WXUNUSED(style
) = 1,
109 wxWindowID
WXUNUSED(id
) = 1,
110 const wxString
& WXUNUSED(name
) = wxEmptyString
)
111 { return (wxStatusBar
*)NULL
; }
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
)[] ) {}
119 virtual void DoSetSizeHints( int WXUNUSED(minW
),
121 int WXUNUSED(maxW
) = wxDefaultCoord
,
122 int WXUNUSED(maxH
) = wxDefaultCoord
,
123 int WXUNUSED(incW
) = wxDefaultCoord
,
124 int WXUNUSED(incH
) = wxDefaultCoord
) {}
128 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
),
129 wxWindowID
WXUNUSED(id
),
130 const wxString
& WXUNUSED(name
) )
131 { return (wxToolBar
*)NULL
; }
132 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
133 #endif // wxUSE_TOOLBAR
136 virtual void SetIcons(const wxIconBundle
& icons
)
137 { wxTopLevelWindowBase::SetIcons(icons
); }
140 virtual void SetTitle( const wxString
&title
);
143 virtual void Maximize( bool WXUNUSED(maximize
) = true ) { }
144 virtual bool IsMaximized() const { return true; }
145 virtual void Iconize(bool WXUNUSED(iconize
) = true) { }
146 virtual bool IsIconized() const { return false; }
147 virtual void Restore() {}
149 virtual bool IsTopLevel() const { return false; }
151 virtual bool Destroy();
153 void OnActivate( wxActivateEvent
& event
);
154 void OnMenuHighlight( wxMenuEvent
& event
);
158 wxMenuBar
*m_menuBar
;
159 GtkNotebookPage
*m_page
;
163 // override wxFrame methods to not do anything
164 virtual void DoSetSize(int x
, int y
,
165 int width
, int height
,
166 int sizeFlags
= wxSIZE_AUTO
);
167 virtual void DoSetClientSize(int width
, int height
);
168 virtual void DoGetClientSize( int *width
, int *height
) const;
171 DECLARE_EVENT_TABLE()
172 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
175 //-----------------------------------------------------------------------------
177 //-----------------------------------------------------------------------------
179 class WXDLLIMPEXP_CORE wxMDIClientWindow
: public wxWindow
183 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
184 virtual ~wxMDIClientWindow();
185 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
188 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)
191 #endif // _WX_GTK_MDI_H_