wxAUI: Made fixed size floating panes work

wxAUI: Added IMPLEMENT_CLASS etc. for wxFloatingPane for a later patch


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Alex Bligh
2006-07-04 15:26:33 +00:00
parent ed3d6ace49
commit e5ab82d310
3 changed files with 16 additions and 14 deletions

View File

@@ -34,9 +34,9 @@ class WXDLLIMPEXP_AUI wxFloatingPane : public wxFloatingPaneBaseClass
public: public:
wxFloatingPane(wxWindow* parent, wxFloatingPane(wxWindow* parent,
wxFrameManager* owner_mgr, wxFrameManager* owner_mgr,
wxWindowID id = wxID_ANY, const wxPaneInfo& pane,
const wxPoint& pos = wxDefaultPosition, wxWindowID id = wxID_ANY
const wxSize& size = wxDefaultSize); );
~wxFloatingPane(); ~wxFloatingPane();
void SetPaneWindow(const wxPaneInfo& pane); void SetPaneWindow(const wxPaneInfo& pane);
private: private:
@@ -59,6 +59,8 @@ private:
wxFrameManager m_mgr; wxFrameManager m_mgr;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxFloatingPaneBaseClass)
}; };
#endif // wxUSE_AUI #endif // wxUSE_AUI

View File

@@ -32,15 +32,19 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif #endif
IMPLEMENT_CLASS( wxFloatingPane, wxFloatingPaneBaseClass )
wxFloatingPane::wxFloatingPane(wxWindow* parent, wxFloatingPane::wxFloatingPane(wxWindow* parent,
wxFrameManager* owner_mgr, wxFrameManager* owner_mgr,
wxWindowID id /*= wxID_ANY*/, const wxPaneInfo& pane,
const wxPoint& pos /*= wxDefaultPosition*/, wxWindowID id /*= wxID_ANY*/)
const wxSize& size /*= wxDefaultSize*/) : wxFloatingPaneBaseClass(parent, id, wxEmptyString,
: wxFloatingPaneBaseClass(parent, id, wxEmptyString, pos, size, pane.floating_pos, pane.floating_size,
wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxCLOSE_BOX | wxFRAME_NO_TASKBAR | wxCLOSE_BOX | wxFRAME_NO_TASKBAR |
wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN) wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN |
(pane.IsFixed()?0:wxRESIZE_BORDER)
)
{ {
m_owner_mgr = owner_mgr; m_owner_mgr = owner_mgr;
m_moving = false; m_moving = false;
@@ -80,9 +84,6 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
SetTitle(pane.caption); SetTitle(pane.caption);
if (contained_pane.IsFixed())
SetWindowStyle(GetWindowStyle() & ~wxRESIZE_BORDER);
if (pane.floating_size != wxDefaultSize) if (pane.floating_size != wxDefaultSize)
{ {
SetSize(pane.floating_size); SetSize(pane.floating_size);

View File

@@ -1782,9 +1782,8 @@ void wxFrameManager::Update()
// we need to create a frame for this // we need to create a frame for this
// pane, which has recently been floated // pane, which has recently been floated
wxFloatingPane* frame = new wxFloatingPane(m_frame, wxFloatingPane* frame = new wxFloatingPane(m_frame,
this, -1, this,
p.floating_pos, p);
p.floating_size);
// on MSW, if the owner desires transparent dragging, and // on MSW, if the owner desires transparent dragging, and
// the dragging is happening right now, then the floating // the dragging is happening right now, then the floating