浏览代码

Changes to guiArrayCtrl

The array control was useless by itself and served as a parent control for a number of other controls. It was removed as a console object and was made a purely abstract class that requires renderCell to be overridden. The headers for columns and rows were never used and were removed. Events were renamed from Mouse to Touch.
Peter Robinson 5 年之前
父节点
当前提交
f61b1f3984

+ 3 - 3
engine/source/gui/editor/guiDebugger.cc

@@ -562,7 +562,7 @@ void DbgFileView::onMouseDown(const GuiEvent &event)
 {
 {
    if (! mActive)
    if (! mActive)
    {
    {
-      Parent::onMouseDown(event);
+      Parent::onTouchDown(event);
       return;
       return;
    }
    }
 
 
@@ -588,7 +588,7 @@ void DbgFileView::onMouseDown(const GuiEvent &event)
       else
       else
       {
       {
          Point2I prevSelected = mSelectedCell;
          Point2I prevSelected = mSelectedCell;
-         Parent::onMouseDown(event);
+         Parent::onTouchDown(event);
          mBlockStart= -1;
          mBlockStart= -1;
          mBlockEnd = -1;
          mBlockEnd = -1;
 
 
@@ -620,7 +620,7 @@ void DbgFileView::onMouseDown(const GuiEvent &event)
    }
    }
    else
    else
    {
    {
-      Parent::onMouseDown(event);
+      Parent::onTouchDown(event);
    }
    }
 }
 }
 
 

+ 1 - 1
engine/source/gui/editor/guiMenuBar.cc

@@ -1214,7 +1214,7 @@ bool GuiMenuTextListCtrl::onKeyDown(const GuiEvent &event)
 
 
 void GuiMenuTextListCtrl::onMouseDown(const GuiEvent &event)
 void GuiMenuTextListCtrl::onMouseDown(const GuiEvent &event)
 {
 {
-   Parent::onMouseDown(event);
+   Parent::onTouchDown(event);
    mMenuBarCtrl->closeMenu();
    mMenuBarCtrl->closeMenu();
 }
 }
 
 

+ 11 - 107
engine/source/gui/guiArrayCtrl.cc

@@ -26,8 +26,6 @@
 #include "gui/containers/guiScrollCtrl.h"
 #include "gui/containers/guiScrollCtrl.h"
 #include "gui/guiArrayCtrl.h"
 #include "gui/guiArrayCtrl.h"
 
 
-IMPLEMENT_CONOBJECT(GuiArrayCtrl);
-
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
 
 
 GuiArrayCtrl::GuiArrayCtrl()
 GuiArrayCtrl::GuiArrayCtrl()
@@ -38,7 +36,6 @@ GuiArrayCtrl::GuiArrayCtrl()
    mSize = Point2I(5, 30);
    mSize = Point2I(5, 30);
    mSelectedCell.set(-1, -1);
    mSelectedCell.set(-1, -1);
    mMouseOverCell.set(-1, -1);
    mMouseOverCell.set(-1, -1);
-   mHeaderDim.set(0, 0);
    mIsContainer = true;
    mIsContainer = true;
 }
 }
 
 
@@ -64,7 +61,7 @@ void GuiArrayCtrl::onSleep()
 void GuiArrayCtrl::setSize(Point2I newSize)
 void GuiArrayCtrl::setSize(Point2I newSize)
 {
 {
    mSize = newSize;
    mSize = newSize;
-   Point2I newExtent(newSize.x * mCellSize.x + mHeaderDim.x, newSize.y * mCellSize.y + mHeaderDim.y);
+   Point2I newExtent(newSize.x * mCellSize.x, newSize.y * mCellSize.y);
 
 
    resize(mBounds.point, newExtent);
    resize(mBounds.point, newExtent);
 }
 }
