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();
66 virtual bool HasVisibleMenubar() const;
69 friend class wxMDIChildFrame
;
71 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
74 //-----------------------------------------------------------------------------
76 //-----------------------------------------------------------------------------
78 class WXDLLIMPEXP_CORE wxMDIChildFrame
: public wxFrame
82 wxMDIChildFrame( wxMDIParentFrame
*parent
,
84 const wxString
& title
,
85 const wxPoint
& pos
= wxDefaultPosition
,
86 const wxSize
& size
= wxDefaultSize
,
87 long style
= wxDEFAULT_FRAME_STYLE
,
88 const wxString
& name
= wxFrameNameStr
);
90 virtual ~wxMDIChildFrame();
91 bool Create( wxMDIParentFrame
*parent
,
93 const wxString
& title
,
94 const wxPoint
& pos
= wxDefaultPosition
,
95 const wxSize
& size
= wxDefaultSize
,
96 long style
= wxDEFAULT_FRAME_STYLE
,
97 const wxString
& name
= wxFrameNameStr
);
99 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
100 virtual wxMenuBar
*GetMenuBar() const;
102 virtual void AddChild( wxWindowBase
*child
);
104 virtual void Activate();
108 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
109 long WXUNUSED(style
) = 1,
110 wxWindowID
WXUNUSED(id
) = 1,
111 const wxString
& WXUNUSED(name
) = wxEmptyString
)
112 { return (wxStatusBar
*)NULL
; }
114 virtual wxStatusBar
*GetStatusBar() const { return (wxStatusBar
*)NULL
; }
115 virtual void SetStatusText( const wxString
&WXUNUSED(text
), int WXUNUSED(number
)=0 ) {}
116 virtual void SetStatusWidths( int WXUNUSED(n
), const int WXUNUSED(widths_field
)[] ) {}
120 virtual void DoSetSizeHints( int WXUNUSED(minW
),
122 int WXUNUSED(maxW
) = wxDefaultCoord
,
123 int WXUNUSED(maxH
) = wxDefaultCoord
,
124 int WXUNUSED(incW
) = wxDefaultCoord
,
125 int WXUNUSED(incH
) = wxDefaultCoord
) {}
129 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
),
130 wxWindowID
WXUNUSED(id
),
131 const wxString
& WXUNUSED(name
) )
132 { return (wxToolBar
*)NULL
; }
133 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
134 #endif // wxUSE_TOOLBAR
137 virtual void SetIcons(const wxIconBundle
& icons
)
138 { wxTopLevelWindowBase::SetIcons(icons
); }
141 virtual void SetTitle( const wxString
&title
);
144 virtual void Maximize( bool WXUNUSED(maximize
) = true ) { }
145 virtual bool IsMaximized() const { return true; }
146 virtual void Iconize(bool WXUNUSED(iconize
) = true) { }
147 virtual bool IsIconized() const { return false; }
148 virtual void Restore() {}
150 virtual bool IsTopLevel() const { return false; }
152 virtual bool Destroy();
154 void OnActivate( wxActivateEvent
& event
);
155 void OnMenuHighlight( wxMenuEvent
& event
);
159 wxMenuBar
*m_menuBar
;
160 GtkNotebookPage
*m_page
;
164 // override wxFrame methods to not do anything
165 virtual void DoSetSize(int x
, int y
,
166 int width
, int height
,
167 int sizeFlags
= wxSIZE_AUTO
);
170 DECLARE_EVENT_TABLE()
171 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
174 //-----------------------------------------------------------------------------
176 //-----------------------------------------------------------------------------
178 class WXDLLIMPEXP_CORE wxMDIClientWindow
: public wxWindow
182 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
183 virtual ~wxMDIClientWindow();
184 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
187 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)
190 #endif // _WX_GTK_MDI_H_