X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fcontrols%2Ftext-input%2Ftext-input-popup-impl.h;h=c7f0fc2d8f09331745210a52d45abe971e5682c7;hp=759c1045f7a1996574c62dcdc4db58c34bef539e;hb=7e315a440bad7033d19fefa8f9952d625ee6f076;hpb=8b1f3f9ca0409d954a6fa7c35fbc43523b2ddc0e diff --git a/base/dali-toolkit/internal/controls/text-input/text-input-popup-impl.h b/base/dali-toolkit/internal/controls/text-input/text-input-popup-impl.h index 759c104..c7f0fc2 100644 --- a/base/dali-toolkit/internal/controls/text-input/text-input-popup-impl.h +++ b/base/dali-toolkit/internal/controls/text-input/text-input-popup-impl.h @@ -18,9 +18,12 @@ * */ -// INTERNAL INCLUDES -#include +// EXTERNAL INCLUDES +#include +#include +#include +// INTERNAL INCLUDES #include #include @@ -82,30 +85,30 @@ public: static const char* const SIGNAL_SHOW_FINISHED; // Popup Button Pressed - typedef SignalV2< bool( Toolkit::Button ) > PressedSignalV2; + typedef Signal< bool( Toolkit::Button ) > PressedSignalType; // Popup Hide Finished - typedef SignalV2< void( TextInputPopup& ) > HideFinishedSignalV2; + typedef Signal< void( TextInputPopup& ) > HideFinishedSignalType; // Popup Show Finished - typedef SignalV2< void( TextInputPopup& ) > ShowFinishedSignalV2; + typedef Signal< void( TextInputPopup& ) > ShowFinishedSignalType; /** * Signal emitted when the button is touched. */ - PressedSignalV2& PressedSignal(); + PressedSignalType& PressedSignal(); /** * Signal emitted when popup is completely hidden * @note Only occurs after a Show() call with animation enabled. */ - HideFinishedSignalV2& HideFinishedSignal(); + HideFinishedSignalType& HideFinishedSignal(); /** * Signal emitted when popup is completely shown * @note Only occurs after a Hide() call with animation enabled. */ - ShowFinishedSignalV2& ShowFinishedSignal(); + ShowFinishedSignalType& ShowFinishedSignal(); public: @@ -162,6 +165,14 @@ public: void CreateOrderedListOfOptions(); /** + * Get the TextSize after constrained by the Popup margins. + * @param[in] textSize Natural size of text + * @return Vector2 constrained text size. + * + */ + Vector2 GetConstrainedTextSize( const Vector2& textSize ); + + /** * Adds a popup option. * @note Creates popup frame if not already created. * @param[in] name The unique name for this option. @@ -186,14 +197,6 @@ public: void Show( Actor target, bool animate = true ); /** - * Sets Alternative offset property. - * The alternative offset property is how much to move in the horizontal and vertical - * axes when the popup goes out of the screen on the left/right sides or top/bottom sides. - * @param[in] offset Vector holding the left/right offset (x) and top/bottom offset (y) - */ - void SetAlternativeOffset(Vector2 offset); - - /** * Returns the current state of the popup. * @return The state of the popup see enum State */ @@ -316,12 +319,6 @@ public: void AddPopupOptions(); /** - * Set Boundary that Popup should stay within - * @param[in] boundingRectangle coordinates of bounding box from Top Left - */ - void SetPopupBoundary( const Rect& boundingRectangle ); - - /** * Get Visible size of the Popup, excludes content that needs scrolling * @return Vector3 size of Popup */ @@ -370,6 +367,12 @@ private: void ApplyTailConstraint(); /** + * Create Layer to be used with stencil to allow scrolling of buttons which do not fit in visible popup + * @param[in] size of the layer. + */ + void CreateLayer( const Vector2& size ); + + /** * Create a stencil to clip the scroll view content * @param[in] size of the stencil. */ @@ -421,7 +424,8 @@ private: private: State mState; ///< Popup State. - Layer mRoot; ///< The actor which all popup content is added to (i.e. panel and buttons) + Layer mRoot; ///< The actor which all popup content is added to (i.e. panel and buttons) + Actor mButtons; ///< Actor which holds all the buttons, sensitivity can be set on all buttons via this actor ImageActor mBackground; ///< The background popup panel ImageActor mBackgroundEffect; ///< The background effect ImageActor mBackgroundLine; ///< The background line @@ -433,10 +437,10 @@ private: float mPopupTailXPosition; ///< X position of PopUp tail. Vector2 mContentSize; ///< Size of Content (i.e. Buttons) - ActorContainer mButtonContainer; ///< List of buttons added to popup. ActorContainer mDividerContainer; ///< List of dividers added to popup. Animation mAnimation; ///< Popup Hide/Show animation. + Layer mLayer; ///< Layer to be used with Stencil Actor mStencil; ///< Stencil to clip scrollview Toolkit::ScrollView mScrollView; ///< Scrollview to house the popup @@ -450,8 +454,6 @@ private: Vector4 mTextColor; // Color of the popup text. Vector4 mTextPressedColor; // Color of the popup text when pressed. - Rect mBoundingRect; // Boundary that Popup must stay within. - // Priority of Options/Buttons in the Cut and Paste pop-up, higher priority buttons are displayed first, left to right. std::size_t mSelectOptionPriority; // Position of Select Button std::size_t mSelectAllOptionPriority; // Position of Select All button @@ -460,9 +462,9 @@ private: std::size_t mPasteOptionPriority; // Position of Paste button std::size_t mClipboardOptionPriority; // Position of Clipboard button - PressedSignalV2 mPressedSignal; ///< Signal emitted when a button within the popup is pressed. - HideFinishedSignalV2 mHideFinishedSignal; ///< Signal emitted when popup is completely hidden - ShowFinishedSignalV2 mShowFinishedSignal; ///< Signal emitted when popup is completely shown + PressedSignalType mPressedSignal; ///< Signal emitted when a button within the popup is pressed. + HideFinishedSignalType mHideFinishedSignal; ///< Signal emitted when popup is completely hidden + ShowFinishedSignalType mShowFinishedSignal; ///< Signal emitted when popup is completely shown };