@@ -135,46 +132,6 @@ void GuiArrayCtrl::scrollCellVisible(Point2I cell)
 
 
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
 
 
-void GuiArrayCtrl::onRenderColumnHeaders(Point2I offset, Point2I parentOffset, Point2I headerDim)
-{
-   if (mProfile->mBorderDefault && *(mProfile->mBorderDefault->mBorder) > 0)
-   {
-      RectI cellR(offset.x + headerDim.x, parentOffset.y, mBounds.extent.x - headerDim.x, headerDim.y);
-      dglDrawRectFill(cellR, mProfile->mBorderDefault->mBorderColor[0]);
-   }
-}
-
-void GuiArrayCtrl::onRenderRowHeader(Point2I offset, Point2I parentOffset, Point2I headerDim, Point2I cell)
-{
-   ColorI color;
-   RectI cellR;
-   if (cell.x % 2)
-      color.set(255, 0, 0, 255);
-   else
-      color.set(0, 255, 0, 255);
-
-   cellR.point.set(parentOffset.x, offset.y);
-   cellR.extent.set(headerDim.x, mCellSize.y);
-   dglDrawRectFill(cellR, color);
-}
-
-void GuiArrayCtrl::onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver)
-{
-   ColorI color(255 * (cell.x % 2), 255 * (cell.y % 2), 255 * ((cell.x + cell.y) % 2), 255);
-   if (selected)
-   {
-      color.set(255, 0, 0, 255);
-   }
-   else if (mouseOver)
-   {
-      color.set(0, 0, 255, 255);
-   }
-
-   //draw the cell
-   RectI cellR(offset.x, offset.y, mCellSize.x, mCellSize.y);
-   dglDrawRectFill(cellR, color);
-}
-
 void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
 void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
 {
 {
    //make sure we have a parent
    //make sure we have a parent
@@ -188,33 +145,6 @@ void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
 
 
    Point2I parentOffset = parent->localToGlobalCoord(Point2I(0, 0));
    Point2I parentOffset = parent->localToGlobalCoord(Point2I(0, 0));
 
 
-   //if we have column headings
-   if (mHeaderDim.y > 0)
-   {
-      headerClip.point.x =   parentOffset.x + mHeaderDim.x;
-      headerClip.point.y =   parentOffset.y;
-      headerClip.extent.x =  clipRect.extent.x;// - headerClip.point.x; // This seems to fix some strange problems with some Gui's, bug? -pw
-      headerClip.extent.y =  mHeaderDim.y;
-
-      if (headerClip.intersect(clipRect))
-      {
-         dglSetClipRect(headerClip);
-
-         //now render the header
-         onRenderColumnHeaders(offset, parentOffset, mHeaderDim);
-
-         clipRect.point.y = headerClip.point.y + headerClip.extent.y - 1;
-      }
-      offset.y += mHeaderDim.y;
-   }
-
-   //if we have row headings
-   if (mHeaderDim.x > 0)
-   {
-      clipRect.point.x = getMax(clipRect.point.x, parentOffset.x + mHeaderDim.x);
-      offset.x += mHeaderDim.x;
-   }
-
    //save the original for clipping the row headers
    //save the original for clipping the row headers
    RectI origClipRect = clipRect;
    RectI origClipRect = clipRect;
 
 
@@ -228,24 +158,6 @@ void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
       if(j * mCellSize.y + offset.y >= updateRect.point.y + updateRect.extent.y)
       if(j * mCellSize.y + offset.y >= updateRect.point.y + updateRect.extent.y)
          break;
          break;
 
 
-      //render the header
-      if (mHeaderDim.x > 0)
-      {
-         headerClip.point.x = parentOffset.x;
-         headerClip.extent.x = mHeaderDim.x;
-         headerClip.point.y = offset.y + j * mCellSize.y;
-         headerClip.extent.y = mCellSize.y;
-         if (headerClip.intersect(origClipRect))
-         {
-            dglSetClipRect(headerClip);
-
-            //render the row header
-            onRenderRowHeader(Point2I(0, offset.y + j * mCellSize.y),
-                              Point2I(parentOffset.x, offset.y + j * mCellSize.y),
-                              mHeaderDim, Point2I(0, j));
-         }
-      }
-
       //render the cells for the row
       //render the cells for the row
       for (i = 0; i < mSize.x; i++)
       for (i = 0; i < mSize.x; i++)
       {
       {
@@ -277,7 +189,7 @@ void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
    }
    }
 }
 }
 
 
-void GuiArrayCtrl::onMouseDown(const GuiEvent &event)
+void GuiArrayCtrl::onTouchDown(const GuiEvent &event)
 {
 {
    if ( !mActive || !mAwake || !mVisible )
    if ( !mActive || !mAwake || !mVisible )
       return;
       return;
@@ -286,7 +198,6 @@ void GuiArrayCtrl::onMouseDown(const GuiEvent &event)
    Parent::onTouchDown(event);
    Parent::onTouchDown(event);
 
 
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
    Point2I cell(
    Point2I cell(
          (pt.x < 0 ? -1 : pt.x / mCellSize.x), 
          (pt.x < 0 ? -1 : pt.x / mCellSize.x), 
          (pt.y < 0 ? -1 : pt.y / mCellSize.y)
          (pt.y < 0 ? -1 : pt.y / mCellSize.y)
@@ -307,55 +218,49 @@ void GuiArrayCtrl::onMouseDown(const GuiEvent &event)
    }
    }
 }
 }
 
 
