Adding Decorator BoundingBox 23/36223/5
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Tue, 3 Mar 2015 16:17:40 +0000 (16:17 +0000)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Tue, 3 Mar 2015 17:18:07 +0000 (17:18 +0000)
Change-Id: Iea3b56d5d9764a4ae124bb422b839a0b86cbe14d
Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/public-api/controls/text-controls/text-field.cpp
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/text/decorator/text-decorator.cpp
dali-toolkit/public-api/text/decorator/text-decorator.h

index c4a636e..03dcf44 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 // EXTERNAL INCLUDES
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -43,16 +44,17 @@ namespace Dali
 namespace Toolkit
 {
 
 namespace Toolkit
 {
 
-const Property::Index TextField::PROPERTY_RENDERING_BACKEND(      Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX );
-const Property::Index TextField::PROPERTY_PLACEHOLDER_TEXT(       Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 1 );
-const Property::Index TextField::PROPERTY_TEXT(                   Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 2 );
-const Property::Index TextField::PROPERTY_CURSOR_IMAGE(           Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 3 );
-const Property::Index TextField::PROPERTY_PRIMARY_CURSOR_COLOR(   Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 4 );
-const Property::Index TextField::PROPERTY_SECONDARY_CURSOR_COLOR( Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 5 );
-const Property::Index TextField::PROPERTY_ENABLE_CURSOR_BLINK(    Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 6 );
-const Property::Index TextField::PROPERTY_CURSOR_BLINK_INTERVAL(  Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 7 );
-const Property::Index TextField::PROPERTY_CURSOR_BLINK_DURATION(  Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 8 );
-const Property::Index TextField::PROPERTY_GRAB_HANDLE_IMAGE(      Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 9 );
+const Property::Index TextField::PROPERTY_RENDERING_BACKEND(       Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX );
+const Property::Index TextField::PROPERTY_PLACEHOLDER_TEXT(        Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 1 );
+const Property::Index TextField::PROPERTY_TEXT(                    Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 2 );
+const Property::Index TextField::PROPERTY_CURSOR_IMAGE(            Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 3 );
+const Property::Index TextField::PROPERTY_PRIMARY_CURSOR_COLOR(    Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 4 );
+const Property::Index TextField::PROPERTY_SECONDARY_CURSOR_COLOR(  Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 5 );
+const Property::Index TextField::PROPERTY_ENABLE_CURSOR_BLINK(     Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 6 );
+const Property::Index TextField::PROPERTY_CURSOR_BLINK_INTERVAL(   Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 7 );
+const Property::Index TextField::PROPERTY_CURSOR_BLINK_DURATION(   Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 8 );
+const Property::Index TextField::PROPERTY_GRAB_HANDLE_IMAGE(       Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 9 );
+const Property::Index TextField::PROPERTY_DECORATION_BOUNDING_BOX( Internal::TextField::TEXTFIELD_PROPERTY_START_INDEX + 10 );
 
 namespace Internal
 {
 
 namespace Internal
 {
@@ -68,17 +70,17 @@ BaseHandle Create()
 
 TypeRegistration mType( typeid(Toolkit::TextField), typeid(Toolkit::Control), Create );
 
 
 TypeRegistration mType( typeid(Toolkit::TextField), typeid(Toolkit::Control), Create );
 
-PropertyRegistration property01( mType, "rendering-backend",      Toolkit::TextField::PROPERTY_RENDERING_BACKEND,      Property::INTEGER,          &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property02( mType, "placeholder-text",       Toolkit::TextField::PROPERTY_PLACEHOLDER_TEXT,       Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property03( mType, "text",                   Toolkit::TextField::PROPERTY_TEXT,                   Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property04( mType, "cursor-image",           Toolkit::TextField::PROPERTY_CURSOR_IMAGE,           Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property05( mType, "primary-cursor-color",   Toolkit::TextField::PROPERTY_PRIMARY_CURSOR_COLOR,   Property::VECTOR4,          &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property06( mType, "secondary-cursor-color", Toolkit::TextField::PROPERTY_SECONDARY_CURSOR_COLOR, Property::VECTOR4,          &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property07( mType, "enable-cursor-blink",    Toolkit::TextField::PROPERTY_ENABLE_CURSOR_BLINK,    Property::BOOLEAN,          &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property08( mType, "cursor-blink-interval",  Toolkit::TextField::PROPERTY_CURSOR_BLINK_INTERVAL,  Property::FLOAT,            &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property09( mType, "cursor-blink-duration",  Toolkit::TextField::PROPERTY_CURSOR_BLINK_DURATION,  Property::FLOAT,            &TextField::SetProperty, &TextField::GetProperty );
-PropertyRegistration property10( mType, "grab-handle-image",      Toolkit::TextField::PROPERTY_GRAB_HANDLE_IMAGE,      Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
-
+PropertyRegistration property01( mType, "rendering-backend",       Toolkit::TextField::PROPERTY_RENDERING_BACKEND,       Property::INTEGER,          &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property02( mType, "placeholder-text",        Toolkit::TextField::PROPERTY_PLACEHOLDER_TEXT,        Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property03( mType, "text",                    Toolkit::TextField::PROPERTY_TEXT,                    Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property04( mType, "cursor-image",            Toolkit::TextField::PROPERTY_CURSOR_IMAGE,            Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property05( mType, "primary-cursor-color",    Toolkit::TextField::PROPERTY_PRIMARY_CURSOR_COLOR,    Property::VECTOR4,          &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property06( mType, "secondary-cursor-color",  Toolkit::TextField::PROPERTY_SECONDARY_CURSOR_COLOR,  Property::VECTOR4,          &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property07( mType, "enable-cursor-blink",     Toolkit::TextField::PROPERTY_ENABLE_CURSOR_BLINK,     Property::BOOLEAN,          &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property08( mType, "cursor-blink-interval",   Toolkit::TextField::PROPERTY_CURSOR_BLINK_INTERVAL,   Property::FLOAT,            &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property09( mType, "cursor-blink-duration",   Toolkit::TextField::PROPERTY_CURSOR_BLINK_DURATION,   Property::FLOAT,            &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property10( mType, "grab-handle-image",       Toolkit::TextField::PROPERTY_GRAB_HANDLE_IMAGE,       Property::STRING,           &TextField::SetProperty, &TextField::GetProperty );
+PropertyRegistration property11( mType, "decoration bounding-box", Toolkit::TextField::PROPERTY_DECORATION_BOUNDING_BOX, Property::RECTANGLE,        &TextField::SetProperty, &TextField::GetProperty );
 } // namespace
 
 Toolkit::TextField TextField::New()
 } // namespace
 
 Toolkit::TextField TextField::New()
@@ -193,6 +195,14 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
         }
         break;
       }
+      case Toolkit::TextField::PROPERTY_DECORATION_BOUNDING_BOX:
+      {
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetBoundingBox( value.Get< Rect<int> >() );
+        }
+        break;
+      }
     }
   }
 }
     }
   }
 }
@@ -285,6 +295,14 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
         }
         break;
       }
+      case Toolkit::TextField::PROPERTY_DECORATION_BOUNDING_BOX:
+      {
+        if( impl.mDecorator )
+        {
+          value = impl.mDecorator->GetBoundingBox();
+        }
+        break;
+      }
     }
   }
 
     }
   }
 
@@ -309,6 +327,13 @@ void TextField::OnInitialize()
   mDoubleTapDetector.SetTapsRequired( 2 );
   mDoubleTapDetector.DetectedSignal().Connect( this, &TextField::OnDoubleTap );
   mDoubleTapDetector.Attach(Self());
   mDoubleTapDetector.SetTapsRequired( 2 );
   mDoubleTapDetector.DetectedSignal().Connect( this, &TextField::OnDoubleTap );
   mDoubleTapDetector.Attach(Self());
+
+  // Set BoundingBox to stage size if not already set.
+  if ( mDecorator->GetBoundingBox().IsEmpty() )
+  {
+    Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();
+    mDecorator->SetBoundingBox( Rect<int>( 0.0f, 0.0f, stageSize.width, stageSize.height ) );
+  }
 }
 
 void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
 }
 
 void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
index bbe9d1f..397f6a5 100644 (file)
@@ -37,6 +37,7 @@ const std::string TextField::ENABLE_CURSOR_BLINK_PROPERTY_NAME("enable-cursor-bl
 const std::string TextField::CURSOR_BLINK_INTERVAL_PROPERTY_NAME("cursor-blink-interval");
 const std::string TextField::CURSOR_BLINK_DURATION_PROPERTY_NAME("cursor-blink-duration");
 const std::string TextField::GRAB_HANDLE_IMAGE_PROPERTY_NAME("grab-handle-image");
 const std::string TextField::CURSOR_BLINK_INTERVAL_PROPERTY_NAME("cursor-blink-interval");
 const std::string TextField::CURSOR_BLINK_DURATION_PROPERTY_NAME("cursor-blink-duration");
 const std::string TextField::GRAB_HANDLE_IMAGE_PROPERTY_NAME("grab-handle-image");
+const std::string TextField::DECORATION_BOUNDING_BOX("decoration-bounding-box");
 
 TextField TextField::New()
 {
 
 TextField TextField::New()
 {
index 293e293..4d97b03 100644 (file)
@@ -41,28 +41,30 @@ class DALI_IMPORT_API TextField : public Control
 public:
 
   // Property indices
 public:
 
   // Property indices
-  static const Property::Index PROPERTY_RENDERING_BACKEND;      ///< name "rendering-backend",      type INT
-  static const Property::Index PROPERTY_PLACEHOLDER_TEXT;       ///< name "placeholder-text",       type STRING
-  static const Property::Index PROPERTY_TEXT;                   ///< name "text",                   type STRING
-  static const Property::Index PROPERTY_CURSOR_IMAGE;           ///< name "cursor-image",           type STRING
-  static const Property::Index PROPERTY_PRIMARY_CURSOR_COLOR;   ///< name "primary-cursor-color",   type VECTOR4
-  static const Property::Index PROPERTY_SECONDARY_CURSOR_COLOR; ///< name "secondary-cursor-color", type VECTOR4
-  static const Property::Index PROPERTY_ENABLE_CURSOR_BLINK;    ///< name "enable-cursor-blink",    type BOOLEAN
-  static const Property::Index PROPERTY_CURSOR_BLINK_INTERVAL;  ///< name "cursor-blink-interval",  type FLOAT
-  static const Property::Index PROPERTY_CURSOR_BLINK_DURATION;  ///< name "cursor-blink-duration",  type FLOAT
-  static const Property::Index PROPERTY_GRAB_HANDLE_IMAGE;      ///< name "grab-handle-image",      type STRING
+  static const Property::Index PROPERTY_RENDERING_BACKEND;       ///< name "rendering-backend",       type INT
+  static const Property::Index PROPERTY_PLACEHOLDER_TEXT;        ///< name "placeholder-text",        type STRING
+  static const Property::Index PROPERTY_TEXT;                    ///< name "text",                    type STRING
+  static const Property::Index PROPERTY_CURSOR_IMAGE;            ///< name "cursor-image",            type STRING
+  static const Property::Index PROPERTY_PRIMARY_CURSOR_COLOR;    ///< name "primary-cursor-color",    type VECTOR4
+  static const Property::Index PROPERTY_SECONDARY_CURSOR_COLOR;  ///< name "secondary-cursor-color",  type VECTOR4
+  static const Property::Index PROPERTY_ENABLE_CURSOR_BLINK;     ///< name "enable-cursor-blink",     type BOOLEAN
+  static const Property::Index PROPERTY_CURSOR_BLINK_INTERVAL;   ///< name "cursor-blink-interval",   type FLOAT
+  static const Property::Index PROPERTY_CURSOR_BLINK_DURATION;   ///< name "cursor-blink-duration",   type FLOAT
+  static const Property::Index PROPERTY_GRAB_HANDLE_IMAGE;       ///< name "grab-handle-image",       type STRING
+  static const Property::Index PROPERTY_DECORATION_BOUNDING_BOX; ///< name "decoration-bounding-box", type RECTANGLE
 
   // Property names
 
   // Property names
-  static const std::string RENDERING_BACKEND_PROPERTY_NAME;      ///< Property, name "rendering-backend",      type INT
-  static const std::string PLACEHOLDER_TEXT_PROPERTY_NAME;       ///< Property, name "placeholder-text",       type STRING
-  static const std::string TEXT_PROPERTY_NAME;                   ///< Property, name "text",                   type STRING
-  static const std::string CURSOR_IMAGE_PROPERTY_NAME;           ///< Property, name "cursor-image",           type STRING
-  static const std::string PRIMARY_CURSOR_COLOR_PROPERTY_NAME;   ///< Property, name "primary-cursor-color",   type VECTOR4
-  static const std::string SECONDARY_CURSOR_COLOR_PROPERTY_NAME; ///< Property, name "secondary-cursor-color", type VECTOR4
-  static const std::string ENABLE_CURSOR_BLINK_PROPERTY_NAME;    ///< Property, name "enable-cursor-blink",    type BOOLEAN
-  static const std::string CURSOR_BLINK_INTERVAL_PROPERTY_NAME;  ///< Property, name "cursor-blink-interval",  type FLOAT
-  static const std::string CURSOR_BLINK_DURATION_PROPERTY_NAME;  ///< Property, name "cursor-blink-duration",  type FLOAT
-  static const std::string GRAB_HANDLE_IMAGE_PROPERTY_NAME;      ///< Property, name "grab-handle-image",      type STRING
+  static const std::string RENDERING_BACKEND_PROPERTY_NAME;      ///< Property, name "rendering-backend",       type INT
+  static const std::string PLACEHOLDER_TEXT_PROPERTY_NAME;       ///< Property, name "placeholder-text",        type STRING
+  static const std::string TEXT_PROPERTY_NAME;                   ///< Property, name "text",                    type STRING
+  static const std::string CURSOR_IMAGE_PROPERTY_NAME;           ///< Property, name "cursor-image",            type STRING
+  static const std::string PRIMARY_CURSOR_COLOR_PROPERTY_NAME;   ///< Property, name "primary-cursor-color",    type VECTOR4
+  static const std::string SECONDARY_CURSOR_COLOR_PROPERTY_NAME; ///< Property, name "secondary-cursor-color",  type VECTOR4
+  static const std::string ENABLE_CURSOR_BLINK_PROPERTY_NAME;    ///< Property, name "enable-cursor-blink",     type BOOLEAN
+  static const std::string CURSOR_BLINK_INTERVAL_PROPERTY_NAME;  ///< Property, name "cursor-blink-interval",   type FLOAT
+  static const std::string CURSOR_BLINK_DURATION_PROPERTY_NAME;  ///< Property, name "cursor-blink-duration",   type FLOAT
+  static const std::string GRAB_HANDLE_IMAGE_PROPERTY_NAME;      ///< Property, name "grab-handle-image",       type STRING
+  static const std::string DECORATION_BOUNDING_BOX;              ///< Property, name "decoration-bounding-box", type RECTANGLE
 
   /**
    * Create the TextField control.
 
   /**
    * Create the TextField control.
index 148fbc8..0b15b49 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/common/constants.h>
 #include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/common/constants.h>
+#include <dali/public-api/common/stage.h>
 #include <dali/public-api/events/tap-gesture.h>
 #include <dali/public-api/events/tap-gesture-detector.h>
 #include <dali/public-api/events/pan-gesture.h>
 #include <dali/public-api/events/tap-gesture.h>
 #include <dali/public-api/events/tap-gesture-detector.h>
 #include <dali/public-api/events/pan-gesture.h>
@@ -56,6 +57,7 @@ const Dali::Vector3 DEFAULT_GRAB_HANDLE_RELATIVE_SIZE( 1.5f, 2.0f, 1.0f );
 const Dali::Vector3 DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE( 1.5f, 1.5f, 1.0f );
 
 const std::size_t CURSOR_BLINK_INTERVAL = 500; // Cursor blink interval
 const Dali::Vector3 DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE( 1.5f, 1.5f, 1.0f );
 
 const std::size_t CURSOR_BLINK_INTERVAL = 500; // Cursor blink interval
+const std::size_t MILLISECONDS = 1000;
 
 } // end of namespace
 
 
 } // end of namespace
 
@@ -116,10 +118,11 @@ struct Decorator::Impl : public ConnectionTracker
     mActiveGrabHandle(false),
     mActiveSelection( false ),
     mCursorBlinkInterval( CURSOR_BLINK_INTERVAL ),
     mActiveGrabHandle(false),
     mActiveSelection( false ),
     mCursorBlinkInterval( CURSOR_BLINK_INTERVAL ),
-    mCursorBlinkDuration(0.0f),
+    mCursorBlinkDuration( 0.0f ),
     mCursorBlinkStatus( true ),
     mCursorBlinkStatus( true ),
-    mGrabDisplacementX(0.0f),
-    mGrabDisplacementY(0.0f)
+    mGrabDisplacementX( 0.0f ),
+    mGrabDisplacementY( 0.0f ),
+    mBoundingBox( Rect<int>() )
   {
   }
 
   {
   }
 
@@ -467,7 +470,7 @@ struct Decorator::Impl : public ConnectionTracker
   TapGestureDetector mTapDetector;
   PanGestureDetector mPanGestureDetector;
 
   TapGestureDetector mTapDetector;
   PanGestureDetector mPanGestureDetector;
 
-
+  Rect<int> mBoundingBox;
 };
 
 DecoratorPtr Decorator::New( Internal::Control& parent, Observer& observer )
 };
 
 DecoratorPtr Decorator::New( Internal::Control& parent, Observer& observer )
@@ -475,6 +478,16 @@ DecoratorPtr Decorator::New( Internal::Control& parent, Observer& observer )
   return DecoratorPtr( new Decorator(parent, observer) );
 }
 
   return DecoratorPtr( new Decorator(parent, observer) );
 }
 
+void Decorator::SetBoundingBox( const Rect<int>& boundingBox )
+{
+  mImpl->mBoundingBox = boundingBox;
+}
+
+const Rect<int>& Decorator::GetBoundingBox() const
+{
+  return mImpl->mBoundingBox;
+}
+
 void Decorator::Relayout( const Vector2& size )
 {
   mImpl->Relayout( size );
 void Decorator::Relayout( const Vector2& size )
 {
   mImpl->Relayout( size );
@@ -554,7 +567,7 @@ void Decorator::StopCursorBlink()
 
 void Decorator::SetCursorBlinkInterval( float seconds )
 {
 
 void Decorator::SetCursorBlinkInterval( float seconds )
 {
-  mImpl->mCursorBlinkInterval = seconds*1000; // Convert to milliseconds
+  mImpl->mCursorBlinkInterval = seconds*MILLISECONDS; // Convert to milliseconds
 }
 
 float Decorator::GetCursorBlinkInterval() const
 }
 
 float Decorator::GetCursorBlinkInterval() const
index 144f0ef..4038d3f 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/object/ref-object.h>
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/object/ref-object.h>
+#include <dali/public-api/math/rect.h>
 
 namespace Dali
 {
 
 namespace Dali
 {
@@ -128,6 +129,36 @@ public:
   static DecoratorPtr New( Dali::Toolkit::Internal::Control& parent, Observer& observer );
 
   /**
   static DecoratorPtr New( Dali::Toolkit::Internal::Control& parent, Observer& observer );
 
   /**
+   * @brief Set the bounding box which handles, popup and similar decorations will not exceed.
+   *
+   * The default value is the width and height of the stage from the top left origin.
+   * If a title bar for example is on the top of the screen then the y should be the title's height and
+   * the boundary height the stage height minus the title's height.
+   * Restrictions - The boundary box should be set up with a fixed z position for the text-input and the default camera.
+   *
+   * ------------------------------------------
+   * |(x,y)                                   |
+   * |o---------------------------------------|
+   * ||                                      ||
+   * ||            Bounding Box              || boundary height
+   * ||                                      ||
+   * |----------------------------------------|
+   * ------------------------------------------
+   *               boundary width
+   *
+   * @param[in] boundingBox Vector( x coordinate, y coordinate, width, height )
+   */
+  void SetBoundingBox( const Rect<int>& boundingBox );
+
+  /**
+   * @brief Retrieve the bounding box origin and dimensions.
+   *
+   * default is set once control is added to stage, before this the return vector will be Vector4:ZERO
+   * @return Rect<int> the bounding box origin, width and height
+   */
+  const Rect<int>& GetBoundingBox() const;
+
+  /**
    * @brief The decorator waits until a relayout before creating actors etc.
    *
    * @param[in] size The size of the parent control after size-negotiation.
    * @brief The decorator waits until a relayout before creating actors etc.
    *
    * @param[in] size The size of the parent control after size-negotiation.