Text Selection Toolbar scrolling
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-selection-toolbar-impl.h
index fb85e95..3593e79 100644 (file)
@@ -20,6 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
 
@@ -88,9 +89,13 @@ private: // From Control
   /**
    * @copydoc Control::OnInitialize()
    */
- virtual void OnInitialize();
 virtual void OnInitialize();
 
   /**
+  * @copydoc Control::OnRelayout()
+  */
+  virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+  /**
    * @brief Set max size of Popup
    * @param[in] maxSize Size (Vector2)
    */
@@ -103,10 +108,28 @@ private: // From Control
   const Dali::Vector2& GetPopupMaxSize() const;
 
   /**
+   * @brief Set up scrollview to scroll Toolbar horizontally
+   * @param[out] scrollView scrollview to setup
+   */
+  void SetUpScrollView( Toolkit::ScrollView& scrollView );
+
+  /**
    * @brief Set up the parts that make the Toolbar
    */
   void SetUp();
 
+  /**
+   * Toolbar has started to scroll
+   * @param[in] position current scroll view position
+   */
+  void OnScrollStarted( const Vector2& position );
+
+  /**
+   * Toolbar has stopped scrolling
+   * @param[in] position current scroll view position
+   */
+  void OnScrollCompleted( const Vector2& position );
+
 private: // Implementation
 
   /**
@@ -127,9 +150,9 @@ private:
 
 private: // Data
 
-  Dali::Toolkit::TableView mTableOfButtons;           // Actor which holds all the buttons, sensitivity can be set on buttons via this actor
-  Layer mStencilLayer;                                // Layer to enable clipping when buttons exceed popup
-
+  Toolkit::TableView mTableOfButtons;                 // Actor which holds all the buttons, sensitivity can be set on buttons via this actor
+  Toolkit::ScrollView mScrollView;                    // Provides scrolling of Toolbar when content does not fit.
+  RulerPtr mRulerX;                                   // Ruler to clamp horizontal scrolling. Updates on Relayout
   Size mMaxSize;                                      // Max size of the Toolbar
   unsigned int mIndexInTable;                         // Index in table to add option
   Dali::Vector< unsigned int > mDividerIndexes;       // Vector of indexes in the Toolbar that contain dividers.