-void GuiArrayCtrl::onMouseEnter(const GuiEvent &event)
+void GuiArrayCtrl::onTouchEnter(const GuiEvent &event)
 {
 {
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
 
 
    //get the cell
    //get the cell
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
    if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
    {
    {
       mMouseOverCell = cell;
       mMouseOverCell = cell;
-      setUpdateRegion(Point2I(cell.x * mCellSize.x + mHeaderDim.x,
-                              cell.y * mCellSize.y + mHeaderDim.y), mCellSize );
+      setUpdateRegion(Point2I(cell.x * mCellSize.x, cell.y * mCellSize.y), mCellSize );
       onCellHighlighted(mMouseOverCell);
       onCellHighlighted(mMouseOverCell);
    }
    }
 }
 }
 
 
-void GuiArrayCtrl::onMouseLeave(const GuiEvent & /*event*/)
+void GuiArrayCtrl::onTouchLeave(const GuiEvent & /*event*/)
 {
 {
-   setUpdateRegion(Point2I(mMouseOverCell.x * mCellSize.x + mHeaderDim.x,
-                           mMouseOverCell.y * mCellSize.y + mHeaderDim.y), mCellSize);
+   setUpdateRegion(Point2I(mMouseOverCell.x * mCellSize.x, mMouseOverCell.y * mCellSize.y), mCellSize);
    mMouseOverCell.set(-1,-1);
    mMouseOverCell.set(-1,-1);
    onCellHighlighted(mMouseOverCell);
    onCellHighlighted(mMouseOverCell);
 }
 }
 
 
-void GuiArrayCtrl::onMouseDragged(const GuiEvent &event)
+void GuiArrayCtrl::onTouchDragged(const GuiEvent &event)
 {
 {
    // for the array control, the behaviour of onMouseDragged is the same
    // for the array control, the behaviour of onMouseDragged is the same
    // as on mouse moved - basically just recalc the currend mouse over cell
    // as on mouse moved - basically just recalc the currend mouse over cell
    // and set the update regions if necessary
    // and set the update regions if necessary
-   GuiArrayCtrl::onMouseMove(event);
+   GuiArrayCtrl::onTouchMove(event);
 }
 }
 
 
