]> git.saurik.com Git - wxWidgets.git/commitdiff
wxAUI: Made fixed size floating panes work
authorAlex Bligh <alex@alex.org.uk>
Tue, 4 Jul 2006 15:26:33 +0000 (15:26 +0000)
committerAlex Bligh <alex@alex.org.uk>
Tue, 4 Jul 2006 15:26:33 +0000 (15:26 +0000)
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

include/wx/aui/floatpane.h
src/aui/floatpane.cpp
src/aui/framemanager.cpp

index 70b44ac90c1d6efe3595f99cf7848172b4534db5..204652a21c6f1cf61c7e49ea9ab093ef5d079065 100644 (file)
@@ -34,9 +34,9 @@ class WXDLLIMPEXP_AUI wxFloatingPane : public wxFloatingPaneBaseClass
 public:
     wxFloatingPane(wxWindow* parent,
                    wxFrameManager* owner_mgr,
-                   wxWindowID id = wxID_ANY,
-                   const wxPoint& pos = wxDefaultPosition,
-                   const wxSize& size = wxDefaultSize);
+                   const wxPaneInfo& pane,
+                   wxWindowID id = wxID_ANY
+                   );
     ~wxFloatingPane();
     void SetPaneWindow(const wxPaneInfo& pane);
 private:
@@ -59,6 +59,8 @@ private:
     wxFrameManager m_mgr;
 
     DECLARE_EVENT_TABLE()
+
+    DECLARE_CLASS(wxFloatingPaneBaseClass)
 };
 
 #endif // wxUSE_AUI
index 00b4bd7b5253a86002f75d00d2f5e00e5189307c..e79355872e5d07c6c5ebe1cb2b1e966affd0e381 100644 (file)
 #ifndef WX_PRECOMP
 #endif
 
+IMPLEMENT_CLASS( wxFloatingPane, wxFloatingPaneBaseClass )
+
 wxFloatingPane::wxFloatingPane(wxWindow* parent,
                 wxFrameManager* owner_mgr,
-                wxWindowID id /*= wxID_ANY*/,
-                const wxPoint& pos /*= wxDefaultPosition*/,
-                const wxSize& size /*= wxDefaultSize*/)
-                : wxFloatingPaneBaseClass(parent, id, wxEmptyString, pos, size,
+                const wxPaneInfo& pane,
+                wxWindowID id /*= wxID_ANY*/)
+                : wxFloatingPaneBaseClass(parent, id, wxEmptyString,
+                        pane.floating_pos, pane.floating_size,
                         wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
                         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_moving = false;
@@ -80,9 +84,6 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
 
     SetTitle(pane.caption);
 
-    if (contained_pane.IsFixed())
-        SetWindowStyle(GetWindowStyle() & ~wxRESIZE_BORDER);
-
     if (pane.floating_size != wxDefaultSize)
     {
         SetSize(pane.floating_size);
index ec8eeded93ad72e0f168b614dde8972c5462737c..62f9cf23a98131ffe33afca3617b3bfc72bb7da1 100644 (file)
@@ -1782,9 +1782,8 @@ void wxFrameManager::Update()
                 // we need to create a frame for this
                 // pane, which has recently been floated
                 wxFloatingPane* frame = new wxFloatingPane(m_frame,
-                                                  this, -1,
-                                                  p.floating_pos,
-                                                  p.floating_size);
+                                                  this,
+                                                  p);
 
                 // on MSW, if the owner desires transparent dragging, and
                 // the dragging is happening right now, then the floating