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 class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame
;
16 class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow
;
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class WXDLLIMPEXP_CORE wxMDIParentFrame
: public wxFrame
25 wxMDIParentFrame() { Init(); }
26 wxMDIParentFrame(wxWindow
*parent
,
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
)
36 (void)Create(parent
, id
, title
, pos
, size
, style
, name
);
39 virtual ~wxMDIParentFrame();
40 bool Create( wxWindow
*parent
,
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
);
48 wxMDIChildFrame
*GetActiveChild() const;
50 wxMDIClientWindow
*GetClientWindow() const;
51 virtual wxMDIClientWindow
*OnCreateClient();
53 virtual void Cascade() {}
54 virtual void Tile(wxOrientation
WXUNUSED(orient
) = wxHORIZONTAL
) {}
55 virtual void ArrangeIcons() {}
56 virtual void ActivateNext();
57 virtual void ActivatePrevious();
61 wxMDIClientWindow
*m_clientWindow
;
64 virtual void OnInternalIdle();
68 virtual void DoGetClientSize(int* width
, int* height
) const;
71 friend class wxMDIChildFrame
;
73 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
76 //-----------------------------------------------------------------------------
78 //-----------------------------------------------------------------------------
80 class WXDLLIMPEXP_CORE wxMDIChildFrame
: public wxFrame
84 wxMDIChildFrame( wxMDIParentFrame
*parent
,
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
);
92 virtual ~wxMDIChildFrame();
93 bool Create( wxMDIParentFrame
*parent
,
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
);
101 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
102 virtual wxMenuBar
*GetMenuBar() const;
104 virtual void AddChild( wxWindowBase
*child
);
106 virtual void Activate();
110 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
111 long WXUNUSED(style
) = 1,
112 wxWindowID
WXUNUSED(id
) = 1,
113 const wxString
& WXUNUSED(name
) = wxEmptyString
)
114 { return (wxStatusBar
*)NULL
; }
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
)[] ) {}
122 virtual void DoSetSizeHints( int WXUNUSED(minW
),
124 int WXUNUSED(maxW
) = wxDefaultCoord
,
125 int WXUNUSED(maxH
) = wxDefaultCoord
,
126 int WXUNUSED(incW
) = wxDefaultCoord
,
127 int WXUNUSED(incH
) = wxDefaultCoord
) {}
131 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
),
132 wxWindowID
WXUNUSED(id
),
133 const wxString
& WXUNUSED(name
) )
134 { return (wxToolBar
*)NULL
; }
135 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
136 #endif // wxUSE_TOOLBAR
139 virtual void SetIcons(const wxIconBundle
& icons
)
140 { wxTopLevelWindowBase::SetIcons(icons
); }
143 virtual void SetTitle( const wxString
&title
);
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; }
150 virtual void Restore() {}
152 virtual bool IsTopLevel() const { return false; }
154 virtual bool Destroy();
156 void OnActivate( wxActivateEvent
& event
);
157 void OnMenuHighlight( wxMenuEvent
& event
);
161 wxMenuBar
*m_menuBar
;
162 GtkNotebookPage
*m_page
;
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
);
172 DECLARE_EVENT_TABLE()
173 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
176 //-----------------------------------------------------------------------------
178 //-----------------------------------------------------------------------------
180 class WXDLLIMPEXP_CORE wxMDIClientWindow
: public wxWindow
184 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
185 virtual ~wxMDIClientWindow();
186 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
189 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)
192 #endif // _WX_GTK_MDI_H_