renamed wxFrameManager::GetFrame() and SetFrame() to GetManagedWindow() and SetManagedWindow()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams 2006-07-12 07:18:19 +00:00
parent 81f5836b89
commit 461125ea4d
4 changed files with 35 additions and 12 deletions

View File

@ -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,

View File

@ -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));

View File

@ -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);
}

View File

@ -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;
}