diff --git a/include/wx/aui/tabmdi.h b/include/wx/aui/tabmdi.h index 2922d3a84b..bd98406353 100644 --- a/include/wx/aui/tabmdi.h +++ b/include/wx/aui/tabmdi.h @@ -11,7 +11,7 @@ #ifndef _WX_AUITABMDI_H_ #define _WX_AUITABMDI_H_ -#if wxUSE_AUI +#if wxUSE_AUI && wxUSE_MDI // ---------------------------------------------------------------------------- // headers @@ -21,6 +21,7 @@ #include "wx/panel.h" #include "wx/notebook.h" #include "wx/icon.h" +#include "wx/mdi.h" #include "wx/aui/auibook.h" //----------------------------------------------------------------------------- @@ -115,7 +116,7 @@ private: // wxAuiMDIChildFrame //----------------------------------------------------------------------------- -class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel +class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxTDIChildFrame { public: wxAuiMDIChildFrame(); @@ -137,88 +138,35 @@ public: const wxString& name = wxFrameNameStr); #if wxUSE_MENUS - virtual void SetMenuBar(wxMenuBar *menuBar); - virtual wxMenuBar *GetMenuBar() const; + virtual void SetMenuBar(wxMenuBar *menuBar) wxOVERRIDE; + virtual wxMenuBar *GetMenuBar() const wxOVERRIDE; #endif // wxUSE_MENUS - virtual void SetTitle(const wxString& title); - virtual wxString GetTitle() const; + virtual void SetTitle(const wxString& title) wxOVERRIDE; - virtual void SetIcons(const wxIconBundle& icons); - virtual const wxIconBundle& GetIcons() const; + virtual void SetIcons(const wxIconBundle& icons) wxOVERRIDE; - virtual void SetIcon(const wxIcon& icon); - virtual const wxIcon& GetIcon() const; - - virtual void Activate(); + virtual void Activate() wxOVERRIDE; virtual bool Destroy() wxOVERRIDE; virtual bool Show(bool show = true) wxOVERRIDE; -#if wxUSE_STATUSBAR - // no status bars - virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1, - long WXUNUSED(style) = 1, - wxWindowID WXUNUSED(winid) = 1, - const wxString& WXUNUSED(name) = wxEmptyString) - { return NULL; } - - virtual wxStatusBar *GetStatusBar() const { return NULL; } - virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {} - virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {} -#endif - -#if wxUSE_TOOLBAR - // no toolbar bars - virtual wxToolBar* CreateToolBar(long WXUNUSED(style), - wxWindowID WXUNUSED(winid), - const wxString& WXUNUSED(name)) - { return NULL; } - virtual wxToolBar *GetToolBar() const { return NULL; } -#endif - - - // no maximize etc - virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ } - virtual void Restore() { /* Has no effect */ } - virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ } - virtual bool IsMaximized() const { return true; } - virtual bool IsIconized() const { return false; } - virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; } - virtual bool IsFullScreen() const { return false; } - - virtual bool IsTopLevel() const wxOVERRIDE { return false; } - void OnMenuHighlight(wxMenuEvent& evt); - void OnActivate(wxActivateEvent& evt); - void OnCloseWindow(wxCloseEvent& evt); void SetMDIParentFrame(wxAuiMDIParentFrame* parent); wxAuiMDIParentFrame* GetMDIParentFrame() const; protected: void Init(); - virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags) wxOVERRIDE; - virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; - // no size hints - virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH), - int WXUNUSED(maxW), int WXUNUSED(maxH), - int WXUNUSED(incW), int WXUNUSED(incH)) wxOVERRIDE {} public: // This function needs to be called when a size change is confirmed, // we needed this function to prevent anybody from the outside // changing the panel... it messes the UI layout when we would allow it. void ApplyMDIChildFrameRect(); - void DoShow(bool show); protected: wxAuiMDIParentFrame* m_pMDIParentFrame; - wxRect m_mdiNewRect; - wxRect m_mdiCurRect; - wxString m_title; - wxIcon m_icon; - wxIconBundle m_iconBundle; bool m_activateOnCreate; #if wxUSE_MENUS @@ -247,7 +195,6 @@ public: virtual bool CreateClient(wxAuiMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); - virtual int SetSelection(size_t page) wxOVERRIDE; virtual wxAuiMDIChildFrame* GetActiveChild(); virtual void SetActiveChild(wxAuiMDIChildFrame* pChildFrame) { @@ -259,12 +206,11 @@ protected: void PageChanged(int oldSelection, int newSelection); void OnPageClose(wxAuiNotebookEvent& evt); void OnPageChanged(wxAuiNotebookEvent& evt); - void OnSize(wxSizeEvent& evt); private: wxDECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow); wxDECLARE_EVENT_TABLE(); }; -#endif // wxUSE_AUI +#endif // wxUSE_AUI && wxUSE_MDI #endif // _WX_AUITABMDI_H_ diff --git a/samples/docview/Makefile.in b/samples/docview/Makefile.in index 8415a78332..9c174054d5 100644 --- a/samples/docview/Makefile.in +++ b/samples/docview/Makefile.in @@ -98,6 +98,9 @@ COND_PLATFORM_OS2_1___docview___os2_emxbindcmd = $(NM) docview$(EXEEXT) | if \ @COND_TOOLKIT_OSX_IPHONE@ = $(__docview_app_Contents_PkgInfo___depname) @COND_TOOLKIT_COCOA@____docview_BUNDLE_TGT_REF_DEP = \ @COND_TOOLKIT_COCOA@ $(__docview_app_Contents_PkgInfo___depname) +COND_MONOLITHIC_0___WXLIB_AUI_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_AUI_p = $(COND_MONOLITHIC_0___WXLIB_AUI_p) COND_MONOLITHIC_0___WXLIB_CORE_p = \ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) @@ -148,7 +151,7 @@ distclean: clean rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile docview$(EXEEXT): $(DOCVIEW_OBJECTS) $(__docview___win32rc) - $(CXX) -o $@ $(DOCVIEW_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS) + $(CXX) -o $@ $(DOCVIEW_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_AUI_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS) $(__docview___os2_emxbindcmd) @COND_PLATFORM_MACOSX_1@docview.app/Contents/PkgInfo: docview$(EXEEXT) $(srcdir)/Info.plist.in $(srcdir)/doc.icns $(srcdir)/chart.icns $(srcdir)/notepad.icns diff --git a/samples/docview/docview.bkl b/samples/docview/docview.bkl index da903d0623..785f7058f5 100644 --- a/samples/docview/docview.bkl +++ b/samples/docview/docview.bkl @@ -10,6 +10,7 @@ docview.cpp doc.cpp view.cpp docview.h doc.h view.h + aui core base docview.rc diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp index 6b352d5f38..3785a06235 100644 --- a/samples/docview/docview.cpp +++ b/samples/docview/docview.cpp @@ -49,6 +49,10 @@ #include "wx/docview.h" #include "wx/docmdi.h" +#if wxUSE_AUI + #include "wx/aui/tabmdi.h" +#endif // wxUSE_AUI + #include "docview.h" #include "doc.h" #include "view.h" @@ -92,7 +96,12 @@ MyApp::MyApp() namespace CmdLineOption { +#if wxUSE_MDI_ARCHITECTURE const char * const MDI = "mdi"; +#endif // wxUSE_MDI_ARCHITECTURE +#if wxUSE_AUI +const char * const AUI = "aui"; +#endif // wxUSE_AUI const char * const SDI = "sdi"; const char * const SINGLE = "single"; @@ -102,8 +111,14 @@ void MyApp::OnInitCmdLine(wxCmdLineParser& parser) { wxApp::OnInitCmdLine(parser); +#if wxUSE_MDI_ARCHITECTURE parser.AddSwitch("", CmdLineOption::MDI, "run in MDI mode: multiple documents, single window"); +#endif // wxUSE_MDI_ARCHITECTURE +#if wxUSE_AUI + parser.AddSwitch("", CmdLineOption::AUI, + "run in MDI mode using AUI: multiple documents, single window"); +#endif // wxUSE_AUI parser.AddSwitch("", CmdLineOption::SDI, "run in SDI mode: multiple documents, multiple windows"); parser.AddSwitch("", CmdLineOption::SINGLE, @@ -126,6 +141,14 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser) } #endif // wxUSE_MDI_ARCHITECTURE +#if wxUSE_AUI + if ( parser.Found(CmdLineOption::AUI) ) + { + m_mode = Mode_AUI; + numModeOptions++; + } +#endif // wxUSE_AUI + if ( parser.Found(CmdLineOption::SDI) ) { m_mode = Mode_SDI; @@ -198,22 +221,37 @@ bool MyApp::OnInit() } // create the main frame window - wxFrame *frame; + wxFrame *frame = NULL; + switch ( m_mode ) + { #if wxUSE_MDI_ARCHITECTURE - if ( m_mode == Mode_MDI ) - { - frame = new wxDocMDIParentFrame(docManager, NULL, wxID_ANY, - GetAppDisplayName(), - wxDefaultPosition, - wxSize(500, 400)); - } - else + case Mode_MDI: + frame = new wxDocMDIParentFrame(docManager, NULL, wxID_ANY, + GetAppDisplayName(), + wxDefaultPosition, + wxSize(500, 400)); + break; #endif // wxUSE_MDI_ARCHITECTURE - { - frame = new wxDocParentFrame(docManager, NULL, wxID_ANY, - GetAppDisplayName(), - wxDefaultPosition, - wxSize(500, 400)); + +#if wxUSE_AUI + case Mode_AUI: + frame = new wxDocParentFrameAny + ( + docManager, NULL, wxID_ANY, + GetAppDisplayName(), + wxDefaultPosition, + wxSize(500, 400) + ); + break; +#endif // wxUSE_AUI + + case Mode_SDI: + case Mode_Single: + frame = new wxDocParentFrame(docManager, NULL, wxID_ANY, + GetAppDisplayName(), + wxDefaultPosition, + wxSize(500, 400)); + break; } // and its menu bar @@ -317,37 +355,55 @@ void MyApp::CreateMenuBarForFrame(wxFrame *frame, wxMenu *file, wxMenu *edit) wxFrame *MyApp::CreateChildFrame(wxView *view, bool isCanvas) { // create a child frame of appropriate class for the current mode - wxFrame *subframe; + wxFrame *subframe = NULL; wxDocument *doc = view->GetDocument(); + switch ( GetMode() ) #if wxUSE_MDI_ARCHITECTURE - if ( GetMode() == Mode_MDI ) { - subframe = new wxDocMDIChildFrame - ( - doc, - view, - wxStaticCast(GetTopWindow(), wxDocMDIParentFrame), - wxID_ANY, - "Child Frame", - wxDefaultPosition, - wxSize(300, 300) - ); - } - else + case Mode_MDI: + subframe = new wxDocMDIChildFrame + ( + doc, + view, + wxStaticCast(GetTopWindow(), wxDocMDIParentFrame), + wxID_ANY, + "Child Frame", + wxDefaultPosition, + wxSize(300, 300) + ); + break; #endif // wxUSE_MDI_ARCHITECTURE - { - subframe = new wxDocChildFrame - ( - doc, - view, - wxStaticCast(GetTopWindow(), wxDocParentFrame), - wxID_ANY, - "Child Frame", - wxDefaultPosition, - wxSize(300, 300) - ); - subframe->Centre(); +#if wxUSE_AUI + case Mode_AUI: + subframe = new wxDocChildFrameAny + ( + doc, + view, + wxStaticCast(GetTopWindow(), wxAuiMDIParentFrame), + wxID_ANY, + "Child Frame", + wxDefaultPosition, + wxSize(300, 300) + ); + break; +#endif // wxUSE_AUI + + case Mode_SDI: + case Mode_Single: + subframe = new wxDocChildFrame + ( + doc, + view, + wxStaticCast(GetTopWindow(), wxDocParentFrame), + wxID_ANY, + "Child Frame", + wxDefaultPosition, + wxSize(300, 300) + ); + + subframe->Centre(); + break; } wxMenu *menuFile = new wxMenu; @@ -392,6 +448,12 @@ void MyApp::OnAbout(wxCommandEvent& WXUNUSED(event)) break; #endif // wxUSE_MDI_ARCHITECTURE +#if wxUSE_AUI + case Mode_AUI: + modeName = "AUI"; + break; +#endif // wxUSE_AUI + case Mode_SDI: modeName = "SDI"; break; @@ -415,7 +477,7 @@ void MyApp::OnAbout(wxCommandEvent& WXUNUSED(event)) "\n" "Authors: Julian Smart, Vadim Zeitlin\n" "\n" - "Usage: docview [--{mdi,sdi,single}]", + "Usage: docview [--{mdi,aui,sdi,single}]", modeName, docsCount ); diff --git a/samples/docview/docview.h b/samples/docview/docview.h index 12e9dbc86b..27d5175f1f 100644 --- a/samples/docview/docview.h +++ b/samples/docview/docview.h @@ -27,6 +27,9 @@ public: #if wxUSE_MDI_ARCHITECTURE Mode_MDI, // MDI mode: multiple documents, single top level window #endif // wxUSE_MDI_ARCHITECTURE +#if wxUSE_AUI + Mode_AUI, // MDI AUI mode +#endif // wxUSE_AUI Mode_SDI, // SDI mode: multiple documents, multiple top level windows Mode_Single // single document mode (and hence single top level window) }; diff --git a/samples/docview/docview_vc7.vcproj b/samples/docview/docview_vc7.vcproj index c7b31a484a..cd439da1ab 100644 --- a/samples/docview/docview_vc7.vcproj +++ b/samples/docview/docview_vc7.vcproj @@ -46,7 +46,7 @@ DoShow(show); + cf->wxWindow::Show(show); } else #endif @@ -1595,14 +1595,6 @@ public: } // TODO: else if (GetFlags() & wxAUI_NB_LEFT){} // TODO: else if (GetFlags() & wxAUI_NB_RIGHT){} - -#if wxUSE_MDI - if (wxDynamicCast(page.window, wxAuiMDIChildFrame)) - { - wxAuiMDIChildFrame* wnd = (wxAuiMDIChildFrame*)page.window; - wnd->ApplyMDIChildFrameRect(); - } -#endif } } @@ -1981,8 +1973,11 @@ bool wxAuiNotebook::InsertPage(size_t page_idx, else active_tabctrl->InsertPage(page, info, page_idx); - UpdateTabCtrlHeight(); - DoSizing(); + // Note that we don't need to call DoSizing() if the height has changed, as + // it's already called from UpdateTabCtrlHeight() itself in this case. + if ( !UpdateTabCtrlHeight() ) + DoSizing(); + active_tabctrl->DoShowHide(); // adjust selected index diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index c27b6ba90b..0331f384c6 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -423,12 +423,10 @@ void wxAuiMDIParentFrame::Tile(wxOrientation orient) // wxAuiMDIChildFrame //----------------------------------------------------------------------------- -wxIMPLEMENT_DYNAMIC_CLASS(wxAuiMDIChildFrame, wxPanel); +wxIMPLEMENT_DYNAMIC_CLASS(wxAuiMDIChildFrame, wxFrame); -wxBEGIN_EVENT_TABLE(wxAuiMDIChildFrame, wxPanel) +wxBEGIN_EVENT_TABLE(wxAuiMDIChildFrame, wxFrame) EVT_MENU_HIGHLIGHT_ALL(wxAuiMDIChildFrame::OnMenuHighlight) - EVT_ACTIVATE(wxAuiMDIChildFrame::OnActivate) - EVT_CLOSE(wxAuiMDIChildFrame::OnCloseWindow) wxEND_EVENT_TABLE() wxAuiMDIChildFrame::wxAuiMDIChildFrame() @@ -498,17 +496,14 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent, if (style & wxMINIMIZE) m_activateOnCreate = false; - wxSize cli_size = pClientWindow->GetClientSize(); - - // create the window off-screen to prevent flicker - wxPanel::Create(pClientWindow, + // create the window hidden to prevent flicker + wxWindow::Show(false); + wxWindow::Create(pClientWindow, id, - wxPoint(cli_size.x+1, cli_size.y+1), + wxDefaultPosition, size, wxNO_BORDER, name); - DoShow(false); - SetMDIParentFrame(parent); m_title = title; @@ -609,32 +604,17 @@ void wxAuiMDIChildFrame::SetTitle(const wxString& title) } } -wxString wxAuiMDIChildFrame::GetTitle() const -{ - return m_title; -} - void wxAuiMDIChildFrame::SetIcons(const wxIconBundle& icons) { - // get icon with the system icon size - SetIcon(icons.GetIcon(-1)); - m_iconBundle = icons; -} + wxTDIChildFrame::SetIcons(icons); -const wxIconBundle& wxAuiMDIChildFrame::GetIcons() const -{ - return m_iconBundle; -} - -void wxAuiMDIChildFrame::SetIcon(const wxIcon& icon) -{ wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame(); wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame")); - m_icon = icon; - + const wxSize sizeIcon(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X), + wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y)); wxBitmap bmp; - bmp.CopyFromIcon(m_icon); + bmp.CopyFromIcon(icons.GetIcon(sizeIcon)); wxAuiMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow(); if (pClientWindow != NULL) @@ -648,12 +628,6 @@ void wxAuiMDIChildFrame::SetIcon(const wxIcon& icon) } } -const wxIcon& wxAuiMDIChildFrame::GetIcon() const -{ - return m_icon; -} - - void wxAuiMDIChildFrame::Activate() { wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame(); @@ -689,16 +663,6 @@ void wxAuiMDIChildFrame::OnMenuHighlight(wxMenuEvent& event) #endif // wxUSE_STATUSBAR } -void wxAuiMDIChildFrame::OnActivate(wxActivateEvent& WXUNUSED(event)) -{ - // do nothing -} - -void wxAuiMDIChildFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) -{ - Destroy(); -} - void wxAuiMDIChildFrame::SetMDIParentFrame(wxAuiMDIParentFrame* parentFrame) { m_pMDIParentFrame = parentFrame; @@ -720,51 +684,23 @@ void wxAuiMDIChildFrame::Init() bool wxAuiMDIChildFrame::Show(bool show) { - // wxAuiMDIChildFrame uses m_activateOnCreate only to decide whether to - // activate the frame when it is created. After Create() is called, - // m_activateOnCreate will never be read again. Therefore, calling this - // function after Create() is pointless and you probably want to call - // Activate() instead. - wxCHECK_MSG( !GetHandle(), false, - wxS("Show() has no effect after Create(). Do you mean Activate()?") ); - m_activateOnCreate = show; - // do nothing + if ( show ) + { + // This is not a real TLW, so it won't get a size event when it's + // really "mapped", i.e. appears on the screen for the first time. + // Instead, its size had been already set when it was created and we + // didn't have any opportunity to lay it out since then, i.e. since + // before its children were created. Do it now to allow the same code + // that would work with a "real" wxMDIChildFrame to also work with this + // class. + DoLayout(); + } + return true; } -void wxAuiMDIChildFrame::DoShow(bool show) -{ - wxWindow::Show(show); -} - -void wxAuiMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) -{ - m_mdiNewRect = wxRect(x, y, width, height); -#ifdef __WXGTK__ - wxPanel::DoSetSize(x,y,width, height, sizeFlags); -#else - wxUnusedVar(sizeFlags); -#endif -} - -void wxAuiMDIChildFrame::DoMoveWindow(int x, int y, int width, int height) -{ - m_mdiNewRect = wxRect(x, y, width, height); -} - -void wxAuiMDIChildFrame::ApplyMDIChildFrameRect() -{ - if (m_mdiCurRect != m_mdiNewRect) - { - wxPanel::DoMoveWindow(m_mdiNewRect.x, m_mdiNewRect.y, - m_mdiNewRect.width, m_mdiNewRect.height); - m_mdiCurRect = m_mdiNewRect; - } -} - - //----------------------------------------------------------------------------- // wxAuiMDIClientWindow //----------------------------------------------------------------------------- @@ -774,7 +710,6 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxAuiMDIClientWindow, wxAuiNotebook); wxBEGIN_EVENT_TABLE(wxAuiMDIClientWindow, wxAuiNotebook) EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, wxAuiMDIClientWindow::OnPageChanged) EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, wxAuiMDIClientWindow::OnPageClose) - EVT_SIZE(wxAuiMDIClientWindow::OnSize) wxEND_EVENT_TABLE() wxAuiMDIClientWindow::wxAuiMDIClientWindow() @@ -790,11 +725,6 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style) { SetWindowStyleFlag(style); - wxSize caption_icon_size = - wxSize(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X), - wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y)); - SetUniformBitmapSize(caption_icon_size); - if (!wxAuiNotebook::Create(parent, wxID_ANY, wxPoint(0,0), @@ -812,11 +742,6 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style) return true; } -int wxAuiMDIClientWindow::SetSelection(size_t nPage) -{ - return wxAuiNotebook::SetSelection(nPage); -} - wxAuiMDIChildFrame* wxAuiMDIClientWindow::GetActiveChild() { const int sel = GetSelection(); @@ -891,13 +816,5 @@ void wxAuiMDIClientWindow::OnPageChanged(wxAuiNotebookEvent& evt) PageChanged(evt.GetOldSelection(), evt.GetSelection()); } -void wxAuiMDIClientWindow::OnSize(wxSizeEvent& evt) -{ - wxAuiNotebook::OnSize(evt); - - for (size_t pos = 0; pos < GetPageCount(); pos++) - ((wxAuiMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect(); -} - #endif //wxUSE_AUI #endif // wxUSE_MDI