]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/treectlg.h
Last part from weak ref patch for event sink disconnection
[wxWidgets.git] / include / wx / generic / treectlg.h
index 8af90003f4295ba64b0a5b9f5538724afb478299..c21b331fe6e241ff9443cfe60b70a4db27c1a70c 100644 (file)
 // forward declaration
 // -----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxGenericTreeItem;
+class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem;
 
-class WXDLLEXPORT wxTreeItemData;
+class WXDLLIMPEXP_FWD_CORE wxTreeItemData;
 
-class WXDLLEXPORT wxTreeRenameTimer;
-class WXDLLEXPORT wxTreeFindTimer;
-class WXDLLEXPORT wxTreeTextCtrl;
-class WXDLLEXPORT wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxTreeRenameTimer;
+class WXDLLIMPEXP_FWD_CORE wxTreeFindTimer;
+class WXDLLIMPEXP_FWD_CORE wxTreeTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
 
 // -----------------------------------------------------------------------------
 // wxGenericTreeCtrl - the tree control
@@ -112,7 +112,13 @@ public:
     // ----------
 
     virtual wxTreeItemId GetRootItem() const { return m_anchor; }
-    virtual wxTreeItemId GetSelection() const { return m_current; }
+    virtual wxTreeItemId GetSelection() const
+    {
+        wxASSERT_MSG( !HasFlag(wxTR_MULTIPLE),
+                       wxT("must use GetSelections() with this control") );
+
+        return m_current;
+    }
     virtual size_t GetSelections(wxArrayTreeItemIds&) const;
 
     virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
@@ -191,8 +197,6 @@ public:
     virtual bool SetBackgroundColour(const wxColour& colour);
     virtual bool SetForegroundColour(const wxColour& colour);
 
-    virtual void Freeze();
-    virtual void Thaw();
     virtual void Refresh(bool eraseBackground = true, const wxRect *rect = NULL);
 
     virtual bool SetFont( const wxFont &font );
@@ -247,7 +251,6 @@ protected:
     bool                 m_lastOnSame;  // last click on the same item as prev
     wxImageList         *m_imageListButtons;
 
-    int                  m_freezeCount;
     int                  m_dragCount;
     wxPoint              m_dragStart;
     wxGenericTreeItem   *m_dropTarget;
@@ -267,6 +270,9 @@ protected:
     // the common part of all ctors
     void Init();
 
+    // overridden wxWindow methods 
+    virtual void DoThaw();
+
     // misc helpers
     void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted);