PushButton pushButton = PushButton::New();
//Test various properties
- checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex(Button::PROPERTY_DIMMED), false);
+ checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex("dimmed"), false);
DALI_TEST_CHECK( false == checkBoxButton.IsDimmed() );
- checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex(Button::PROPERTY_DIMMED), true);
+ checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex("dimmed"), true);
DALI_TEST_CHECK( true == checkBoxButton.IsDimmed() );
- pushButton.SetProperty(pushButton.GetPropertyIndex(Button::PROPERTY_DIMMED), false);
+ pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), false);
DALI_TEST_CHECK( false == pushButton.IsDimmed() );
- pushButton.SetProperty(pushButton.GetPropertyIndex(Button::PROPERTY_DIMMED), true);
+ pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), true);
DALI_TEST_CHECK( true == pushButton.IsDimmed() );
}
application.Render();
// Make the third actor not focusable
- Property::Index propertyActorFocusable = third.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = third.GetPropertyIndex("is-focus-group");
third.SetProperty(propertyActorFocusable, false);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
// Make the second actor not focusable
- Property::Index propertyActorFocusable = second.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
second.SetProperty(propertyActorFocusable, false);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
// Make the second actor not focusable
- Property::Index propertyActorFocusable = second.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
second.SetProperty(propertyActorFocusable, false);
// flush the queue and render once
application.SendNotification();
//Test properties
std::string testString = "Hello World";
- popup.SetProperty(popup.GetPropertyIndex(Popup::PROPERTY_TITLE), testString);
+ popup.SetProperty(popup.GetPropertyIndex("title"), testString);
DALI_TEST_EQUALS( testString, popup.GetTitle().GetText(), TEST_LOCATION );
}
namespace
{
+const char* const PROPERTY_TEXT = "text";
+const char* const PROPERTY_MULTILINE_POLICY = "multiline-policy";
+const char* const PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
+const char* const PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
+const char* const PROPERTY_LINE_JUSTIFICATION = "line-justification";
+const char* const PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
+const char* const PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
+const char* const PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
+const char* const PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
+const char* const PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
+const char* const PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
+const char* const PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
+
bool TestEqual( float x, float y )
{
return !( fabsf( x - y ) > Math::MACHINE_EPSILON_1000 );
Stage::GetCurrent().Add( view );
//Test multiline policy property
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByNewLineChar");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByNewLineChar");
DALI_TEST_CHECK( Toolkit::TextView::SplitByNewLineChar == view.GetMultilinePolicy() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByWord");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByWord");
DALI_TEST_CHECK( Toolkit::TextView::SplitByWord == view.GetMultilinePolicy() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByChar");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByChar");
DALI_TEST_CHECK( Toolkit::TextView::SplitByChar == view.GetMultilinePolicy() );
//Test width exceed policy property
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "Original");
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "Original");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "Original");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "Original");
DALI_TEST_CHECK( Toolkit::TextView::Original == view.GetWidthExceedPolicy() );
DALI_TEST_CHECK( Toolkit::TextView::Original == view.GetHeightExceedPolicy() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "Fade");
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "Fade");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "Fade");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "Fade");
DALI_TEST_CHECK( Toolkit::TextView::Fade == view.GetWidthExceedPolicy() );
DALI_TEST_CHECK( Toolkit::TextView::Fade == view.GetHeightExceedPolicy() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "ShrinkToFit");
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "ShrinkToFit");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "ShrinkToFit");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "ShrinkToFit");
DALI_TEST_CHECK( Toolkit::TextView::ShrinkToFit == view.GetWidthExceedPolicy() );
DALI_TEST_CHECK( Toolkit::TextView::ShrinkToFit == view.GetHeightExceedPolicy() );
//Test line justification property
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Left");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Left");
DALI_TEST_CHECK( Toolkit::TextView::Left == view.GetLineJustification() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Center");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Center");
DALI_TEST_CHECK( Toolkit::TextView::Center == view.GetLineJustification() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Right");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Right");
DALI_TEST_CHECK( Toolkit::TextView::Right == view.GetLineJustification() );
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Justified");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Justified");
DALI_TEST_CHECK( Toolkit::TextView::Justified == view.GetLineJustification() );
//Test fade boundary property
unsigned int testValue = 23;
PixelSize leftFadeBoundary(testValue);
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_LEFT), testValue);
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_LEFT), testValue);
DALI_TEST_CHECK( leftFadeBoundary == view.GetFadeBoundary().mLeft );
testValue = 26;
PixelSize rightFadeBoundary(testValue);
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_RIGHT), testValue);
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_RIGHT), testValue);
DALI_TEST_CHECK( rightFadeBoundary == view.GetFadeBoundary().mRight );
testValue = 2;
PixelSize topFadeBoundary(testValue);
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_TOP), testValue);
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_TOP), testValue);
DALI_TEST_CHECK( topFadeBoundary == view.GetFadeBoundary().mTop );
testValue = 11;
PixelSize bottomFadeBoundary(testValue);
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_BOTTOM), testValue);
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_BOTTOM), testValue);
DALI_TEST_CHECK( bottomFadeBoundary == view.GetFadeBoundary().mBottom );
//Test Line height offset property
float testOffsetValue = 14.04f;
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_HEIGHT_OFFSET), testOffsetValue);
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_HEIGHT_OFFSET), testOffsetValue);
DALI_TEST_CHECK( PointSize(testOffsetValue) == view.GetLineHeightOffset() );
//Test alignment property
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HORIZONTAL_ALIGNMENT), "HorizontalLeft");
- view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_VERTICAL_ALIGNMENT), "VerticalTop");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_HORIZONTAL_ALIGNMENT), "HorizontalLeft");
+ view.SetProperty(view.GetPropertyIndex(PROPERTY_VERTICAL_ALIGNMENT), "VerticalTop");
DALI_TEST_CHECK( (Toolkit::Alignment::HorizontalLeft | Toolkit::Alignment::VerticalTop) == view.GetTextAlignment() );
}
class Button : public Control
{
public:
- //Signal Names
- static const char* const SIGNAL_CLICKED;
- /**
- * The names of custom properties installed by this control.
- */
- // Property Names
- static const char* const PROPERTY_DIMMED; ///< name "dimmed", type bool.
+ // Signal Names
+ static const char* const SIGNAL_CLICKED;
public:
static const char* const SIGNAL_TOUCHED_OUTSIDE;
static const char* const SIGNAL_HIDDEN;
- /**
- * The names of custom properties installed by this control.
- */
- // Property Names
- static const char* const PROPERTY_TITLE; ///< name "title", type string.
- static const char* const PROPERTY_STATE; ///< name "state", type string.
-
/**
* Current popup state
*/
*/
class ScrollViewCustomEffect : public ScrollViewEffect
{
- static const std::string ANCHOR_POINT_PROPERTY_NAME;
- static const std::string SCROLL_AMOUNT_PROPERTY_NAME; ///< Property, name "scroll-amount", type VECTOR3
-
public:
enum EFlag
{
public:
- static const std::string EFFECT_TIME;
- static const std::string EFFECT_REFERENCE;
- static const std::string EFFECT_DEPTH;
- static const std::string EFFECT_ACTIVATE;
static const float DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK;
public:
class TextView : public Control
{
public:
- //Signal Names
- static const char* const SIGNAL_TEXT_SCROLLED; ///< Signal emitted when the scroll position changes. @see SignalScrolled()
- /**
- * The names of custom properties installed by this control.
- */
- // Property Names
- static const char* const PROPERTY_TEXT; ///< name "text", type std::string
- static const char* const PROPERTY_MULTILINE_POLICY; ///< name "multiline-policy", type std::string
- static const char* const PROPERTY_WIDTH_EXCEED_POLICY; ///< name "width-exceed-policy", type std::string
- static const char* const PROPERTY_HEIGHT_EXCEED_POLICY; ///< name "height-exceed-policy", type std::string
- static const char* const PROPERTY_LINE_JUSTIFICATION; ///< name "line-justification", type std::string
- static const char* const PROPERTY_FADE_BOUNDARY_LEFT; ///< name "fade-boundary-left", type int
- static const char* const PROPERTY_FADE_BOUNDARY_RIGHT; ///< name "fade-boundary-right", type int
- static const char* const PROPERTY_FADE_BOUNDARY_TOP; ///< name "fade-boundary-top", type int
- static const char* const PROPERTY_FADE_BOUNDARY_BOTTOM; ///< name "fade-boundary-bottom", type int
- static const char* const PROPERTY_LINE_HEIGHT_OFFSET; ///< name "line-height-offset", type float
- static const char* const PROPERTY_HORIZONTAL_ALIGNMENT; ///< name "horizontal-alignment", type std::string
- static const char* const PROPERTY_VERTICAL_ALIGNMENT; ///< name "vertical-alignment", type std::string
+ // Signal Names
+ static const char* const SIGNAL_TEXT_SCROLLED; ///< Signal emitted when the scroll position changes. @see SignalScrolled()
/**
* Structure used to retrieve Layout info per character.
class FocusManager : public BaseHandle
{
public:
- //Signal Names
+ // Signal Names
static const char* const SIGNAL_FOCUS_CHANGED;
static const char* const SIGNAL_FOCUS_OVERSHOT;
static const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED;
- // Property Names
- static const std::string ACTOR_FOCUSABLE; ///< name "focusable", type bool
- static const std::string IS_FOCUS_GROUP; ///< name "is-focus-group", type bool
-
/**
* Accessibility needs four information which will be read by screen-reader.
* Reading order : Label -> Trait -> Optional (Value and Hint)
#include "button-impl.h"
+namespace
+{
+const char* const PROPERTY_DIMMED = "dimmed";
+} // unnamed namespace
+
namespace Dali
{
OnButtonInitialize();
Actor self = Self();
- mPropertyDimmed = self.RegisterProperty( Dali::Toolkit::Button::PROPERTY_DIMMED, false, Property::READ_WRITE );
+ mPropertyDimmed = self.RegisterProperty( PROPERTY_DIMMED, false, Property::READ_WRITE );
self.SetKeyboardFocusable( true );
}
const Vector3 DEFAULT_DIALOG_SIZE = Vector3(POPUP_TITLE_WIDTH/POPUP_WIDTH, 0.5f, 0.0f);
const Vector3 DEFAULT_BOTTOM_SIZE = Vector3(1.0f, 0.2f, 0.0f);
+const char* const PROPERTY_TITLE = "title";
+const char* const PROPERTY_STATE = "state";
+
// Constraints ///////////////////////////////////////////////////////////////////////////
/**
// Hide content by default.
SetState( Toolkit::Popup::POPUP_HIDE, 0.0f );
- mPropertyTitle = self.RegisterProperty( Dali::Toolkit::Popup::PROPERTY_TITLE, "", Property::READ_WRITE );
- mPropertyState = self.RegisterProperty( Dali::Toolkit::Popup::PROPERTY_STATE, "POPUP_HIDE", Property::READ_WRITE );
+ mPropertyTitle = self.RegisterProperty( PROPERTY_TITLE, "", Property::READ_WRITE );
+ mPropertyState = self.RegisterProperty( PROPERTY_STATE, "POPUP_HIDE", Property::READ_WRITE );
// Make self as keyboard focusable and focus group
self.SetKeyboardFocusable(true);
namespace // unnamed namespace
{
+const char * const EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
+const char * const EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
+const char * const EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
+const char * const EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
+
const float TWISTEFFECT_ANIMATION_MAX_TIME = 60.0f; ///< Animation time (every time finishes, checks if it needs to go again)
const float TWISTEFFECT_DEFAULT_DROPOFF = 0.7f; ///< Default drop off amount
const float TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_X = 720.0f; ///< Default drop off distance
if( mFlags & FlagScale )
{
constraint = Constraint::New<Vector3>( Actor::SCALE,
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_DEPTH ) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_DEPTH ) ),
ScrollTwistScaleConstraint(mScaleFactor) );
constraint.SetRemoveAction( Constraint::Discard );
child.ApplyConstraint( constraint );
constraint = Constraint::New<Vector3>( Actor::POSITION,
ParentSource(Actor::POSITION),
Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_REFERENCE ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_TIME ) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_REFERENCE ) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_TIME ) ),
Source(scrollView, Actor::SIZE),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
ScrollTwistPositionConstraint(mDelayMin, mDelayMax) );
constraint.SetRemoveAction( Constraint::Discard );
child.ApplyConstraint( constraint );
Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
Source(scrollView, Actor::SIZE ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
ScrollDropoffTwistRotationConstraint(mMaxSwingAngle, mDropOff, mDropOffDistance, mDropOffFunction) );
}
else
constraint = Constraint::New<Quaternion>( Actor::ROTATION,
Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+ Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
ScrollTwistRotationConstraint(mMaxSwingAngle) );
}
constraint.SetRemoveAction( Constraint::Discard );
// Create effect-time property if not already created.
if(mPropertyTime == Property::INVALID_INDEX)
{
- mPropertyTime = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_TIME, 0.0f );
- mPropertyReference = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_REFERENCE, Vector3::ZERO );
- mPropertyDepth = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_DEPTH, 0.0f);
- mPropertyActivate = SafeRegisterProperty(scrollView,Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE,1.0f);
+ mPropertyTime = SafeRegisterProperty( scrollView, EFFECT_TIME, 0.0f );
+ mPropertyReference = SafeRegisterProperty( scrollView, EFFECT_REFERENCE, Vector3::ZERO );
+ mPropertyDepth = SafeRegisterProperty( scrollView, EFFECT_DEPTH, 0.0f);
+ mPropertyActivate = SafeRegisterProperty(scrollView, EFFECT_ACTIVATE, 1.0f);
}
// Connect to the scroll view signals
namespace
{
+const char* const PROPERTY_TEXT = "text";
+const char* const PROPERTY_MULTILINE_POLICY = "multiline-policy";
+const char* const PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
+const char* const PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
+const char* const PROPERTY_LINE_JUSTIFICATION = "line-justification";
+const char* const PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
+const char* const PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
+const char* const PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
+const char* const PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
+const char* const PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
+const char* const PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
+const char* const PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
+
// Currently on desktop machines 2k x 2k is the maximum frame buffer size, on target is 4k x 4k.
const float MAX_OFFSCREEN_RENDERING_SIZE = 2048.f;
{
Actor self = Self();
- mPropertyText = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_TEXT, "", Property::READ_WRITE );
+ mPropertyText = self.RegisterProperty( PROPERTY_TEXT, "", Property::READ_WRITE );
- mPropertyMultilinePolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_MULTILINE_POLICY, "SplitByNewLineChar", Property::READ_WRITE );
+ mPropertyMultilinePolicy = self.RegisterProperty( PROPERTY_MULTILINE_POLICY, "SplitByNewLineChar", Property::READ_WRITE );
- mPropertyWidthExceedPolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_WIDTH_EXCEED_POLICY, "Original", Property::READ_WRITE );
+ mPropertyWidthExceedPolicy = self.RegisterProperty( PROPERTY_WIDTH_EXCEED_POLICY, "Original", Property::READ_WRITE );
- mPropertyHeightExceedPolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_HEIGHT_EXCEED_POLICY, "Original", Property::READ_WRITE );
+ mPropertyHeightExceedPolicy = self.RegisterProperty( PROPERTY_HEIGHT_EXCEED_POLICY, "Original", Property::READ_WRITE );
- mPropertyLineJustification = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_LINE_JUSTIFICATION, "Left", Property::READ_WRITE );
+ mPropertyLineJustification = self.RegisterProperty( PROPERTY_LINE_JUSTIFICATION, "Left", Property::READ_WRITE );
- mPropertyFadeBoundaryLeft = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_LEFT, static_cast< int >( 0 ), Property::READ_WRITE );
+ mPropertyFadeBoundaryLeft = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_LEFT, static_cast< int >( 0 ), Property::READ_WRITE );
- mPropertyFadeBoundaryRight = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_RIGHT, static_cast< int >( 0 ), Property::READ_WRITE );
+ mPropertyFadeBoundaryRight = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_RIGHT, static_cast< int >( 0 ), Property::READ_WRITE );
- mPropertyFadeBoundaryTop = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_TOP, static_cast< int >( 0 ), Property::READ_WRITE );
+ mPropertyFadeBoundaryTop = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_TOP, static_cast< int >( 0 ), Property::READ_WRITE );
- mPropertyFadeBoundaryBottom = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_BOTTOM, static_cast< int >( 0 ), Property::READ_WRITE );
+ mPropertyFadeBoundaryBottom = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_BOTTOM, static_cast< int >( 0 ), Property::READ_WRITE );
- mPropertyLineHeightOffset = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_LINE_HEIGHT_OFFSET, 0.0f, Property::READ_WRITE );
+ mPropertyLineHeightOffset = self.RegisterProperty( PROPERTY_LINE_HEIGHT_OFFSET, 0.0f, Property::READ_WRITE );
- mPropertyHorizontalAlignment = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_HORIZONTAL_ALIGNMENT, "HorizontalCenter", Property::READ_WRITE );
+ mPropertyHorizontalAlignment = self.RegisterProperty( PROPERTY_HORIZONTAL_ALIGNMENT, "HorizontalCenter", Property::READ_WRITE );
- mPropertyVerticalAlignment = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_VERTICAL_ALIGNMENT, "VerticalCenter", Property::READ_WRITE );
+ mPropertyVerticalAlignment = self.RegisterProperty( PROPERTY_VERTICAL_ALIGNMENT, "VerticalCenter", Property::READ_WRITE );
}
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FOCUS_MANAGER");
#endif
+const char * const ACTOR_FOCUSABLE("focusable");
+const char * const IS_FOCUS_GROUP("is-focus-group");
+
const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "B16-8_TTS_focus.png";
const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
&& actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
{
// Check whether the actor is focusable
- Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable != Property::INVALID_INDEX)
{
hittable = actor.GetProperty<bool>(propertyActorFocusable);
mFocusIDContainer.erase(GetFocusOrder(actor));
// Create actor focusable property if not already created.
- Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable == Property::INVALID_INDEX)
{
- propertyActorFocusable = actor.RegisterProperty(Toolkit::FocusManager::ACTOR_FOCUSABLE, true);
+ propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, true);
}
if(order == 0)
{
// Check whether the actor is focusable
bool actorFocusable = false;
- Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable != Property::INVALID_INDEX)
{
actorFocusable = actor.GetProperty<bool>(propertyActorFocusable);
if(actor)
{
// Create focus group property if not already created.
- Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(Toolkit::FocusManager::IS_FOCUS_GROUP);
+ Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
if(propertyIsFocusGroup == Property::INVALID_INDEX)
{
- propertyIsFocusGroup = actor.RegisterProperty(Toolkit::FocusManager::IS_FOCUS_GROUP, isFocusGroup);
+ propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
}
else
{
if(actor)
{
- Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(Toolkit::FocusManager::IS_FOCUS_GROUP);
+ Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
if(propertyIsFocusGroup != Property::INVALID_INDEX)
{
isFocusGroup = actor.GetProperty<bool>(propertyIsFocusGroup);
if(actor)
{
// Create actor focusable property if not already created.
- Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+ Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable == Property::INVALID_INDEX)
{
- propertyActorFocusable = actor.RegisterProperty(Toolkit::FocusManager::ACTOR_FOCUSABLE, focusable);
+ propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
}
else
{
{
const char* const Button::SIGNAL_CLICKED = "clicked";
-const char* const Button::PROPERTY_DIMMED = "dimmed";
Button::Button()
{}
const char* const Popup::SIGNAL_TOUCHED_OUTSIDE = "touched-outside";
const char* const Popup::SIGNAL_HIDDEN = "hidden";
-const char* const Popup::PROPERTY_TITLE = "title";
-const char* const Popup::PROPERTY_STATE = "state";
Popup::Popup()
{
namespace Toolkit
{
-const std::string ScrollViewTwistEffect::EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
-const std::string ScrollViewTwistEffect::EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
-const std::string ScrollViewTwistEffect::EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
-const std::string ScrollViewTwistEffect::EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
-
const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
ScrollViewTwistEffect ScrollViewTwistEffect::New()
const char* const TextView::SIGNAL_TEXT_SCROLLED = "scrolled";
-const char* const TextView::PROPERTY_TEXT = "text";
-const char* const TextView::PROPERTY_MULTILINE_POLICY = "multiline-policy";
-const char* const TextView::PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
-const char* const TextView::PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
-const char* const TextView::PROPERTY_LINE_JUSTIFICATION = "line-justification";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
-const char* const TextView::PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
-const char* const TextView::PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
-const char* const TextView::PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
TextView::CharacterLayoutInfo::CharacterLayoutInfo()
: mSize(),
const char* const FocusManager::SIGNAL_FOCUS_CHANGED = "focus-changed";
const char* const FocusManager::SIGNAL_FOCUS_OVERSHOT = "focus-overshot";
const char* const FocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED = "focused-actor-activated";
-const std::string FocusManager::ACTOR_FOCUSABLE("focusable");
-const std::string FocusManager::IS_FOCUS_GROUP("is-focus-group");
FocusManager::FocusManager()
{