]> git.saurik.com Git - wxWidgets.git/commitdiff
Added way to specify in generic tree control
authorRobert Roebling <robert@roebling.de>
Fri, 7 Jan 2005 22:31:42 +0000 (22:31 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 7 Jan 2005 22:31:42 +0000 (22:31 +0000)
   if the drop effect (a line) should be drawn
   above or below the item.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/treectlg.h
src/generic/treectlg.cpp

index 6bd96cf472186e3846346c3a60f61077e57974a8..82dcaa849d7d6de73f55933917293ba92773180d 100644 (file)
@@ -105,6 +105,9 @@ public:
     virtual void AssignStateImageList(wxImageList *imageList);
     virtual void AssignButtonsImageList(wxImageList *imageList);
 
+    virtual void SetDropEffectAboveItem( bool above = false ) { m_dropEffectAboveItem = above; }
+    virtual bool GetDropEffectAboveItem() const { return m_dropEffectAboveItem; }
+
     // Functions to work with tree ctrl items.
 
     // accessors
@@ -446,6 +449,8 @@ protected:
     // incremental search data
     wxString             m_findPrefix;
     wxTimer             *m_findTimer;
+    
+    bool                 m_dropEffectAboveItem;
 
     // the common part of all ctors
     void Init();
index ca9a9565dffd741c14f3561445bc71ed8152bd2e..ed8f47b512e3ee998c23bc6a2a02afafc108c364 100644 (file)
@@ -758,6 +758,8 @@ void wxGenericTreeCtrl::Init()
 
     m_findTimer = NULL;
 
+    m_dropEffectAboveItem = false;
+
     m_lastOnSame = false;
 
 #ifdef __WXMAC_CARBON__
@@ -2499,7 +2501,7 @@ void wxGenericTreeCtrl::DrawDropEffect(wxGenericTreeItem *item)
         {
             // draw a line under the drop target because the item will be
             // dropped there
-            DrawLine(item, true /* below */);
+            DrawLine(item, !m_dropEffectAboveItem );
         }
 
         SetCursor(wxCURSOR_BULLSEYE);