[problem] TypeRegistry does not have an entry for ControlImpl but that is what all
ControlImpl objects are set to when using GetTypeName() etc.
[cause] This means we cannot use control properly with the type-registry.
Everywhere else, the namespaces are stripped from the typeid name so for
Internal::ImageActor we just have ImageActor and this matches the entry
for ImageActor in the type-registry.
However, for Control, we only have an entry for Control, not ControlImpl so there
is no match.
[solution] By moving ControlImpl to Internal::Control we will have the match in the
type-registry.
Added typedef for ControlImpl so applications will only have to be recompiled.
Change-Id: I50d63b27f0fc6af0e8de1c59757e0a9324354c63
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
- map.push_back( Property::StringValuePair( "type", "TextActor" ) );
+ map.push_back( Property::StringValuePair( "type", "Actor" ) );
button.SetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR, map );
- DALI_TEST_EQUALS( "TextActor", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ DALI_TEST_CHECK( "ImageActor" != button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
}
// PushButton::PROPERTY_DIMMED_STATE_ACTOR
}
DummyControlImpl::DummyControlImpl()
-: ControlImpl(true)
+: Control(true)
{
}
};
/**
- * Cannot create an instance of ControlImpl, so use this dummy class for the implementation.
- * This class does not override any of ControlImpl's behaviour.
+ * Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
+ * This class does not override any of Internal::Control's behaviour.
*/
-class DummyControlImpl : public ControlImpl
+class DummyControlImpl : public Internal::Control
{
public:
static DummyControl New();
public:
- inline void EnableGestureDetection(Gesture::Type type) { ControlImpl::EnableGestureDetection(type); }
- inline void DisableGestureDetection(Gesture::Type type) { ControlImpl::DisableGestureDetection(type); }
- inline PinchGestureDetector GetPinchGestureDetector() const { return ControlImpl::GetPinchGestureDetector(); }
- inline PanGestureDetector GetPanGestureDetector() const { return ControlImpl::GetPanGestureDetector(); }
- inline TapGestureDetector GetTapGestureDetector() const { return ControlImpl::GetTapGestureDetector(); }
- inline LongPressGestureDetector GetLongPressGestureDetector() const { return ControlImpl::GetLongPressGestureDetector(); }
+ inline void EnableGestureDetection(Gesture::Type type) { Internal::Control::EnableGestureDetection(type); }
+ inline void DisableGestureDetection(Gesture::Type type) { Internal::Control::DisableGestureDetection(type); }
+ inline PinchGestureDetector GetPinchGestureDetector() const { return Internal::Control::GetPinchGestureDetector(); }
+ inline PanGestureDetector GetPanGestureDetector() const { return Internal::Control::GetPanGestureDetector(); }
+ inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
+ inline LongPressGestureDetector GetLongPressGestureDetector() const { return Internal::Control::GetLongPressGestureDetector(); }
protected:
};
/**
- * Cannot create an instance of ControlImpl, so use this dummy class for the implementation.
- * This class DOES override ControlImpl's behaviour.
+ * Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
+ * This class DOES override Internal::Control's behaviour.
*/
class DummyControlImplOverride : public DummyControlImpl
{
virtual ~DummyControlImplOverride();
-private: // From ControlImpl
+private: // From Internal::Control
virtual void OnInitialize();
virtual void OnStyleChange(StyleChange change);
{
try
{
- ControlImpl& controlImpl = control.GetImplementation();
+ Toolkit::Internal::Control& controlImpl = control.GetImplementation();
(void)controlImpl; // Avoid unused warning
tet_result(TET_FAIL);
}
try
{
const DummyControl constControl(control);
- const ControlImpl& controlImpl = constControl.GetImplementation();
+ const Toolkit::Internal::Control& controlImpl = constControl.GetImplementation();
(void)controlImpl; // Avoid unused warning
tet_result(TET_FAIL);
}
{
try
{
- ControlImpl& controlImpl = control.GetImplementation();
+ Toolkit::Internal::Control& controlImpl = control.GetImplementation();
(void)controlImpl; // Avoid unused warning
tet_result(TET_PASS);
}
try
{
const DummyControl constControl(control);
- const ControlImpl& controlImpl = constControl.GetImplementation();
+ const Toolkit::Internal::Control& controlImpl = constControl.GetImplementation();
(void)controlImpl; // Avoid unused warning
tet_result(TET_PASS);
}
DALI_TEST_CHECK( !Control::DownCast(control) );
- control = ControlImpl::New();
+ control = Toolkit::Internal::Control::New();
DALI_TEST_CHECK( Control::DownCast(control) );
END_TEST;
}
Vector3 actorSize ( actor.GetCurrentSize() );
- Control control( Control::DownCast( actor ) );
+ Toolkit::Control control( Toolkit::Control::DownCast( actor ) );
if ( actorSize == Vector3::ZERO && control )
{
actorSize = control.GetNaturalSize();
}
Alignment::Alignment( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical )
-: ControlImpl( false ), // doesn't require touch events
+: Control( false ), // doesn't require touch events
mHorizontal( horizontal ),
mVertical( vertical ),
mScaling( Toolkit::Alignment::ScaleNone ),
* Alignment is a control to position and resize actors inside other container actors.
* @see Dali::Toolkit::Alignment for more details.
*/
-class Alignment : public ControlImpl
+class Alignment : public Control
{
public:
private: // From Control
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut()
+ * @copydoc Control::OnRelaidOut()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
} // unnamed namespace
Button::Button()
-: ControlImpl( true ),
+: Control( true ),
mState( ButtonUp ),
mDimmed( false ),
mPainter( NULL )
/**
* Button is the base class implementation for all buttons.
*/
-class Button : public ControlImpl
+class Button : public Control
{
public:
// Properties
enum
{
- BUTTON_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1,
+ BUTTON_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
BUTTON_PROPERTY_END_INDEX = BUTTON_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
};
*/
virtual bool OnTouchEvent( const TouchEvent& event );
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
*/
Actor& GetFadeOutCheckedImage();
-protected: // From ControlImpl
+protected: // From Control
/**
* Respond the activate notification.
Vector3 PushButton::GetNaturalSize()
{
- Vector3 size = ControlImpl::GetNaturalSize();
+ Vector3 size = Control::GetNaturalSize();
const bool widthIsZero = EqualsZero( size.width );
const bool heightIsZero = EqualsZero( size.height );
*/
virtual float OnAnimationTimeRequested() const;
-protected: // From ControlImpl
+protected: // From Control
/**
* Respond the activate notification.
}
Popup::Popup(PopupStyle& style)
-: ControlImpl(true),
+: Control(true),
mShowing(false),
mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
mAlterAddedChild(false),
return GetNaturalSize().width;
}
-Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
{
Actor nextFocusableActor( currentFocusedActor );
{
switch ( direction )
{
- case Control::Left:
+ case Toolkit::Control::Left:
{
if ( iter == focusableActors.begin() )
{
}
break;
}
- case Control::Right:
+ case Toolkit::Control::Right:
{
if ( iter == focusableActors.end() - 1 )
{
break;
}
- case Control::Up:
+ case Toolkit::Control::Up:
{
if ( *iter == mContent )
{
break;
}
- case Control::Down:
+ case Toolkit::Control::Down:
{
if ( mContent && mContent.IsKeyboardFocusable() )
{
/**
* @copydoc Toolkit::Popup
*/
-class Popup : public ControlImpl
+class Popup : public Control
{
public:
virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
/**
- * From ControlImpl; called after a child has been added to the owning actor.
+ * From Control; called after a child has been added to the owning actor.
* @param[in] child The child which has been added.
*/
virtual void OnControlChildAdd( Actor& child );
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut()
+ * @copydoc Control::OnRelaidOut()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
/**
- * @copydoc Toolkit::ControlImpl::OnKeyEvent()
+ * @copydoc Control::OnKeyEvent()
*/
virtual bool OnKeyEvent(const KeyEvent& event);
/**
* @copydoc Control::GetNextKeyboardFocusableActor()
*/
- Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
private:
*/
void FindControls( Actor actor, ControlStack& controls, Vector2 size )
{
- Control control( Control::DownCast( actor ) );
+ Toolkit::Control control( Toolkit::Control::DownCast( actor ) );
if( control )
{
// If the control size has been set by the application / control, then we should try and honour that.
while ( !controlStack.empty() )
{
ControlSizePair pair ( controlStack.top() );
- Control control ( pair.first );
+ Toolkit::Control control ( pair.first );
Vector2 size ( pair.second );
controlStack.pop();
*/
static Property::Value GetProperty( BaseObject* object, Property::Index index );
-private: // from ControlImpl
+private: // from Control
/**
* @copydoc Toolkit::Control::OnInitialize
return true;
}
-Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
{
Actor nextFocusActor;
if(mActiveLayout)
*/
virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
/**
* @copydoc Toolkit::Control::GetNextKeyboardFocusableActor()
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor actor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
/**
* @copydoc Toolkit::Control::OnKeyboardFocusChangeCommitted()
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
/**
- * @copydoc Dali::ControlImpl::OnControlSizeSet(const Vector3&)
+ * @copydoc Dali::Control::OnControlSizeSet(const Vector3&)
*/
virtual void OnControlSizeSet( const Vector3& size );
///////////////////////////////////////////////////////////////////////////////////////////////////
Scrollable::Scrollable()
-: ControlImpl(true/*requires touch*/),
+: Control(true/*requires touch*/),
mPropertyRelativePosition(Property::INVALID_INDEX),
mPropertyPositionMin(Property::INVALID_INDEX),
mPropertyPositionMax(Property::INVALID_INDEX),
/**
* @copydoc Toolkit::Scrollable
*/
-class Scrollable : public ControlImpl
+class Scrollable : public Control
{
public:
static const std::string SCROLLABLE_CAN_SCROLL_VERTICAL;
{
}
-void StyleChangeProcessor::Register( ControlImpl* control )
+void StyleChangeProcessor::Register( Control* control )
{
// Only create a style change processor if we have not created one in the local thread storage.
if (!gThreadLocalStyleChangeProcessor.get())
gThreadLocalStyleChangeProcessor->Reference();
- std::vector<ControlImpl*>& controls( gThreadLocalStyleChangeProcessor->mControls );
+ std::vector<Control*>& controls( gThreadLocalStyleChangeProcessor->mControls );
// Store the Control raw pointer to allow traverse all off stage controls.
DALI_ASSERT_ALWAYS( ( std::find( controls.begin(), controls.end(), control ) == controls.end() ) && "StyleChangeProcessor::Register. The control has been registered twice." );
controls.push_back( control );
}
-void StyleChangeProcessor::Unregister( ControlImpl* control )
+void StyleChangeProcessor::Unregister( Control* control )
{
if (gThreadLocalStyleChangeProcessor.get())
{
- std::vector<ControlImpl*>& controls( gThreadLocalStyleChangeProcessor->mControls );
+ std::vector<Control*>& controls( gThreadLocalStyleChangeProcessor->mControls );
// Removes the control from the vector as is not needed to notify it about style changes.
- std::vector<ControlImpl*>::iterator it = std::find( controls.begin(), controls.end(), control );
- std::vector<ControlImpl*>::iterator endIt = controls.end();
+ std::vector<Control*>::iterator it = std::find( controls.begin(), controls.end(), control );
+ std::vector<Control*>::iterator endIt = controls.end();
DALI_ASSERT_ALWAYS( ( it != endIt ) && "StyleChangeProcessor::UnRegister. The control has not been registered in the StyleChangeProcessor." );
*it = *(endIt - 1);
void StyleChangeProcessor::StyleChanged(Dali::StyleMonitor styleMonitor, StyleChange styleChange)
{
// Traverse all registered controls.
- std::vector<ControlImpl*>& controls( gThreadLocalStyleChangeProcessor->mControls );
+ std::vector<Control*>& controls( gThreadLocalStyleChangeProcessor->mControls );
- for( std::vector<ControlImpl*>::iterator it = controls.begin(), endIt = controls.end(); it != endIt; ++it )
+ for( std::vector<Control*>::iterator it = controls.begin(), endIt = controls.end(); it != endIt; ++it )
{
// Create a valid handle.
- IntrusivePtr<ControlImpl> implementation( *it );
+ IntrusivePtr<Control> implementation( *it );
if (implementation)
{
namespace Toolkit
{
-class ControlImpl;
-
namespace Internal
{
+class Control;
+
/**
* This observes and processes when any style changes occur. When they do occur, it traverses through
* all registered controls and calls the StyleChanged method.
* Registers a control with the StyleChangeProcessor.
* @param[in] control The raw Control pointer.
*/
- static void Register( ControlImpl* control );
+ static void Register( Control* control );
/**
* Unregisters a control from the StyleChangeProcessor.
* @param[in] control The raw Control pointer.
*/
- static void Unregister( ControlImpl* control );
+ static void Unregister( Control* control );
public:
private:
- unsigned int mCount; ///< The reference count
- std::vector<ControlImpl*> mControls; ///< Stores all registered controls.
+ unsigned int mCount; ///< The reference count
+ std::vector<Control*> mControls; ///< Stores all registered controls.
};
} // namespace Internal
}
TableView::TableView( unsigned int initialRows, unsigned int initialColumns )
-: ControlImpl( true ), // requires touch
+: Control( true ), // requires touch
mCellData( initialRows, initialColumns ),
mLayoutingChild( false ),
mConstraintDuration( DEFAULT_CONSTRAINT_DURATION )
// nothing to do
}
-Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
{
Actor nextFocusableActor;
switch ( direction )
{
- case Control::Left:
+ case Toolkit::Control::Left:
{
if(--currentColumn < 0)
{
}
break;
}
- case Control::Right:
+ case Toolkit::Control::Right:
{
if(++currentColumn > numberOfColumns - 1)
{
}
break;
}
- case Control::Up:
+ case Toolkit::Control::Up:
{
if(--currentRow < 0)
{
}
break;
}
- case Control::Down:
+ case Toolkit::Control::Down:
{
if(++currentRow > numberOfRows - 1)
{
* TableView is a custom control for laying out actors in a table layout
* @see Dali::Toolkit:TableView for more details
*/
-class TableView : public ControlImpl
+class TableView : public Control
{
public:
*/
unsigned int GetColumns();
-private: // From ControlImpl
+private: // From Control
/**
- * @copydoc Toolkit::ControlImpl::OnControlChildAdd(Actor& child)
+ * @copydoc Control::OnControlChildAdd(Actor& child)
*/
virtual void OnControlChildAdd(Actor& child);
/**
- * @copydoc Toolkit::ControlImpl::OnControlChildRemove(Actor& child)
+ * @copydoc Control::OnControlChildRemove(Actor& child)
*/
virtual void OnControlChildRemove(Actor& child);
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut
+ * @copydoc Control::OnRelaidOut
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
/**
- * @copydoc Toolkit::ControlImpl::OnInitialize()
+ * @copydoc Control::OnInitialize()
*/
virtual void OnInitialize();
/**
- * @copydoc Toolkit::ControlImpl::GetNextKeyboardFocusableActor
+ * @copydoc Control::GetNextKeyboardFocusableActor
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
private: // Implementation
}
TextInput::TextInput()
-:ControlImpl( true ),
+:Control( true ),
mState( StateEdit ),
mStyledText(),
mInputStyle(),
mDisplayedTextView.SetLineJustification( Toolkit::TextView::Left );
mDisplayedTextView.SetTextAlignment( static_cast<Toolkit::Alignment::Type>( Toolkit::Alignment::HorizontalLeft | Toolkit::Alignment::VerticalTop ) );
mDisplayedTextView.SetPosition( Vector3( 0.0f, 0.0f, DISPLAYED_TEXT_VIEW_Z_OFFSET ) );
- mDisplayedTextView.SetSizePolicy( Control::Fixed, Control::Fixed );
+ mDisplayedTextView.SetSizePolicy( Toolkit::Control::Fixed, Toolkit::Control::Fixed );
mDisplayedTextView.ScrolledSignal().Connect( this, &TextInput::OnTextViewScrolled );
typedef IntrusivePtr<TextInput> TextInputPtr;
-class TextInput : public ControlImpl
+class TextInput : public Control
{
public:
virtual void OnKeyInputFocusLost();
/**
- * From ControlImpl; called whenever the control is added to the stage.
+ * From Control; called whenever the control is added to the stage.
*/
virtual void OnControlStageConnection();
-private: // From ControlImpl
+private: // From Control
/**
* Creation of the layer that is used by top level active parts of the TextInput like handles
void CreateActiveLayer();
/**
- * @copydoc Toolkit::ControlImpl::OnInitialize()
+ * @copydoc Control::OnInitialize()
*/
virtual void OnInitialize();
/**
- * @copydoc Toolkit::ControlImpl::OnControlSizeSet()
+ * @copydoc Control::OnControlSizeSet()
*/
virtual void OnControlSizeSet(const Vector3& targetSize);
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut()
+ * @copydoc Control::OnRelaidOut()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
}
TextView::TextView()
-: ControlImpl( false ), // doesn't require touch events
+: Control( false ), // doesn't require touch events
mCurrentStyledText(),
mTextViewProcessorOperations(),
mLayoutParameters( Toolkit::TextView::SplitByNewLineChar,
/**
* TextView is a custom control for text aligning and multiline support
*/
-class TextView : public ControlImpl
+class TextView : public Control
{
public:
// Properties
enum
{
- TEXTVIEW_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1,
+ TEXTVIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
TEXTVIEW_PROPERTY_END_INDEX = TEXTVIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
};
static Property::Value GetProperty( BaseObject* object, Property::Index index );
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_KEYBOARD_FOCUS_MANAGER");
#endif
-const std::string IS_FOCUS_GROUP_PROPERTY_NAME("is-keyboard-focus-group"); // This property will be replaced by a flag in ControlImpl.
+const std::string IS_FOCUS_GROUP_PROPERTY_NAME("is-keyboard-focus-group"); // This property will be replaced by a flag in Control.
const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "keyboard_focus.png";
const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
}
}
-Control KeyInputFocusManager::GetCurrentFocusControl() const
+Toolkit::Control KeyInputFocusManager::GetCurrentFocusControl() const
{
- Control currentFocusControl;
+ Toolkit::Control currentFocusControl;
if(!mFocusActorsQueue.empty())
{
namespace Toolkit
{
-const Property::Index Control::PROPERTY_BACKGROUND_COLOR = ControlImpl::CONTROL_PROPERTY_START_INDEX;
-const Property::Index Control::PROPERTY_BACKGROUND = ControlImpl::CONTROL_PROPERTY_START_INDEX + 1;
-const Property::Index Control::PROPERTY_WIDTH_POLICY = ControlImpl::CONTROL_PROPERTY_START_INDEX + 2;
-const Property::Index Control::PROPERTY_HEIGHT_POLICY = ControlImpl::CONTROL_PROPERTY_START_INDEX + 3;
-const Property::Index Control::PROPERTY_MINIMUM_SIZE = ControlImpl::CONTROL_PROPERTY_START_INDEX + 4;
-const Property::Index Control::PROPERTY_MAXIMUM_SIZE = ControlImpl::CONTROL_PROPERTY_START_INDEX + 5;
-const Property::Index Control::PROPERTY_KEY_INPUT_FOCUS = ControlImpl::CONTROL_PROPERTY_START_INDEX + 6;
+const Property::Index Control::PROPERTY_BACKGROUND_COLOR = Internal::Control::CONTROL_PROPERTY_START_INDEX;
+const Property::Index Control::PROPERTY_BACKGROUND = Internal::Control::CONTROL_PROPERTY_START_INDEX + 1;
+const Property::Index Control::PROPERTY_WIDTH_POLICY = Internal::Control::CONTROL_PROPERTY_START_INDEX + 2;
+const Property::Index Control::PROPERTY_HEIGHT_POLICY = Internal::Control::CONTROL_PROPERTY_START_INDEX + 3;
+const Property::Index Control::PROPERTY_MINIMUM_SIZE = Internal::Control::CONTROL_PROPERTY_START_INDEX + 4;
+const Property::Index Control::PROPERTY_MAXIMUM_SIZE = Internal::Control::CONTROL_PROPERTY_START_INDEX + 5;
+const Property::Index Control::PROPERTY_KEY_INPUT_FOCUS = Internal::Control::CONTROL_PROPERTY_START_INDEX + 6;
namespace
{
BaseHandle Create()
{
- return ControlImpl::New();
+ return Internal::Control::New();
}
TypeRegistration CONTROL_TYPE( typeid(Control), typeid(CustomActor), Create );
-// Property Registration after ControlImpl::Impl definition below
+// Property Registration after Internal::Control::Impl definition below
-TypeAction ACTION_TYPE_1(CONTROL_TYPE, Toolkit::Control::ACTION_CONTROL_ACTIVATED, &ControlImpl::DoAction);
+TypeAction ACTION_TYPE_1(CONTROL_TYPE, Toolkit::Control::ACTION_CONTROL_ACTIVATED, &Internal::Control::DoAction);
/**
* Helper class used to set the Control's size through the Actor's API or through children added.
} // unnamed namespace
-class ControlImpl::Impl : public ConnectionTrackerInterface
+namespace Internal
+{
+
+class Control::Impl : public ConnectionTrackerInterface
{
public:
// Construction & Destruction
- Impl(ControlImpl& controlImpl)
+ Impl(Control& controlImpl)
: mControlImpl(controlImpl),
mInitialized( false ),
mPinchGestureDetector(),
mLongPressGestureDetector(),
mStartingPinchScale(),
mLockSetSize( false ),
- mWidthPolicy( Control::Fixed ),
- mHeightPolicy( Control::Fixed ),
+ mWidthPolicy( Toolkit::Control::Fixed ),
+ mHeightPolicy( Toolkit::Control::Fixed ),
mSize(),
mSetSize(),
mMinimumSize(),
*/
static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
{
- Control control = Control::DownCast( BaseHandle( object ) );
+ Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
if ( control )
{
- ControlImpl& controlImpl( control.GetImplementation() );
+ Control& controlImpl( control.GetImplementation() );
switch ( index )
{
- case Control::PROPERTY_BACKGROUND_COLOR:
+ case Toolkit::Control::PROPERTY_BACKGROUND_COLOR:
{
controlImpl.SetBackgroundColor( value.Get< Vector4 >() );
break;
}
- case Control::PROPERTY_BACKGROUND:
+ case Toolkit::Control::PROPERTY_BACKGROUND:
{
if ( value.HasKey( "image" ) )
{
break;
}
- case Control::PROPERTY_WIDTH_POLICY:
+ case Toolkit::Control::PROPERTY_WIDTH_POLICY:
{
- controlImpl.mImpl->mWidthPolicy = Scripting::GetEnumeration< Control::SizePolicy >( value.Get< std::string >(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
+ controlImpl.mImpl->mWidthPolicy = Scripting::GetEnumeration< Toolkit::Control::SizePolicy >( value.Get< std::string >(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
break;
}
- case Control::PROPERTY_HEIGHT_POLICY:
+ case Toolkit::Control::PROPERTY_HEIGHT_POLICY:
{
- controlImpl.mImpl->mHeightPolicy = Scripting::GetEnumeration< Control::SizePolicy >( value.Get< std::string >(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
+ controlImpl.mImpl->mHeightPolicy = Scripting::GetEnumeration< Toolkit::Control::SizePolicy >( value.Get< std::string >(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
break;
}
- case Control::PROPERTY_MINIMUM_SIZE:
+ case Toolkit::Control::PROPERTY_MINIMUM_SIZE:
{
controlImpl.SetMinimumSize( value.Get< Vector3 >() );
break;
}
- case Control::PROPERTY_MAXIMUM_SIZE:
+ case Toolkit::Control::PROPERTY_MAXIMUM_SIZE:
{
controlImpl.SetMaximumSize( value.Get< Vector3 >() );
break;
}
- case Control::PROPERTY_KEY_INPUT_FOCUS:
+ case Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS:
{
if ( value.Get< bool >() )
{
{
Property::Value value;
- Control control = Control::DownCast( BaseHandle( object ) );
+ Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
if ( control )
{
- ControlImpl& controlImpl( control.GetImplementation() );
+ Control& controlImpl( control.GetImplementation() );
switch ( index )
{
- case Control::PROPERTY_BACKGROUND_COLOR:
+ case Toolkit::Control::PROPERTY_BACKGROUND_COLOR:
{
value = controlImpl.GetBackgroundColor();
break;
}
- case Control::PROPERTY_BACKGROUND:
+ case Toolkit::Control::PROPERTY_BACKGROUND:
{
Property::Map map;
break;
}
- case Control::PROPERTY_WIDTH_POLICY:
+ case Toolkit::Control::PROPERTY_WIDTH_POLICY:
{
- value = std::string( Scripting::GetEnumerationName< Control::SizePolicy >( controlImpl.mImpl->mWidthPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
+ value = std::string( Scripting::GetEnumerationName< Toolkit::Control::SizePolicy >( controlImpl.mImpl->mWidthPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
break;
}
- case Control::PROPERTY_HEIGHT_POLICY:
+ case Toolkit::Control::PROPERTY_HEIGHT_POLICY:
{
- value = std::string( Scripting::GetEnumerationName< Control::SizePolicy >( controlImpl.mImpl->mHeightPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
+ value = std::string( Scripting::GetEnumerationName< Toolkit::Control::SizePolicy >( controlImpl.mImpl->mHeightPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
break;
}
- case Control::PROPERTY_MINIMUM_SIZE:
+ case Toolkit::Control::PROPERTY_MINIMUM_SIZE:
{
value = controlImpl.mImpl->mMinimumSize;
break;
}
- case Control::PROPERTY_MAXIMUM_SIZE:
+ case Toolkit::Control::PROPERTY_MAXIMUM_SIZE:
{
value = controlImpl.mImpl->mMaximumSize;
break;
}
- case Control::PROPERTY_KEY_INPUT_FOCUS:
+ case Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS:
{
value = controlImpl.HasKeyInputFocus();
break;
// Data
- ControlImpl& mControlImpl;
+ Control& mControlImpl;
bool mInitialized:1;
bool mLockSetSize; ///< Used to avoid. Can't be a bitfield as a reference to this member is used in SetSizeLock helper class.
- Control::SizePolicy mWidthPolicy; ///< Stores the width policy.
- Control::SizePolicy mHeightPolicy; ///< Stores the height policy.
+ Toolkit::Control::SizePolicy mWidthPolicy; ///< Stores the width policy.
+ Toolkit::Control::SizePolicy mHeightPolicy; ///< Stores the height policy.
Vector3 mSize; ///< Stores the current control's size.
Vector3 mSetSize; ///< Always stores the size set through the Actor's API. Useful when reset to the initial size is needed.
// Background
Background* mBackground; ///< Only create the background if we use it
- // Properties - these need to be members of ControlImpl::Impl as they need to functions within this class.
+ // Properties - these need to be members of Internal::Control::Impl as they need to functions within this class.
static PropertyRegistration PROPERTY_1;
static PropertyRegistration PROPERTY_2;
static PropertyRegistration PROPERTY_3;
static PropertyRegistration PROPERTY_7;
};
-PropertyRegistration ControlImpl::Impl::PROPERTY_1( CONTROL_TYPE, "background-color", Control::PROPERTY_BACKGROUND_COLOR, Property::VECTOR4, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_2( CONTROL_TYPE, "background", Control::PROPERTY_BACKGROUND, Property::MAP, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_3( CONTROL_TYPE, "width-policy", Control::PROPERTY_WIDTH_POLICY, Property::STRING, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_4( CONTROL_TYPE, "height-policy", Control::PROPERTY_HEIGHT_POLICY, Property::STRING, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_5( CONTROL_TYPE, "minimum-size", Control::PROPERTY_MINIMUM_SIZE, Property::VECTOR3, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_6( CONTROL_TYPE, "maximum-size", Control::PROPERTY_MAXIMUM_SIZE, Property::VECTOR3, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
-PropertyRegistration ControlImpl::Impl::PROPERTY_7( CONTROL_TYPE, "key-input-focus", Control::PROPERTY_KEY_INPUT_FOCUS, Property::BOOLEAN, &ControlImpl::Impl::SetProperty, &ControlImpl::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_1( CONTROL_TYPE, "background-color", Toolkit::Control::PROPERTY_BACKGROUND_COLOR, Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_2( CONTROL_TYPE, "background", Toolkit::Control::PROPERTY_BACKGROUND, Property::MAP, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_3( CONTROL_TYPE, "width-policy", Toolkit::Control::PROPERTY_WIDTH_POLICY, Property::STRING, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_4( CONTROL_TYPE, "height-policy", Toolkit::Control::PROPERTY_HEIGHT_POLICY, Property::STRING, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_5( CONTROL_TYPE, "minimum-size", Toolkit::Control::PROPERTY_MINIMUM_SIZE, Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_6( CONTROL_TYPE, "maximum-size", Toolkit::Control::PROPERTY_MAXIMUM_SIZE, Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_7( CONTROL_TYPE, "key-input-focus", Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS, Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-Control ControlImpl::New()
+Toolkit::Control Control::New()
{
// Create the implementation, temporarily owned on stack
- IntrusivePtr<ControlImpl> controlImpl = new ControlImpl( false );
+ IntrusivePtr<Control> controlImpl = new Control( false );
// Pass ownership to handle
- Control handle( *controlImpl );
+ Toolkit::Control handle( *controlImpl );
// Second-phase init of the implementation
// This can only be done after the CustomActor connection has been made...
return handle;
}
-ControlImpl::~ControlImpl()
+Control::~Control()
{
if( mImpl->mInitialized )
{
delete mImpl;
}
-void ControlImpl::Initialize()
+void Control::Initialize()
{
// Register with the style change processor so we are informed when the default style changes
Internal::StyleChangeProcessor::Register( this );
mImpl->mInitialized = true;
}
-void ControlImpl::EnableGestureDetection(Gesture::Type type)
+void Control::EnableGestureDetection(Gesture::Type type)
{
if ( (type & Gesture::Pinch) && !mImpl->mPinchGestureDetector )
{
}
}
-void ControlImpl::DisableGestureDetection(Gesture::Type type)
+void Control::DisableGestureDetection(Gesture::Type type)
{
if ( (type & Gesture::Pinch) && mImpl->mPinchGestureDetector )
{
}
}
-PinchGestureDetector ControlImpl::GetPinchGestureDetector() const
+PinchGestureDetector Control::GetPinchGestureDetector() const
{
return mImpl->mPinchGestureDetector;
}
-PanGestureDetector ControlImpl::GetPanGestureDetector() const
+PanGestureDetector Control::GetPanGestureDetector() const
{
return mImpl->mPanGestureDetector;
}
-TapGestureDetector ControlImpl::GetTapGestureDetector() const
+TapGestureDetector Control::GetTapGestureDetector() const
{
return mImpl->mTapGestureDetector;
}
-LongPressGestureDetector ControlImpl::GetLongPressGestureDetector() const
+LongPressGestureDetector Control::GetLongPressGestureDetector() const
{
return mImpl->mLongPressGestureDetector;
}
-void ControlImpl::SetBackgroundColor( const Vector4& color )
+void Control::SetBackgroundColor( const Vector4& color )
{
Background& background( mImpl->GetBackground() );
background.color = color;
}
-Vector4 ControlImpl::GetBackgroundColor() const
+Vector4 Control::GetBackgroundColor() const
{
if ( mImpl->mBackground )
{
return Color::TRANSPARENT;
}
-void ControlImpl::SetBackground( Image image )
+void Control::SetBackground( Image image )
{
Background& background( mImpl->GetBackground() );
Self().Add( imageActor );
}
-void ControlImpl::ClearBackground()
+void Control::ClearBackground()
{
if ( mImpl->mBackground )
{
}
}
-Actor ControlImpl::GetBackgroundActor() const
+Actor Control::GetBackgroundActor() const
{
if ( mImpl->mBackground )
{
return Actor();
}
-void ControlImpl::OnPinch(PinchGesture pinch)
+void Control::OnPinch(PinchGesture pinch)
{
if (pinch.state == Gesture::Started)
{
Self().SetScale(mImpl->mStartingPinchScale * pinch.scale);
}
-void ControlImpl::OnStageConnection()
+void Control::OnStageConnection()
{
RelayoutRequest();
OnControlStageConnection();
}
-void ControlImpl::OnStageDisconnection()
+void Control::OnStageDisconnection()
{
// Notify derived classes
OnControlStageDisconnection();
}
-void ControlImpl::OnChildAdd(Actor& child)
+void Control::OnChildAdd(Actor& child)
{
// If this is the background actor, then we do not want to relayout or inform deriving classes
if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
OnControlChildAdd( child );
}
-void ControlImpl::OnChildRemove(Actor& child)
+void Control::OnChildRemove(Actor& child)
{
// If this is the background actor, then we do not want to relayout or inform deriving classes
if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
OnControlChildRemove( child );
}
-void ControlImpl::OnSizeSet(const Vector3& targetSize)
+void Control::OnSizeSet(const Vector3& targetSize)
{
if( ( !mImpl->mLockSetSize ) && ( targetSize != mImpl->mSetSize ) )
{
}
}
-void ControlImpl::OnSizeAnimation(Animation& animation, const Vector3& targetSize)
+void Control::OnSizeAnimation(Animation& animation, const Vector3& targetSize)
{
// Do Nothing
}
-bool ControlImpl::OnTouchEvent(const TouchEvent& event)
+bool Control::OnTouchEvent(const TouchEvent& event)
{
return false; // Do not consume
}
-bool ControlImpl::OnKeyEvent(const KeyEvent& event)
+bool Control::OnKeyEvent(const KeyEvent& event)
{
return false; // Do not consume
}
-bool ControlImpl::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool Control::OnMouseWheelEvent(const MouseWheelEvent& event)
{
return false; // Do not consume
}
-void ControlImpl::OnKeyInputFocusGained()
+void Control::OnKeyInputFocusGained()
{
// Do Nothing
}
-void ControlImpl::OnKeyInputFocusLost()
+void Control::OnKeyInputFocusLost()
{
// Do Nothing
}
-Actor ControlImpl::GetChildByAlias(const std::string& actorAlias)
+Actor Control::GetChildByAlias(const std::string& actorAlias)
{
return Actor();
}
-bool ControlImpl::OnAccessibilityPan(PanGesture gesture)
+bool Control::OnAccessibilityPan(PanGesture gesture)
{
return false; // Accessibility pan gesture is not handled by default
}
-bool ControlImpl::OnAccessibilityValueChange(bool isIncrease)
+bool Control::OnAccessibilityValueChange(bool isIncrease)
{
return false; // Accessibility value change action is not handled by default
}
-void ControlImpl::SetKeyboardNavigationSupport(bool isSupported)
+void Control::SetKeyboardNavigationSupport(bool isSupported)
{
mImpl->mIsKeyboardNavigationSupported = isSupported;
}
-bool ControlImpl::IsKeyboardNavigationSupported()
+bool Control::IsKeyboardNavigationSupported()
{
return mImpl->mIsKeyboardNavigationSupported;
}
-void ControlImpl::SetAsKeyboardFocusGroup(bool isFocusGroup)
+void Control::SetAsKeyboardFocusGroup(bool isFocusGroup)
{
mImpl->mIsKeyboardFocusGroup = isFocusGroup;
// The following line will be removed when the deprecated API in KeyboardFocusManager is deleted
- KeyboardFocusManager::Get().SetAsFocusGroup(Self(), isFocusGroup);
+ Toolkit::KeyboardFocusManager::Get().SetAsFocusGroup(Self(), isFocusGroup);
}
-bool ControlImpl::IsKeyboardFocusGroup()
+bool Control::IsKeyboardFocusGroup()
{
- return KeyboardFocusManager::Get().IsFocusGroup(Self());
+ return Toolkit::KeyboardFocusManager::Get().IsFocusGroup(Self());
}
-Actor ControlImpl::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
{
return Actor();
}
-bool ControlImpl::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool Control::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
{
bool ret = false;
return ret;
}
-void ControlImpl::DoActivatedAction(const PropertyValueContainer& attributes)
+void Control::DoActivatedAction(const PropertyValueContainer& attributes)
{
OnActivated();
}
-Toolkit::Control::KeyEventSignalV2& ControlImpl::KeyEventSignal()
+Toolkit::Control::KeyEventSignalV2& Control::KeyEventSignal()
{
return mImpl->mKeyEventSignalV2;
}
-void ControlImpl::SetSizePolicy( Control::SizePolicy widthPolicy, Control::SizePolicy heightPolicy )
+void Control::SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy )
{
bool relayoutRequest( false );
}
}
-void ControlImpl::GetSizePolicy( Control::SizePolicy& widthPolicy, Control::SizePolicy& heightPolicy ) const
+void Control::GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const
{
widthPolicy = mImpl->mWidthPolicy;
heightPolicy = mImpl->mHeightPolicy;
}
-void ControlImpl::SetMinimumSize( const Vector3& size )
+void Control::SetMinimumSize( const Vector3& size )
{
if ( mImpl->mMinimumSize != size )
{
mImpl->mMinimumSize = size;
// Only relayout if our control is using the minimum or range policy.
- if ( ( mImpl->mHeightPolicy == Control::Minimum ) || ( mImpl->mWidthPolicy == Control::Minimum ) ||
- ( mImpl->mHeightPolicy == Control::Range ) || ( mImpl->mWidthPolicy == Control::Range ) )
+ if ( ( mImpl->mHeightPolicy == Toolkit::Control::Minimum ) || ( mImpl->mWidthPolicy == Toolkit::Control::Minimum ) ||
+ ( mImpl->mHeightPolicy == Toolkit::Control::Range ) || ( mImpl->mWidthPolicy == Toolkit::Control::Range ) )
{
RelayoutRequest();
}
}
}
-const Vector3& ControlImpl::GetMinimumSize() const
+const Vector3& Control::GetMinimumSize() const
{
return mImpl->mMinimumSize;
}
-void ControlImpl::SetMaximumSize( const Vector3& size )
+void Control::SetMaximumSize( const Vector3& size )
{
if ( mImpl->mMaximumSize != size )
{
mImpl->mMaximumSize = size;
// Only relayout if our control is using the maximum or range policy.
- if ( ( mImpl->mHeightPolicy == Control::Maximum ) || ( mImpl->mWidthPolicy == Control::Maximum ) ||
- ( mImpl->mHeightPolicy == Control::Range ) || ( mImpl->mWidthPolicy == Control::Range ) )
+ if ( ( mImpl->mHeightPolicy == Toolkit::Control::Maximum ) || ( mImpl->mWidthPolicy == Toolkit::Control::Maximum ) ||
+ ( mImpl->mHeightPolicy == Toolkit::Control::Range ) || ( mImpl->mWidthPolicy == Toolkit::Control::Range ) )
{
RelayoutRequest();
}
}
}
-const Vector3& ControlImpl::GetMaximumSize() const
+const Vector3& Control::GetMaximumSize() const
{
return mImpl->mMaximumSize;
}
-Vector3 ControlImpl::GetNaturalSize()
+Vector3 Control::GetNaturalSize()
{
// could be overridden in derived classes.
return mImpl->mSetSize;
}
-float ControlImpl::GetHeightForWidth( float width )
+float Control::GetHeightForWidth( float width )
{
// could be overridden in derived classes.
float height( 0.0f );
return height;
}
-float ControlImpl::GetWidthForHeight( float height )
+float Control::GetWidthForHeight( float height )
{
// could be overridden in derived classes.
float width( 0.0f );
return width;
}
-const Vector3& ControlImpl::GetControlSize() const
+const Vector3& Control::GetControlSize() const
{
return mImpl->mSize;
}
-const Vector3& ControlImpl::GetSizeSet() const
+const Vector3& Control::GetSizeSet() const
{
return mImpl->mSetSize;
}
-void ControlImpl::SetKeyInputFocus()
+void Control::SetKeyInputFocus()
{
if( Self().OnStage() )
{
- KeyInputFocusManager::Get().SetFocus(Control::DownCast(Self()));
+ Toolkit::KeyInputFocusManager::Get().SetFocus(Toolkit::Control::DownCast(Self()));
}
}
-bool ControlImpl::HasKeyInputFocus()
+bool Control::HasKeyInputFocus()
{
bool result = false;
if( Self().OnStage() )
{
- result = KeyInputFocusManager::Get().IsKeyboardListener(Control::DownCast(Self()));
+ result = Toolkit::KeyInputFocusManager::Get().IsKeyboardListener(Toolkit::Control::DownCast(Self()));
}
return result;
}
-void ControlImpl::ClearKeyInputFocus()
+void Control::ClearKeyInputFocus()
{
if( Self().OnStage() )
{
- KeyInputFocusManager::Get().RemoveFocus(Control::DownCast(Self()));
+ Toolkit::KeyInputFocusManager::Get().RemoveFocus(Toolkit::Control::DownCast(Self()));
}
}
-void ControlImpl::RelayoutRequest()
+void Control::RelayoutRequest()
{
Internal::RelayoutController::Get().Request();
}
-void ControlImpl::Relayout( Vector2 size, ActorSizeContainer& container )
+void Control::Relayout( Vector2 size, ActorSizeContainer& container )
{
// Avoids relayout again when OnSizeSet callback arrives.
{
OnRelaidOut( size, container );
}
-void ControlImpl::Relayout( Actor actor, Vector2 size, ActorSizeContainer& container )
+void Control::Relayout( Actor actor, Vector2 size, ActorSizeContainer& container )
{
if ( actor )
{
- Control control( Control::DownCast( actor ) );
+ Toolkit::Control control( Toolkit::Control::DownCast( actor ) );
if( control )
{
control.GetImplementation().NegotiateSize( size, container );
}
}
-void ControlImpl::OnRelaidOut( Vector2 size, ActorSizeContainer& container )
+void Control::OnRelaidOut( Vector2 size, ActorSizeContainer& container )
{
unsigned int numChildren = Self().GetChildCount();
}
}
-void ControlImpl::NegotiateSize( Vector2 allocatedSize, ActorSizeContainer& container )
+void Control::NegotiateSize( Vector2 allocatedSize, ActorSizeContainer& container )
{
Vector2 size;
- if ( mImpl->mWidthPolicy == Control::Fixed )
+ if ( mImpl->mWidthPolicy == Toolkit::Control::Fixed )
{
- if ( mImpl->mHeightPolicy == Control::Fixed )
+ if ( mImpl->mHeightPolicy == Toolkit::Control::Fixed )
{
// If a control says it has a fixed size, then use the size set by the application / control.
Vector2 setSize( mImpl->mSetSize );
}
else
{
- if ( mImpl->mHeightPolicy == Control::Fixed )
+ if ( mImpl->mHeightPolicy == Toolkit::Control::Fixed )
{
// Height is fixed so if the application / control has set it, then use that.
if ( !EqualsZero( mImpl->mSetSize.height ) )
Relayout( size, container );
}
-bool ControlImpl::EmitKeyEventSignal( const KeyEvent& event )
+bool Control::EmitKeyEventSignal( const KeyEvent& event )
{
// Guard against destruction during signal emission
Dali::Toolkit::Control handle( GetOwner() );
return consumed;
}
-void ControlImpl::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback )
+void Control::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback )
{
mImpl->SignalConnected( slotObserver, callback );
}
-void ControlImpl::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback )
+void Control::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback )
{
mImpl->SignalDisconnected( slotObserver, callback );
}
-std::size_t ControlImpl::GetConnectionCount() const
+std::size_t Control::GetConnectionCount() const
{
return mImpl->GetConnectionCount();
}
-ControlImpl::ControlImpl( bool requiresTouchEvents )
+Control::Control( bool requiresTouchEvents )
: CustomActorImpl( requiresTouchEvents ),
mImpl(new Impl(*this))
{
}
+} // namespace Internal
+
} // namespace Toolkit
} // namespace Dali
Control Control::New()
{
- // Use TypeRegistry to create instance of control so that the type-info matches Control rather than ControlImpl
- TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( typeid(Control) );
- DALI_ASSERT_ALWAYS( typeInfo && "TypeRegistry returning Invalid TypeInfo" );
-
- BaseHandle handle = typeInfo.CreateInstance();
- DALI_ASSERT_ALWAYS( handle && "Unable to Create Control" );
-
- Control control = DownCast( handle );
- DALI_ASSERT_ALWAYS( handle && "TypeRegistry did not create a Control" );
-
- return control;
+ return Internal::Control::New();
}
Control::Control()
}
Control::Control(const Control& uiControl)
-: CustomActor( uiControl ? static_cast<const ControlImpl&>( uiControl.GetImplementation() ).GetOwner() : NULL)
+: CustomActor( uiControl ? static_cast< const Internal::Control& >( uiControl.GetImplementation() ).GetOwner() : NULL)
{
}
Control Control::DownCast( BaseHandle handle )
{
- return DownCast<Control, ControlImpl>(handle);
+ return DownCast< Control, Internal::Control >(handle);
}
-ControlImpl& Control::GetImplementation()
+Internal::Control& Control::GetImplementation()
{
- return static_cast<ControlImpl&>(CustomActor::GetImplementation());
+ return static_cast<Internal::Control&>(CustomActor::GetImplementation());
}
-const ControlImpl& Control::GetImplementation() const
+const Internal::Control& Control::GetImplementation() const
{
- return static_cast<const ControlImpl&>(CustomActor::GetImplementation());
+ return static_cast<const Internal::Control&>(CustomActor::GetImplementation());
}
void Control::SetSizePolicy( SizePolicy widthPolicy, SizePolicy heightPolicy )
}
-Control::Control(ControlImpl& implementation)
+Control::Control(Internal::Control& implementation)
: CustomActor(implementation)
{
}
Control::Control(Dali::Internal::CustomActor* internal)
: CustomActor(internal)
{
- VerifyCustomActorPointer<ControlImpl>(internal);
+ VerifyCustomActorPointer<Internal::Control>(internal);
}
} // namespace Toolkit
}
ScrollComponentImpl::ScrollComponentImpl()
-: ControlImpl(true/*requires touch*/)
+: Control(true/*requires touch*/)
{
}
* Base class for scroll component implementations.
* Scroll-components such as scroll bars, indicators etc. are connected to scrollable containers via ScrollConnector.
*/
-class ScrollComponentImpl : public ControlImpl
+class ScrollComponentImpl : public Internal::Control
{
public:
class KeyInputFocusManager;
}
-typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size
+typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size
typedef std::vector< ActorSizePair > ActorSizeContainer; ///< Container of actors and their sizes
+namespace Internal
+{
+
/**
* @brief This is the internal base class for all controls.
*
* Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will
* be disconnected automatically when the control is destroyed.
*/
-class ControlImpl : public CustomActorImpl, public ConnectionTrackerInterface
+class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
{
public:
* If touch is required then the user can connect to this class' touch signal.
* @return A handle to the ConntrolImpl instance.
*/
- static Control New();
+ static Toolkit::Control New();
// Destruction
/**
* @brief Virtual destructor.
*/
- virtual ~ControlImpl();
+ virtual ~Control();
// Actions
* @param[in] loopEnabled Whether the focus movement should be looped within the control.
* @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
/**
* @brief Informs this control that its chosen focusable actor will be focused.
protected: // Construction
/**
- * @brief Create a ControlImpl.
+ * @brief Create a Control.
*
* @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required.
*/
- ControlImpl(bool requiresTouchEvents);
+ Control(bool requiresTouchEvents);
public:
// Size negotiation
/**
- * @copydoc Control::SetSizePolicy()
+ * @copydoc Toolkit::Control::SetSizePolicy()
*/
- void SetSizePolicy( Control::SizePolicy widthPolicy, Control::SizePolicy heightPolicy );
+ void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy );
/**
- * @copydoc Control::GetSizePolicy()
+ * @copydoc Toolkit::Control::GetSizePolicy()
*/
- void GetSizePolicy( Control::SizePolicy& widthPolicy, Control::SizePolicy& heightPolicy ) const;
+ void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const;
/**
- * @copydoc Control::SetMinimumSize()
+ * @copydoc Toolkit::Control::SetMinimumSize()
*/
void SetMinimumSize( const Vector3& size );
/**
- * @copydoc Control::GetMinimumSize()
+ * @copydoc Toolkit::Control::GetMinimumSize()
*/
const Vector3& GetMinimumSize() const;
/**
- * @copydoc Control::SetMaximumSize()
+ * @copydoc Toolkit::Control::SetMaximumSize()
*/
void SetMaximumSize( const Vector3& size );
/**
- * @copydoc Control::GetMaximumSize()
+ * @copydoc Toolkit::Control::GetMaximumSize()
*/
const Vector3& GetMaximumSize() const;
/**
- * @copydoc Control::GetNaturalSize()
+ * @copydoc Toolkit::Control::GetNaturalSize()
*/
virtual Vector3 GetNaturalSize();
/**
- * @copydoc Control::GetHeightForWidth()
+ * @copydoc Toolkit::Control::GetHeightForWidth()
*/
virtual float GetHeightForWidth( float width );
/**
- * @copydoc Control::GetWidthForHeight()
+ * @copydoc Toolkit::Control::GetWidthForHeight()
*/
virtual float GetWidthForHeight( float height );
//KeyInput
/**
- * @copydoc Control::SetKeyInputFocus()
+ * @copydoc Toolkit::Control::SetKeyInputFocus()
*/
void SetKeyInputFocus();
/**
- * @copydoc Control::HasKeyInputFocus()
+ * @copydoc Toolkit::Control::HasKeyInputFocus()
*/
bool HasKeyInputFocus();
/**
- * @copydoc Control::ClearKeyInputFocus()
+ * @copydoc Toolkit::Control::ClearKeyInputFocus()
*/
void ClearKeyInputFocus();
private:
// Undefined
- ControlImpl(const ControlImpl&);
- ControlImpl& operator=(const ControlImpl&);
+ Control(const Control&);
+ Control& operator=(const Control&);
class Impl;
Impl *mImpl;
friend class Internal::KeyInputFocusManager; ///< KeyInputFocusManager needs to call which is private.
};
+} // namespace Internal
+
+typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control
+
} // namespace Toolkit
} // namespace Dali
//Forward declarations.
-class ControlImpl;
+namespace Internal
+{
+class Control;
+}
/**
* @brief Control is the base class for all controls.
*
- * The implementation of the control must be supplied; see ControlImpl for more details.
- * @see ControlImpl
+ * The implementation of the control must be supplied; see Internal::Control for more details.
+ * @see Internal::Control
*/
class Control : public CustomActor, public ConnectionTrackerInterface
{
*
* @return The implementation.
*/
- ControlImpl& GetImplementation();
+ Internal::Control& GetImplementation();
/**
* @brief Retrieve the Control implementation.
*
* @return The implementation.
*/
- const ControlImpl& GetImplementation() const;
+ const Internal::Control& GetImplementation() const;
// Size Negotiation
* @param[in] implementation The implementation for this control.
* @return A handle to a newly allocated Dali resource.
*/
- Control(ControlImpl& implementation);
+ Control(Internal::Control& implementation);
/**
* @brief This constructor is used by CustomActor within Dali core to create additional Control handles
baseHandle = typeInfo.CreateInstance();
Handle handle = Handle::DownCast(baseHandle);
Actor actor = Actor::DownCast(handle);
- Control control = Control::DownCast(handle);
if(handle)
{
DALI_SCRIPT_VERBOSE(" Is Actor id=%d\n", actor.GetId());
}
+ Toolkit::Control control = Toolkit::Control::DownCast(handle);
if(control)
{
DALI_SCRIPT_VERBOSE(" Is Control id=%d\n", actor.GetId());
BloomView::BloomView()
- : ControlImpl( false ) // doesn't require touch events
+ : Control( false ) // doesn't require touch events
, mBlurNumSamples(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
, mBlurBellCurveWidth(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_BELL_CURVE_WIDTH)
, mPixelFormat(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
BloomView::BloomView( const unsigned int blurNumSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
const float downsampleWidthScale, const float downsampleHeightScale)
- : ControlImpl( false ) // doesn't require touch events
+ : Control( false ) // doesn't require touch events
, mBlurNumSamples(blurNumSamples)
, mBlurBellCurveWidth(blurBellCurveWidth)
, mPixelFormat(renderTargetPixelFormat)
/**
* BloomEffect implementation class
*/
-class BloomView : public ControlImpl
+class BloomView : public Control
{
public:
/**
Image shapeImage,
unsigned int maximumNumberOfBubble,
const Vector2& bubbleSizeRange )
-: ControlImpl( true ),
+: Control( true ),
mMovementArea( movementArea ),
mShapeImage( shapeImage ),
mTotalNumOfBubble( maximumNumberOfBubble ),
/**
* BubbleEmitter implementation class.
*/
-class BubbleEmitter : public ControlImpl
+class BubbleEmitter : public Control
{
public:
}
Cluster::Cluster(Toolkit::ClusterStyle& style)
-: ControlImpl(true/*requires touch*/),
+: Control(true/*requires touch*/),
mClusterStyle(style),
mExpandedCount(0)
{
* Multiple cluster styles may be provided, to determine the position, size, rotation, scale, color and visibility
* of the child actors in the cluster.
*/
-class Cluster : public ControlImpl
+class Cluster : public Control
{
public:
*/
void DoTransformAction(const PropertyValueContainer& attributes);
-private: // From ControlImpl
+private: // From Control
/**
- * From Toolkit::ControlImpl; called shortly before a child is removed from the owning actor.
+ * From Control; called shortly before a child is removed from the owning actor.
* @param[in] child The child being removed.Ptr
*/
virtual void OnControlChildRemove(Actor& child);
*/
static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
}
EffectsView::EffectsView()
-: ControlImpl( false ),
+: Control( false ),
mEffectType( Toolkit::EffectsView::INVALID_TYPE ),
mPixelFormat( EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT ),
mSpread(0.0f),
return mBackgroundColor;
}
-// From ControlImpl
+// From Control
void EffectsView::OnInitialize()
{
//////////////////////////////////////////////////////
* EffectsView implementation class
* @copydoc Dali::Toolkit::EffectsView
*/
-class EffectsView : public ControlImpl
+class EffectsView : public Control
{
public:
/// @copydoc Dali::Toolkit::EffectsView New()
*/
void SetupProperties();
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
GaussianBlurView::GaussianBlurView()
- : ControlImpl( false ) // doesn't require touch events
+ : Control( false ) // doesn't require touch events
, mNumSamples(GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
, mPixelFormat(GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
GaussianBlurView::GaussianBlurView( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
const float downsampleWidthScale, const float downsampleHeightScale,
bool blurUserImage)
- : ControlImpl( false ) // doesn't require touch events
+ : Control( false ) // doesn't require touch events
, mNumSamples(numSamples)
, mPixelFormat(renderTargetPixelFormat)
, mDownsampleWidthScale(downsampleWidthScale)
/**
* GaussianBlurView implementation class
*/
-class GaussianBlurView : public ControlImpl
+class GaussianBlurView : public Control
{
public:
}
ImageView::ImageView()
-: ControlImpl(true)
+: Control(true)
{
}
/**
* @copydoc Toolkit::ImageView
*/
-class ImageView : public ControlImpl
+class ImageView : public Control
{
public:
}
MaskedImageView::MaskedImageView()
-: ControlImpl(true),
+: Control(true),
mEditMode( Dali::Toolkit::MaskedImageView::EDIT_DISABLED ),
mSelfPropertySetting( false ),
mSourceRotation( Dali::Toolkit::MaskedImageView::ROTATE_0 ),
/**
* @copydoc Dali::Toolkit::MaskedImageView
*/
-class MaskedImageView : public ControlImpl
+class MaskedImageView : public Control
{
public:
}
Magnifier::Magnifier()
-: ControlImpl(true),
+: Control(true),
mPropertySourcePosition(Property::INVALID_INDEX),
mActorSize(Vector3::ZERO),
mMagnificationFactor(1.0f)
/**
* @copydoc Toolkit::Magnifier
*/
-class Magnifier : public ControlImpl
+class Magnifier : public Control
{
public:
}
NavigationControl::NavigationControl()
-: ControlImpl( true ),
+: Control( true ),
mToolBar(NULL),
mTitleBar(NULL),
mOrientationAngle( 0 ),
* NavigationControl implements a controller than manages the navigation of hierarchical contents.
* @see Dali::Toolkit::NavigationControl for more details.
*/
-class NavigationControl : public ControlImpl
+class NavigationControl : public Control
{
public:
*/
Toolkit::NavigationControl::ItemPoppedSignalV2& ItemPoppedSignal();
-private: // override functions from ControlImpl
+private: // override functions from Control
/**
- * @copydoc Toolkit::ControlImpl::OnInitialize()
+ * @copydoc Control::OnInitialize()
*/
virtual void OnInitialize();
/**
- * From ControlImpl; called after a child has been added to the owning actor.
+ * From Control; called after a child has been added to the owning actor.
* @param[in] child The child which has been added.
*/
virtual void OnControlChildAdd( Actor& child );
/**
- * @copydoc Toolkit::ControlImple::OnStageConnection()
+ * @copydoc Control::OnStageConnection()
*/
virtual void OnStageConnection();
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut()
+ * @copydoc Control::OnRelaidOut()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
/**
- * @copydoc Toolkit::ControlImpl::OnControlSizeSet
+ * @copydoc Control::OnControlSizeSet
*/
virtual void OnControlSizeSet( const Vector3& size );
/**
- * @copydoc Toolkit::ControlImpl::OnKeyEvent()
+ * @copydoc Control::OnKeyEvent()
*/
virtual bool OnKeyEvent( const KeyEvent& event );
} // unnamed namespace
Page::Page()
-: ControlImpl(false),
+: Control(false),
mTitle(""),
mSubTitle("")
{
* @see Dali::Toolkit::Page for more details
*/
-class Page : public ControlImpl
+class Page : public Control
{
public:
*/
Toolkit::Popup GetPopupMenu() const;
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
const float PageTurnView::STATIC_PAGE_INTERVAL_DISTANCE = 1.0f;
PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& pageSize )
-: ControlImpl( true ),
+: Control( true ),
mPageFactory( pageFactory ),
mPageSize( pageSize ),
mIsEditMode( false ),
namespace Internal
{
-class PageTurnView : public ControlImpl
+class PageTurnView : public Control
{
protected:
*/
void RenderPage( int pageIndex );
-private: // from ControlImpl
+private: // from Control
/**
* @copydoc Toolkit::Control::OnPan
}
RotatingSelector::RotatingSelector()
-: ControlImpl(true/*requires touch*/),
+: Control(true/*requires touch*/),
mSelected(false),
mSelectable(true),
mIsAnimating(false)
/**
* RotatingSelector is a custom control for text aligning and multiline support
*/
-class RotatingSelector : public ControlImpl
+class RotatingSelector : public Control
{
public:
*/
static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
} // namespace
ShadowView::ShadowView( float downsampleWidthScale, float downsampleHeightScale )
-: ControlImpl( false ), // doesn't require touch events
+: Control( false ), // doesn't require touch events
mChildrenRoot(Actor::New()),
mCachedShadowColor(DEFAULT_SHADOW_COLOR),
mCachedBackgroundColor(DEFAULT_SHADOW_COLOR.r, DEFAULT_SHADOW_COLOR.g, DEFAULT_SHADOW_COLOR.b, 0.0f),
/**
* ShadowView implementation class
*/
-class ShadowView : public ControlImpl
+class ShadowView : public Control
{
public:
{
// Properties
-const Property::Index Slider::LOWER_BOUND_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1;
-const Property::Index Slider::UPPER_BOUND_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 2;
+const Property::Index Slider::LOWER_BOUND_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX;
+const Property::Index Slider::UPPER_BOUND_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 1;
-const Property::Index Slider::VALUE_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 3;
-const Property::Index Slider::HIT_REGION_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 4;
-const Property::Index Slider::BACKING_REGION_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 5;
-const Property::Index Slider::HANDLE_REGION_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 6;
+const Property::Index Slider::VALUE_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 2;
+const Property::Index Slider::HIT_REGION_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 3;
+const Property::Index Slider::BACKING_REGION_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 4;
+const Property::Index Slider::HANDLE_REGION_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 5;
-const Property::Index Slider::BACKING_IMAGE_NAME_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 7;
-const Property::Index Slider::HANDLE_IMAGE_NAME_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 8;
-const Property::Index Slider::PROGRESS_IMAGE_NAME_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 9;
-const Property::Index Slider::POPUP_IMAGE_NAME_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 10;
-const Property::Index Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 11;
+const Property::Index Slider::BACKING_IMAGE_NAME_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 6;
+const Property::Index Slider::HANDLE_IMAGE_NAME_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 7;
+const Property::Index Slider::PROGRESS_IMAGE_NAME_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 8;
+const Property::Index Slider::POPUP_IMAGE_NAME_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 9;
+const Property::Index Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 10;
-const Property::Index Slider::DISABLE_COLOR_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 12;
-const Property::Index Slider::POPUP_TEXT_COLOR_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 13;
+const Property::Index Slider::DISABLE_COLOR_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 11;
+const Property::Index Slider::POPUP_TEXT_COLOR_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 12;
-const Property::Index Slider::VALUE_PRECISION_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 14;
+const Property::Index Slider::VALUE_PRECISION_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 13;
-const Property::Index Slider::SHOW_POPUP_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 15;
-const Property::Index Slider::SHOW_VALUE_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 16;
+const Property::Index Slider::SHOW_POPUP_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 14;
+const Property::Index Slider::SHOW_VALUE_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 15;
-const Property::Index Slider::ENABLED_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 17;
+const Property::Index Slider::ENABLED_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 16;
-const Property::Index Slider::MARKS_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 18;
-const Property::Index Slider::SNAP_TO_MARKS_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 19;
-const Property::Index Slider::MARK_TOLERANCE_PROPERTY = ControlImpl::CONTROL_PROPERTY_END_INDEX + 20;
+const Property::Index Slider::MARKS_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 17;
+const Property::Index Slider::SNAP_TO_MARKS_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 18;
+const Property::Index Slider::MARK_TOLERANCE_PROPERTY = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 19;
namespace Internal
{
}
Slider::Slider()
-: ControlImpl( true ),
+: Control( true ),
mState( NORMAL ),
mDisableColor( 0.0f, 0.0f, 0.0f, 0.0f ),
mPopupTextColor( 0.0f, 0.0f, 0.0f, 0.0f ),
Toolkit::TextView textView = Toolkit::TextView::New();
textView.SetParentOrigin( ParentOrigin::CENTER );
textView.SetAnchorPoint( AnchorPoint::CENTER );
- textView.SetSizePolicy( Control::Flexible, Control::Flexible );
+ textView.SetSizePolicy( Toolkit::Control::Flexible, Toolkit::Control::Flexible );
textView.SetZ( VALUE_DISPLAY_TEXT_Z );
return textView;
}
/**
* @copydoc Toolkit::Slider
*/
-class Slider : public ControlImpl
+class Slider : public Control
{
public:
+ // Properties
+ enum
+ {
+ SLIDER_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+ SLIDER_PROPERTY_END_INDEX = SLIDER_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
+ };
+
typedef Property::Array MarkList;
/**
virtual ~Slider();
/**
- * @copydoc Toolkit::ControlImpl::OnControlSizeSet( const Vector3& size )
+ * @copydoc Control::OnControlSizeSet( const Vector3& size )
*/
virtual void OnControlSizeSet( const Vector3& size );
} // unnamed namespace
SuperBlurView::SuperBlurView( unsigned int blurLevels )
-: ControlImpl( false ),
+: Control( false ),
mBlurLevels( blurLevels ),
mBlurStrengthPropertyIndex(Property::INVALID_INDEX),
mResourcesCleared( true ),
/**
* SuperBlurView implementation class
*/
-class SuperBlurView : public ControlImpl
+class SuperBlurView : public Control
{
public:
// Properties
enum
{
- SUPER_BLUR_VIEW_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1,
+ SUPER_BLUR_VIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
SUPER_BLUR_VIEW_PROPERTY_END_INDEX = SUPER_BLUR_VIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
};
*/
virtual ~SuperBlurView();
-private: // from ControlImpl
+private: // from Control
/**
* @copydoc Toolkit::Control::OnInitialize
virtual void OnControlSizeSet(const Vector3& targetSize);
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut()
+ * @copydoc Control::OnRelaidOut()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
}
ToolBar::ToolBar()
-: ControlImpl( false ), // doesn't require touch events
+: Control( false ), // doesn't require touch events
mLayout(),
mLeftOffset( 0 ),
mCenterBase( 1 ),
* ToolBar is a control to create a tool bar.
* @see Dali::Toolkit::ToolBar for more details.
*/
-class ToolBar : public ControlImpl
+class ToolBar : public Control
{
public:
*/
void RemoveControl( Dali::Actor control );
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
* Adds a control using some default values (the control uses 10% of the tool bar space and is placed on the left group).
* @param child The control to be added.
*
- * @see Toolkit::ControlImpl::OnControlChildAdd()
+ * @see Control::OnControlChildAdd()
*/
virtual void OnControlChildAdd(Actor& child);
}
View::View(bool fullscreen)
-: ControlImpl( false ), // doesn't require touch events
+: Control( false ), // doesn't require touch events
mOrientation( -1 ),
mFullScreen(fullscreen),
mContentLayers(),
* View is a control to add layers and a background.
* @see Dali::Toolkit::View for more details.
*/
-class View : public ControlImpl
+class View : public Control
{
private:
typedef std::map<unsigned int,Layer> LayerContainer;
*/
static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-private: // From ControlImpl
+private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()