long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr);
- void OnSize(wxSizeEvent& event);
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void SetMenuBar(wxMenuBar *menu_bar);
- // Gets the size available for subwindows after menu size, toolbar size
- // and status bar size have been subtracted. If you want to manage your own
- // toolbar(s), don't call SetToolBar.
- void DoGetClientSize(int *width, int *height) const;
-
// Get the active MDI child window (Windows only)
wxMDIChildFrame *GetActiveChild() const ;
// Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
+ // Gets the size available for subwindows after menu size, toolbar size
+ // and status bar size have been subtracted. If you want to manage your own
+ // toolbar(s), don't call SetToolBar.
+ void DoGetClientSize(int *width, int *height) const;
+
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame)
- EVT_SIZE(wxMDIParentFrame::OnSize)
EVT_ACTIVATE(wxMDIParentFrame::OnActivate)
EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged)
END_EVENT_TABLE()
}
-// Get size *available for subwindows* i.e. excluding menu bar.
-void wxMDIParentFrame::DoGetClientSize(int *x, int *y) const
-{
- wxDisplaySize( x , y ) ;
-}
-
void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar)
{
wxFrame::SetMenuBar( menu_bar ) ;
}
-void wxMDIParentFrame::OnSize(wxSizeEvent& event)
-{
-#if wxUSE_CONSTRAINTS
- if (GetAutoLayout())
- Layout();
-#endif
- int x = 0;
- int y = 0;
- int width, height;
- GetClientSize(&width, &height);
-
- if ( GetClientWindow() )
- GetClientWindow()->SetSize(x, y, width, height);
-}
-
void wxMDIParentFrame::OnActivate(wxActivateEvent& event)
{
if ( m_currentChild && event.GetActive() )
return TRUE;
}
+// Get size *available for subwindows* i.e. excluding menu bar.
+void wxMDIClientWindow::DoGetClientSize(int *x, int *y) const
+{
+ wxDisplaySize( x , y ) ;
+}
+
// Explicitly call default scroll behaviour
void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
{
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame)
- EVT_SIZE(wxMDIParentFrame::OnSize)
EVT_ACTIVATE(wxMDIParentFrame::OnActivate)
EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged)
END_EVENT_TABLE()
}
-// Get size *available for subwindows* i.e. excluding menu bar.
-void wxMDIParentFrame::DoGetClientSize(int *x, int *y) const
-{
- wxDisplaySize( x , y ) ;
-}
-
void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar)
{
wxFrame::SetMenuBar( menu_bar ) ;
}
-void wxMDIParentFrame::OnSize(wxSizeEvent& event)
-{
-#if wxUSE_CONSTRAINTS
- if (GetAutoLayout())
- Layout();
-#endif
- int x = 0;
- int y = 0;
- int width, height;
- GetClientSize(&width, &height);
-
- if ( GetClientWindow() )
- GetClientWindow()->SetSize(x, y, width, height);
-}
-
void wxMDIParentFrame::OnActivate(wxActivateEvent& event)
{
if ( m_currentChild && event.GetActive() )
return TRUE;
}
+// Get size *available for subwindows* i.e. excluding menu bar.
+void wxMDIClientWindow::DoGetClientSize(int *x, int *y) const
+{
+ wxDisplaySize( x , y ) ;
+}
+
// Explicitly call default scroll behaviour
void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
{