#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
using namespace Dali;
using namespace Toolkit;
DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_SHADOW ) == TextLabel::Property::SHADOW );
DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_EMBOSS ) == TextLabel::Property::EMBOSS );
DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextLabel::Property::OUTLINE );
- DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == DevelTextLabel::Property::PIXEL_SIZE );
- DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == DevelTextLabel::Property::ELLIPSIS );
- DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY ) == DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == TextLabel::Property::PIXEL_SIZE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == TextLabel::Property::ELLIPSIS );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY ) == TextLabel::Property::AUTO_SCROLL_LOOP_DELAY );
END_TEST;
}
DALI_TEST_EQUALS( SCROLL_LOOPS, label.GetProperty<int>( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, SCROLL_GAP );
DALI_TEST_EQUALS( SCROLL_GAP, label.GetProperty<float>( TextLabel::Property::AUTO_SCROLL_GAP ), TEST_LOCATION );
- label.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY, SCROLL_LOOP_DELAY );
- DALI_TEST_EQUALS( SCROLL_LOOP_DELAY, label.GetProperty<float>( DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY ), TEST_LOCATION );
+ label.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, SCROLL_LOOP_DELAY );
+ DALI_TEST_EQUALS( SCROLL_LOOP_DELAY, label.GetProperty<float>( TextLabel::Property::AUTO_SCROLL_LOOP_DELAY ), TEST_LOCATION );
//Check autoscroll stop type property
- label.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
- DALI_TEST_EQUALS( STOP_IMMEDIATE, label.GetProperty<std::string>( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
+ DALI_TEST_EQUALS( STOP_IMMEDIATE, label.GetProperty<std::string>( TextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
- label.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
- DALI_TEST_EQUALS( STOP_FINISH_LOOP, label.GetProperty<std::string>( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
+ DALI_TEST_EQUALS( STOP_FINISH_LOOP, label.GetProperty<std::string>( TextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
// Check the line spacing property
DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
// Check the pixel size of font
- label.SetProperty( DevelTextLabel::Property::PIXEL_SIZE, 20.f );
- DALI_TEST_EQUALS( label.GetProperty<float>( DevelTextLabel::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::PIXEL_SIZE, 20.f );
+ DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Check the ellipsis property
- DALI_TEST_CHECK( !label.GetProperty<bool>( DevelTextLabel::Property::ELLIPSIS ) );
- label.SetProperty( DevelTextLabel::Property::ELLIPSIS, true );
- DALI_TEST_CHECK( label.GetProperty<bool>( DevelTextLabel::Property::ELLIPSIS ) );
+ DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
+ label.SetProperty( TextLabel::Property::ELLIPSIS, true );
+ DALI_TEST_CHECK( label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
END_TEST;
}
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelImmediate.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
+ labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
Stage::GetCurrent().Add( labelFinished );
// Turn on all the effects
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelFinished.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+ labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelShort.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
+ labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
Stage::GetCurrent().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelLong.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+ labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
try
{
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelShort.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
+ labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
Stage::GetCurrent().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelLong.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+ labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
try
{
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelShort.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
+ labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
Stage::GetCurrent().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelLong.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+ labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
try
{
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelShort.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );
+ labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
Stage::GetCurrent().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3 );
labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
- labelLong.SetProperty( DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP );
+ labelLong.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
try
{
//label.SetProperty( TextLabel::Property::POINT_SIZE, 18 );
Stage::GetCurrent().Add( label );
- label.SetProperty( DevelTextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_WORD" );
+ label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_WORD" );
application.SendNotification();
application.Render();
- lineCount = label.GetProperty<int>( DevelTextLabel::Property::LINE_COUNT );
+ lineCount = label.GetProperty<int>( TextLabel::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
- label.SetProperty( DevelTextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_CHARACTER" );
+ label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_CHARACTER" );
application.SendNotification();
application.Render();
- lineCount = label.GetProperty<int>( DevelTextLabel::Property::LINE_COUNT );
+ lineCount = label.GetProperty<int>( TextLabel::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
END_TEST;
ToolkitTestApplication application;
TextLabel label = TextLabel::New();
- label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::RED );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ), 1.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
-
- label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 1.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
-
- label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::BLUE );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ), 1.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
-
- label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ALPHA, 0.6f );
- DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 0.6f, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty< Vector4 >( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::RED );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_RED ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_BLUE ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_RED ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_GREEN ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_BLUE ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_RED ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_BLUE ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::TEXT_COLOR_ALPHA, 0.6f );
+ DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_ALPHA ), 0.6f, TEST_LOCATION );
DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
END_TEST;
}
+++ /dev/null
-#ifndef DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
-#define DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
-
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelTextLabel
-{
-
-/**
- * @brief Enumeration for the start and end property ranges for this control.
- * @SINCE_1_0.0
- */
-enum PropertyRange
-{
- ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
- ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices
-};
-
-namespace Property
-{
- enum Type
- {
- ///////////////////////////////////////////////////////////////////////////////
- // Event side (non-animatable) properties
- ///////////////////////////////////////////////////////////////////////////////
-
- RENDERING_BACKEND = Dali::Toolkit::TextLabel::Property::RENDERING_BACKEND,
- TEXT = Dali::Toolkit::TextLabel::Property::TEXT,
- FONT_FAMILY = Dali::Toolkit::TextLabel::Property::FONT_FAMILY,
- FONT_STYLE = Dali::Toolkit::TextLabel::Property::FONT_STYLE,
- POINT_SIZE = Dali::Toolkit::TextLabel::Property::POINT_SIZE,
- MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE,
- HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,
- VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,
- TEXT_COLOR = Dali::Toolkit::TextLabel::Property::TEXT_COLOR,
- SHADOW_OFFSET = Dali::Toolkit::TextLabel::Property::SHADOW_OFFSET,
- SHADOW_COLOR = Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,
- UNDERLINE_ENABLED = Dali::Toolkit::TextLabel::Property::UNDERLINE_ENABLED,
- UNDERLINE_COLOR = Dali::Toolkit::TextLabel::Property::UNDERLINE_COLOR,
- UNDERLINE_HEIGHT = Dali::Toolkit::TextLabel::Property::UNDERLINE_HEIGHT,
- ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP,
- ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,
- AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED,
- AUTO_SCROLL_LOOP_COUNT = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT,
- AUTO_SCROLL_GAP = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_GAP,
- LINE_SPACING = Dali::Toolkit::TextLabel::Property::LINE_SPACING,
- UNDERLINE = Dali::Toolkit::TextLabel::Property::UNDERLINE,
- SHADOW = Dali::Toolkit::TextLabel::Property::SHADOW,
- EMBOSS = Dali::Toolkit::TextLabel::Property::EMBOSS,
- OUTLINE = Dali::Toolkit::TextLabel::Property::OUTLINE,
-
- /**
- * @brief The size of font in pixels.
- * @details Name "pixelSize", type Property::FLOAT.
- * Conversion from Point size to Pixel size:
- * Pixel size = Point size * DPI / 72
- */
- PIXEL_SIZE = OUTLINE + 1,
-
- /**
- * @brief Enable or disable the ellipsis.
- * @details Name "ellipsis", type Property::BOOLEAN.
- */
- ELLIPSIS = OUTLINE + 2,
-
- /**
- * @brief delay starting time of auto scrolling and further loops
- * @details Name "autoScrollLoopDelay", type Property::FLOAT.
- */
- AUTO_SCROLL_LOOP_DELAY = OUTLINE + 3,
-
- /**
- * @brief Auto scrolling stop behaviour.
- * @details Name "autoScrollStopMode", type [Type](@ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode::Type) (Property::INTEGER) or Property::STRING.
- * Values FINISH_LOOP, IMMEDIATE, default FINISH_LOOP
- */
- AUTO_SCROLL_STOP_MODE = OUTLINE + 4,
-
- /*
- * @brief The line count of text.
- * @details name "lineCount", type int
- * @node This property is read-only.
- */
- LINE_COUNT = OUTLINE + 5,
-
- /**
- * @brief line wrap mode when the text lines over layout width.
- * @details Name "lineWrapMode", type Property::STRING.
- */
- LINE_WRAP_MODE = OUTLINE + 6,
-
- ///////////////////////////////////////////////////////////////////////////////
- // Animatable Properties
- ///////////////////////////////////////////////////////////////////////////////
-
- /*
- * @brief Animatable text color.
- * @details Name "textColorAnimatable", type Property::VECTOR4.
- * Text color property to use if required to animate the text color.
- */
- TEXT_COLOR_ANIMATABLE = ANIMATABLE_PROPERTY_START_INDEX,
-
- /**
- * @brief The red component of the text color.
- * @details Name "textColorRed", type Property::FLOAT.
- * @see TEXT_COLOR_ANIMATABLE
- */
- TEXT_COLOR_RED = ANIMATABLE_PROPERTY_START_INDEX + 1,
-
- /**
- * @brief The green component of the text color.
- * @details Name "textColorGreen", type Property::FLOAT.
- * @see TEXT_COLOR_ANIMATABLE
- */
- TEXT_COLOR_GREEN = ANIMATABLE_PROPERTY_START_INDEX + 2,
-
- /**
- * @brief The blue component of the text color.
- * @details Name "textColorBlue", type Property::FLOAT.
- * @see TEXT_COLOR_ANIMATABLE
- */
- TEXT_COLOR_BLUE = ANIMATABLE_PROPERTY_START_INDEX + 3,
-
- /**
- * @brief The alpha component of the text color.
- * @details Name "textColorAlpha", type Property::FLOAT.
- * @see TEXT_COLOR_ANIMATABLE
- */
- TEXT_COLOR_ALPHA = ANIMATABLE_PROPERTY_START_INDEX + 4,
- };
-} // namespace Property
-
-/**
-* @brief The type for TextLabel::Property::AUTO_SCROLL_STOP_MODE
-*/
-namespace AutoScrollStopMode
-{
-/**
-* @ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode
-*/
-enum Type
-{
- FINISH_LOOP = 0, ///< stop animation after current loop finished.
- IMMEDIATE ///< stop animation immediatly and reset position.
-};
-} // namespace AutoScrollStopMode
-
-} // namespace DevelText
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
$(devel_api_src_dir)/controls/text-controls/hidden-input-properties.h \
$(devel_api_src_dir)/controls/text-controls/text-editor-devel.h \
$(devel_api_src_dir)/controls/text-controls/text-field-devel.h \
- $(devel_api_src_dir)/controls/text-controls/text-label-devel.h \
$(devel_api_src_dir)/controls/text-controls/text-selection-popup.h \
$(devel_api_src_dir)/controls/text-controls/text-selection-toolbar.h
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/text/rendering-backend.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
#include <dali-toolkit/internal/text/property-string-parser.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
#include <dali-toolkit/internal/text/text-effects-style.h>
const Scripting::StringEnum AUTO_SCROLL_STOP_MODE_TABLE[] =
{
- { "IMMEDIATE", Toolkit::DevelTextLabel::AutoScrollStopMode::IMMEDIATE },
- { "FINISH_LOOP", Toolkit::DevelTextLabel::AutoScrollStopMode::FINISH_LOOP },
+ { "IMMEDIATE", Toolkit::TextLabel::AutoScrollStopMode::IMMEDIATE },
+ { "FINISH_LOOP", Toolkit::TextLabel::AutoScrollStopMode::FINISH_LOOP },
};
const unsigned int AUTO_SCROLL_STOP_MODE_TABLE_COUNT = sizeof( AUTO_SCROLL_STOP_MODE_TABLE ) / sizeof( AUTO_SCROLL_STOP_MODE_TABLE[0] );
// Setup properties, signals and actions using the type-registry.
DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextLabel, Toolkit::Control, Create );
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "renderingBackend", INTEGER, RENDERING_BACKEND ) // Deprecated property
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "text", STRING, TEXT )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontFamily", STRING, FONT_FAMILY )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontStyle", MAP, FONT_STYLE )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "pointSize", FLOAT, POINT_SIZE )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "multiLine", BOOLEAN, MULTI_LINE )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "horizontalAlignment", STRING, HORIZONTAL_ALIGNMENT )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "verticalAlignment", STRING, VERTICAL_ALIGNMENT )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "textColor", VECTOR4, TEXT_COLOR )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadowOffset", VECTOR2, SHADOW_OFFSET )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadowColor", VECTOR4, SHADOW_COLOR )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineEnabled", BOOLEAN, UNDERLINE_ENABLED )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineColor", VECTOR4, UNDERLINE_COLOR )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineHeight", FLOAT, UNDERLINE_HEIGHT )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "enableMarkup", BOOLEAN, ENABLE_MARKUP )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "enableAutoScroll", BOOLEAN, ENABLE_AUTO_SCROLL )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollSpeed", INTEGER, AUTO_SCROLL_SPEED )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopCount", INTEGER, AUTO_SCROLL_LOOP_COUNT )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollGap", FLOAT, AUTO_SCROLL_GAP )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineSpacing", FLOAT, LINE_SPACING )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underline", MAP, UNDERLINE )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadow", MAP, SHADOW )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "emboss", MAP, EMBOSS )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "outline", MAP, OUTLINE )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "pixelSize", FLOAT, PIXEL_SIZE )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "ellipsis", BOOLEAN, ELLIPSIS )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopDelay", FLOAT, AUTO_SCROLL_LOOP_DELAY )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollStopMode", STRING, AUTO_SCROLL_STOP_MODE )
-DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "lineCount", INTEGER, LINE_COUNT )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineWrapMode", STRING, LINE_WRAP_MODE )
-DALI_DEVEL_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT( Toolkit, TextLabel, "textColorAnimatable", Color::BLACK, TEXT_COLOR_ANIMATABLE )
-DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorRed", TEXT_COLOR_RED, TEXT_COLOR_ANIMATABLE, 0)
-DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorGreen", TEXT_COLOR_GREEN, TEXT_COLOR_ANIMATABLE, 1)
-DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorBlue", TEXT_COLOR_BLUE, TEXT_COLOR_ANIMATABLE, 2)
-DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorAlpha", TEXT_COLOR_ALPHA, TEXT_COLOR_ANIMATABLE, 3)
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "renderingBackend", INTEGER, RENDERING_BACKEND )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "text", STRING, TEXT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontFamily", STRING, FONT_FAMILY )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontStyle", MAP, FONT_STYLE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "pointSize", FLOAT, POINT_SIZE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "multiLine", BOOLEAN, MULTI_LINE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "horizontalAlignment", STRING, HORIZONTAL_ALIGNMENT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "verticalAlignment", STRING, VERTICAL_ALIGNMENT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "unusedPropertyTextColor", VECTOR4, UNUSED_PROPERTY_TEXT_COLOR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadowOffset", VECTOR2, SHADOW_OFFSET )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadowColor", VECTOR4, SHADOW_COLOR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineEnabled", BOOLEAN, UNDERLINE_ENABLED )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineColor", VECTOR4, UNDERLINE_COLOR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underlineHeight", FLOAT, UNDERLINE_HEIGHT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "enableMarkup", BOOLEAN, ENABLE_MARKUP )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "enableAutoScroll", BOOLEAN, ENABLE_AUTO_SCROLL )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollSpeed", INTEGER, AUTO_SCROLL_SPEED )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopCount", INTEGER, AUTO_SCROLL_LOOP_COUNT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollGap", FLOAT, AUTO_SCROLL_GAP )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineSpacing", FLOAT, LINE_SPACING )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underline", MAP, UNDERLINE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadow", MAP, SHADOW )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "emboss", MAP, EMBOSS )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "outline", MAP, OUTLINE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "pixelSize", FLOAT, PIXEL_SIZE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "ellipsis", BOOLEAN, ELLIPSIS )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopDelay", FLOAT, AUTO_SCROLL_LOOP_DELAY )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollStopMode", STRING, AUTO_SCROLL_STOP_MODE )
+DALI_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "lineCount", INTEGER, LINE_COUNT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineWrapMode", STRING, LINE_WRAP_MODE )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT( Toolkit, TextLabel, "textColor", Color::BLACK, TEXT_COLOR )
+DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorRed", TEXT_COLOR_RED, TEXT_COLOR, 0 )
+DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorGreen", TEXT_COLOR_GREEN, TEXT_COLOR, 1 )
+DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorBlue", TEXT_COLOR_BLUE, TEXT_COLOR, 2 )
+DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorAlpha", TEXT_COLOR_ALPHA, TEXT_COLOR, 3 )
DALI_TYPE_REGISTRATION_END()
} // namespace
break;
}
- case Toolkit::TextLabel::Property::TEXT_COLOR:
+ case Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR:
{
- label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, value );
+ label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, value );
impl.mTextUpdateNeeded = true;
break;
}
}
break;
}
- case Toolkit::DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE:
+ case Toolkit::TextLabel::Property::AUTO_SCROLL_STOP_MODE:
{
if( !impl.mTextScroller )
{
impl.mTextScroller = Text::TextScroller::New( impl );
}
- DevelTextLabel::AutoScrollStopMode::Type stopMode = impl.mTextScroller->GetStopMode();
- if( Scripting::GetEnumerationProperty< Toolkit::DevelTextLabel::AutoScrollStopMode::Type >( value,
+ Toolkit::TextLabel::AutoScrollStopMode::Type stopMode = impl.mTextScroller->GetStopMode();
+ if( Scripting::GetEnumerationProperty< Toolkit::TextLabel::AutoScrollStopMode::Type >( value,
AUTO_SCROLL_STOP_MODE_TABLE,
AUTO_SCROLL_STOP_MODE_TABLE_COUNT,
stopMode ) )
impl.mTextScroller->SetLoopCount( value.Get<int>() );
break;
}
- case Toolkit::DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY:
+ case Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_DELAY:
{
if( !impl.mTextScroller )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::PIXEL_SIZE:
+ case Toolkit::TextLabel::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::ELLIPSIS:
+ case Toolkit::TextLabel::Property::ELLIPSIS:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::LINE_WRAP_MODE:
+ case Toolkit::TextLabel::Property::LINE_WRAP_MODE:
{
const std::string& wrapModeStr = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel %p LINE_WRAP_MODE %s\n", impl.mController.Get(), wrapModeStr.c_str() );
}
break;
}
- case Toolkit::TextLabel::Property::TEXT_COLOR:
+ case Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR:
{
- value = label.GetProperty( Toolkit::DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE );
+ value = label.GetProperty( Toolkit::TextLabel::Property::TEXT_COLOR );
break;
}
case Toolkit::TextLabel::Property::SHADOW_OFFSET:
}
break;
}
- case Toolkit::DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE:
+ case Toolkit::TextLabel::Property::AUTO_SCROLL_STOP_MODE:
{
if( impl.mTextScroller )
{
- const char* mode = Scripting::GetEnumerationName< Toolkit::DevelTextLabel::AutoScrollStopMode::Type >( impl.mTextScroller->GetStopMode(),
+ const char* mode = Scripting::GetEnumerationName< Toolkit::TextLabel::AutoScrollStopMode::Type >( impl.mTextScroller->GetStopMode(),
AUTO_SCROLL_STOP_MODE_TABLE,
AUTO_SCROLL_STOP_MODE_TABLE_COUNT );
if( mode )
}
break;
}
- case Toolkit::DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY:
+ case Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_DELAY:
{
if( impl.mController )
{
GetOutlineProperties( impl.mController, value, Text::EffectStyle::DEFAULT );
break;
}
- case Toolkit::DevelTextLabel::Property::PIXEL_SIZE:
+ case Toolkit::TextLabel::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::ELLIPSIS:
+ case Toolkit::TextLabel::Property::ELLIPSIS:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::LINE_WRAP_MODE:
+ case Toolkit::TextLabel::Property::LINE_WRAP_MODE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextLabel::Property::LINE_COUNT:
+ case Toolkit::TextLabel::Property::LINE_COUNT:
{
if( impl.mController )
{
mVisual = Toolkit::VisualFactory::Get().CreateVisual( propertyMap );
DevelControl::RegisterVisual( *this, Toolkit::TextLabel::Property::TEXT, mVisual );
- TextVisual::SetAnimatableTextColorProperty( mVisual, Toolkit::DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE );
+ TextVisual::SetAnimatableTextColorProperty( mVisual, Toolkit::TextLabel::Property::TEXT_COLOR );
mController = TextVisual::GetController(mVisual);
if( mController )
switch ( index )
{
- case Toolkit::DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE:
+ case Toolkit::TextLabel::Property::TEXT_COLOR:
{
const Vector4& textColor = propertyValue.Get< Vector4 >();
if( mController->GetDefaultColor() != textColor )
return mLoopDelay;
}
-void TextScroller::SetStopMode( DevelTextLabel::AutoScrollStopMode::Type stopMode )
+void TextScroller::SetStopMode( TextLabel::AutoScrollStopMode::Type stopMode )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetAutoScrollStopMode [%s]\n",(stopMode == DevelTextLabel::AutoScrollStopMode::IMMEDIATE)?"IMMEDIATE":"FINISH_LOOP" );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetAutoScrollStopMode [%s]\n",(stopMode == TextLabel::AutoScrollStopMode::IMMEDIATE)?"IMMEDIATE":"FINISH_LOOP" );
mStopMode = stopMode;
}
{
switch( mStopMode )
{
- case DevelTextLabel::AutoScrollStopMode::IMMEDIATE:
+ case TextLabel::AutoScrollStopMode::IMMEDIATE:
{
mScrollAnimation.Stop();
mScrollerInterface.ScrollingFinished();
break;
}
- case DevelTextLabel::AutoScrollStopMode::FINISH_LOOP:
+ case TextLabel::AutoScrollStopMode::FINISH_LOOP:
{
mScrollAnimation.SetLoopCount( 1 ); // As animation already playing this allows the current animation to finish instead of trying to stop mid-way
break;
}
}
-DevelTextLabel::AutoScrollStopMode::Type TextScroller::GetStopMode() const
+TextLabel::AutoScrollStopMode::Type TextScroller::GetStopMode() const
{
return mStopMode;
}
mLoopCount( 1 ),
mLoopDelay( 0.0f ),
mWrapGap( 0.0f ),
- mStopMode( DevelTextLabel::AutoScrollStopMode::FINISH_LOOP )
+ mStopMode( TextLabel::AutoScrollStopMode::FINISH_LOOP )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller Default Constructor\n" );
}
#include <dali/public-api/rendering/renderer.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
#include <dali-toolkit/internal/text/text-definitions.h>
#include <dali-toolkit/internal/text/layouts/layout-alignment.h>
* @brief Set the mode of scrolling stop
* @param[in] stopMode type when text scrolling is stoped.
*/
- void SetStopMode( DevelTextLabel::AutoScrollStopMode::Type stopMode );
+ void SetStopMode( TextLabel::AutoScrollStopMode::Type stopMode );
/**
* @brief Stop the auto scrolling.
* @brief Get the mode of scrolling stop
* @return stopMode type when text scrolling is stoped.
*/
- DevelTextLabel::AutoScrollStopMode::Type GetStopMode() const;
+ TextLabel::AutoScrollStopMode::Type GetStopMode() const;
private: // Implementation
int mLoopCount; ///< Number of time the text should scroll
float mLoopDelay; ///< Time delay of loop start
float mWrapGap; ///< Gap before text wraps around when scrolling
- DevelTextLabel::AutoScrollStopMode::Type mStopMode; ///< Stop mode of scrolling text, when loop count is 0.
+ TextLabel::AutoScrollStopMode::Type mStopMode; ///< Stop mode of scrolling text, when loop count is 0.
}; // TextScroller class
enum PropertyRange
{
PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0
- PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_0.0
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0
+
+ ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_2.60
+ ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_2.60
};
/**
*/
enum
{
+ ///////////////////////////////////////////////////////////////////////////////
+ // Event side (non-animatable) properties
+ ///////////////////////////////////////////////////////////////////////////////
+
/**
- * DEPRECATED_1_2.53 No longer be supported and will be ignored.
+ * @DEPRECATED_1_2.53 No longer be supported and will be ignored.
* @brief The type of rendering e.g. bitmap-based.
- * @details name "renderingBackend", type INT, default RENDERING_SHARED_ATLAS.
+ * @details Name "renderingBackend", type Property::INT.
* @SINCE_1_0.0
*/
RENDERING_BACKEND = PROPERTY_START_INDEX,
/**
* @brief The text to display in UTF-8 format.
- * @details name "text", type STRING.
+ * @details Name "text", type Property::STRING.
* @SINCE_1_0.0
*/
TEXT,
/**
* @brief The requested font family to use.
- * @details name "fontFamily", type STRING.
+ * @details Name "fontFamily", type Property::STRING.
* @SINCE_1_0.0
*/
FONT_FAMILY,
/**
* @brief The requested font style to use.
- * @details name "fontStyle", type STRING or MAP.
+ * @details Name "fontStyle", type Property::STRING or Property::MAP.
* @SINCE_1_2.13
*/
FONT_STYLE,
/**
* @brief The size of font in points.
- *
- * Conversion from Pixel size to Point size :
- * Point size = Pixel size * 72 / DPI
- * @details name "pointSize", type FLOAT.
+ * @details Name "pointSize", type Property::FLOAT.
+ * Conversion from Pixel size to Point size:
+ * Point size = Pixel size * 72 / DPI
* @SINCE_1_0.0
*/
POINT_SIZE,
/**
* @brief The single-line or multi-line layout option.
- * @details name "multiLine", type BOOLEAN, default false.
+ * @details Name "multiLine", type Property::BOOLEAN.
* @SINCE_1_0.0
+ * @note Default is false.
*/
MULTI_LINE,
/**
* @brief The line horizontal alignment.
- * @details name "horizontalAlignment", type STRING, values "BEGIN", "CENTER", "END", default BEGIN.
+ * @details Name "horizontalAlignment", type Property::STRING
+ * Values "BEGIN", "CENTER", "END", default BEGIN.
* @SINCE_1_0.0
*/
HORIZONTAL_ALIGNMENT,
/**
* @brief The line vertical alignment.
- * @details name "verticalAlignment", type STRING, values "TOP", "CENTER", "BOTTOM" @SINCE_1_0.0, default TOP.
+ * @details Name "verticalAlignment", type Property::STRING.
+ * Values "TOP", "CENTER", "BOTTOM" @SINCE_1_0.0, default TOP.
* @SINCE_1_0.0
*/
VERTICAL_ALIGNMENT,
/**
+ * @DEPRECATED_1_2.60 Use the new enum value of TEXT_COLOR instead.
* @brief The color of the text.
- * @details name "textColor", type VECTOR4.
+ * @details Name "unusedPropertyTextColor", type Property::VECTOR4.
* @SINCE_1_0.0
*/
- TEXT_COLOR,
+ UNUSED_PROPERTY_TEXT_COLOR,
/**
* @DEPRECATED_1_1.37 Use SHADOW instead
* @brief The drop shadow offset 0 indicates no shadow.
- * @details name "shadowOffset", type VECTOR2.
+ * @details Name "shadowOffset", type Property::VECTOR2.
*/
SHADOW_OFFSET,
/**
* @DEPRECATED_1_1.37 Use SHADOW instead
* @brief The color of a drop shadow.
- * @details name "shadowColor", type VECTOR4
+ * @details Name "shadowColor", type Property::VECTOR4
*/
SHADOW_COLOR,
/**
* @DEPRECATED_1_1.37 Use UNDERLINE instead
* @brief The underline enabled flag.
- * @details name "underlineEnabled", type BOOLEAN.
+ * @details Name "underlineEnabled", type Property::BOOLEAN.
*/
UNDERLINE_ENABLED,
/**
* @DEPRECATED_1_1.37 Use UNDERLINE instead
* @brief The color of the underline.
- * @details name "underlineColor", type VECTOR4.
+ * @details Name "underlineColor", type Property::VECTOR4.
*/
UNDERLINE_COLOR,
/**
* @DEPRECATED_1_1.37 Use UNDERLINE instead
* @brief Overrides the underline height from font metrics.
- * @details name "underlineHeight", type FLOAT.
+ * @details Name "underlineHeight", type Property::FLOAT.
*/
UNDERLINE_HEIGHT,
/**
* @brief Whether the mark-up processing is enabled.
- * @details name "enableMarkup", type BOOLEAN.
+ * @details Name "enableMarkup", type Property::BOOLEAN.
* @SINCE_1_0.0
+ * @note Default is false.
*/
ENABLE_MARKUP,
/**
* @brief Starts or stops auto scrolling.
- * @details name "enableAutoScroll", type BOOLEAN, default is false.
+ * @details Name "enableAutoScroll", type Property::BOOLEAN.
* @SINCE_1_1.35
+ * @note Default is false.
*/
ENABLE_AUTO_SCROLL,
/**
* @brief Sets the speed of scrolling in pixels per second.
- * @details name "autoScrollSpeed", type INT, default in style sheet.
+ * @details Name "autoScrollSpeed", type Property::INT.
* @SINCE_1_1.35
+ * @note Default in style sheet.
*/
AUTO_SCROLL_SPEED,
/**
* @brief Number of complete loops when scrolling enabled.
- * @details name "autoScrollLoopCount", type INT, default in style sheet.
+ * @details Name "autoScrollLoopCount", type Property::INT.
* @SINCE_1_1.35
+ * @note Default in style sheet.
*/
AUTO_SCROLL_LOOP_COUNT,
/**
* @brief Gap before scrolling wraps.
- * @details name "autoScrollGap", type INT, default in style sheet but can be overridden to prevent same text being shown at start and end.
+ * @details Name "autoScrollGap", type Property::INT.
* @SINCE_1_1.35
+ * @note Default in style sheet but can be overridden to prevent same text being shown at start and end.
*/
AUTO_SCROLL_GAP,
/**
* @brief The default extra space between lines in points.
- * @details name "lineSpacing", type FLOAT.
+ * @details Name "lineSpacing", type Property::FLOAT.
* @SINCE_1_1.37
*/
LINE_SPACING,
/**
* @brief The default underline parameters.
- * @details name "underline", type MAP.
+ * @details Name "underline", type Property::MAP.
* @SINCE_1_2.13
*/
UNDERLINE,
/**
* @brief The default shadow parameters.
- * @details name "shadow", type MAP.
+ * @details Name "shadow", type Property::MAP.
* @SINCE_1_2.13
*/
SHADOW,
/**
* @brief The default emboss parameters.
- * @details name "emboss", type MAP.
+ * @details Name "emboss", type Property::MAP.
* @SINCE_1_2.13
*/
EMBOSS,
/**
* @brief The default outline parameters.
- * @details name "outline", type MAP.
+ * @details Name "outline", type Property::MAP.
* @SINCE_1_2.13
*/
OUTLINE,
+
+ /**
+ * @brief The size of font in pixels.
+ * @details Name "pixelSize", type Property::FLOAT.
+ * Conversion from Point size to Pixel size:
+ * Pixel size = Point size * DPI / 72
+ * @SINCE_1_2.60
+ */
+ PIXEL_SIZE,
+
+ /**
+ * @brief Whether we should show the ellipsis if required.
+ * @details Name "ellipsis", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ ELLIPSIS,
+
+ /**
+ * @brief The amount of time to delay the starting time of auto scrolling and further loops.
+ * @details Name "autoScrollLoopDelay", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ AUTO_SCROLL_LOOP_DELAY,
+
+ /**
+ * @brief The auto scrolling stop behaviour.
+ * @details Name "autoScrollStopMode", type AutoScrollStopMode::Type (Property::INTEGER) or Property::STRING.
+ * @SINCE_1_2.60
+ * @note Default is AutoScrollStopMode::FINISH_LOOP.
+ * @see AutoScrollStopMode::Type
+ */
+ AUTO_SCROLL_STOP_MODE,
+
+ /*
+ * @brief The line count of text.
+ * @details name "lineCount", type Property::INTEGER.
+ * @SINCE_1_2.60
+ * @note This property is read-only.
+ */
+ LINE_COUNT,
+
+ /**
+ * @brief Line wrap mode when text lines are greater than the layout width.
+ * @details Name "lineWrapMode", type Property::STRING.
+ * @SINCE_1_2.60
+ */
+ LINE_WRAP_MODE,
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // Animatable Properties
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief The color of the text.
+ * @details Name "textColor", type Property::VECTOR4.
+ * @SINCE_1_2.60
+ */
+ TEXT_COLOR = ANIMATABLE_PROPERTY_START_INDEX,
+
+ /**
+ * @brief The red component of the text color.
+ * @details Name "textColorRed", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @see TEXT_COLOR
+ */
+ TEXT_COLOR_RED,
+
+ /**
+ * @brief The green component of the text color.
+ * @details Name "textColorGreen", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @see TEXT_COLOR
+ */
+ TEXT_COLOR_GREEN,
+
+ /**
+ * @brief The blue component of the text color.
+ * @details Name "textColorBlue", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @see TEXT_COLOR
+ */
+ TEXT_COLOR_BLUE,
+
+ /**
+ * @brief The alpha component of the text color.
+ * @details Name "textColorAlpha", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @see TEXT_COLOR
+ */
+ TEXT_COLOR_ALPHA,
+ };
+ };
+
+ /**
+ * @brief The enumerations used for auto scroll stop mode.
+ * @SINCE_1_2.60
+ * @see Property::AUTO_SCROLL_STOP_MODE.
+ */
+ struct AutoScrollStopMode
+ {
+ /**
+ * @brief The enumerations used for auto scroll stop mode.
+ * @SINCE_1_2.60
+ * @see Property::AUTO_SCROLL_STOP_MODE.
+ */
+ enum Type
+ {
+ FINISH_LOOP = 0, ///< Stop animation after current loop finishes. @SINCE_1_2.60
+ IMMEDIATE ///< Stop animation immediately and reset position. @SINCE_1_2.60
};
};
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.