-void GuiArrayCtrl::onMouseMove(const GuiEvent &event)
+void GuiArrayCtrl::onTouchMove(const GuiEvent &event)
 {
 {
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    if (cell.x != mMouseOverCell.x || cell.y != mMouseOverCell.y)
    if (cell.x != mMouseOverCell.x || cell.y != mMouseOverCell.y)
    {
    {
       if (mMouseOverCell.x != -1)
       if (mMouseOverCell.x != -1)
       {
       {
-         setUpdateRegion(Point2I(mMouseOverCell.x * mCellSize.x + mHeaderDim.x,
-                           mMouseOverCell.y * mCellSize.y + mHeaderDim.y), mCellSize);
+         setUpdateRegion(Point2I(mMouseOverCell.x * mCellSize.x, mMouseOverCell.y * mCellSize.y), mCellSize);
       }
       }
 
 
       if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
       if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
       {
       {
-         setUpdateRegion(Point2I(cell.x * mCellSize.x + mHeaderDim.x,
-                           cell.y * mCellSize.y + mHeaderDim.y), mCellSize);
+         setUpdateRegion(Point2I(cell.x * mCellSize.x, cell.y * mCellSize.y), mCellSize);
          mMouseOverCell = cell;
          mMouseOverCell = cell;
       }
       }
       else
       else
@@ -434,7 +339,6 @@ void GuiArrayCtrl::onRightMouseDown(const GuiEvent &event)
    Parent::onRightMouseDown( event );
    Parent::onRightMouseDown( event );
 
 
    Point2I pt = globalToLocalCoord( event.mousePoint );
    Point2I pt = globalToLocalCoord( event.mousePoint );
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    Point2I cell((pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y));
    if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
    if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
    {
    {

+ 6 - 11
engine/source/gui/guiArrayCtrl.h

@@ -37,7 +37,6 @@ class GuiArrayCtrl : public GuiControl
 
 
 protected:
 protected:
 
 
-   Point2I mHeaderDim;
    Point2I mSize;
    Point2I mSize;
    Point2I mCellSize;
    Point2I mCellSize;
    Point2I mSelectedCell;
    Point2I mSelectedCell;
@@ -51,7 +50,6 @@ protected:
 public:
 public:
 
 
    GuiArrayCtrl();
    GuiArrayCtrl();
-   DECLARE_CONOBJECT(GuiArrayCtrl);
 
 
    bool onWake();
    bool onWake();
    void onSleep();
    void onSleep();
@@ -60,7 +58,6 @@ public:
    /// @{
    /// @{
    Point2I getSize() { return mSize; }
    Point2I getSize() { return mSize; }
    virtual void setSize(Point2I size);
    virtual void setSize(Point2I size);
-   void setHeaderDim(const Point2I &dim) { mHeaderDim = dim; }
    void getScrollDimensions(S32 &cell_size, S32 &num_cells);
    void getScrollDimensions(S32 &cell_size, S32 &num_cells);
    /// @}
    /// @}
 
 
@@ -75,19 +72,17 @@ public:
 
 
    /// @name Rendering methods
    /// @name Rendering methods
    /// @{
    /// @{
-   virtual void onRenderColumnHeaders(Point2I offset, Point2I parentOffset, Point2I headerDim);
-   virtual void onRenderRowHeader(Point2I offset, Point2I parentOffset, Point2I headerDim, Point2I cell);
-   virtual void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
+   virtual void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) = 0;
    void onRender(Point2I offset, const RectI &updateRect);
    void onRender(Point2I offset, const RectI &updateRect);
    /// @}
    /// @}
 
 
    /// @name Mouse input methods
    /// @name Mouse input methods
    /// @{
    /// @{
-   void onMouseDown(const GuiEvent &event);
-   void onMouseMove(const GuiEvent &event);
-   void onMouseDragged(const GuiEvent &event);
-   void onMouseEnter(const GuiEvent &event);
-   void onMouseLeave(const GuiEvent &event);
+   void onTouchDown(const GuiEvent &event);
+   void onTouchMove(const GuiEvent &event);
+   void onTouchDragged(const GuiEvent &event);
+   void onTouchEnter(const GuiEvent &event);
+   void onTouchLeave(const GuiEvent &event);
    bool onKeyDown(const GuiEvent &event);
    bool onKeyDown(const GuiEvent &event);
    void onRightMouseDown(const GuiEvent &event);
    void onRightMouseDown(const GuiEvent &event);
    /// @}
    /// @}

+ 2 - 2
engine/source/gui/guiPopUpCtrl.cc

@@ -180,7 +180,7 @@ void GuiPopupTextListCtrl::onMouseDown(const GuiEvent &event)
 
 
 void GuiPopupTextListCtrl::onMouseUp(const GuiEvent &event)
 void GuiPopupTextListCtrl::onMouseUp(const GuiEvent &event)
 {
 {
-   Parent::onMouseDown(event);
+   Parent::onTouchDown(event);
    mPopUpCtrl->closePopUp();
    mPopUpCtrl->closePopUp();
    Parent::onTouchUp(event);
    Parent::onTouchUp(event);
 }
 }
@@ -1532,7 +1532,7 @@ void GuiPopUpMenuCtrl::autoScroll()
       mSc->scrollByRegion(mScrollDir);
       mSc->scrollByRegion(mScrollDir);
       mScrollCount -= 1;
       mScrollCount -= 1;
    }
    }
-   mTl->onMouseMove(mEventSave);
+   mTl->onTouchMove(mEventSave);
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------

+ 1 - 3
engine/source/gui/guiPopUpCtrlEx.cc

@@ -187,7 +187,6 @@ void GuiPopupTextListCtrlEx::onMouseUp(const GuiEvent &event)
         return;
         return;
 
 
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
    Point2I cell(
    Point2I cell(
       (pt.x < 0 ? -1 : pt.x / mCellSize.x), 
       (pt.x < 0 ? -1 : pt.x / mCellSize.x), 
       (pt.y < 0 ? -1 : pt.y / mCellSize.y)
       (pt.y < 0 ? -1 : pt.y / mCellSize.y)
@@ -207,10 +206,9 @@ void GuiPopupTextListCtrlEx::onMouseUp(const GuiEvent &event)
 void GuiPopupTextListCtrlEx::onMouseMove( const GuiEvent &event )
 void GuiPopupTextListCtrlEx::onMouseMove( const GuiEvent &event )
 {
 {
    if( !mPopUpCtrl || !mPopUpCtrl->isMethod("onHotTrackItem") )
    if( !mPopUpCtrl || !mPopUpCtrl->isMethod("onHotTrackItem") )
-      return Parent::onMouseMove( event );
+      return Parent::onTouchMove( event );
 
 
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   pt.x -= mHeaderDim.x; pt.y -= mHeaderDim.y;
    Point2I cell( (pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y) );
    Point2I cell( (pt.x < 0 ? -1 : pt.x / mCellSize.x), (pt.y < 0 ? -1 : pt.y / mCellSize.y) );
 
 
    // Within Bounds?
    // Within Bounds?

+ 1 - 1
engine/source/gui/guiTextListCtrl.cc

@@ -524,7 +524,7 @@ void GuiTextListCtrl::setSize(Point2I newSize)
       mCellSize.y = mFont->getHeight() + 2;
       mCellSize.y = mFont->getHeight() + 2;
    }
    }
 
 
-   Point2I newExtent( newSize.x * mCellSize.x + mHeaderDim.x, newSize.y * mCellSize.y + mHeaderDim.y );
+   Point2I newExtent( newSize.x * mCellSize.x, newSize.y * mCellSize.y);
    resize( mBounds.point, newExtent );
    resize( mBounds.point, newExtent );
 }
 }
 
 

+ 6 - 6
engine/source/gui/guiTreeViewCtrl.cc

@@ -2238,7 +2238,7 @@ void GuiTreeViewCtrl::onMouseUp(const GuiEvent &event)
 
 
    if (mFlags.test(IsEditable))
    if (mFlags.test(IsEditable))
    {
    {
-      Parent::onMouseMove( event );
+      Parent::onTouchMove( event );
       if (mOldDragY != mMouseOverCell.y)
       if (mOldDragY != mMouseOverCell.y)
       {
       {
 
 
@@ -2617,7 +2617,7 @@ void GuiTreeViewCtrl::onMouseDragged(const GuiEvent &event)
    if (mSelectedItems.size() == 0)
    if (mSelectedItems.size() == 0)
       return;
       return;
    Point2I pt = globalToLocalCoord(event.mousePoint);
    Point2I pt = globalToLocalCoord(event.mousePoint);
-   Parent::onMouseMove(event);
+   Parent::onTouchMove(event);
    mouseLock();
    mouseLock();
    mMouseDragged = true;
    mMouseDragged = true;
    // whats our mDragMidPoint?
    // whats our mDragMidPoint?
@@ -2704,7 +2704,7 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
 {
 {
    if( !mActive || !mAwake || !mVisible )
    if( !mActive || !mAwake || !mVisible )
    {
    {
-      Parent::onMouseDown(event);
+      Parent::onTouchDown(event);
       return;
       return;
    }
    }
    if ( mProfile->mCanKeyFocus )
    if ( mProfile->mCanKeyFocus )
@@ -2879,7 +2879,7 @@ void GuiTreeViewCtrl::onMouseMove( const GuiEvent &event )
    if ( mMouseOverCell.y >= 0 && mVisibleItems.size() > mMouseOverCell.y)
    if ( mMouseOverCell.y >= 0 && mVisibleItems.size() > mMouseOverCell.y)
       mVisibleItems[mMouseOverCell.y]->mState.clear( Item::MouseOverBmp | Item::MouseOverText );
       mVisibleItems[mMouseOverCell.y]->mState.clear( Item::MouseOverBmp | Item::MouseOverText );
 
 
-   Parent::onMouseMove( event );
+   Parent::onTouchMove( event );
 
 
    if ( mMouseOverCell.y >= 0 )
    if ( mMouseOverCell.y >= 0 )
    {
    {
@@ -2904,7 +2904,7 @@ void GuiTreeViewCtrl::onMouseMove( const GuiEvent &event )
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 void GuiTreeViewCtrl::onMouseEnter( const GuiEvent &event )
 void GuiTreeViewCtrl::onMouseEnter( const GuiEvent &event )
 {
 {
-   Parent::onMouseEnter( event );
+   Parent::onTouchEnter( event );
    onMouseMove( event );
    onMouseMove( event );
 }
 }
 
 
@@ -2915,7 +2915,7 @@ void GuiTreeViewCtrl::onMouseLeave( const GuiEvent &event )
    if ( mMouseOverCell.y >= 0 && mVisibleItems.size() > mMouseOverCell.y)
    if ( mMouseOverCell.y >= 0 && mVisibleItems.size() > mMouseOverCell.y)
       mVisibleItems[mMouseOverCell.y]->mState.clear( Item::MouseOverBmp | Item::MouseOverText );
       mVisibleItems[mMouseOverCell.y]->mState.clear( Item::MouseOverBmp | Item::MouseOverText );
 
 
-   Parent::onMouseLeave( event );
+   Parent::onTouchLeave( event );
 }
 }