diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 7931b602ac..af10d6e3db 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -371,7 +371,7 @@ friend class wxFloatingPane; public: - wxFrameManager(wxFrame* frame = NULL, + wxFrameManager(wxWindow* managed_wnd = NULL, unsigned int flags = wxAUI_MGR_DEFAULT); virtual ~wxFrameManager(); void UnInit(); @@ -379,8 +379,8 @@ public: void SetFlags(unsigned int flags); unsigned int GetFlags() const; - void SetFrame(wxWindow* frame); - wxWindow* GetFrame() const; + void SetManagedWindow(wxWindow* managed_wnd); + wxWindow* GetManagedWindow() const; #ifdef SWIG %disownarg( wxDockArt* art_provider ); @@ -412,6 +412,14 @@ public: void Update(); +public: + + // deprecated -- please use SetManagedWindow() and + // and GetManagedWindow() instead + + wxDEPRECATED( void SetFrame(wxFrame* frame) ); + wxDEPRECATED( wxFrame* GetFrame() const ); + protected: void DrawHintRect(wxWindow* pane_window, diff --git a/samples/aui/auidemo.cpp b/samples/aui/auidemo.cpp index 47a6a43ba1..36c4aeb7f0 100644 --- a/samples/aui/auidemo.cpp +++ b/samples/aui/auidemo.cpp @@ -589,7 +589,7 @@ MyFrame::MyFrame(wxWindow* parent, : wxFrame(parent, id, title, pos, size, style) { // tell wxFrameManager to manage this frame - m_mgr.SetFrame(this); + m_mgr.SetManagedWindow(this); // set frame icon SetIcon(wxIcon(sample_xpm)); diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp index 0e0c1143eb..c70ef3e168 100644 --- a/src/aui/floatpane.cpp +++ b/src/aui/floatpane.cpp @@ -49,7 +49,7 @@ wxFloatingPane::wxFloatingPane(wxWindow* parent, m_owner_mgr = owner_mgr; m_moving = false; m_last_rect = wxRect(); - m_mgr.SetFrame(this); + m_mgr.SetManagedWindow(this); SetExtraStyle(wxWS_EX_PROCESS_IDLE); } diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 6b1c211d43..fe57440d76 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -391,7 +391,7 @@ BEGIN_EVENT_TABLE(wxFrameManager, wxEvtHandler) END_EVENT_TABLE() -wxFrameManager::wxFrameManager(wxFrame* frame, unsigned int flags) +wxFrameManager::wxFrameManager(wxWindow* managed_wnd, unsigned int flags) { m_action = actionNone; m_last_mouse_move = wxPoint(); @@ -400,9 +400,9 @@ wxFrameManager::wxFrameManager(wxFrame* frame, unsigned int flags) m_hint_wnd = NULL; m_flags = flags; - if (frame) + if (managed_wnd) { - SetFrame(frame); + SetManagedWindow(managed_wnd); } } @@ -500,10 +500,25 @@ unsigned int wxFrameManager::GetFlags() const } -// SetFrame() is usually called once when the frame +// don't use these anymore as they are deprecated +// use Set/GetManagedFrame() instead +void wxFrameManager::SetFrame(wxFrame* frame) +{ + SetManagedWindow((wxWindow*)frame); +} + +wxFrame* wxFrameManager::GetFrame() const +{ + return (wxFrame*)m_frame; +} + + + + +// SetManagedWindow() is usually called once when the frame // manager class is being initialized. "frame" specifies // the frame which should be managed by the frame mananger -void wxFrameManager::SetFrame(wxWindow* frame) +void wxFrameManager::SetManagedWindow(wxWindow* frame) { wxASSERT_MSG(frame, wxT("specified frame must be non-NULL")); @@ -538,8 +553,8 @@ void wxFrameManager::UnInit() m_frame->RemoveEventHandler(this); } -// GetFrame() returns the window pointer being managed by wxFrameManager -wxWindow* wxFrameManager::GetFrame() const +// GetManagedWindow() returns the window pointer being managed +wxWindow* wxFrameManager::GetManagedWindow() const { return m_frame; }