-struct ConfinementConstraint
-{
- /**
- * Confinement constraint constructor.
- * @param[in] topLeftMargin (optional) Top-Left margins (defaults to 0.0f, 0.0f)
- * @param[in] bottomRightMargin (optional) Bottom-Right margins (defaults to 0.0f, 0.0f)
- * @paran[in[ flipHorizontal (optional) whether to flip Actor to other side if near edge
- * @param[in] flipVertical (optional) whether to flip Actor to the other side if near edge
- * @param[in] boundingRect Rectangle to bound Popup to.
- *
- */
- ConfinementConstraint(Vector2 topLeftMargin = Vector2::ZERO, Vector2 bottomRightMargin = Vector2::ZERO, bool flipHorizontal = false, bool flipVertical = false, Rect<float> boundingRect = Rect<float>(0.0f, 0.0f, 0.0f, 0.0f) )
- : mMinIndent(topLeftMargin),
- mMaxIndent(bottomRightMargin),
- mFlipHorizontal(flipHorizontal),
- mFlipVertical(flipVertical),
- mBoundingRect( boundingRect )
- {
- }
-
- Vector3 operator()(const Vector3& constPosition,
- const PropertyInput& sizeProperty,
- const PropertyInput& parentOriginProperty,
- const PropertyInput& anchorPointProperty,
- const PropertyInput& referenceSizeProperty,
- const PropertyInput& alternativeOffsetProperty)
- {
- const Vector3& size = sizeProperty.GetVector3();
- const Vector3& origin = parentOriginProperty.GetVector3();
- const Vector3& anchor = anchorPointProperty.GetVector3();
- const Vector3& referenceSize = referenceSizeProperty.GetVector3();
- const Vector2& alternativeOffset = alternativeOffsetProperty.GetVector2();
-
- Vector3 newPosition(constPosition);
-
- // Get actual position of Actor relative to parent's Top-Left.
- Vector3 position(constPosition + origin * referenceSize);
-
- // if top-left corner is outside of Top-Left bounds, then push back in screen.
-
- Vector3 corner(position - size * anchor - mMinIndent);
-
- newPosition.x -= std::max(corner.x, 0.0f);
-
- if ( mFlipHorizontal )
- {
- if( corner.x < mBoundingRect.x + POP_UP_SCREEN_EDGE_MARGIN )
- {
- // Snap PopUp to left hand boundary so stays visible
- corner.x = mBoundingRect.x + POP_UP_SCREEN_EDGE_MARGIN ;
- }
- else if ( ( corner.x + size.x ) > ( ( mBoundingRect.x + mBoundingRect.width ) - POP_UP_SCREEN_EDGE_MARGIN ))
- {
- // Calculate offset from left boundary PopUp must be placed at so it does not exceed right side boundary.
- float requiredOffSetFromLeftBoundaryToFit = mBoundingRect.width - POP_UP_SCREEN_EDGE_MARGIN - size.x;
- corner.x = mBoundingRect.x + requiredOffSetFromLeftBoundaryToFit - ( origin.x * referenceSize.x ) + ( size.x * anchor.x );
- }
- newPosition.x = corner.x;
- }
-
- if(mFlipVertical && corner.y < 0.0f)
- {
- corner.y = 0.0f;
- newPosition.y += size.height + alternativeOffset.height;
- }
-
- newPosition.y -= std::min(corner.y, 0.0f);
-
- // if bottom-right corner is outside of Bottom-Right bounds, then push back in screen.
- corner += size - referenceSize + mMinIndent + mMaxIndent;
-
- if(mFlipVertical && corner.y > 0.0f)
- {
- corner.y = 0.0f;
- newPosition.y -= size.height + alternativeOffset.height;
- }
-
- return newPosition;
- }
-
- Vector3 mMinIndent; ///< Top-Left Margin
- Vector3 mMaxIndent; ///< Bottom-Right Margin.
- bool mFlipHorizontal; ///< Whether to flip actor's position if exceeds horizontal screen bounds
- bool mFlipVertical; ///< Whether to flip actor's position if exceeds vertical screen bounds
- Rect<float> mBoundingRect; ///< Bounding Rect Popup must stay within
-};
+const std::string POPUP_BACKGROUND( DALI_IMAGE_DIR "popup_bubble_bg.#.png" );
+const std::string POPUP_BACKGROUND_EFFECT( DALI_IMAGE_DIR "popup_bubble_bg_ef.#.png" );
+const std::string POPUP_BACKGROUND_LINE( DALI_IMAGE_DIR "popup_bubble_bg_line.#.png" );
+
+const std::string POPUP_TAIL_BOTTOM( DALI_IMAGE_DIR "popup_bubble_tail_bottom.png" );
+const std::string POPUP_TAIL_BOTTOM_EFFECT( DALI_IMAGE_DIR "popup_bubble_tail_bottom_ef.png" );
+const std::string POPUP_TAIL_BOTTOM_LINE( DALI_IMAGE_DIR "popup_bubble_tail_bottom_line.png" );
+const std::string POPUP_TAIL_TOP( DALI_IMAGE_DIR "popup_bubble_tail_top.png" );
+const std::string POPUP_TAIL_TOP_EFFECT( DALI_IMAGE_DIR "popup_bubble_tail_top_ef.png" );
+const std::string POPUP_TAIL_TOP_LINE( DALI_IMAGE_DIR "popup_bubble_tail_top_line.png" );
+
+const std::string OPTION_ICON_CLIPBOARD( DALI_IMAGE_DIR "copy_paste_icon_clipboard.png" );
+const std::string OPTION_ICON_COPY( DALI_IMAGE_DIR "copy_paste_icon_copy.png" );
+const std::string OPTION_ICON_CUT( DALI_IMAGE_DIR "copy_paste_icon_cut.png" );
+const std::string OPTION_ICON_PASTE( DALI_IMAGE_DIR "copy_paste_icon_paste.png" );
+const std::string OPTION_ICON_SELECT( DALI_IMAGE_DIR "copy_paste_icon_select.png" );
+const std::string OPTION_ICON_SELECT_ALL( DALI_IMAGE_DIR "copy_paste_icon_select_all.png" );