+ if( !mScrollTimer.IsRunning() )
+ {
+ mScrollTimer.Start();
+ }
+ }
+
+ /**
+ * Stops the timer used to scroll the text.
+ */
+ void StopScrollTimer()
+ {
+ if( mScrollTimer )
+ {
+ mScrollTimer.Stop();
+ }
+ }
+
+ /**
+ * Callback called by the timer used to scroll the text.
+ *
+ * It calculates and sets a new scroll position.
+ */
+ bool OnScrollTimerTick()
+ {
+ if( HANDLE_TYPE_COUNT != mHandleScrolling )
+ {
+ mController.DecorationEvent( mHandleScrolling,
+ HANDLE_SCROLLING,
+ mScrollDirection == SCROLL_RIGHT ? mScrollDistance : -mScrollDistance,
+ 0.f );
+ }
+
+ return true;
+ }
+
+ ControllerInterface& mController;
+
+ TapGestureDetector mTapDetector;
+ PanGestureDetector mPanGestureDetector;
+ Timer mCursorBlinkTimer; ///< Timer to signal cursor to blink
+ Timer mScrollTimer; ///< Timer used to scroll the text when the grab handle is moved close to the edges.
+
+ Layer mActiveLayer; ///< Layer for active handles and alike that ensures they are above all else.
+ ImageActor mPrimaryCursor;
+ ImageActor mSecondaryCursor;
+
+ Actor mHighlightActor; ///< Actor to display highlight
+ Renderer mHighlightRenderer;
+ Material mHighlightMaterial; ///< Material used for highlight
+ Property::Map mQuadVertexFormat;
+ Property::Map mQuadIndexFormat;
+ PopupImpl mCopyPastePopup;
+ TextSelectionPopup::Buttons mEnabledPopupButtons; /// Bit mask of currently enabled Popup buttons
+ TextSelectionPopupCallbackInterface& mTextSelectionPopupCallbackInterface;
+
+ Image mHandleImages[HANDLE_TYPE_COUNT][HANDLE_IMAGE_TYPE_COUNT];
+ Vector4 mHandleColor;
+
+ CursorImpl mCursor[CURSOR_COUNT];
+ HandleImpl mHandle[HANDLE_TYPE_COUNT];
+
+ PropertyBuffer mQuadVertices;
+ PropertyBuffer mQuadIndices;
+ Geometry mQuadGeometry;
+ QuadContainer mHighlightQuadList; ///< Sub-selections that combine to create the complete selection highlight
+
+ Rect<int> mBoundingBox;
+ Vector4 mHighlightColor; ///< Color of the highlight
+ Vector2 mHighlightPosition; ///< The position of the highlight actor.
+
+ unsigned int mActiveCursor;
+ unsigned int mCursorBlinkInterval;
+ float mCursorBlinkDuration;
+ HandleType mHandleScrolling; ///< The handle which is scrolling.
+ ScrollDirection mScrollDirection; ///< The direction of the scroll.
+ float mScrollThreshold; ///< Defines a square area inside the control, close to the edge. A cursor entering this area will trigger scroll events.
+ float mScrollSpeed; ///< The scroll speed in pixels per second.
+ float mScrollDistance; ///< Distance the text scrolls during a scroll interval.
+ int mTextDepth; ///< The depth used to render the text.
+
+ bool mActiveCopyPastePopup : 1;
+ bool mCursorBlinkStatus : 1; ///< Flag to switch between blink on and blink off.
+ bool mPrimaryCursorVisible : 1; ///< Whether the primary cursor is visible.
+ bool mSecondaryCursorVisible : 1; ///< Whether the secondary cursor is visible.
+ bool mSwapSelectionHandles : 1; ///< Whether to swap the selection handle images.
+ bool mNotifyEndOfScroll : 1; ///< Whether to notify the end of the scroll.