/*
- * 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.
charactersToGlyph.Begin(),
glyphsPerCharacter.Begin(),
numberOfGlyphs,
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::LineWrap::WORD );
+ Text::HorizontalAlignment::BEGIN,
+ Text::LineWrap::WORD );
Vector<LineRun>& lines = visualModel->mLines;
layoutEngine.Align( textArea,
0u,
numberOfCharacters,
- Layout::HORIZONTAL_ALIGN_BEGIN,
+ Text::HorizontalAlignment::BEGIN,
lines,
alignmentOffset );
}
/*
- * 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.
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/internal/visuals/wireframe/wireframe-visual.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/rendering/geometry.h>
#include <dali-toolkit/dali-toolkit.h>
const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
-void TestDebugVisual( Visual::Base& visual, DevelVisual::Type actualType, Vector2 expectedNaturalSize )
+void TestDebugVisual( Visual::Base& visual, Visual::Type actualType, Vector2 expectedNaturalSize )
{
DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( GetImplementation(visual) ) );
Property::Map propertyMap;
visual.CreatePropertyMap( propertyMap );
- Property::Value* typeValue = propertyMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* typeValue = propertyMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
if ( typeValue )
{
DALI_TEST_CHECK( typeValue->Get<int>() == actualType );
propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
Visual::Base colorVisual = factory.CreateVisual(propertyMap1);
DALI_TEST_CHECK( colorVisual );
- TestDebugVisual( colorVisual, DevelVisual::COLOR, Vector2::ZERO );
+ TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO );
// Test that border visual is replaced with debug visual
Property::Map propertyMap2;
propertyMap2.Insert(BorderVisual::Property::SIZE, 2.f);
Visual::Base borderVisual = factory.CreateVisual(propertyMap2);
DALI_TEST_CHECK( borderVisual );
- TestDebugVisual( borderVisual, DevelVisual::BORDER, Vector2::ZERO );
+ TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO );
// Test that gradient visual is replaced with debug visual
Property::Map propertyMap3;
propertyMap3.Insert(GradientVisual::Property::STOP_COLOR, stopColors);
Visual::Base gradientVisual = factory.CreateVisual(propertyMap3);
DALI_TEST_CHECK( gradientVisual );
- TestDebugVisual( gradientVisual, DevelVisual::GRADIENT, Vector2::ZERO );
+ TestDebugVisual( gradientVisual, Visual::GRADIENT, Vector2::ZERO );
// Test that image visual is replaced with debug visual
Property::Map propertyMap4;
- propertyMap4.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap4.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap4.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
propertyMap4.Insert( ImageVisual::Property::DESIRED_WIDTH, 50.f );
propertyMap4.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100.f );
Visual::Base imageVisual = factory.CreateVisual( propertyMap4 );
DALI_TEST_CHECK( imageVisual );
- TestDebugVisual( imageVisual, DevelVisual::IMAGE, Vector2( 50.f, 100.f ) );
+ TestDebugVisual( imageVisual, Visual::IMAGE, Vector2( 50.f, 100.f ) );
// Test that SVG visual is replaced with debug visual
// TEST_SVG_FILE:
// <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
// </svg>
Property::Map propertyMap5;
- propertyMap5.Insert( Visual::Property::TYPE, DevelVisual::SVG );
+ propertyMap5.Insert( Toolkit::Visual::Property::TYPE, Visual::SVG );
propertyMap5.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME );
Visual::Base svgVisual = factory.CreateVisual( propertyMap5 );
DALI_TEST_CHECK( svgVisual );
- TestDebugVisual( svgVisual, DevelVisual::SVG, Vector2(100.f, 100.f) );
+ TestDebugVisual( svgVisual, Visual::SVG, Vector2(100.f, 100.f) );
// Test that AnimatedImageVisual is replaced with debug visual
// TEST_GIF_FILE: anim.gif
// resolution: 50*50, frame count: 4, frame delay: 0.2 second for each frame
Property::Map propertyMap6;
- propertyMap6.Insert( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE );
+ propertyMap6.Insert( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE );
propertyMap6.Insert( ImageVisual::Property::URL, TEST_GIF_FILE_NAME );
Visual::Base animatedImageVisual = factory.CreateVisual( propertyMap6 );
DALI_TEST_CHECK( animatedImageVisual );
- TestDebugVisual( animatedImageVisual, DevelVisual::ANIMATED_IMAGE, Vector2(50.f, 50.f) );
+ TestDebugVisual( animatedImageVisual, Visual::ANIMATED_IMAGE, Vector2(50.f, 50.f) );
// Test that text visual is replaced with debug visual
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
Property::Map propertyMap7;
- propertyMap7.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+ propertyMap7.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
propertyMap7.Insert( TextVisual::Property::ENABLE_MARKUP, true );
propertyMap7.Insert( TextVisual::Property::TEXT, "<font family='TizenSans' size='12'>Hello world</font>" );
propertyMap7.Insert( TextVisual::Property::MULTI_LINE, true );
// Test that NPatchVisual is replaced with debug visual
// TEST_NPATCH_FILE_NAME: image_01.9.jpg
Property::Map propertyMap8;
- propertyMap8.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap8.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap8.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
Visual::Base nPatchVisual = factory.CreateVisual( propertyMap8 );
DALI_TEST_CHECK( nPatchVisual );
- TestDebugVisual( nPatchVisual, DevelVisual::N_PATCH, Vector2::ZERO );
+ TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
// Test that color visual is replaced with debug visual
Dali::Property::Map map;
- map[ Visual::Property::TYPE ] = Visual::COLOR;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
map[ ColorVisual::Property::MIX_COLOR ] = Color::CYAN;
Visual::Base colorVisual = factory.CreateVisual( map);
DALI_TEST_CHECK( colorVisual );
- TestDebugVisual( colorVisual, DevelVisual::COLOR, Vector2::ZERO );
+ TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO );
// Test that border visual is replaced with debug visual
map.Clear();
- map[ Visual::Property::TYPE ] = Visual::BORDER;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
map[ BorderVisual::Property::COLOR ] = Color::GREEN;
map[ BorderVisual::Property::SIZE ] = 2.f;
Visual::Base borderVisual = factory.CreateVisual( map );
DALI_TEST_CHECK( borderVisual );
- TestDebugVisual( borderVisual, DevelVisual::BORDER, Vector2::ZERO );
+ TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO );
// Test that image visual is replaced with debug visual
Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME);
Visual::Base imageVisual = factory.CreateVisual( image );
DALI_TEST_CHECK( imageVisual );
- TestDebugVisual( imageVisual, DevelVisual::IMAGE, Vector2::ZERO);
+ TestDebugVisual( imageVisual, Visual::IMAGE, Vector2::ZERO);
// Test that n patch visual is replaced with debug visual
Visual::Base nPatchVisual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
DALI_TEST_CHECK( nPatchVisual );
- TestDebugVisual( nPatchVisual, DevelVisual::N_PATCH, Vector2::ZERO );
+ TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
/*
- * 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.
#include <dali.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
#include <dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
-
using namespace Dali;
using namespace Toolkit;
layoutArray.PushBack(gridLayoutProperty);
- view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+ view.SetProperty( ItemView::Property::LAYOUT, layoutArray );
Dali::Toolkit::Internal::GridLayout* gridLayout = dynamic_cast<Dali::Toolkit::Internal::GridLayout*>(view.GetLayout(0).Get());
/*
- * 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.
visualModel->mCharactersToGlyph.Begin(),
visualModel->mGlyphsPerCharacter.Begin(),
totalNumberOfGlyphs,
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::LineWrap::WORD );
+ Text::HorizontalAlignment::BEGIN,
+ Text::LineWrap::WORD );
layoutParameters.isLastNewParagraph = isLastNewParagraph;
visualModel->mCharactersToGlyph.Begin(),
visualModel->mGlyphsPerCharacter.Begin(),
visualModel->mGlyphs.Count(),
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::LineWrap::WORD );
+ Text::HorizontalAlignment::BEGIN,
+ Text::LineWrap::WORD );
layoutParameters.numberOfBidirectionalInfoRuns = logicalModel->mBidirectionalLineInfo.Count();
layoutParameters.lineBidirectionalInfoRunsBuffer = logicalModel->mBidirectionalLineInfo.Begin();
struct AlignData
{
- std::string description;
- std::string text;
- Size textArea;
- unsigned int numberOfFonts;
- FontDescriptionRun* fontDescriptions;
- Layout::HorizontalAlignment horizontalAlignment;
- Layout::VerticalAlignment verticalAlignment;
- unsigned int startIndex;
- unsigned int numberOfCharacters;
- unsigned int numberOfLines;
- float* lineOffsets;
+ std::string description;
+ std::string text;
+ Size textArea;
+ unsigned int numberOfFonts;
+ FontDescriptionRun* fontDescriptions;
+ Text::HorizontalAlignment::Type horizontalAlignment;
+ Text::VerticalAlignment::Type verticalAlignment;
+ unsigned int startIndex;
+ unsigned int numberOfCharacters;
+ unsigned int numberOfLines;
+ float* lineOffsets;
};
bool AlignTest( const AlignData& data )
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::BEGIN,
+ Text::VerticalAlignment::TOP,
0u,
22u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::BEGIN,
+ Text::VerticalAlignment::TOP,
22u,
26u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_BEGIN,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::BEGIN,
+ Text::VerticalAlignment::TOP,
48u,
26u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_CENTER,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::CENTER,
+ Text::VerticalAlignment::TOP,
0u,
22u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_CENTER,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::CENTER,
+ Text::VerticalAlignment::TOP,
22u,
26u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_CENTER,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::CENTER,
+ Text::VerticalAlignment::TOP,
48u,
26u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_END,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::END,
+ Text::VerticalAlignment::TOP,
0u,
22u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_END,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::END,
+ Text::VerticalAlignment::TOP,
22u,
26u,
6u,
textArea,
6u,
fontDescriptionRuns.Begin(),
- Layout::HORIZONTAL_ALIGN_END,
- Layout::VERTICAL_ALIGN_TOP,
+ Text::HorizontalAlignment::END,
+ Text::VerticalAlignment::TOP,
48u,
26u,
6u,
DALI_TEST_EQUALS( Pixel::RGBA8888, bitmap.GetPixelFormat(), TEST_LOCATION );
// Changes vertical alignment.
- controller->SetVerticalAlignment( Layout::VERTICAL_ALIGN_CENTER );
+ controller->SetVerticalAlignment( Text::VerticalAlignment::CENTER );
controller->Relayout( relayoutSize );
// Renders the text and creates the final bitmap.
DALI_TEST_EQUALS( 60u, bitmap.GetHeight(), TEST_LOCATION );
DALI_TEST_EQUALS( Pixel::RGBA8888, bitmap.GetPixelFormat(), TEST_LOCATION );
- controller->SetVerticalAlignment( Layout::VERTICAL_ALIGN_BOTTOM );
+ controller->SetVerticalAlignment( Text::VerticalAlignment::BOTTOM );
controller->Relayout( relayoutSize );
// Renders the text and creates the final bitmap.
ViewModel* model = typesetter->GetViewModel();
DALI_TEST_CHECK( NULL != model );
- DALI_TEST_EQUALS( Layout::HORIZONTAL_ALIGN_BEGIN, model->GetHorizontalAlignment(), TEST_LOCATION );
- DALI_TEST_EQUALS( Layout::VERTICAL_ALIGN_TOP, model->GetVerticalAlignment(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Text::HorizontalAlignment::BEGIN, model->GetHorizontalAlignment(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Text::VerticalAlignment::TOP, model->GetVerticalAlignment(), TEST_LOCATION );
- controller->SetHorizontalAlignment( Layout::HORIZONTAL_ALIGN_CENTER );
- controller->SetVerticalAlignment( Layout::VERTICAL_ALIGN_CENTER );
+ controller->SetHorizontalAlignment( Text::HorizontalAlignment::CENTER );
+ controller->SetVerticalAlignment( Text::VerticalAlignment::CENTER );
- DALI_TEST_EQUALS( Layout::HORIZONTAL_ALIGN_CENTER, model->GetHorizontalAlignment(), TEST_LOCATION );
- DALI_TEST_EQUALS( Layout::VERTICAL_ALIGN_CENTER, model->GetVerticalAlignment(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Text::HorizontalAlignment::CENTER, model->GetHorizontalAlignment(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Text::VerticalAlignment::CENTER, model->GetVerticalAlignment(), TEST_LOCATION );
tet_result(TET_PASS);
END_TEST;
#include <toolkit-style-monitor.h>
#include <dummy-control.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
-#include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
#include <dali/integration-api/events/key-event-integ.h>
DALI_TEST_EQUALS( (bool)visual, true, location );
Property::Map map;
visual.CreatePropertyMap( map );
- Property::Value* value = map.Find( Visual::Property::TYPE );
+ Property::Value* value = map.Find( Toolkit::Visual::Property::TYPE );
DALI_TEST_EQUALS( value != NULL, true, location );
int visualType;
tet_infoline( "Changing state to FOCUSED - check visual changes\n");
Visual::Base fgVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOREGROUND_VISUAL, Toolkit::Visual::GRADIENT, TEST_LOCATION);
- Visual::Base focusVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::DevelVisual::N_PATCH, TEST_LOCATION);
+ Visual::Base focusVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::Visual::N_PATCH, TEST_LOCATION);
actor.SetProperty(DevelControl::Property::SUB_STATE, "SELECTED");
tet_infoline( "Changing substate to SELECTED - Expect no change\n");
Visual::Base fgVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOREGROUND_VISUAL, Toolkit::Visual::GRADIENT, TEST_LOCATION);
- Visual::Base focusVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::DevelVisual::N_PATCH, TEST_LOCATION);
+ Visual::Base focusVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::Visual::N_PATCH, TEST_LOCATION);
DALI_TEST_CHECK( fgVisual1 == fgVisual2 );
DALI_TEST_CHECK( focusVisual1 == focusVisual2 );
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
- application.ProcessEvent( Integration::KeyEvent( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( Integration::KeyEvent( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/align-enums.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
namespace Dali
#include <toolkit-timer.h>
#include <toolkit-event-thread-callback.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include "dummy-control.h"
VisualFactory factory = VisualFactory::Get();
Visual::Base animatedImageVisual = factory.CreateVisual(
Property::Map()
- .Add( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE )
+ .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE )
.Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME )
.Add( ImageVisual::Property::PIXEL_AREA, Vector4() )
.Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::REPEAT )
Property::Map resultMap;
animatedImageVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from a visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::ANIMATED_IMAGE );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
DALI_TEST_CHECK( value );
resultMap.Clear();
animatedImageVisual2.CreatePropertyMap( resultMap );
// check the property values from the returned map from a visual
- value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::ANIMATED_IMAGE );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
DALI_TEST_CHECK( value );
Visual::Base animatedImageVisual = factory.CreateVisual(
Property::Map()
- .Add( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE )
+ .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE )
.Add( "url", urls )
.Add( "batchSize", 4 )
.Add( "cacheSize", 8 )
Property::Map resultMap;
animatedImageVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from a visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::ANIMATED_IMAGE );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
- value = resultMap.Find( DevelImageVisual::Property::URL, "url" );
+ value = resultMap.Find( ImageVisual::Property::URL, "url" );
DALI_TEST_CHECK( value );
Property::Array* resultUrls = value->GetArray();
DALI_TEST_CHECK( resultUrls );
DALI_TEST_EQUALS( resultUrls->Count(), urls.Count(), TEST_LOCATION );
- value = resultMap.Find( DevelImageVisual::Property::BATCH_SIZE, "batchSize" );
+ value = resultMap.Find( ImageVisual::Property::BATCH_SIZE, "batchSize" );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), 4, TEST_LOCATION );
- value = resultMap.Find( DevelImageVisual::Property::CACHE_SIZE, "cacheSize" );
+ value = resultMap.Find( ImageVisual::Property::CACHE_SIZE, "cacheSize" );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), 8, TEST_LOCATION );
- value = resultMap.Find( DevelImageVisual::Property::FRAME_DELAY, "frameDelay" );
+ value = resultMap.Find( ImageVisual::Property::FRAME_DELAY, "frameDelay" );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), 200, TEST_LOCATION );
{
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
- propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) );
- propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 4);
- propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 8);
- propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
+ propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4);
+ propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 8);
+ propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
VisualFactory factory = VisualFactory::Get();
Visual::Base visual = factory.CreateVisual( propertyMap );
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
- propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) );
- propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 0);
- propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 0);
- propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
+ propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 0);
+ propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 0);
+ propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
VisualFactory factory = VisualFactory::Get();
Visual::Base visual = factory.CreateVisual( propertyMap ); // TexMgr::Request load tId:0
Property::Map animatedImageMap1;
animatedImageMap1.Insert(Visual::Property::TYPE, Visual::IMAGE );
- animatedImageMap1.Insert( DevelImageVisual::Property::URL, Property::Value(urls1) );
- animatedImageMap1.Insert( DevelImageVisual::Property::BATCH_SIZE, 3);
- animatedImageMap1.Insert( DevelImageVisual::Property::CACHE_SIZE, 3);
- animatedImageMap1.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ animatedImageMap1.Insert( ImageVisual::Property::URL, Property::Value(urls1) );
+ animatedImageMap1.Insert( ImageVisual::Property::BATCH_SIZE, 3);
+ animatedImageMap1.Insert( ImageVisual::Property::CACHE_SIZE, 3);
+ animatedImageMap1.Insert( ImageVisual::Property::FRAME_DELAY, 100);
Property::Map animatedImageMap2;
animatedImageMap2.Insert(Visual::Property::TYPE, Visual::IMAGE );
- animatedImageMap2.Insert( DevelImageVisual::Property::URL, Property::Value(urls2) );
- animatedImageMap2.Insert( DevelImageVisual::Property::BATCH_SIZE, 2);
- animatedImageMap2.Insert( DevelImageVisual::Property::CACHE_SIZE, 2);
- animatedImageMap2.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ animatedImageMap2.Insert( ImageVisual::Property::URL, Property::Value(urls2) );
+ animatedImageMap2.Insert( ImageVisual::Property::BATCH_SIZE, 2);
+ animatedImageMap2.Insert( ImageVisual::Property::CACHE_SIZE, 2);
+ animatedImageMap2.Insert( ImageVisual::Property::FRAME_DELAY, 100);
VisualFactory factory = VisualFactory::Get();
Visual::Base animatedImageVisual1 = factory.CreateVisual( animatedImageMap1 );
{
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
- propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) );
- propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 6);
- propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 11);
- propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
+ propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 6);
+ propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11);
+ propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
VisualFactory factory = VisualFactory::Get();
Visual::Base visual = factory.CreateVisual( propertyMap );
{
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
- propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) );
- propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 4);
- propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 11);
- propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100);
+ propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
+ propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4);
+ propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11);
+ propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
VisualFactory factory = VisualFactory::Get();
Visual::Base visual = factory.CreateVisual( propertyMap );
/*
- * Copyright (c) 2014 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.
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
using namespace Dali;
using namespace Toolkit;
Button button = PushButton::New();
button.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
.Add( Toolkit::TextVisual::Property::TEXT, "Button Label")
);
tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Intermediate part of test");
Property::Map propertyMap;
- propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, "error if this is the final text" );
propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
// Set default point size for text visual as style sheet not available.
button.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
);
Button button = PushButton::New();
button.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
.Add( Toolkit::TextVisual::Property::TEXT, TEST_LABEL1 )
);
DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL1, TEST_LOCATION );
Property::Map propertyMap;
- propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, TEST_LABEL2 );
propertyMap.Insert( Toolkit::TextVisual::Property::TEXT_COLOR, Color::BLUE );
propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
/*
- * Copyright (c) 2014 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.
#include <dali-toolkit/dali-toolkit.h>
#include <test-application.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
using namespace Dali;
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, "activate" )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, "activate" )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, "activate" )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, "activate" )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, "activate" )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
#include <dali.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <toolkit-event-thread-callback.h>
Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE )->Get<int>() == Visual::COLOR );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>() == Visual::COLOR );
DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) );
DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>() == Color::RED );
Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE )->Get<int>() == Visual::IMAGE );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>() == Visual::IMAGE );
DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL ) );
DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL )->Get<std::string>() == "TestImage" );
DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() );
Property::Map imageMap;
- imageMap[ Visual::Property::TYPE ] = Visual::IMAGE;
+ imageMap[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
imageMap[ ImageVisual::Property::URL ] = "TestImage";
control.SetProperty( Control::Property::BACKGROUND, imageMap );
Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
- DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(),(int)Visual::IMAGE, TEST_LOCATION );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) );
+ DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>(),(int)Visual::IMAGE, TEST_LOCATION );
DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL ) );
DALI_TEST_EQUALS( resultMap->Find( ImageVisual::Property::URL )->Get<std::string>(), "TestImage", TEST_LOCATION );
control.SetProperty( Control::Property::BACKGROUND, rendererMap );
propValue = control.GetProperty( Control::Property::BACKGROUND );
resultMap = propValue.GetMap();
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
- DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) );
+ DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) );
DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>(), Color::CYAN, TEST_LOCATION );
control.SetProperty( Control::Property::BACKGROUND, "Foobar.png" );
propValue = control.GetProperty( Control::Property::BACKGROUND );
resultMap = propValue.GetMap();
- DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::IMAGE, TEST_LOCATION );
+ DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>(), (int)Visual::IMAGE, TEST_LOCATION );
DALI_TEST_EQUALS( resultMap->Find( ImageVisual::Property::URL )->Get<std::string>(), "Foobar.png", TEST_LOCATION );
// set as Color
control.SetProperty( Control::Property::BACKGROUND, Color::RED );
propValue = control.GetProperty( Control::Property::BACKGROUND );
resultMap = propValue.GetMap();
- DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
+ DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>(), Color::RED, TEST_LOCATION );
// Deprecated Properties
{
ToolkitTestApplication application;
Control control = Control::New();
- control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+ control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
.Add( ColorVisual::Property::MIX_COLOR, Color::RED ) );
tet_infoline( "Test to ensure that a renderer does NOT get added when we are clipping children and already have renderers/visuals" );
{
ToolkitTestApplication application;
Control control = Control::New();
- control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+ control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
.Add( ColorVisual::Property::MIX_COLOR, Color::RED ) );
tet_infoline( "Test to ensure that a renderer does NOT get added when we are clipping children and already have renderers/visuals and when already on stage" );
Control control = Control::New();
Property::Map transformMap;
- transformMap.Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 10 ) )
- .Add( DevelVisual::Transform::Property::ANCHOR_POINT, Align::BOTTOM_END )
- .Add( DevelVisual::Transform::Property::ORIGIN, Align::BOTTOM_END )
- .Add( DevelVisual::Transform::Property::SIZE, Vector2( 10, 20 ) );
+ transformMap.Add( Visual::Transform::Property::OFFSET, Vector2( 10, 10 ) )
+ .Add( Visual::Transform::Property::ANCHOR_POINT, Align::BOTTOM_END )
+ .Add( Visual::Transform::Property::ORIGIN, Align::BOTTOM_END )
+ .Add( Visual::Transform::Property::SIZE, Vector2( 10, 20 ) );
- control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
- .Add( DevelVisual::Property::TRANSFORM, transformMap ) );
+ control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
+ .Add( Visual::Property::TRANSFORM, transformMap ) );
tet_infoline( "Test to ensure that the control background transform does not get overwritten when adding to the stage" );
Property::Value value = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* map = value.GetMap();
DALI_TEST_CHECK( map );
- Property::Value* transformValue = map->Find( DevelVisual::Property::TRANSFORM );
+ Property::Value* transformValue = map->Find( Visual::Property::TRANSFORM );
DALI_TEST_CHECK( transformValue );
Property::Map* retMap = transformValue->GetMap();
DALI_TEST_CHECK( retMap );
- DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::OFFSET )->Get< Vector2 >(), Vector2( 10, 10 ), TEST_LOCATION );
- DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ANCHOR_POINT )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
- DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ORIGIN )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
- DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::SIZE )->Get< Vector2 >(), Vector2( 10, 20 ), TEST_LOCATION );
+ DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::OFFSET )->Get< Vector2 >(), Vector2( 10, 10 ), TEST_LOCATION );
+ DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::ANCHOR_POINT )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
+ DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::ORIGIN )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
+ DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::SIZE )->Get< Vector2 >(), Vector2( 10, 20 ), TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( factory );
Property::Map propertyMapLarge;
- propertyMapLarge.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMapLarge.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMapLarge.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
Property::Map propertyMapSmall;
- propertyMapSmall.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMapSmall.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMapSmall.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
Visual::Base smallVisual = factory.CreateVisual( propertyMapSmall );
actor.SetSize( 200.f, 200.f );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
Visual::Base largeVisual = factory.CreateVisual( propertyMapLarge );
largeVisual.SetName("largeVisual");
application.Render();
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
END_TEST;
}
controlWrapper.SetProperty( Control::Property::BACKGROUND, rendererMap );
Property::Value propertyValue = controlWrapper.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propertyValue.GetMap();
- DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
- DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
+ DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) );
+ DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) );
DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>(), Color::RED, TEST_LOCATION );
/*
- * Copyright (c) 2015 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.
#include <dali-toolkit-test-suite-utils.h>
#include <toolkit-event-thread-callback.h>
#include <dali-toolkit/devel-api/image-loader/image-atlas.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
-
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/dali-toolkit.h>
using namespace Dali;
imageMap1[ ImageVisual::Property::URL ] = gImage_34_RGBA;
imageMap1[ ImageVisual::Property::DESIRED_HEIGHT ] = 34;
imageMap1[ ImageVisual::Property::DESIRED_WIDTH ] = 34;
- imageMap1[ DevelImageVisual::Property::ATLASING] = true;
+ imageMap1[ ImageVisual::Property::ATLASING] = true;
Property::Map imageMap2;
imageMap2[ ImageVisual::Property::URL ] = gImage_50_RGBA;
imageMap2[ ImageVisual::Property::DESIRED_HEIGHT ] = 50;
imageMap2[ ImageVisual::Property::DESIRED_WIDTH ] = 50;
- imageMap2[ DevelImageVisual::Property::ATLASING ] = true;
+ imageMap2[ ImageVisual::Property::ATLASING ] = true;
ImageView imageView1 = ImageView::New();
imageView1.SetProperty( ImageView::Property::IMAGE, imageMap1 );
imageMap3[ ImageVisual::Property::URL ] = gImage_128_RGB;
imageMap3[ ImageVisual::Property::DESIRED_HEIGHT ] = 100;
imageMap3[ ImageVisual::Property::DESIRED_WIDTH ] = 100;
- imageMap3[ DevelImageVisual::Property::ATLASING ] = true;
+ imageMap3[ ImageVisual::Property::ATLASING ] = true;
ImageView imageView3 = ImageView::New();
imageView3.SetProperty( ImageView::Property::IMAGE, imageMap3 );
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/scripting/scripting.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
-#include <dali/public-api/rendering/renderer.h>
#include <test-native-image.h>
#include <sstream>
#include <unistd.h>
+
#include "dummy-control.h"
using namespace Dali;
imageMap[ ImageVisual::Property::URL ] = gImage_34_RGBA;
imageMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 34;
imageMap[ ImageVisual::Property::DESIRED_WIDTH ] = 34;
- imageMap[ DevelImageVisual::Property::ATLASING] = true;
+ imageMap[ ImageVisual::Property::ATLASING] = true;
ImageView imageView = ImageView::New();
imageView.SetProperty( ImageView::Property::IMAGE, imageMap );
Property::Map syncLoadingMap;
syncLoadingMap[ ImageVisual::Property::SYNCHRONOUS_LOADING ] = true;
- syncLoadingMap[ DevelImageVisual::Property::ATLASING ] = true;
+ syncLoadingMap[ ImageVisual::Property::ATLASING ] = true;
// Sync loading, no atlasing for big size image
{
imageView.SetBackgroundImage( image );
- DALI_TEST_EQUALS( Toolkit::DevelControl::IsResourceReady( imageView ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
- Toolkit::DevelControl::ResourceReadySignal( imageView ).Connect( &ResourceReadySignal);
+ imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
Stage::GetCurrent().Add( imageView );
application.Render(16);
- DALI_TEST_EQUALS( Toolkit::DevelControl::IsResourceReady( imageView ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.IsResourceReady(), true, TEST_LOCATION );
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
// Check ImageView with background and main image, to ensure both visuals are marked as loaded
ImageView imageView = ImageView::New( TEST_IMAGE_1 );
- DALI_TEST_EQUALS( Toolkit::DevelControl::IsResourceReady( imageView ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
- Toolkit::DevelControl::ResourceReadySignal( imageView ).Connect( &ResourceReadySignal);
+ imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
Stage::GetCurrent().Add( imageView );
DALI_TEST_EQUALS( imageView.GetRendererCount(), 1u, TEST_LOCATION );
- DALI_TEST_EQUALS( Toolkit::DevelControl::IsResourceReady( imageView ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.IsResourceReady(), true, TEST_LOCATION );
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
#include <dali-toolkit-test-suite-utils.h>
#include <toolkit-timer.h>
#include <toolkit-event-thread-callback.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/rendering/shader.h>
#include <dali/devel-api/images/nine-patch-image.h>
#include <dali/devel-api/object/handle-devel.h>
-#include <dali-toolkit/devel-api/align-enums.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
DALI_TEST_CHECK( value->Get( mixColor1 ) );
DALI_TEST_EQUALS( mixColor1, Vector3(testColor), 0.001, TEST_LOCATION );
- value = map.Find( DevelVisual::Property::MIX_COLOR );
+ value = map.Find( Visual::Property::MIX_COLOR );
DALI_TEST_CHECK( value );
Vector4 mixColor2;
DALI_TEST_CHECK( value->Get( mixColor2 ) );
DALI_TEST_EQUALS( mixColor2, testColor, 0.001, TEST_LOCATION );
- value = map.Find( DevelVisual::Property::OPACITY );
+ value = map.Find( Visual::Property::OPACITY );
DALI_TEST_CHECK( value );
float opacity;
DALI_TEST_CHECK( value->Get( opacity ) );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
tet_infoline( "Request remote image visual with a Property::Map; request a second visual with the same property map - should reuse texture" );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
TestGlAbstraction& gl = application.GetGlAbstraction();
tet_infoline( "Request remote image visual with a Property::Map; request a second visual with the same url but different property map - should create new texture" );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME );
TestGlAbstraction& gl = application.GetGlAbstraction();
const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f);
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_SMALL_IMAGE_FILE_NAME );
propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width );
propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height );
propertyMap.Insert( ImageVisual::Property::PIXEL_AREA, pixelArea );
propertyMap.Insert( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT );
propertyMap.Insert( ImageVisual::Property::WRAP_MODE_V, WrapMode::REPEAT );
- propertyMap.Insert( DevelImageVisual::Property::ATLASING, true );
+ propertyMap.Insert( ImageVisual::Property::ATLASING, true );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( visual );
const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f);
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width );
propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Renderer renderer = actor.GetRendererAt(0);
- Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
+ Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR );
Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(TARGET_MIX_COLOR)), true, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", TARGET_MIX_COLOR.a), true, TEST_LOCATION );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, TARGET_MIX_COLOR );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, TARGET_MIX_COLOR );
blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
Renderer renderer = actor.GetRendererAt(0);
tet_infoline("Test that the renderer has the opacity property");
- Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
DALI_TEST_CHECK( index != Property::INVALID_INDEX );
Property::Map map;
map["target"] = "testVisual";
- map["property"] = DevelVisual::Property::OPACITY;
+ map["property"] = Visual::Property::OPACITY;
map["targetValue"] = 0.1f;
map["animator"] = Property::Map()
.Add("alphaFunction", "LINEAR")
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Renderer renderer = actor.GetRendererAt(0);
- Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
+ Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR );
tet_infoline("Test that the renderer has the mixColor property");
DALI_TEST_CHECK( index != Property::INVALID_INDEX );
tet_infoline( "Request remote image visual, then destroy visual to cancel load" );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME );
TestGlAbstraction& gl = application.GetGlAbstraction();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_INVALID_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_INVALID_FILE_NAME );
propertyMap.Insert( ImageVisual::Property::SYNCHRONOUS_LOADING, true );
// Local invalid file, asynchronous loading
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_INVALID_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
- propertyMap.Insert( DevelImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME );
+ propertyMap.Insert( ImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( visual );
Property::Map testMap;
visual.CreatePropertyMap(testMap);
- DALI_TEST_EQUALS(*testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION );
+ DALI_TEST_EQUALS(*testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION );
// For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied.
// Image with a size smaller than 512*512 will be uploaded as a part of the atlas.
actor.SetSize( 200.f, 200.f );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
END_TEST;
}
const std::string MASK_IMAGE = TEST_REMOTE_IMAGE_FILE_NAME;
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
propertyMap.Insert( "alphaMaskUrl", MASK_IMAGE );
Property::Map testMap;
visual.CreatePropertyMap(testMap);
- DALI_TEST_EQUALS(*testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(MASK_IMAGE), TEST_LOCATION );
+ DALI_TEST_EQUALS(*testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(MASK_IMAGE), TEST_LOCATION );
// For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied.
// Image with a size smaller than 512*512 will be uploaded as a part of the atlas.
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
actor.SetSize( 200.f, 200.f );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
- propertyMap.Insert( DevelImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME );
- propertyMap.Insert( DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.6f );
- propertyMap.Insert( DevelImageVisual::Property::CROP_TO_MASK, true );
+ propertyMap.Insert( ImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME );
+ propertyMap.Insert( ImageVisual::Property::MASK_CONTENT_SCALE, 1.6f );
+ propertyMap.Insert( ImageVisual::Property::CROP_TO_MASK, true );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( visual );
Property::Map testMap;
visual.CreatePropertyMap(testMap);
- DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION );
- DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::MASK_CONTENT_SCALE), Property::Value(1.6f), TEST_LOCATION );
- DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::CROP_TO_MASK),Property::Value(true), TEST_LOCATION );
+ DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION );
+ DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::MASK_CONTENT_SCALE), Property::Value(1.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::CROP_TO_MASK),Property::Value(true), TEST_LOCATION );
// For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied.
// Image with a size smaller than 512*512 will be uploaded as a part of the atlas.
actor.SetSize( 200.f, 200.f );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DALI_TEST_EQUALS( size, Vector2( 100.0f, 100.0f ), 0.001f, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelControl::IsResourceReady( actor ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
END_TEST;
}
/*
- * 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.
#include <dali.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
-
using namespace Dali;
using namespace Toolkit;
/*
- * Copyright (c) 2014 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.
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/pan-gesture-event.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
-
using namespace Dali;
using namespace Toolkit;
DALI_TEST_EQUALS( view.GetProperty(ItemView::Property::REFRESH_INTERVAL).Get<float>(), 11.0f, TEST_LOCATION );
// Test "layout" property
- DALI_TEST_CHECK( view.GetPropertyIndex("layout") == DevelItemView::Property::LAYOUT );
+ DALI_TEST_CHECK( view.GetPropertyIndex("layout") == ItemView::Property::LAYOUT );
Property::Map gridLayoutProperty;
gridLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::GRID) );
gridLayoutProperty.Insert( DefaultItemLayoutProperty::ITEM_SIZE, Dali::Property::Value(Vector3(200, 200,50)) );
layoutArray.PushBack(spiralLayoutPrperty);
layoutArray.PushBack(listLayoutPrperty);
- view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+ view.SetProperty( ItemView::Property::LAYOUT, layoutArray);
Property::Array getLayoutArray;
- DALI_TEST_CHECK( view.GetProperty(DevelItemView::Property::LAYOUT ).Get( getLayoutArray ) );
+ DALI_TEST_CHECK( view.GetProperty( ItemView::Property::LAYOUT ).Get( getLayoutArray ) );
//Check that the result is the same as
DALI_TEST_EQUALS( layoutArray.Count(), getLayoutArray.Count(), TEST_LOCATION );
DALI_TEST_EQUALS(number, 4, TEST_LOCATION );
}
}
- view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+ view.SetProperty( ItemView::Property::LAYOUT, layoutArray);
// Test "overshootEnabled" property
/*
- * Copyright (c) 2014 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.
manager.SetFocus( dummy3 );
DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
- Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", DevelDevice::Class::TOUCH, DevelDevice::Subclass::NONE );
+ Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", Device::Class::TOUCH, Device::Subclass::NONE );
application.ProcessEvent(event);
DALI_TEST_CHECK( callback1.mIsCalled );
manager.SetFocus( dummy3 );
DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
- Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", DevelDevice::Class::TOUCH, DevelDevice::Subclass::NONE );
+ Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", Device::Class::TOUCH, Device::Subclass::NONE );
application.ProcessEvent(event);
DALI_TEST_CHECK( !callback1.mIsCalled );
FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
manager.FocusedActorEnterKeySignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
- Integration::KeyEvent returnEvent( "Return", "", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+ Integration::KeyEvent returnEvent( "Return", "", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
// Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
// It makes mIsFocusIndicatorEnabled true
FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
- Integration::KeyEvent tabEvent( "Tab", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent shiftTabEvent( "Tab", "", 0, 1, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+ Integration::KeyEvent tabEvent( "Tab", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent shiftTabEvent( "Tab", "", 0, 1, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
// Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
// It makes mIsFocusIndicatorEnabled true
FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
- Integration::KeyEvent leftEvent( "Left", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent rightEvent( "Right", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent upEvent( "Up", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent downEvent( "Down", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent pageUpEvent( "Prior", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
- Integration::KeyEvent pageDownEvent( "Next", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+ Integration::KeyEvent leftEvent( "Left", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent rightEvent( "Right", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent upEvent( "Up", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent downEvent( "Down", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent pageUpEvent( "Prior", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent pageDownEvent( "Next", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
// Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
// It makes mIsFocusIndicatorEnabled true
/*
- * 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.
unsigned long timeStamp,
const Integration::KeyEvent::State& keyState,
const std::string& deviceName = "",
- const DevelDevice::Class::Type& deviceClass = DevelDevice::Class::NONE,
- const DevelDevice::Subclass::Type& deviceSubclass = DevelDevice::Subclass::NONE
+ const Device::Class::Type& deviceClass = Device::Class::NONE,
+ const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE
)
{
return Integration::KeyEvent( keyName,
popup.SetKeyInputFocus();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DevelDevice::Class::TOUCH, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", Device::Class::TOUCH, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
/*
- * 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.
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
using namespace Dali;
using namespace Dali::Toolkit;
DALI_TEST_EQUALS( textString, std::string( "test1" ), TEST_LOCATION );
Property::Map textVisualMap2;
- textVisualMap2.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ textVisualMap2.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
textVisualMap2.Insert( Toolkit::TextVisual::Property::TEXT, "test2" );
textVisualMap2.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 12.0f );
progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, textVisualMap2);
/*
- * Copyright (c) 2014 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.
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
#include <dali/devel-api/adaptor-framework/image-loading.h>
application.Render();
pushButton.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
);
PushButton pushButton = PushButton::New();
pushButton.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
);
/*
- * Copyright (c) 2014 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.
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
using namespace Dali;
using namespace Dali::Toolkit;
RadioButton radioButton = RadioButton::New();
radioButton.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
);
RadioButton radioButton = RadioButton::New();
radioButton.SetProperty( Toolkit::Button::Property::LABEL,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
);
/*
- * Copyright (c) 2015 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.
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/pan-gesture-event.h>
-#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar-devel.h>
using namespace Dali;
using namespace Toolkit;
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
- float transientDuration = scrollBar.GetProperty<float>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+ float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
float totalVisibleDuration = hideDuration + transientDuration;
// Check that the default duration is greater than 0
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
- float transientDuration = scrollBar.GetProperty<float>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+ float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
float totalVisibleDuration = hideDuration + transientDuration;
// Check that the default duration is greater than 0
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
- float transientDuration = scrollBar.GetProperty<float>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+ float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
float totalVisibleDuration = hideDuration + transientDuration;
// Check that the default duration is greater than 0
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/pan-gesture-event.h>
-#include <dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h>
-#include <dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h>
using namespace Dali;
using namespace Toolkit;
rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, pageSize.width );
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, pageSize.width*3 );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, false );
- scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap);
+ scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 );
- scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap);
+ scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 );
- scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap);
+ scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
Property::Map rulerMap;
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, true );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
- scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap);
+ scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
/*
- * 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.
Property::Map effect = Toolkit::CreateAlphaDiscardEffect();
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
Property::Map effect = Toolkit::CreateDissolveEffect( highPrecision );
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
Property::Map effect = Toolkit::CreateDistanceFieldEffect();
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
Property::Map effect = Toolkit::CreateImageRegionEffect();
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
Property::Map effect = Toolkit::CreateMotionBlurEffect();
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
Property::Map effect = Toolkit::CreateMotionStretchEffect();
DALI_TEST_CHECK( !effect.Empty() );
- Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER );
+ Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER );
DALI_TEST_CHECK( customShaderValue );
Property::Map customShader;
unsigned long timeStamp,
const Integration::KeyEvent::State& keyState,
const std::string& deviceName = DEFAULT_DEVICE_NAME,
- const DevelDevice::Class::Type& deviceClass = DevelDevice::Class::NONE,
- const DevelDevice::Subclass::Type& deviceSubclass = DevelDevice::Subclass::NONE )
+ const Device::Class::Type& deviceClass = Device::Class::NONE,
+ const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
{
return Integration::KeyEvent( keyName,
keyString,
{
}
- void Callback( TextEditor editor, DevelTextEditor::Scroll::Type type )
+ void Callback( TextEditor editor, TextEditor::Scroll::Type type )
{
- if( type == DevelTextEditor::Scroll::STARTED )
+ if( type == TextEditor::Scroll::STARTED )
{
mStartedCalled = true;
}
- else if( type == DevelTextEditor::Scroll::FINISHED )
+ else if( type == TextEditor::Scroll::FINISHED )
{
mFinishedCalled = true;
}
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_EMBOSS ) == TextEditor::Property::INPUT_EMBOSS );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextEditor::Property::OUTLINE );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_OUTLINE ) == TextEditor::Property::INPUT_OUTLINE );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL ) == DevelTextEditor::Property::SMOOTH_SCROLL );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL_DURATION ) == DevelTextEditor::Property::SMOOTH_SCROLL_DURATION );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SCROLL_BAR ) == DevelTextEditor::Property::ENABLE_SCROLL_BAR );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SCROLL_BAR_SHOW_DURATION ) == DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SCROLL_BAR_FADE_DURATION ) == DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == DevelTextEditor::Property::PIXEL_SIZE );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_LINE_COUNT) == DevelTextEditor::Property::LINE_COUNT );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL ) == TextEditor::Property::SMOOTH_SCROLL );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL_DURATION ) == TextEditor::Property::SMOOTH_SCROLL_DURATION );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SCROLL_BAR ) == TextEditor::Property::ENABLE_SCROLL_BAR );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SCROLL_BAR_SHOW_DURATION ) == TextEditor::Property::SCROLL_BAR_SHOW_DURATION );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SCROLL_BAR_FADE_DURATION ) == TextEditor::Property::SCROLL_BAR_FADE_DURATION );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == TextEditor::Property::PIXEL_SIZE );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_LINE_COUNT) == TextEditor::Property::LINE_COUNT );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SELECTION ) == TextEditor::Property::ENABLE_SELECTION );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER ) == TextEditor::Property::PLACEHOLDER );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT ) == DevelTextEditor::Property::PLACEHOLDER_TEXT );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR ) == DevelTextEditor::Property::PLACEHOLDER_TEXT_COLOR );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SELECTION ) == DevelTextEditor::Property::ENABLE_SELECTION );
- DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER ) == DevelTextEditor::Property::PLACEHOLDER );
END_TEST;
}
DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::INPUT_EMBOSS ), std::string("Emboss input properties"), TEST_LOCATION );
// Check the outline property
+
+ // Test string type first
+ // This is purely to maintain backward compatibility, but we don't support string as the outline property type.
+ editor.SetProperty( TextEditor::Property::OUTLINE, "Outline properties" );
+ DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION );
+
+ // Then test the property map type
Property::Map outlineMapSet;
Property::Map outlineMapGet;
DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::INPUT_OUTLINE ), std::string("Outline input properties"), TEST_LOCATION );
// Check the smooth scroll property
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), false, TEST_LOCATION );
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL, true );
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::SMOOTH_SCROLL ), false, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
// Check the smooth scroll duration property
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Check the scroll bar property
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::ENABLE_SCROLL_BAR ), false, TEST_LOCATION );
- editor.SetProperty( DevelTextEditor::Property::ENABLE_SCROLL_BAR, true );
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::ENABLE_SCROLL_BAR ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::ENABLE_SCROLL_BAR ), false, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::ENABLE_SCROLL_BAR ), true, TEST_LOCATION );
- editor.SetProperty( DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION, 0.3f );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION ), 0.3f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- editor.SetProperty( DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION, 0.2f );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::SCROLL_BAR_SHOW_DURATION, 0.3f );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_SHOW_DURATION ), 0.3f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::SCROLL_BAR_FADE_DURATION, 0.2f );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Check the pixel size of font
- editor.SetProperty( DevelTextEditor::Property::PIXEL_SIZE, 20.f );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::PIXEL_SIZE, 20.f );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Check placeholder text properties.
editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
DALI_TEST_EQUALS( editor.GetProperty<Vector4>( DevelTextEditor::Property::PLACEHOLDER_TEXT_COLOR ), Color::RED, TEST_LOCATION );
// Check the enable selection property
- editor.SetProperty( DevelTextEditor::Property::ENABLE_SELECTION, false );
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::ENABLE_SELECTION ), false, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::ENABLE_SELECTION, false );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::ENABLE_SELECTION ), false, TEST_LOCATION );
// Check the placeholder property with pixel size
Property::Map placeholderPixelSizeMapSet;
placeholderFontstyleMap.Insert( "weight", "bold" );
placeholderPixelSizeMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
+ editor.SetProperty( TextEditor::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
- placeholderPixelSizeMapGet = editor.GetProperty<Property::Map>( DevelTextEditor::Property::PLACEHOLDER );
+ placeholderPixelSizeMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderPixelSizeMapGet.Count(), placeholderPixelSizeMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderPixelSizeMapGet, placeholderPixelSizeMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Insert( "width", "condensed" );
placeholderFontstyleMap.Insert( "slant", "italic" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, placeholderMapSet );
+ editor.SetProperty( TextEditor::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = editor.GetProperty<Property::Map>( DevelTextEditor::Property::PLACEHOLDER );
+ placeholderMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Insert( "weight", "normal" );
placeholderFontstyleMap.Insert( "slant", "oblique" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, placeholderMapSet );
+ editor.SetProperty( TextEditor::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = editor.GetProperty<Property::Map>( DevelTextEditor::Property::PLACEHOLDER );
+ placeholderMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Clear();
placeholderFontstyleMap.Insert( "slant", "roman" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, placeholderMapSet );
+ editor.SetProperty( TextEditor::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = editor.GetProperty<Property::Map>( DevelTextEditor::Property::PLACEHOLDER );
+ placeholderMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::PLACEHOLDER );
placeholderFontstyleMap.Clear();
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = editor.GetProperty<Property::Map>( DevelTextEditor::Property::PLACEHOLDER );
+ editor.SetProperty( TextEditor::Property::PLACEHOLDER, placeholderMapSet );
+ placeholderMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
editor.SetKeyInputFocus();
gTextChangedCallBackCalled = false;
- application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
DALI_TEST_CHECK( gTextChangedCallBackCalled );
END_TEST;
gInputStyleMask = TextEditor::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
gInputStyleMask = TextEditor::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
gInputStyleMask = TextEditor::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
editor.SetProperty( TextEditor::Property::INPUT_EMBOSS, "emboss" );
editor.SetProperty( TextEditor::Property::INPUT_OUTLINE, "outline" );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Add a key event but as the text editor has not the focus it should do nothing.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Now the text editor has the focus, so it can handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// The second text editor has the focus. It should handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
// Now the text editor has the focus, so it can handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
// Move the cursor and check the position changes.
Vector3 position1 = cursor.GetCurrentPosition();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( position2.x < position1.x );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( position5.x > position4.x );
// Remove all the text.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
editor.SetProperty( TextEditor::Property::TEXT, "" );
// Render and notify
application.Render();
// Move at the end of the text.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
for( unsigned int index = 0u; index < 10u; ++index )
{
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
}
// Add a character
- application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( "Hello\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
// Add some key events
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
for( unsigned int index = 0u; index < 10u; ++index )
{
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
}
// Add a character
- application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
editor.SetSize( 50.f, 50.f );
editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL, true );
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
- editor.SetProperty( DevelTextEditor::Property::ENABLE_SCROLL_BAR, true );
- editor.SetProperty( DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION, 0.3f );
- editor.SetProperty( DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION, 0.2f );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
+ editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
+ editor.SetProperty( TextEditor::Property::SCROLL_BAR_SHOW_DURATION, 0.3f );
+ editor.SetProperty( TextEditor::Property::SCROLL_BAR_FADE_DURATION, 0.2f );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
application.Render();
// Move at the end of the text.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
for( unsigned int index = 0u; index < 10u; ++index )
{
// Add a character
- application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
}
// Modify duration after scroll is enabled
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.1f );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL_DURATION, 0.1f );
// Continuous scroll left to increase coverage
for( unsigned int index = 0u; index < 10u; ++index )
{
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
}
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.1f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
- DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::ENABLE_SCROLL_BAR ), true, TEST_LOCATION );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION ), 0.3f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.1f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( TextEditor::Property::ENABLE_SCROLL_BAR ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_SHOW_DURATION ), 0.3f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<float>( TextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Press Escape to increase coverage
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
application.Render();
// Move to seconds line of the text.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
// Add another script characters ( glyph height is defferent )
- application.ProcessEvent( GenerateKey( "d", "ㅁ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "d", "ኢ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "ㅁ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "ኢ", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Delete characters
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
DALI_TEST_EQUALS( layoutHeight, editor.GetHeightForWidth( 100.f ), TEST_LOCATION );
DALI_TEST_EQUALS( "Hello\nworld\nHello world", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
// For coverage
- application.ProcessEvent( GenerateKey( "", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_VOLUME_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::GRAB_HANDLE_IMAGE, HANDLE_IMAGE_FILE_NAME );
- editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL, true );
+ editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true );
editor.SetSize( 30.f, 500.f );
editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
Stage::GetCurrent().Add( editor );
editor.SetSize( 100.0f, 100.0f );
- lineCount = editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 14, TEST_LOCATION );
editor.SetSize( 50.0f, 100.0f );
- lineCount = editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 28, TEST_LOCATION );
END_TEST;
editor.SetSize( 50.f, 50.f );
editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- editor.SetProperty( DevelTextEditor::Property::ENABLE_SCROLL_BAR, true );
+ editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
editor.SetKeyboardFocusable(true);
bool startedCalled = false;
bool finishedCalled = false;
ScrollStateChangeCallback callback( startedCalled, finishedCalled );
- DevelTextEditor::ScrollStateChangedSignal( editor ).Connect( &callback, &ScrollStateChangeCallback::Callback );
+ editor.ScrollStateChangedSignal().Connect( &callback, &ScrollStateChangeCallback::Callback );
KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
END_TEST;
}
-int UtcDaliToolkitTextEditorTextWarpMode(void)
+
+int UtcDaliToolkitTextEditorTextWrapMode(void)
{
ToolkitTestApplication application;
tet_infoline(" UtcDaliToolkitTextEditorTextWarpMode");
Stage::GetCurrent().Add( editor );
- editor.SetProperty( DevelTextEditor::Property::LINE_WRAP_MODE, "WORD" );
+ editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, "WORD" );
+ DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
application.SendNotification();
application.Render();
- lineCount = editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
+ editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, "CHARACTER" );
+ DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render();
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
+ DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
- editor.SetProperty( DevelTextEditor::Property::LINE_WRAP_MODE, "CHARACTER" );
+ editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, Text::LineWrap::WORD );
+ DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
application.SendNotification();
application.Render();
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
+ DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
+
+ editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, Text::LineWrap::CHARACTER );
+ DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render();
- lineCount = editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+ lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
END_TEST;
#include <dali/integration-api/events/long-press-gesture-event.h>
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/text-controls/hidden-input-properties.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
#include "toolkit-clipboard.h"
using namespace Dali;
unsigned long timeStamp,
const Integration::KeyEvent::State& keyState,
const std::string& deviceName = DEFAULT_DEVICE_NAME,
- const DevelDevice::Class::Type& deviceClass = DevelDevice::Class::NONE,
- const DevelDevice::Subclass::Type& deviceSubclass = DevelDevice::Subclass::NONE )
+ const Device::Class::Type& deviceClass = Device::Class::NONE,
+ const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE )
{
return Integration::KeyEvent( keyName,
keyString,
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_EMBOSS ) == TextField::Property::INPUT_EMBOSS );
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextField::Property::OUTLINE );
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_OUTLINE ) == TextField::Property::INPUT_OUTLINE );
- DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_HIDDEN_INPUT_SETTINGS ) == DevelTextField::Property::HIDDEN_INPUT_SETTINGS );
- DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == DevelTextField::Property::PIXEL_SIZE );
- DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_SELECTION ) == DevelTextField::Property::ENABLE_SELECTION );
- DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER ) == DevelTextField::Property::PLACEHOLDER );
- DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == DevelTextField::Property::ELLIPSIS );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_HIDDEN_INPUT_SETTINGS ) == TextField::Property::HIDDEN_INPUT_SETTINGS );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == TextField::Property::PIXEL_SIZE );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_SELECTION ) == TextField::Property::ENABLE_SELECTION );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER ) == TextField::Property::PLACEHOLDER );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == TextField::Property::ELLIPSIS );
END_TEST;
}
DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_EMBOSS ), std::string("Emboss input properties"), TEST_LOCATION );
// Check the outline property
+
+ // Test string type first
+ // This is purely to maintain backward compatibility, but we don't support string as the outline property type.
+ field.SetProperty( TextField::Property::OUTLINE, "Outline properties" );
+ DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION );
+
+ // Then test the property map type
Property::Map outlineMapSet;
Property::Map outlineMapGet;
Property::Map hiddenMapSet;
Property::Map hiddenMapGet;
hiddenMapSet[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
- hiddenMapSet[ HiddenInput::Property::SHOW_DURATION ] = 2;
+ hiddenMapSet[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 2;
hiddenMapSet[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 4;
hiddenMapSet[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, hiddenMapSet );
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, hiddenMapSet );
- hiddenMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::HIDDEN_INPUT_SETTINGS );
+ hiddenMapGet = field.GetProperty<Property::Map>( TextField::Property::HIDDEN_INPUT_SETTINGS );
DALI_TEST_EQUALS( hiddenMapSet.Count(), hiddenMapGet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( hiddenMapSet, hiddenMapGet ), true, TEST_LOCATION );
// Check the pixel size of font
- field.SetProperty( DevelTextField::Property::PIXEL_SIZE, 20.f );
- DALI_TEST_EQUALS( field.GetProperty<float>( DevelTextField::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ field.SetProperty( TextField::Property::PIXEL_SIZE, 20.f );
+ DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// Check the enable selection property
- field.SetProperty( DevelTextField::Property::ENABLE_SELECTION, false );
- DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_SELECTION ), false, TEST_LOCATION );
+ field.SetProperty( TextField::Property::ENABLE_SELECTION, false );
+ DALI_TEST_EQUALS( field.GetProperty<bool>( TextField::Property::ENABLE_SELECTION ), false, TEST_LOCATION );
// Check the placeholder property with pixel size
Property::Map placeholderPixelSizeMapSet;
placeholderFontstyleMap.Insert( "weight", "bold" );
placeholderPixelSizeMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- field.SetProperty( DevelTextField::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
+ field.SetProperty( TextField::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
- placeholderPixelSizeMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::PLACEHOLDER );
+ placeholderPixelSizeMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderPixelSizeMapGet.Count(), placeholderPixelSizeMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderPixelSizeMapGet, placeholderPixelSizeMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Insert( "width", "condensed" );
placeholderFontstyleMap.Insert( "slant", "italic" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- field.SetProperty( DevelTextField::Property::PLACEHOLDER, placeholderMapSet );
+ field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::PLACEHOLDER );
+ placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Insert( "weight", "normal" );
placeholderFontstyleMap.Insert( "slant", "oblique" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- field.SetProperty( DevelTextField::Property::PLACEHOLDER, placeholderMapSet );
+ field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::PLACEHOLDER );
+ placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
placeholderFontstyleMap.Clear();
placeholderFontstyleMap.Insert( "slant", "roman" );
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- field.SetProperty( DevelTextField::Property::PLACEHOLDER, placeholderMapSet );
+ field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::PLACEHOLDER );
+ placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
placeholderFontstyleMap.Clear();
placeholderMapSet["placeholderFontStyle"] = placeholderFontstyleMap;
- field.SetProperty( DevelTextField::Property::PLACEHOLDER, placeholderMapSet );
- placeholderMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::PLACEHOLDER );
+ field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
+ placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
// Check the ellipsis property
- DALI_TEST_CHECK( !field.GetProperty<bool>( DevelTextField::Property::ELLIPSIS ) );
- field.SetProperty( DevelTextField::Property::ELLIPSIS, true );
- DALI_TEST_CHECK( field.GetProperty<bool>( DevelTextField::Property::ELLIPSIS ) );
+ DALI_TEST_CHECK( !field.GetProperty<bool>( TextField::Property::ELLIPSIS ) );
+ field.SetProperty( TextField::Property::ELLIPSIS, true );
+ DALI_TEST_CHECK( field.GetProperty<bool>( TextField::Property::ELLIPSIS ) );
END_TEST;
}
field.SetKeyInputFocus();
gTextChangedCallBackCalled = false;
- application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
DALI_TEST_CHECK( gTextChangedCallBackCalled );
END_TEST;
gMaxCharactersCallBackCalled = false;
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
DALI_TEST_CHECK( maxLengthReachedSignal );
gMaxCharactersCallBackCalled = false;
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
DALI_TEST_CHECK( !maxLengthReachedSignal );
gInputStyleMask = TextField::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
gInputStyleMask = TextField::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
gInputStyleMask = TextField::InputStyle::NONE;
inputStyleChangedSignal = false;
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Add a key event but as the text field has not the focus it should do nothing.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Now the text field has the focus, so it can handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// The second text field has the focus. It should handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
// Now the text field has the focus, so it can handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
// Move the cursor and check the position changes.
Vector3 position1 = cursor.GetCurrentPosition();
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( position2.x < position1.x );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( position5.x > position4.x );
// Remove all the text.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
field.SetProperty( TextField::Property::TEXT, "" );
// Render and notify
Property::Map map;
map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_NONE;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
map[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_COUNT;
map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
for( unsigned int index = 0u; index < 5u; ++index )
{
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
}
map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_COUNT;
map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
for( unsigned int index = 0u; index < 5u; ++index )
{
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
}
map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_LAST_CHARACTER;
- map[ HiddenInput::Property::SHOW_DURATION ] = 0;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 0;
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- map[ HiddenInput::Property::SHOW_DURATION ] = 100;
- field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
- application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 100;
+ field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
+ application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
Property::Map mapGet;
- mapGet = field.GetProperty<Property::Map>( DevelTextField::Property::HIDDEN_INPUT_SETTINGS );
+ mapGet = field.GetProperty<Property::Map>( TextField::Property::HIDDEN_INPUT_SETTINGS );
DALI_TEST_EQUALS( map.Count(), mapGet.Count(), TEST_LOCATION );
DALI_TEST_EQUALS( DaliTestCheckMaps( map, mapGet ), true, TEST_LOCATION );
END_TEST;
DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
// Press Escape to increase coverage
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
application.Render();
// Add a key event but as the text field has not the focus it should do nothing.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Now the text field has the focus, so it can handle the key events.
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
// Generate a Esc key event. The text field should lose the focus.
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
// No more text should be introduced
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Generate a Esc key event. The text field should lose the focus.
- application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Generate a Esc key event. The text field should lose the focus.
- application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
// Generate a Esc key event. The text field should lose the focus.
- application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( previousHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ) , TEST_LOCATION );
// Add another script characters ( glyph height is defferent )
- application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
- application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "ㅁ", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
#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( label.GetProperty<std::string>( TextLabel::Property::EMBOSS ), std::string("Emboss properties"), TEST_LOCATION );
// Check the outline property
+
+ // Test string type first
+ // This is purely to maintain backward compatibility, but we don't support string as the outline property type.
+ label.SetProperty( TextLabel::Property::OUTLINE, "Outline properties" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION );
+
+ // Then test the property map type
Property::Map outlineMapSet;
Property::Map outlineMapGet;
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
{
END_TEST;
}
-int UtcDaliToolkitTextlabelTextWarpMode(void)
+int UtcDaliToolkitTextlabelTextWrapMode(void)
{
ToolkitTestApplication application;
tet_infoline(" UtcDaliToolkitTextlabelTextWarpMode");
//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, "WORD" );
+ DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
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( TextLabel::Property::LINE_WRAP_MODE, "CHARACTER" );
+ DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION );
+ application.SendNotification();
+ application.Render();
- label.SetProperty( DevelTextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_CHARACTER" );
+ label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, Text::LineWrap::WORD );
+ DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
application.SendNotification();
application.Render();
+ lineCount = label.GetProperty<int>( TextLabel::Property::LINE_COUNT );
+ DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, Text::LineWrap::CHARACTER );
+ DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION );
- lineCount = label.GetProperty<int>( DevelTextLabel::Property::LINE_COUNT );
+ application.SendNotification();
+ application.Render();
+
+ lineCount = label.GetProperty<int>( TextLabel::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
+ tet_infoline( "Ensure invalid string does not change wrapping mode" );
+ label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "InvalidWrapMode" );
+ DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), 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;
}
/*
- * 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.
VisualFactory factory = VisualFactory::Get();
Dali::Property::Map map;
- map[ Visual::Property::TYPE ] = Visual::COLOR;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
map[ ColorVisual::Property::MIX_COLOR ] = color;
Visual::Base colorVisual = factory.CreateVisual( map );
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, colorVisual );
/*
- * 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.
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/popup/popup.h>
#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
#include <dali/integration-api/events/hover-event-integ.h>
using namespace Dali;
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
- Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
.Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) )
);
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
- Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
.Add( TextVisual::Property::POINT_SIZE, 20 ) )
);
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
- Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, "dummy-url.png" ) )
);
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP,
- Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+ Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, "dummy-url.png" ) )
- .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+ .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
.Add( TextVisual::Property::TEXT, "Hello Array Test" ) )
);
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
- Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
.Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) )
.Add( Tooltip::Property::LAYOUT, Vector2( 1.0f, 2.0f ) )
.Add( Tooltip::Property::WAIT_TIME, 2.5f )
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
- Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+ Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, "dummy-url.png" ) )
- .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+ .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT )
.Add( TextVisual::Property::TEXT, "Hello Array Test" ) ))
.Add( Tooltip::Property::TAIL,
Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
#include "dummy-control.h"
using namespace Dali;
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
application.SendNotification();
application.Render(0);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
application.SendNotification();
application.Render(0);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, PrimitiveVisual::Property::MIX_COLOR );
- Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
application.SendNotification();
application.Render(0);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
application.SendNotification();
application.Render(0);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
application.SendNotification();
application.Render(0);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
tet_printf( "Test that the property has been set to target value\n");
DALI_TEST_EQUALS(renderer.GetProperty<Vector3>(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION);
Renderer renderer = actor.GetRendererAt(0);
Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
- Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY );
+ Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
tet_printf( "Test that the property has been set to target value\n");
DALI_TEST_EQUALS(renderer.GetProperty<Vector3>(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION);
#include <unistd.h>
#include <dali-toolkit-test-suite-utils.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/rendering/shader.h>
#include <dali/devel-api/object/handle-devel.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
-#include <dali-toolkit/devel-api/align-enums.h>
#include <dali-toolkit/dali-toolkit.h>
#include "dummy-control.h"
{
Property::Map transformMap;
transformMap
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) );
return transformMap;
}
DALI_TEST_CHECK( value->Get( mixColor1 ) );
DALI_TEST_EQUALS( mixColor1, Vector3(testColor), 0.001, TEST_LOCATION );
- value = map.Find( DevelVisual::Property::MIX_COLOR );
+ value = map.Find( Visual::Property::MIX_COLOR );
DALI_TEST_CHECK( value );
Vector4 mixColor2;
DALI_TEST_CHECK( value->Get( mixColor2 ) );
DALI_TEST_EQUALS( mixColor2, testColor, 0.001, TEST_LOCATION );
- value = map.Find( DevelVisual::Property::OPACITY );
+ value = map.Find( Visual::Property::OPACITY );
DALI_TEST_CHECK( value );
float opacity;
DALI_TEST_CHECK( value->Get( opacity ) );
// color colorVisual
Dali::Property::Map map;
- map[ Visual::Property::TYPE ] = Visual::COLOR;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
map[ ColorVisual::Property::MIX_COLOR ] = Color::MAGENTA;
Visual::Base colorVisual = factory.CreateVisual( map );
// border visual
float borderSize = 5.f;
map.Clear();
- map[ Visual::Property::TYPE ] = Visual::BORDER;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
map[ BorderVisual::Property::COLOR ] = Color::RED;
map[ BorderVisual::Property::SIZE ] = borderSize;
Visual::Base borderVisual = factory.CreateVisual( map );
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
propertyMap.Clear();
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
propertyMap.Insert( TextVisual::Property::ENABLE_MARKUP, true );
propertyMap.Insert( TextVisual::Property::TEXT, "<font family='TizenSans' size='12'>Hello world</font>" );
propertyMap.Insert( TextVisual::Property::MULTI_LINE, true );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
- propertyMap.Insert(DevelVisual::Property::MIX_COLOR, Color::BLUE);
+ propertyMap.Insert(Visual::Property::MIX_COLOR, Color::BLUE);
Visual::Base colorVisual = factory.CreateVisual( propertyMap );
Property::Map resultMap;
colorVisual.CreatePropertyMap( resultMap );
- Property::Value* typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( typeValue->Get<int>() == Visual::COLOR );
borderVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- Property::Value* typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( typeValue->Get<int>() == Visual::BORDER );
DALI_TEST_CHECK( AAValue->Get<bool>() == true );
Property::Map propertyMap1;
- propertyMap1[ Visual::Property::TYPE ] = Visual::BORDER;
+ propertyMap1[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
propertyMap1[ BorderVisual::Property::COLOR ] = Color::CYAN;
propertyMap1[ BorderVisual::Property::SIZE ] = 10.0f;
borderVisual = factory.CreateVisual( propertyMap1 );
borderVisual.CreatePropertyMap( resultMap );
- typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( typeValue->Get<int>() == Visual::BORDER );
gradientVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<int>() == Visual::GRADIENT );
gradientVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<int>() == Visual::GRADIENT );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::MAGENTA );
propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 20 );
propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 30 );
imageVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<int>() == Visual::IMAGE );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
- value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 );
+ value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<Vector4>() == Color::MAGENTA );
imageVisual = factory.CreateVisual(image);
imageVisual.CreatePropertyMap( resultMap );
- value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<int>() == Visual::IMAGE );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( "mixColor", Color::MAGENTA );
propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
propertyMap.Insert( ImageVisual::Property::BORDER_ONLY, true );
- propertyMap.Insert( DevelImageVisual::Property::BORDER, border );
+ propertyMap.Insert( ImageVisual::Property::BORDER, border );
Visual::Base nPatchVisual = factory.CreateVisual( propertyMap );
Property::Map resultMap;
nPatchVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::N_PATCH );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::N_PATCH );
- value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 );
+ value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<Vector4>() == Color::MAGENTA );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<bool>() );
- value = resultMap.Find( DevelImageVisual::Property::BORDER, Property::RECTANGLE );
+ value = resultMap.Find( ImageVisual::Property::BORDER, Property::RECTANGLE );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get< Rect< int > >() == border );
Vector4 border1( 1.0f, 1.0f, 1.0f, 1.0f );
Property::Map propertyMap1;
- propertyMap1.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap1.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap1.Insert( "mixColor", Color::MAGENTA );
propertyMap1.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
propertyMap1.Insert( ImageVisual::Property::BORDER_ONLY, true );
- propertyMap1.Insert( DevelImageVisual::Property::BORDER, border1 );
+ propertyMap1.Insert( ImageVisual::Property::BORDER, border1 );
nPatchVisual = factory.CreateVisual( propertyMap1 );
nPatchVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from visual
- value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::N_PATCH );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::N_PATCH );
- value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 );
+ value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<Vector4>() == Color::MAGENTA );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<bool>() );
- value = resultMap.Find( DevelImageVisual::Property::BORDER, Property::RECTANGLE );
+ value = resultMap.Find( ImageVisual::Property::BORDER, Property::RECTANGLE );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get< Rect< int > >() == border );
// request SvgVisual with a property map
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::SVG );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::WHITE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::SVG );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::WHITE );
propertyMap.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME );
Visual::Base svgVisual = factory.CreateVisual( propertyMap );
Property::Map resultMap;
svgVisual.CreatePropertyMap( resultMap );
// check the property values from the returned map from a visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::SVG );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::SVG );
value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
DALI_TEST_CHECK( value );
resultMap.Clear();
svgVisual2.CreatePropertyMap( resultMap );
// check the property values from the returned map from a visual
- value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<int>() == DevelVisual::SVG );
+ DALI_TEST_CHECK( value->Get<int>() == Visual::SVG );
value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
DALI_TEST_CHECK( value );
//Request MeshVisual using a property map.
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLUE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::BLUE );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_LOCATION );
Property::Map resultMap;
meshVisual.CreatePropertyMap( resultMap );
- TestMixColor( meshVisual, DevelVisual::Property::MIX_COLOR, Color::BLUE );
+ TestMixColor( meshVisual, Visual::Property::MIX_COLOR, Color::BLUE );
//Check values in the result map are identical to the initial map's values.
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), (int)Visual::MESH, TEST_LOCATION );
//Request PrimitiveVisual using a property map.
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, color );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
primitiveVisual.CreatePropertyMap( resultMap );
//Check values in the result map are identical to the initial map's values.
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), (int)Visual::PRIMITIVE, TEST_LOCATION );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLACK );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::BLACK );
propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
propertyMap.Insert( "enableMarkup", false );
propertyMap.Insert( "text", "Hello world" );
textVisual.CreatePropertyMap( resultMap );
//Check values in the result map are identical to the initial map's values.
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_EQUALS( value->Get<int>(), (int)DevelVisual::TEXT, TEST_LOCATION );
+ DALI_TEST_EQUALS( value->Get<int>(), (int)Visual::TEXT, TEST_LOCATION );
- value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 );
+ value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<Vector4>(), Color::BLACK, 0.001f, TEST_LOCATION );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<bool>() );
- value = resultMap.Find( TextVisual::Property::HORIZONTAL_ALIGNMENT, Property::STRING );
+ value = resultMap.Find( TextVisual::Property::HORIZONTAL_ALIGNMENT, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_EQUALS( value->Get<std::string>(), "CENTER", TEST_LOCATION );
+ DALI_TEST_EQUALS( value->Get<int>(), (int)Text::HorizontalAlignment::CENTER, TEST_LOCATION );
- value = resultMap.Find( TextVisual::Property::VERTICAL_ALIGNMENT, Property::STRING );
+ value = resultMap.Find( TextVisual::Property::VERTICAL_ALIGNMENT, Property::INTEGER );
DALI_TEST_CHECK( value );
- DALI_TEST_EQUALS( value->Get<std::string>(), "CENTER", TEST_LOCATION );
+ DALI_TEST_EQUALS( value->Get<int>(), (int)Text::VerticalAlignment::CENTER, TEST_LOCATION );
value = resultMap.Find( TextVisual::Property::TEXT_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::BORDER);
- propertyMap.Insert(DevelVisual::Property::MIX_COLOR, Vector4(1, 1, 1, 0.8f));
+ propertyMap.Insert(Visual::Property::MIX_COLOR, Vector4(1, 1, 1, 0.8f));
propertyMap.Insert(BorderVisual::Property::COLOR, Color::BLUE);
propertyMap.Insert(BorderVisual::Property::SIZE, 5.f);
Visual::Base borderVisual = factory.CreateVisual( propertyMap );
Renderer renderer = actor.GetRendererAt(0);
Property::Index borderColorIndex = DevelHandle::GetPropertyIndex( renderer, BorderVisual::Property::COLOR );
- Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
+ Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR );
Animation animation = dummyImpl.CreateTransition( transition );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::WIREFRAME );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::WIREFRAME );
// Create the visual.
Visual::Base visual = factory.CreateVisual( propertyMap );
visual.CreatePropertyMap( resultMap );
// Check the property values from the returned map from visual
- Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
+ Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<int>() == Visual::WIREFRAME );
Dali::Property::Map visualMap;
colorVisual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM );
+ Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM );
Dali::Property::Map* map = value->GetMap();
DALI_TEST_CHECK( map );
//Test default values
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( typeValue->Get<Vector2>() == Vector2(0.0f,0.0f) );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( typeValue->Get<Vector2>() == Vector2(1.0f,1.0f) );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
+ DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
+ DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ORIGIN );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ORIGIN );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( (Toolkit::Align::Type)typeValue->Get<int>() == Toolkit::Align::TOP_BEGIN );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ANCHOR_POINT );
DALI_TEST_CHECK( typeValue );
DALI_TEST_CHECK( (Toolkit::Align::Type)typeValue->Get<int>() == Toolkit::Align::TOP_BEGIN );
}
static void TestTransform( ToolkitTestApplication& application, Visual::Base visual )
{
Property::Map transform;
- transform.Insert( DevelVisual::Transform::Property::OFFSET, Vector2(10.0f, 10.0f) );
- transform.Insert( DevelVisual::Transform::Property::SIZE, Vector2(0.2f, 0.2f) );
- transform.Insert( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) );
- transform.Insert( DevelVisual::Transform::Property::ORIGIN, "CENTER" );
- transform.Insert( DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::BOTTOM_END );
+ transform.Insert( Visual::Transform::Property::OFFSET, Vector2(10.0f, 10.0f) );
+ transform.Insert( Visual::Transform::Property::SIZE, Vector2(0.2f, 0.2f) );
+ transform.Insert( Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
+ transform.Insert( Visual::Transform::Property::ORIGIN, "CENTER" );
+ transform.Insert( Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::BOTTOM_END );
visual.SetTransformAndSize( transform, Vector2(100, 100) );
Dali::Property::Map visualMap;
visual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM );
+ Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM );
Dali::Property::Map* map = value->GetMap();
DALI_TEST_CHECK( map );
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET );
DALI_TEST_CHECK( typeValue );
DALI_TEST_EQUALS( typeValue->Get<Vector2>(),Vector2(10.0f,10.0f), TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE );
DALI_TEST_CHECK( typeValue );
DALI_TEST_EQUALS( typeValue->Get<Vector2>(), Vector2(0.2f,0.2f), TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ), TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ), TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ORIGIN );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ORIGIN );
DALI_TEST_CHECK( typeValue );
DALI_TEST_EQUALS( (Toolkit::Align::Type)typeValue->Get<int>(), Toolkit::Align::CENTER, TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ANCHOR_POINT );
DALI_TEST_CHECK( typeValue );
DALI_TEST_EQUALS( (Toolkit::Align::Type)typeValue->Get<int>(), Toolkit::Align::BOTTOM_END, TEST_LOCATION );
}
//Set a new transform
transform.Clear();
transform = DefaultTransform();
- transform.Insert( DevelVisual::Transform::Property::OFFSET, Vector2(20.0f, 20.0f) );
- transform.Insert( DevelVisual::Transform::Property::SIZE, Vector2(100.0f, 100.0f) );
- transform.Insert( DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) );
+ transform.Insert( Visual::Transform::Property::OFFSET, Vector2(20.0f, 20.0f) );
+ transform.Insert( Visual::Transform::Property::SIZE, Vector2(100.0f, 100.0f) );
+ transform.Insert( Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
visual.SetTransformAndSize( transform, Vector2(100, 100) );
application.SendNotification();
application.Render(0);
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap[ Visual::Property::TYPE ] = Visual::PRIMITIVE;
+ propertyMap[ Toolkit::Visual::Property::TYPE ] = Visual::PRIMITIVE;
propertyMap[ PrimitiveVisual::Property::MIX_COLOR ] = Color::WHITE;
propertyMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE;
propertyMap[ PrimitiveVisual::Property::SLICES ] = 10;
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::GRADIENT );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::GREEN );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::GRADIENT );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::GREEN );
Property::Array stopOffsets;
stopOffsets.PushBack( 0.0f );
propertyMap.Insert( GradientVisual::Property::RADIUS, 1.414f );
Visual::Base visual = factory.CreateVisual( propertyMap );
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::GREEN );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::GREEN );
END_TEST;
}
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::BORDER );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::BORDER );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::MAGENTA );
propertyMap.Insert( BorderVisual::Property::COLOR, Vector4(0.f, 1.f, 0.f, 0.6f) );
propertyMap.Insert( BorderVisual::Property::SIZE, 3.0f );
Visual::Base visual = factory.CreateVisual( propertyMap );
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::MAGENTA );
END_TEST;
}
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
- propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::CYAN );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Visual::Property::MIX_COLOR, Color::CYAN );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "lightPosition", Vector3( 5.0f, 10.0f, 15.0f) );
Visual::Base visual = factory.CreateVisual( propertyMap );
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::CYAN );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::CYAN );
END_TEST;
}
Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
Visual::Base visual = factory.CreateVisual(image);
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::WHITE );
END_TEST;
}
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
propertyMap[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE;
- propertyMap[DevelVisual::Property::MIX_COLOR] = Color::YELLOW;
+ propertyMap[Visual::Property::MIX_COLOR] = Color::YELLOW;
propertyMap[Toolkit::ImageVisual::Property::URL] = TEST_IMAGE_FILE_NAME;
propertyMap[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = 100.0f;
propertyMap[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = 100.0f;
propertyMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
Visual::Base visual = factory.CreateVisual(propertyMap);
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::YELLOW );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::YELLOW );
END_TEST;
}
Image image = ResourceImage::New(TEST_NPATCH_FILE_NAME, ImageDimensions(100, 200));
Visual::Base visual = factory.CreateVisual(image);
TestTransform( application, visual );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::WHITE );
END_TEST;
}
Dali::Property::Map visualMap;
visual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM );
+ Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM );
Dali::Property::Map* map = value->GetMap();
DALI_TEST_CHECK( map );
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::RELATIVE ), TEST_LOCATION );
}
{
- Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY );
+ Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::ABSOLUTE ), TEST_LOCATION );
}
END_TEST;
Property::Map transformMap;
transformMap["size"] = Vector2( 0.5f, 0.5f ) ;
transformMap["offset"] = Vector2( 20.0f, 0.0f ) ;
- transformMap["offsetPolicy"] = Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE );
+ transformMap["offsetPolicy"] = Vector2( Visual::Transform::Policy::ABSOLUTE, Visual::Transform::Policy::ABSOLUTE );
transformMap["anchorPoint"] = Align::CENTER;
transformMap["origin"] = Align::CENTER;
- properties[DevelVisual::Property::TRANSFORM] = transformMap;
+ properties[Visual::Property::TRANSFORM] = transformMap;
properties[Visual::Property::TYPE] = Visual::IMAGE;
- properties[DevelVisual::Property::MIX_COLOR] = Color::BLUE;
+ properties[Visual::Property::MIX_COLOR] = Color::BLUE;
properties[Visual::Property::SHADER]=shader;
properties[ImageVisual::Property::URL] = TEST_NPATCH_FILE_NAME;
Visual::Base visual = factory.CreateVisual( properties );
- TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::BLUE );
+ TestMixColor( visual, Visual::Property::MIX_COLOR, Color::BLUE );
// trigger creation through setting on stage
DummyControl dummy = DummyControl::New(true);
VisualFactory factory = VisualFactory::Get();
Visual::Base opaqueGradientVisual = factory.CreateVisual(
- Property::Map().Add( Visual::Property::TYPE, Visual::GRADIENT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT )
.Add( GradientVisual::Property::START_POSITION, Vector2( -0.5f, -0.5f ) )
.Add( GradientVisual::Property::END_POSITION, Vector2( 0.5f, 0.5f ) )
.Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( Color::RED )
.Add( Color::GREEN ) ) );
Visual::Base alphaGradientVisual = factory.CreateVisual(
- Property::Map().Add( Visual::Property::TYPE, Visual::GRADIENT )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT )
.Add( GradientVisual::Property::START_POSITION, Vector2( -0.5f, -0.5f ) )
.Add( GradientVisual::Property::END_POSITION, Vector2( 0.5f, 0.5f ) )
.Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( Color::RED )
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
propertyMap.Insert( "mixColor", Color::WHITE );
propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
propertyMap.Insert( "enableMarkup", false );
// Create a texture bigger than the maximum allowed by the image atlas. Used to increase coverage.
propertyMap.Clear();
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
propertyMap.Insert( TextVisual::Property::ENABLE_MARKUP, true );
propertyMap.Insert( TextVisual::Property::TEXT, "<font family='TizenSans' size='12'>Hello world</font>" );
propertyMap.Insert( TextVisual::Property::MULTI_LINE, true );
Property::Map transformMap;
transformMap.Insert( "size", Vector2( 0.5f, 0.5f ) );
- propertyMap.Insert( DevelVisual::Property::TRANSFORM, transformMap );
+ propertyMap.Insert( Visual::Property::TRANSFORM, transformMap );
textVisual = factory.CreateVisual( propertyMap );
textVisual.SetDepthIndex( 1 );
VisualFactory factory = VisualFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
propertyMap.Insert( "mixColor", Color::WHITE );
propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
propertyMap.Insert( "enableMarkup", false );
{
Visual::Base imageVisual = factory.CreateVisual(
Property::Map()
- .Add( Visual::Property::TYPE, Visual::IMAGE )
+ .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ) );
Dali::Property::Map visualMap;
imageVisual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA );
+ Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA );
// test values
DALI_TEST_CHECK( value );
{
Visual::Base imageVisual = factory.CreateVisual(
Property::Map()
- .Add( Visual::Property::TYPE, Visual::IMAGE )
+ .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME )
- .Add( DevelVisual::Property::PREMULTIPLIED_ALPHA, true ) );
+ .Add( Visual::Property::PREMULTIPLIED_ALPHA, true ) );
Dali::Property::Map visualMap;
imageVisual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA );
+ Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA );
// test values
DALI_TEST_CHECK( value );
{
Visual::Base imageVisual = factory.CreateVisual(
Property::Map()
- .Add( Visual::Property::TYPE, Visual::IMAGE )
+ .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, TEST_SVG_FILE_NAME ) );
Dali::Property::Map visualMap;
imageVisual.CreatePropertyMap( visualMap );
- Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA );
+ Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA );
// test values
DALI_TEST_CHECK( value );
#include <dali-toolkit-test-suite-utils.h>
#include <toolkit-timer.h>
#include <toolkit-event-thread-callback.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/rendering/shader.h>
#include <dali/devel-api/images/nine-patch-image.h>
-#include <dali-toolkit/devel-api/align-enums.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/dali-toolkit.h>
#include "dummy-control.h"
{
Property::Map transformMap;
transformMap
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) );
return transformMap;
}
Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
Dali::Property::Map map;
- map[ Visual::Property::TYPE ] = Visual::COLOR;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR;
map[ ColorVisual::Property::MIX_COLOR ] = testColor;
Visual::Base visual = factory.CreateVisual( map );
DALI_TEST_CHECK( visual );
float testSize = 5.f;
Dali::Property::Map propertyMap;
- propertyMap[ Visual::Property::TYPE ] = Visual::BORDER;
+ propertyMap[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
propertyMap[ BorderVisual::Property::COLOR ] = testColor;
propertyMap[ BorderVisual::Property::SIZE ] = testSize;
Visual::Base visual = factory.CreateVisual( propertyMap );
// enable the anti-aliasing
Dali::Property::Map map;
- map[ Visual::Property::TYPE ] = Visual::BORDER;
+ map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER;
map[ BorderVisual::Property::COLOR ] = testColor;
map[ BorderVisual::Property::SIZE ] = testSize;
map[ BorderVisual::Property::ANTI_ALIASING ] = true;
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
{
tet_infoline( "whole grid" );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA );
- propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 2, 2, 2, 2 ) );
+ propertyMap.Insert( ImageVisual::Property::BORDER, Rect< int >( 2, 2, 2, 2 ) );
{
tet_infoline( "whole grid" );
Visual::Base visual = factory.CreateVisual( propertyMap );
}
propertyMap.Clear();
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA );
- propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 1, 1, 1, 1 ) );
+ propertyMap.Insert( ImageVisual::Property::BORDER, Rect< int >( 1, 1, 1, 1 ) );
{
tet_infoline( "whole grid" );
Visual::Base visual = factory.CreateVisual( propertyMap );
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
{
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH );
propertyMap.Insert( ImageVisual::Property::URL, "ERROR.9.jpg" );
Visual::Base visual = factory.CreateVisual( propertyMap );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, 111 );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, 111 );
propertyMap.Insert( ImageVisual::Property::URL, "ERROR.9.jpg" );
Visual::Base visual = factory.CreateVisual( propertyMap );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
//Test to see if mesh loads correctly.
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, "" );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, "" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, Color::GREEN ); // Test that wrong property types don't prevent the object load
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, false );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_SIMPLE_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_SIMPLE_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, "invalid" );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, "also invalid" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH );
propertyMap.Insert( MeshVisual::Property::OBJECT_URL, "invalid" );
propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
//Test to see if shape loads correctly.
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTRUM );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::BEVELLED_CUBE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, 0.7f );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::OCTAHEDRON );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3( 0.0, 1.0, 2.0 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 1000000 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 2 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1000000 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1 ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_DIMENSIONS, Vector3::ZERO );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( -1.0f ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( 2.0f ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( -1.0f ) );
//Set up visual properties.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( 2.0f ) );
//Set up visual properties, without supplying shape.
Property::Map propertyMap;
- propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
//Test to see if shape loads regardless of missing input.
TestPrimitiveVisualWithProperties( propertyMap, application );
const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f);
Property::Map propertyMap;
- propertyMap.Add( Visual::Property::TYPE, Visual::IMAGE )
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
.Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME )
.Add( ImageVisual::Property::PIXEL_AREA, pixelArea )
.Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT )
#
-# 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.
develapieffectsviewdir = $(develapicontrolsdir)/effects-view
develapigaussianblurviewdir = $(develapicontrolsdir)/gaussian-blur-view
develapimagnifierdir = $(develapicontrolsdir)/magnifier
-develapiitemviewdir = $(develapicontrolsdir)/scrollable/item-view
-develapiscrollviewdir = $(develapicontrolsdir)/scrollable/scroll-view
-develapiscrollbardir = $(develapicontrolsdir)/scroll-bar
develapinavigationviewdir = $(develapicontrolsdir)/navigation-view
develapipageturnviewdir = $(develapicontrolsdir)/page-turn-view
develapipopupdir = $(develapicontrolsdir)/popup
-develapiprogressbardir = $(develapicontrolsdir)/progress-bar
develapishadowviewdir = $(develapicontrolsdir)/shadow-view
develapisuperblurviewdir = $(develapicontrolsdir)/super-blur-view
develapifocusmanagerdir = $(develapidir)/focus-manager
develapifocusmanager_HEADERS = $(devel_api_focus_manager_header_files)
develapigaussianblurview_HEADERS = $(devel_api_gaussian_blur_view_header_files)
develapiimageloader_HEADERS = $(devel_api_image_loader_header_files)
-develapiitemview_HEADERS = $(devel_api_item_view_header_files)
-develapiscrollview_HEADERS = $(devel_api_scroll_view_header_files)
-develapiscrollbar_HEADERS = $(devel_api_scroll_bar_header_files)
develapimagnifier_HEADERS = $(devel_api_magnifier_header_files)
develapinavigationview_HEADERS = $(devel_api_navigation_view_header_files)
develapipageturnview_HEADERS = $(devel_api_page_turn_view_header_files)
develapipopup_HEADERS = $(devel_api_popup_header_files)
-develapiprogressbar_HEADERS = $(devel_api_progress_bar_header_files)
develapivisualfactory_HEADERS = $(devel_api_visual_factory_header_files)
develapivisuals_HEADERS = $(devel_api_visuals_header_files)
develapiscripting_HEADERS = $(devel_api_scripting_header_files)
publicapiimageviewdir = $(publicapicontrolsdir)/image-view
publicapivideoviewdir = $(publicapicontrolsdir)/video-view
publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view
+publicapiprogressbardir = $(publicapicontrolsdir)/progress-bar
publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar
publicapiscrollabledir = $(publicapicontrolsdir)/scrollable
publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view
publicapitableviewdir = $(publicapicontrolsdir)/table-view
publicapitextcontrolsdir = $(publicapicontrolsdir)/text-controls
publicapifocusmanagerdir = $(publicapidir)/focus-manager
-publicapirenderingbackenddir = $(publicapidir)/text
+publicapitextdir = $(publicapidir)/text
publicapisliderdir = $(publicapicontrolsdir)/slider
publicapivisualsdir = $(publicapidir)/visuals
publicapivideoview_HEADERS = $(public_api_video_view_header_files)
publicapiitemview_HEADERS = $(public_api_item_view_header_files)
publicapimodel3dview_HEADERS = $(public_api_model3d_view_header_files)
+publicapiprogressbar_HEADERS = $(public_api_progress_bar_header_files)
publicapiscrollbar_HEADERS = $(public_api_scroll_bar_header_files)
publicapiscrollable_HEADERS = $(public_api_scrollable_header_files)
publicapiscrollview_HEADERS = $(public_api_scroll_view_header_files)
publicapitableview_HEADERS = $(public_api_table_view_header_files)
publicapitextcontrols_HEADERS = $(public_api_text_controls_header_files)
publicapifocusmanager_HEADERS = $(public_api_focus_manager_header_files)
-publicapirenderingbackend_HEADERS = $(public_api_rendering_backend_header_files)
+publicapitext_HEADERS = $(public_api_text_header_files)
publicapislider_HEADERS = $(public_api_slider_header_files)
publicapivisuals_HEADERS = $(public_api_visuals_header_files)
#include <dali-toolkit/public-api/controls/flex-container/flex-container.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
+#include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h>
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
#include <dali-toolkit/public-api/controls/slider/slider.h>
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
+#include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
#include <dali-toolkit/public-api/controls/text-controls/text-field.h>
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
#include <dali-toolkit/public-api/styling/style-manager.h>
#include <dali-toolkit/public-api/text/rendering-backend.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/public-api/visuals/border-visual-properties.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
#include <dali-toolkit/public-api/visuals/mesh-visual-properties.h>
#include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/public-api/dali-toolkit-version.h>
#include <dali-toolkit/public-api/enums.h>
#include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
namespace DevelControl
{
-ResourceReadySignalType& ResourceReadySignal( Control& control )
-{
- Internal::Control& internalControl = Toolkit::Internal::GetImplementation(control);
- Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get( internalControl );
-
- return controlImpl.mResourceReadySignal;
-}
-
-bool IsResourceReady( const Control& control )
-{
- const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(control);
- const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
-
- return controlDataImpl.IsResourceReady();
-}
-
void RegisterVisual( Internal::Control& control, Dali::Property::Index index, Toolkit::Visual::Base& visual )
{
Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( control );
} // namespace Property
-/// @brief ResourceReady signal type;
-typedef Signal<void ( Control ) > ResourceReadySignalType;
-
-/**
- * @brief This signal is emitted after all resources required
- * by a control are loaded and ready.
- * Most resources are only loaded when the control is placed on stage.
- *
- * @note A RelayoutRequest is queued by Control before this signal is emitted
- *
- * A callback of the following type may be connected:
- * @code
- * void YourCallbackName( Control control );
- * @endcode
- */
-DALI_IMPORT_API ResourceReadySignalType& ResourceReadySignal( Control& control );
-
-/**
- * @brief Query if all resources required by a control are loaded and ready.
- * Most resources are only loaded when the control is placed on stage.
- * @return true if the resources are loaded and ready, false otherwise
- *
- */
-DALI_IMPORT_API bool IsResourceReady( const Control& control );
-
/**
* @brief Register a visual by Property Index.
*
+++ /dev/null
-#ifndef DALI_TOOLKIT_SCROLL_BAR_DEVEL_H
-#define DALI_TOOLKIT_SCROLL_BAR_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/scroll-bar/scroll-bar.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelScrollBar
-{
-
-namespace Property
-{
-
-/**
- * @brief ScrollBar is a UI component that can be linked to the scrollable objects
- * indicating the current scroll position of the scrollable object.
- *
- * Actions
- * | %Action Name | Attributes | Description |
- * |------------------------|-------------------------|-------------------------------------------|
- * | ShowIndicator | Doesn't have attributes | Shows the scroll-indicator |
- * | HideIndicator | Doesn't have attributes | Hides the scroll-indicator |
- * | ShowTransientIndicator | Doesn't have attributes | Shows the scroll-indicator for short time |
- */
-
-/**
- * @brief Enumeration for the instance of properties belonging to the ScrollBar class.
- */
-enum
-{
- SCROLL_DIRECTION = Dali::Toolkit::ScrollBar::Property::SCROLL_DIRECTION,
- INDICATOR_HEIGHT_POLICY = Dali::Toolkit::ScrollBar::Property::INDICATOR_HEIGHT_POLICY,
- INDICATOR_FIXED_HEIGHT = Dali::Toolkit::ScrollBar::Property::INDICATOR_FIXED_HEIGHT,
- INDICATOR_SHOW_DURATION = Dali::Toolkit::ScrollBar::Property::INDICATOR_SHOW_DURATION,
- INDICATOR_HIDE_DURATION = Dali::Toolkit::ScrollBar::Property::INDICATOR_HIDE_DURATION,
- SCROLL_POSITION_INTERVALS = Dali::Toolkit::ScrollBar::Property::SCROLL_POSITION_INTERVALS,
- INDICATOR_MINIMUM_HEIGHT = Dali::Toolkit::ScrollBar::Property::INDICATOR_MINIMUM_HEIGHT,
- INDICATOR_START_PADDING = Dali::Toolkit::ScrollBar::Property::INDICATOR_START_PADDING,
- INDICATOR_END_PADDING = Dali::Toolkit::ScrollBar::Property::INDICATOR_END_PADDING,
-
- /**
- * @brief The duration that transient indicators will remain fully visible.
- * @details name "indicatorTransientDuration", type float.
- */
- INDICATOR_TRANSIENT_DURATION = INDICATOR_END_PADDING + 1
-};
-
-} // namespace Property
-
-} // namespace DevelScrollBar
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_SCROLL_BAR_DEVEL_H
+++ /dev/null
-#ifndef DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
-#define DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
-
-/*
- * Copyright (c) 2016 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/scrollable/item-view/item-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelItemView
-{
-
-namespace Property
-{
-
-enum
-{
- // Event side properties
- MINIMUM_SWIPE_SPEED = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_SPEED,
- MINIMUM_SWIPE_DISTANCE = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE,
- WHEEL_SCROLL_DISTANCE_STEP = Dali::Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP,
- SNAP_TO_ITEM_ENABLED = Dali::Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED,
- REFRESH_INTERVAL = Dali::Toolkit::ItemView::Property::REFRESH_INTERVAL,
-
- /**
- * @brief The layout used.
- * @details Name "layout", type Property::ARRAY
- * @see SetLayout()
- */
- LAYOUT = REFRESH_INTERVAL + 1,
-
- // Animatable properties
- LAYOUT_POSITION = Dali::Toolkit::ItemView::Property::LAYOUT_POSITION,
- SCROLL_SPEED = Dali::Toolkit::ItemView::Property::SCROLL_SPEED,
- OVERSHOOT = Dali::Toolkit::ItemView::Property::OVERSHOOT,
- SCROLL_DIRECTION = Dali::Toolkit::ItemView::Property::SCROLL_DIRECTION,
- LAYOUT_ORIENTATION = Dali::Toolkit::ItemView::Property::LAYOUT_ORIENTATION,
- SCROLL_CONTENT_SIZE = Dali::Toolkit::ItemView::Property::SCROLL_CONTENT_SIZE
-};
-
-} // namespace Property
-
-} // namespace DevelItemView
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
+++ /dev/null
-#ifndef DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_H
-#define DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_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.
- */
-namespace Dali
-{
-namespace Toolkit
-{
-namespace ScrollMode
-{
-
-enum Type
-{
- /**
- * @brief True if the content can be scrolled in X axis or false if
- * not.
- *
- * @details Name "xAxisScrollEnabled", type Property::BOOLEAN
- */
- X_AXIS_SCROLL_ENABLED,
-
- /**
- * @brief When set, causes scroll view to snap to multiples of the
- * value of the interval in the X axis while flicking.
- *
- * By default, there is no snapping.
- * @details Name "xAxisSnapToInterval", type Property::FLOAT
- */
- X_AXIS_SNAP_TO_INTERVAL,
-
- /**
- * @brief When set, causes scroll view unable to scroll beyond the
- * value of the boundary in the X axis.
- *
- * By default, there is no boundary.
- * @details Name "xAxisScrollBoundary", type Property::FLOAT
- */
- X_AXIS_SCROLL_BOUNDARY,
-
- /**
- * @brief True if the content can be scrolled in Y axis or false if
- * not.
- *
- * @details Name "yAxisScrollEnabled", type Property::BOOLEAN
- */
- Y_AXIS_SCROLL_ENABLED,
-
- /**
- * @brief When set, causes scroll view to snap to multiples of the
- * value of the interval in the Y axis while flicking.
- *
- * By default, there is no snapping.
- * @details Name "yAxisSnapToInterval", type Property::FLOAT
- */
- Y_AXIS_SNAP_TO_INTERVAL,
-
- /**
- * @brief When set, causes scroll view unable to scroll beyond the
- * value of the boundary in the Y axis.
- *
- * By default, there is no boundary.
- * @details Name "yAxisScrollBoundary", type Property::FLOAT
- */
- Y_AXIS_SCROLL_BOUNDARY
-};
-
-} // ScrollMode
-} // toolkit
-} // Dali
-
-#endif //DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_H
+++ /dev/null
-#ifndef DALI_TOOLKIT_SCROLL_VIEW_DEVEL_H
-#define DALI_TOOLKIT_SCROLL_VIEW_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/scrollable/scroll-view/scroll-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelScrollView
-{
-
-namespace Property
-{
-
-enum
-{
- // Event side properties
-
- WRAP_ENABLED = Dali::Toolkit::ScrollView::Property::WRAP_ENABLED,
- PANNING_ENABLED = Dali::Toolkit::ScrollView::Property::PANNING_ENABLED,
- AXIS_AUTO_LOCK_ENABLED = Dali::Toolkit::ScrollView::Property::AXIS_AUTO_LOCK_ENABLED,
- WHEEL_SCROLL_DISTANCE_STEP = Dali::Toolkit::ScrollView::Property::WHEEL_SCROLL_DISTANCE_STEP,
-
- /**
- * @brief The scroll mode
- * @details Name "scrollMode", type Property::MAP
- * The scroll mode map is a frontend for the Ruler helper class, containing the following keys:
- *
- * | %Property Name | Type | Required | Description |
- * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------------------------|
- * | xAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in X axis or false if not. |
- * | xAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the X axis while flicking. (by default no snapping) |
- * | xAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary) |
- * | yAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in Y axis or false if not. |
- * | yAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the Y axis while flicking. (by default no snapping) |
- * | yAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary) |
- *
- * Alternatively, one can use the keys defined in the Dali::Toolkit::ScrollMode::Type enumeration.
- */
- SCROLL_MODE = WHEEL_SCROLL_DISTANCE_STEP + 1,
-};
-
-} // namespace Property
-
-} // namespace DevelScrollView
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_SCROLL_VIEW_DEVEL_H
+++ /dev/null
-
-/*
- * 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.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
-
-// INTERNAL HEADER
-#include <dali-toolkit/internal/controls/text-controls/text-editor-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelTextEditor
-{
-
-ScrollStateChangedSignalType& ScrollStateChangedSignal( TextEditor textEditor )
-{
- return Dali::Toolkit::GetImpl( textEditor ).ScrollStateChangedSignal();
-}
-
-} // namespace DevelText
-
-} // namespace Toolkit
-
-} // namespace Dali
INPUT_EMBOSS = Dali::Toolkit::TextEditor::Property::INPUT_EMBOSS,
OUTLINE = Dali::Toolkit::TextEditor::Property::OUTLINE,
INPUT_OUTLINE = Dali::Toolkit::TextEditor::Property::INPUT_OUTLINE,
-
- /**
- * @brief name "smoothScroll", type bool
- * @details Enable or disable the smooth scroll animation
- * @note This property is currently being used for some applications, so it can't be changed.
- */
- SMOOTH_SCROLL = INPUT_OUTLINE + 1,
-
- /**
- * @brief name "smoothScrollDuration", type float
- * @details Sets the duration of smooth scroll animation
- * @note This property is currently being used for some applications, so it can't be changed.
- */
- SMOOTH_SCROLL_DURATION,
-
- /**
- * @brief name "enableScrollBar", type bool
- * @details Enable or disable the scroll bar
- * @note This property is currently being used for some applications, so it can't be changed.
- */
- ENABLE_SCROLL_BAR,
-
- /**
- * @brief name "scrollBarShowDuration", type float
- * @details Sets the duration of scroll bar to show
- * @note This property is currently being used for some applications, so it can't be changed.
- */
- SCROLL_BAR_SHOW_DURATION,
-
- /**
- * @brief name "scrollBarFadeDuration", type float
- * @details Sets the duration of scroll bar to fade out
- * @note This property is currently being used for some applications, so it can't be changed.
- */
- SCROLL_BAR_FADE_DURATION,
-
- /**
- * @brief The size of font in pixels.
- *
- * Conversion from Point size to Pixel size :
- * Pixel size = Point size * DPI / 72
- * @details name "pixelSize", type float
- */
- PIXEL_SIZE,
-
- /**
- * @brief The line count of text.
- * @details name "lineCount", type int
- * @note this property is read-only.
- */
- LINE_COUNT,
+ SMOOTH_SCROLL = Dali::Toolkit::TextEditor::Property::SMOOTH_SCROLL,
+ SMOOTH_SCROLL_DURATION = Dali::Toolkit::TextEditor::Property::SMOOTH_SCROLL_DURATION,
+ ENABLE_SCROLL_BAR = Dali::Toolkit::TextEditor::Property::ENABLE_SCROLL_BAR,
+ SCROLL_BAR_SHOW_DURATION = Dali::Toolkit::TextEditor::Property::SCROLL_BAR_SHOW_DURATION,
+ SCROLL_BAR_FADE_DURATION = Dali::Toolkit::TextEditor::Property::SCROLL_BAR_FADE_DURATION,
+ PIXEL_SIZE = Dali::Toolkit::TextEditor::Property::PIXEL_SIZE,
+ LINE_COUNT = Dali::Toolkit::TextEditor::Property::LINE_COUNT,
+ ENABLE_SELECTION = Dali::Toolkit::TextEditor::Property::ENABLE_SELECTION,
+ PLACEHOLDER = Dali::Toolkit::TextEditor::Property::PLACEHOLDER,
+ LINE_WRAP_MODE = Dali::Toolkit::TextEditor::Property::LINE_WRAP_MODE,
/**
* @brief The text to display when the TextEditor is empty and inactive.
- * @details name "placeholderText", type string
+ * @details Name "placeholderText", type Property::STRING.
*/
PLACEHOLDER_TEXT,
/**
* @brief The placeholder-text color.
- * @details name "placeholderTextColor", type vector4
+ * @details Name "placeholderTextColor", type Property::VECTOR4.
*/
PLACEHOLDER_TEXT_COLOR,
-
- /**
- * @brief Enables Text selection, such as the cursor, handle, clipboard, and highlight color.
- * @details name "enableSelection", type bool
- */
- ENABLE_SELECTION,
-
- /**
- * @brief Sets the placeholder : text, color, font family, font style, point size, and pixel size.
- *
- * @code
- * Property::Map propertyMap;
- * propertyMap["placeholderText"] = "Setting Placeholder Text";
- * propertyMap["placeholderTextFocused"] = "Setting Placeholder Text Focused";
- * propertyMap["placeholderColor"] = Color::RED;
- * propertyMap["placeholderFontFamily"] = "Arial";
- * propertyMap["placeholderPointSize"] = 12.0f;
- *
- * Property::Map fontStyleMap;
- * fontStyleMap.Insert( "weight", "bold" );
- * fontStyleMap.Insert( "width", "condensed" );
- * fontStyleMap.Insert( "slant", "italic" );
- * propertyMap["placeholderFontStyle"] = fontStyleMap;
- *
- * editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER, propertyMap );
- * @endcode
- *
- * @details name "placeholder", type MAP
- */
- PLACEHOLDER,
-
- /**
- * @brief line wrap mode when the text lines over layout width.
- * @details name "lineWrapMode", type string.
- */
- LINE_WRAP_MODE
};
-} // namespace Property
-
-namespace Scroll
-{
- enum Type
- {
- STARTED, ///< Scrolling is started.
- FINISHED ///< Scrolling is finished.
- };
-} // namespace Scroll
-
-typedef Signal< void ( TextEditor, Scroll::Type ) > ScrollStateChangedSignalType;
-/**
- * @brief This signal is emitted when TextEditor scrolling is started or finished.
- *
- * A callback of the following type may be connected:
- * @code
- * void YourCallbackName( ScrollState::Type type );
- * @endcode
- * type: Whether the scrolling is started or finished.
- * @return The signal to connect to
- */
-DALI_IMPORT_API ScrollStateChangedSignalType& ScrollStateChangedSignal( TextEditor textEditor );
+} // namespace Property
} // namespace DevelTextEditor
+++ /dev/null
-#ifndef DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
-#define DALI_TOOLKIT_TEXT_FIELD_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-field.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelTextField
-{
-
-namespace Property
-{
- enum Type
- {
- RENDERING_BACKEND = Dali::Toolkit::TextField::Property::RENDERING_BACKEND,
- TEXT = Dali::Toolkit::TextField::Property::TEXT,
- PLACEHOLDER_TEXT = Dali::Toolkit::TextField::Property::PLACEHOLDER_TEXT,
- PLACEHOLDER_TEXT_FOCUSED = Dali::Toolkit::TextField::Property::PLACEHOLDER_TEXT_FOCUSED,
- FONT_FAMILY = Dali::Toolkit::TextField::Property::FONT_FAMILY,
- FONT_STYLE = Dali::Toolkit::TextField::Property::FONT_STYLE,
- POINT_SIZE = Dali::Toolkit::TextField::Property::POINT_SIZE,
- MAX_LENGTH = Dali::Toolkit::TextField::Property::MAX_LENGTH,
- EXCEED_POLICY = Dali::Toolkit::TextField::Property::EXCEED_POLICY,
- HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT,
- VERTICAL_ALIGNMENT = Dali::Toolkit::TextField::Property::VERTICAL_ALIGNMENT,
- TEXT_COLOR = Dali::Toolkit::TextField::Property::TEXT_COLOR,
- PLACEHOLDER_TEXT_COLOR = Dali::Toolkit::TextField::Property::PLACEHOLDER_TEXT_COLOR,
- SHADOW_OFFSET = Dali::Toolkit::TextField::Property::SHADOW_OFFSET,
- SHADOW_COLOR = Dali::Toolkit::TextField::Property::SHADOW_COLOR,
- PRIMARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR,
- SECONDARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::SECONDARY_CURSOR_COLOR,
- ENABLE_CURSOR_BLINK = Dali::Toolkit::TextField::Property::ENABLE_CURSOR_BLINK,
- CURSOR_BLINK_INTERVAL = Dali::Toolkit::TextField::Property::CURSOR_BLINK_INTERVAL,
- CURSOR_BLINK_DURATION = Dali::Toolkit::TextField::Property::CURSOR_BLINK_DURATION,
- CURSOR_WIDTH = Dali::Toolkit::TextField::Property::CURSOR_WIDTH,
- GRAB_HANDLE_IMAGE = Dali::Toolkit::TextField::Property::GRAB_HANDLE_IMAGE,
- GRAB_HANDLE_PRESSED_IMAGE = Dali::Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE,
- SCROLL_THRESHOLD = Dali::Toolkit::TextField::Property::SCROLL_THRESHOLD,
- SCROLL_SPEED = Dali::Toolkit::TextField::Property::SCROLL_SPEED,
- SELECTION_HANDLE_IMAGE_LEFT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT,
- SELECTION_HANDLE_IMAGE_RIGHT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT,
- SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT,
- SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT,
- SELECTION_HANDLE_MARKER_IMAGE_LEFT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT,
- SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Dali::Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT,
- SELECTION_HIGHLIGHT_COLOR = Dali::Toolkit::TextField::Property::SELECTION_HIGHLIGHT_COLOR,
- DECORATION_BOUNDING_BOX = Dali::Toolkit::TextField::Property::DECORATION_BOUNDING_BOX,
- INPUT_METHOD_SETTINGS = Dali::Toolkit::TextField::Property::INPUT_METHOD_SETTINGS,
- INPUT_COLOR = Dali::Toolkit::TextField::Property::INPUT_COLOR,
- ENABLE_MARKUP = Dali::Toolkit::TextField::Property::ENABLE_MARKUP,
- INPUT_FONT_FAMILY = Dali::Toolkit::TextField::Property::INPUT_FONT_FAMILY,
- INPUT_FONT_STYLE = Dali::Toolkit::TextField::Property::INPUT_FONT_STYLE,
- INPUT_POINT_SIZE = Dali::Toolkit::TextField::Property::INPUT_POINT_SIZE,
- UNDERLINE = Dali::Toolkit::TextField::Property::UNDERLINE,
- INPUT_UNDERLINE = Dali::Toolkit::TextField::Property::INPUT_UNDERLINE,
- SHADOW = Dali::Toolkit::TextField::Property::SHADOW,
- INPUT_SHADOW = Dali::Toolkit::TextField::Property::INPUT_SHADOW,
- EMBOSS = Dali::Toolkit::TextField::Property::EMBOSS,
- INPUT_EMBOSS = Dali::Toolkit::TextField::Property::INPUT_EMBOSS,
- OUTLINE = Dali::Toolkit::TextField::Property::OUTLINE,
- INPUT_OUTLINE = Dali::Toolkit::TextField::Property::INPUT_OUTLINE,
-
- /**
- * @brief Hides the input characters and instead shows a default character for password or pin entry.
- * @details name "hiddenInputSettings", type map.
- * @note Optional.
- * This property is currently being used for some applications, so it can't be changed.
- * @see HiddenInput
- */
- HIDDEN_INPUT_SETTINGS = INPUT_OUTLINE + 1,
-
- /**
- * @brief The size of font in pixels.
- *
- * Conversion from Point size to Pixel size :
- * Pixel size = Point size * DPI / 72
- * @details name "pixelSize", type float
- */
- PIXEL_SIZE = INPUT_OUTLINE + 2,
-
- /**
- * @brief Enables Text selection, such as the cursor, handle, clipboard, and highlight color.
- * @details name "enableSelection", type bool
- */
- ENABLE_SELECTION = INPUT_OUTLINE + 3,
-
- /**
- * @brief Sets the placeholder : text, color, font family, font style, point size, and pixel size.
- *
- * @code
- * Property::Map propertyMap;
- * propertyMap["placeholderText"] = "Setting Placeholder Text";
- * propertyMap["placeholderTextFocused"] = "Setting Placeholder Text Focused";
- * propertyMap["placeholderColor"] = Color::RED;
- * propertyMap["placeholderFontFamily"] = "Arial";
- * propertyMap["placeholderPointSize"] = 12.0f;
- * propertyMap["placeholderEllipsis"] = true;
- *
- * Property::Map fontStyleMap;
- * fontStyleMap.Insert( "weight", "bold" );
- * fontStyleMap.Insert( "width", "condensed" );
- * fontStyleMap.Insert( "slant", "italic" );
- * propertyMap["placeholderFontStyle"] = fontStyleMap;
- *
- * field.SetProperty( DevelTextField::Property::PLACEHOLDER, propertyMap );
- * @endcode
- *
- * @details name "placeholder", type MAP
- */
- PLACEHOLDER = INPUT_OUTLINE + 4,
-
- /**
- * @brief Enable or disable the ellipsis.
- * @details name "ellipsis", type Property::BOOLEAN.
- * @note PLACEHOLDER map is used to add ellipsis to placeholder text.
- */
- ELLIPSIS = INPUT_OUTLINE + 5
- };
-} // namespace Property
-
-} // namespace DevelText
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
+++ /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
#define __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMS_H__
/*
- * 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.
};
}
-/**
- * @brief Enum used to describe anchor point and parent origin of visuals
- */
-namespace Align
-{
- enum Type
- {
- TOP_BEGIN = 0,
- TOP_CENTER,
- TOP_END,
- CENTER_BEGIN,
- CENTER,
- CENTER_END,
- BOTTOM_BEGIN,
- BOTTOM_CENTER,
- BOTTOM_END
- };
-}
-
} // namespace Toolkit
} // namespace Dali
$(devel_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
$(devel_api_src_dir)/controls/popup/confirmation-popup.cpp \
$(devel_api_src_dir)/controls/popup/popup.cpp \
- $(devel_api_src_dir)/controls/progress-bar/progress-bar.cpp \
$(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \
$(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \
$(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \
$(devel_api_src_dir)/controls/text-controls/text-selection-toolbar.cpp \
- $(devel_api_src_dir)/controls/text-controls/text-editor-devel.cpp \
$(devel_api_src_dir)/controls/tool-bar/tool-bar.cpp \
$(devel_api_src_dir)/focus-manager/keyinput-focus-manager.cpp \
$(devel_api_src_dir)/focus-manager/keyboard-focus-manager-devel.cpp \
# Add devel header files here
devel_api_header_files = \
- $(devel_api_src_dir)/align-enums.h
+ $(devel_api_src_dir)/direction-enums.h
devel_api_controls_header_files = \
$(devel_api_src_dir)/controls/control-depth-index-ranges.h \
devel_api_effects_view_header_files = \
$(devel_api_src_dir)/controls/effects-view/effects-view.h
-devel_api_item_view_header_files = \
- $(devel_api_src_dir)/controls/scrollable/item-view/default-item-layout-property.h \
- $(devel_api_src_dir)/controls/scrollable/item-view/item-view-devel.h
-
-devel_api_scroll_bar_header_files = \
- $(devel_api_src_dir)/controls/scroll-bar/scroll-bar-devel.h
-
devel_api_magnifier_header_files = \
$(devel_api_src_dir)/controls/magnifier/magnifier.h
$(devel_api_src_dir)/controls/popup/confirmation-popup.h \
$(devel_api_src_dir)/controls/popup/popup.h
-devel_api_progress_bar_header_files = \
- $(devel_api_src_dir)/controls/progress-bar/progress-bar.h
-
devel_api_visual_factory_header_files = \
$(devel_api_src_dir)/visual-factory/transition-data.h \
$(devel_api_src_dir)/visual-factory/visual-factory.h \
$(devel_api_src_dir)/visual-factory/visual-base.h
-devel_api_visuals_header_files = \
- $(devel_api_src_dir)/visuals/text-visual-properties.h \
- $(devel_api_src_dir)/visuals/image-visual-properties-devel.h \
- $(devel_api_src_dir)/visuals/visual-properties-devel.h
-
devel_api_shadow_view_header_files = \
$(devel_api_src_dir)/controls/shadow-view/shadow-view.h
$(devel_api_src_dir)/scripting/script.h \
$(devel_api_src_dir)/scripting/script-plugin.h
-devel_api_scroll_view_header_files = \
- $(devel_api_src_dir)/controls/scrollable/scroll-view/scroll-mode.h \
- $(devel_api_src_dir)/controls/scrollable/scroll-view/scroll-view-devel.h
-
devel_api_shader_effects_header_files = \
$(devel_api_src_dir)/shader-effects/alpha-discard-effect.h \
$(devel_api_src_dir)/shader-effects/dissolve-effect.h \
$(devel_api_src_dir)/controls/super-blur-view/super-blur-view.h
devel_api_text_controls_header_files = \
- $(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
#define __DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H__
/*
- * 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.
Property::Map customShader;
customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = ALPHA_DISCARD_FRAGMENT_SHADER_SOURCE;
- map[ Visual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#define DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H
/*
- * 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.
customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- map[ Visual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#define __DALI_TOOLKIT_SHADER_EFFECT_DISTANCEFIELD_H__
/*
- * 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.
customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentShaderString;
customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- map[ Visual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#define __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__
/*
- * 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.
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
Property::Map customShader;
customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexShader;
- map[ DevelVisual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_BLUR_H__
/*
- * 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.
customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- map[ Visual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H__
/*
- * 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.
customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- map[ Visual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
* | size | VECTOR2 | No | (1,1) | size of visual |
* | origin | INTEGER or STRING | No | CENTER | origin of the visual @sa Dali::Toolkit::Align |
* | anchorPoint | INTEGER or STRING | No | CENTER | anchor point of the visual @sa Dali::Toolkit::Align |
- * | offsetPolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::DevelVisual::Transform::Policy |
- * | sizePolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::DevelVisual::Transform::Policy |
+ * | offsetPolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::Visual::Transform::Policy |
+ * | sizePolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::Visual::Transform::Policy |
*
* Relative means that the component describes a factor of the parent control size;
* size.x = 1 means full width; size.y = 0.5 means half height.
+++ /dev/null
-#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H
-#define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_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/visuals/image-visual-properties.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelImageVisual
-{
-
-namespace Property
-{
-
-enum Type
-{
- URL = Dali::Toolkit::ImageVisual::Property::URL,
- FITTING_MODE = Dali::Toolkit::ImageVisual::Property::FITTING_MODE,
- SAMPLING_MODE = Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE,
- DESIRED_WIDTH = Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH,
- DESIRED_HEIGHT = Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT,
- SYNCHRONOUS_LOADING = Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING,
- BORDER_ONLY = Dali::Toolkit::ImageVisual::Property::BORDER_ONLY,
- PIXEL_AREA = Dali::Toolkit::ImageVisual::Property::PIXEL_AREA,
- WRAP_MODE_U = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U,
- WRAP_MODE_V = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V,
-
- /**
- * @brief The border of the image
- * @details Name "border", type Property::RECTANGLE or Property::VECTOR4
- * The border of the image in the order: left, right, bottom, top.
- *
- * @note Optional.
- * @note For N-Patch images only.
- */
- BORDER = WRAP_MODE_V + 1,
-
- /**
- * @brief Whether to use the texture atlas
- * @details Name "atlasing", type Property::BOOLEAN, true to enable texture atlas
- *
- * @note Optional. By default atlasing is off.
- */
-
- ATLASING = WRAP_MODE_V + 2,
-
- /**
- * @brief URL of a masking image
- * @details Name "alphaMaskUrl", type Property::STRING, URL of image to apply as
- * a mask after image loading. If set after the main URL has finished loading, this
- * may necessitate a re-load of the main image. The alpha mask image will be scaled
- * on load to match the size of the main image, then applied to the pixel data
- * before uploading to GL.
- * @note Optional.
- */
-
- ALPHA_MASK_URL = WRAP_MODE_V + 3,
-
- /**
- * @brief Defines the batch size for pre-loading images in the AnimatedImageVisual
- * @details Name "batchSize", type Property::INTEGER, number of images to pre-load
- * before starting to play. Default value: 1
- */
- BATCH_SIZE = WRAP_MODE_V + 4,
-
- /**
- * @brief Defines the cache size for loading images in the AnimatedImageVisual
- * @details Name "cacheSize", type Property::INTEGER, number of images to keep
- * cached ahead during playback. Default value: 1
- *
- * @note, cacheSize should be >= batchSize.
- * If it isn't, then the cache will automatically be changed to batchSize.
- * @note, because of the defaults, it is expected that the application developer
- * tune the batch and cache sizes to their particular use case.
- */
- CACHE_SIZE = WRAP_MODE_V + 5,
-
- /**
- * @brief The number of milliseconds between each frame in the AnimatedImageVisual
- * @details Name "frameDelay", type Property::INTEGER, The number of milliseconds between each frame. Note, this is only used with the URLS property above.
- */
- FRAME_DELAY = WRAP_MODE_V + 6,
-
- /**
- * @brief The scale factor to apply to the content image before masking
- * @details Name "maskContentScale", type Property::FLOAT, The scale factor
- * to apply to the content before masking. Note, scaled images are cropped to
- * the same size as the alpha mask.
- */
- MASK_CONTENT_SCALE = WRAP_MODE_V + 7,
-
- /**
- * @brief Whether to crop image to mask or scale mask to fit image
- * @details Name "cropToMask", type Property::BOOLEAN, True if the image should
- * be cropped to match the mask size, or false if the image should remain the same size.
- * Note, if this is false, then the mask is scaled to fit the image before being applied.
- */
- CROP_TO_MASK = WRAP_MODE_V + 8,
-
-};
-
-} //namespace Property
-
-} // namespace DevelImageVisual
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H
+++ /dev/null
-#ifndef DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H
-#define DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_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/toolkit-property-index-ranges.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace TextVisual
-{
-
-namespace Property
-{
-
-enum
-{
- /**
- * @brief The text to display in UTF-8 format,
- * @details name "text", type STRING
- */
- TEXT = VISUAL_PROPERTY_START_INDEX,
-
- /**
- * @brief The requested font family to use,
- * @details name "fontFamily", type STRING
- */
- FONT_FAMILY,
-
- /**
- * @brief The requested font style to use,
- * @details name "fontStyle", type MAP
- */
- FONT_STYLE,
-
- /**
- * @brief The size of font in points
- * @details name "pointSize", type FLOAT
- */
- POINT_SIZE,
-
- /**
- * @brief The single-line or multi-line layout option
- * @details name "multiLine", type BOOLEAN, default false
- */
- MULTI_LINE,
-
- /**
- * @brief The line horizontal alignment
- * @details name "horizontalAlignment", type STRING, values "BEGIN", "CENTER", "END", default BEGIN
- */
- HORIZONTAL_ALIGNMENT,
-
- /**
- * @brief The line vertical alignment
- * @details name "verticalAlignment", type STRING, values "TOP", "CENTER", "BOTTOM", default TOP
- */
- VERTICAL_ALIGNMENT,
-
- /**
- * @brief The color of the text
- * @details name "textColor", type VECTOR4
- */
- TEXT_COLOR,
-
- /**
- * @brief Whether the mark-up processing is enabled
- * @details name "enableMarkup", type BOOLEAN
- */
- ENABLE_MARKUP,
-
- /**
- * @brief The shadow parameters.
- * @details name "shadow", type MAP.
- */
- SHADOW,
-
- /**
- * @brief The default underline parameters.
- * @details name "underline", type MAP.
- */
- UNDERLINE,
-};
-
-} // namespace Property
-
-} // namespace TextVisual
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H
+++ /dev/null
-#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
-#define DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_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/visuals/visual-properties.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace DevelVisual
-{
-
-/**
- * @brief All the visual types.
- */
-enum Type
-{
- BORDER = Dali::Toolkit::Visual::BORDER,
- COLOR = Dali::Toolkit::Visual::COLOR,
- GRADIENT = Dali::Toolkit::Visual::GRADIENT,
- IMAGE = Dali::Toolkit::Visual::IMAGE,
- MESH = Dali::Toolkit::Visual::MESH,
- PRIMITIVE = Dali::Toolkit::Visual::PRIMITIVE,
- WIREFRAME = Dali::Toolkit::Visual::WIREFRAME,
-
- TEXT = WIREFRAME + 1, ///< Renders text.
- N_PATCH = WIREFRAME + 2, ///< Renders an n-patch image.
- SVG = WIREFRAME + 3, ///< Renders an SVG image.
- ANIMATED_IMAGE = WIREFRAME + 4 ///< Renders a animated image.
-};
-
-namespace Property
-{
-
-enum Type
-{
- TYPE = Dali::Toolkit::Visual::Property::TYPE,
- SHADER = Dali::Toolkit::Visual::Property::SHADER,
-
- /**
- * @brief The transform used by the visual.
- * @details Name "transform", type Property::Map.
- *
- * @note Optional.
- * @see DevelVisual::Transform::Property
- */
- TRANSFORM = SHADER + 1,
-
- /**
- * @brief Enables/disables premultiplied alpha.
- * The premultiplied alpha is false by default unless this behaviour is modified
- * by the derived Visual type.
- *
- * @details Name "premultipliedAlpha", type Property::Boolean.
- *
- * @note Optional.
- */
- PREMULTIPLIED_ALPHA = SHADER + 2,
-
- /**
- * @brief Mix color is a blend color for any visual.
- * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4
- *
- * @note Optional
- */
- MIX_COLOR = SHADER + 3,
-
- /**
- * @brief Opacity is the alpha component of the mixColor, above.
- * @details Name "opacity", type Property::FLOAT
- *
- * @note Optional
- */
- OPACITY = SHADER + 4
-};
-
-} // namespace Property
-
-namespace Transform
-{
-
-/**
- * @brief Policies used by the transform for the offset or size.
- */
-namespace Policy
-{
-
-enum Type
-{
- RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control).
- ABSOLUTE = 1 ///< Absolute value in world units.
-};
-
-} // namespace Policy
-
-namespace Property
-{
-
-enum Type
-{
- /**
- * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
- * @details Name "offset", type Property::VECTOR2
- * @see OFFSET_POLICY
- */
- OFFSET,
-
- /**
- * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
- * @details Name "size", type Property::VECTOR2
- * @see SIZE_POLICY
- */
- SIZE,
-
- /**
- * @brief The origin of the visual within its control area.
- * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING.
- * @see Toolkit::Align
- * @note The default is Align::TOP_BEGIN.
- */
- ORIGIN,
-
- /**
- * @brief The anchor-point of the visual
- * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING.
- * @see Toolkit::Align
- * @note The default is Align::TOP_BEGIN.
- */
- ANCHOR_POINT,
-
- /**
- * @brief Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
- * @details Name "offsetPolicy", type Vector2 or Property::ARRAY of Property::STRING.
- * If Property::ARRAY then 2 strings expected for the x and y.
- *
- * C++:
- * @code
- * control.SetProperty( ..., // Some visual based property
- * Property::Map().Add( ... ) // Properties to set up visual
- * .Add( DevelVisual::Property::TRANSFORM,
- * Property::Array().Add( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Policy::ABSOLUTE, Policy::RELATIVE ) ) )
- * .Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 1.0f ) ) );
- * @endcode
- *
- * JSON:
- * @code
- * {
- * ...
- * "transition":
- * {
- * "offsetPolicy" : [ "ABSOLUTE", "RELATIVE" ],
- * "offset" : [ 10, 1.0 ]
- * }
- * ...
- * }
- *
- * @endcode
- * @see Policy::Type
- * @note By default, both the x and the y offset is RELATIVE.
- */
- OFFSET_POLICY,
-
- /**
- * @brief Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
- * @details Name "sizePolicy", type Vector2 or Property::ARRAY of Property::STRING.
- * If Property::ARRAY then 2 strings expected for the width and height.
- *
- * @see Policy::Type
- * @see OFFSET_POLICY for example
- * @note By default, both the width and the height is RELATIVE to the control's size.
- */
- SIZE_POLICY,
-};
-
-} // namespace Property
-
-} // namespace Transform
-
-} // namespace DevelVisual
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
}
}
- if( !mParser.Parse( data ) )
+ if( mParser.Parse( data ) )
+ {
+ // Drop the styles and get them to be rebuilt against the new parse tree as required.
+ mStyles.Clear();
+ }
+ else
{
DALI_LOG_WARNING( "JSON Parse Error:%d:%d:'%s'\n",
mParser.GetErrorLineNumber(),
}
}
- DUMP_PARSE_TREE(parser); // This macro only writes out if DEBUG is enabled and the "DUMP_TREE" constant is defined in the stylesheet.
- DUMP_TEST_MAPPINGS(parser);
+ DUMP_PARSE_TREE(mParser); // This macro only writes out if DEBUG is enabled and the "DUMP_TREE" constant is defined in the stylesheet.
+ DUMP_TEST_MAPPINGS(mParser);
DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Cannot parse JSON");
}
#include <dali/devel-api/scripting/scripting.h>
#include <dali-toolkit/public-api/controls/control.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/builder/style.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
// merge them into the visual map
if( instancedProperties )
{
- Property::Value* instanceTypeValue = instancedProperties->Find( Toolkit::DevelVisual::Property::TYPE);
- Property::Value* newTypeValue = visualMap.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE );
+ Property::Value* instanceTypeValue = instancedProperties->Find( Toolkit::Visual::Property::TYPE);
+ Property::Value* newTypeValue = visualMap.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE );
if( instanceTypeValue && newTypeValue )
{
int instanceVisualType=-1;
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h>
namespace Dali
Property::Map customShader;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = BLOOM_EXTRACT_FRAGMENT_SOURCE;
Property::Map visualMap;
- visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader );
+ visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader );
mBloomExtractImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
// set GaussianBlurView to blur our extracted bloom
mCompositeImageView.SetImage( mRenderTargetForRenderingChildren );
// Create shader used to composite bloom and original image to output render target
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = COMPOSITE_FRAGMENT_SOURCE;
- visualMap[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ visualMap[ Toolkit::Visual::Property::SHADER ] = customShader;
mCompositeImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
TextureSet textureSet = mCompositeImageView.GetRendererAt(0).GetTextures();
TextureSetImage( textureSet, 1u, mBlurExtractTarget );
#define DALI_TOOLKIT_INTERNAL_COLOR_ADJUSTER_H
/*
- * 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.
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#define DALI_COMPOSE_SHADER(STR) #STR
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentShader;
Property::Map map;
- map[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/internal/visuals/text/text-visual.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#if defined(DEBUG_ENABLED)
Debug::Filter* gLogButtonFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_BUTTON_CONTROL");
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, size )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, size )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
currentBackGroundVisual.SetTransformAndSize( visualTransform, size );
}
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, visualSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, visualPosition )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, visualAnchorPoint );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, visualSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, visualPosition )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, visualAnchorPoint );
currentVisual.SetTransformAndSize( visualTransform, size );
}
Property::Map textVisualTransform;
- textVisualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, preSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, labelPosition )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, visualAnchorPoint );
+ textVisualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, preSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, labelPosition )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, visualAnchorPoint );
textVisual.SetTransformAndSize( textVisualTransform, size );
}
DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "Button::SetProperty Setting TextVisual with string[%s]\n", textString.c_str() );
Property::Map setPropertyMap;
- setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+ setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
.Add( Toolkit::TextVisual::Property::TEXT, textString );
GetImplementation( button ).MergeWithExistingLabelProperties( setPropertyMap, outTextVisualProperties );
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#if defined(DEBUG_ENABLED)
DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnRelayout Setting visual position to(%f,%f)\n", visualPosition.x, visualPosition.y );
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, visualSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, visualPosition )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, visualSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, visualPosition )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER );
visual.SetTransformAndSize( visualTransform, size );
}
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/internal/styling/style-manager-impl.h>
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
}
}
-Toolkit::DevelVisual::Type GetVisualTypeFromMap( const Property::Map& map )
+Toolkit::Visual::Type GetVisualTypeFromMap( const Property::Map& map )
{
- Property::Value* typeValue = map.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE );
- Toolkit::DevelVisual::Type type = Toolkit::DevelVisual::IMAGE;
+ Property::Value* typeValue = map.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE );
+ Toolkit::Visual::Type type = Toolkit::Visual::IMAGE;
if( typeValue )
{
Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, type );
Property::Map fromMap;
visual.CreatePropertyMap( fromMap );
- Toolkit::DevelVisual::Type fromType = GetVisualTypeFromMap( fromMap );
- Toolkit::DevelVisual::Type toType = GetVisualTypeFromMap( toMap );
+ Toolkit::Visual::Type fromType = GetVisualTypeFromMap( fromMap );
+ Toolkit::Visual::Type toType = GetVisualTypeFromMap( toMap );
if( fromType != toType )
{
}
else
{
- if( fromType == Toolkit::DevelVisual::IMAGE || fromType == Toolkit::DevelVisual::N_PATCH
- || fromType == Toolkit::DevelVisual::SVG || fromType == Toolkit::DevelVisual::ANIMATED_IMAGE )
+ if( fromType == Toolkit::Visual::IMAGE || fromType == Toolkit::Visual::N_PATCH
+ || fromType == Toolkit::Visual::SVG || fromType == Toolkit::Visual::ANIMATED_IMAGE )
{
Property::Value* fromUrl = fromMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
Property::Value* toUrl = toMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
Toolkit::Control::KeyEventSignalType mKeyEventSignal;
Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusGainedSignal;
Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusLostSignal;
-
- Toolkit::DevelControl::ResourceReadySignalType mResourceReadySignal;
+ Toolkit::Control::ResourceReadySignalType mResourceReadySignal;
// Gesture Detection
PinchGestureDetector mPinchGestureDetector;
*/
// EXTERNAL INCLUDES
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
// TODO:
// pixel format / size - set from JSON
horizFragmentShaderStringStream << GAUSSIAN_BLUR_FRAGMENT_SOURCE;
Property::Map source;
source[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = horizFragmentShaderStringStream.str();
- mCustomShader[ Toolkit::DevelVisual::Property::SHADER ] = source;
+ mCustomShader[ Toolkit::Visual::Property::SHADER ] = source;
//////////////////////////////////////////////////////
// Create actors
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
{
// ImageView can relayout in the OnImageReady, alternative to a signal would be to have a upcall from the Control to ImageView
Dali::Toolkit::Control handle( GetOwner() );
- Toolkit::DevelControl::ResourceReadySignal( handle ).Connect( this, &ImageView::OnResourceReady );
+ handle.ResourceReadySignal().Connect( this, &ImageView::OnResourceReady );
}
void ImageView::SetImage( Image image )
map = value.GetMap();
if( map )
{
- Property::Value* shaderValue = map->Find( Toolkit::DevelVisual::Property::SHADER, CUSTOM_SHADER );
+ Property::Value* shaderValue = map->Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER );
// set image only if property map contains image information other than custom shader
if( map->Count() > 1u || !shaderValue )
{
#include <dali-toolkit/public-api/visuals/border-visual-properties.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
Property::Map map;
- map[ Toolkit::DevelVisual::Property::TYPE ] = Toolkit::Visual::BORDER;
+ map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::BORDER;
map[ Toolkit::BorderVisual::Property::COLOR ] = Color::WHITE;
map[ Toolkit::BorderVisual::Property::SIZE ] = IMAGE_BORDER_INDENT;
Toolkit::Visual::Base borderVisual = visualFactory.CreateVisual( map );
#define DALI_PAGE_TURN_BOOK_SPINE_EFFECT_H
/*
- * 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.
*/
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#define DALI_COMPOSE_SHADER(STR) #STR
customShader[ Toolkit::Visual::Shader::Property::VERTEX_SHADER ] = vertexSource;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource;
- map[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
/*
- * 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.
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/controls/page-turn-view/page-turn-effect.h>
using namespace Dali;
customShader[ Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_X ] = 20;
customShader[ Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_Y ] = 20;
- map[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/controls/page-turn-view/page-turn-effect.h>
#include <dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
Shader PageTurnView::CreateShader( const Property::Map& shaderMap )
{
Shader shader;
- Property::Value* shaderValue = shaderMap.Find( Toolkit::DevelVisual::Property::SHADER, CUSTOM_SHADER );
+ Property::Value* shaderValue = shaderMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER );
Property::Map shaderSource;
if( shaderValue && shaderValue->Get( shaderSource ) )
{
const bool prevAlter = mAlterAddedChild;
mAlterAddedChild = false;
mPopupContainer.Add( mPopupBackgroundImage );
- DevelActor::LowerToBottom(mPopupBackgroundImage);
+ mPopupBackgroundImage.LowerToBottom();
mAlterAddedChild = prevAlter;
if( mTailImage )
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/size-negotiation/relayout-container.h>
#include <dali/public-api/math/math-utils.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali/integration-api/debug.h>
{
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
trackVisual.SetTransformAndSize( visualTransform, trackSize );
}
{
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mSecondaryProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, Vector2( mDomain.from.x + mSecondaryProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
secondProgressVisual.SetTransformAndSize( visualTransform, trackSize );
}
{
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, Vector2( mDomain.from.x + mProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
progressVisual.SetTransformAndSize( visualTransform, trackSize );
}
{
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
labelVisual.SetTransformAndSize( visualTransform, trackSize );
}
{
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) );
indeterminateVisual.SetTransformAndSize( visualTransform, trackSize );
}
// if LABEL_VISUAL doesn't set before, add Visual property "TYPE" to create new text Visual
if( map.Empty() )
{
- newTextMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ newTextMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
newTextMap.Add( Toolkit::TextVisual::Property::POINT_SIZE, DEFAULT_FONT_SIZE );
}
newTextMap.Add( Toolkit::TextVisual::Property::TEXT, textString );
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali/public-api/animation/animation.h>
-#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
+#include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
namespace Dali
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar-devel.h>
using namespace Dali;
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorMinimumHeight", FLOAT, INDICATOR_MINIMUM_HEIGHT )
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorStartPadding", FLOAT, INDICATOR_START_PADDING )
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorEndPadding", FLOAT, INDICATOR_END_PADDING )
-
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorTransientDuration", FLOAT, INDICATOR_TRANSIENT_DURATION )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorTransientDuration", FLOAT, INDICATOR_TRANSIENT_DURATION )
DALI_SIGNAL_REGISTRATION( Toolkit, ScrollBar, "panFinished", PAN_FINISHED_SIGNAL )
DALI_SIGNAL_REGISTRATION( Toolkit, ScrollBar, "scrollPositionIntervalReached", SCROLL_POSITION_INTERVAL_REACHED_SIGNAL )
scrollBarImpl.ApplyConstraints();
break;
}
- case Toolkit::DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION:
+ case Toolkit::ScrollBar::Property::INDICATOR_TRANSIENT_DURATION:
{
scrollBarImpl.mTransientIndicatorDuration = value.Get<float>();
break;
value = scrollBarImpl.mIndicatorEndPadding;
break;
}
- case Toolkit::DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION:
+ case Toolkit::ScrollBar::Property::INDICATOR_TRANSIENT_DURATION:
{
value = scrollBarImpl.mTransientIndicatorDuration;
break;
#define __DALI_TOOLKIT_INTERNAL_SCROLL_BAR_H__
/*
- * 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.
#include <dali/public-api/animation/animation.h>
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/object/property-notification.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
using namespace Dali;
using namespace Dali::Toolkit;
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
using namespace Dali;
using namespace Dali::Toolkit;
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
#include <dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h>
#include <dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h>
#include <dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h>
DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "wheelScrollDistanceStep", FLOAT, WHEEL_SCROLL_DISTANCE_STEP )
DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "snapToItemEnabled", BOOLEAN, SNAP_TO_ITEM_ENABLED )
DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "refreshInterval", FLOAT, REFRESH_INTERVAL )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ItemView, "layout", ARRAY, LAYOUT )
+DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "layout", ARRAY, LAYOUT )
DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ItemView, "layoutPosition", FLOAT, LAYOUT_POSITION)
itemViewImpl.SetMinimumSwipeSpeed( value.Get<float>() );
break;
}
+
case Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE:
{
itemViewImpl.SetMinimumSwipeDistance( value.Get<float>() );
break;
}
+
case Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP:
{
itemViewImpl.SetWheelScrollDistanceStep( value.Get<float>() );
break;
}
+
case Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED:
{
itemViewImpl.SetAnchoring( value.Get<bool>() );
break;
}
+
case Toolkit::ItemView::Property::REFRESH_INTERVAL:
{
itemViewImpl.SetRefreshInterval( value.Get<float>() );
break;
}
- case Toolkit::DevelItemView::Property::LAYOUT:
+
+ case Toolkit::ItemView::Property::LAYOUT:
{
// Get a Property::Array from the property if possible.
Property::Array layoutArray;
value = itemViewImpl.GetMinimumSwipeSpeed();
break;
}
+
case Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE:
{
value = itemViewImpl.GetMinimumSwipeDistance();
break;
}
+
case Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP:
{
value = itemViewImpl.GetWheelScrollDistanceStep();
break;
}
+
case Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED:
{
value = itemViewImpl.GetAnchoring();
break;
}
+
case Toolkit::ItemView::Property::REFRESH_INTERVAL:
{
value = itemViewImpl.GetRefreshInterval();
break;
}
- case Toolkit::DevelItemView::Property::LAYOUT:
+
+ case Toolkit::ItemView::Property::LAYOUT:
{
Property::Array layouts= itemViewImpl.GetLayoutArray();
value = layouts;
break;
}
-
}
}
/*
- * Copyright (c) 2015 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
using namespace Dali;
using namespace Dali::Toolkit;
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
-#include <dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h>
-#include <dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "panningEnabled", BOOLEAN, PANNING_ENABLED )
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "axisAutoLockEnabled", BOOLEAN, AXIS_AUTO_LOCK_ENABLED )
DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "wheelScrollDistanceStep", VECTOR2, WHEEL_SCROLL_DISTANCE_STEP )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollMode", MAP, SCROLL_MODE )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollMode", MAP, SCROLL_MODE )
DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPosition", VECTOR2, SCROLL_POSITION)
DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPrePosition", VECTOR2, SCROLL_PRE_POSITION)
scrollViewImpl.SetWheelScrollDistanceStep( value.Get<Vector2>() );
break;
}
- case Toolkit::DevelScrollView::Property::SCROLL_MODE:
+ case Toolkit::ScrollView::Property::SCROLL_MODE:
{
Property::Map* map = value.GetMap();
if( map )
#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__
/*
- * Copyright (c) 2015 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.
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/public-api/animation/animation.h>
#include <dali/public-api/object/property-notification.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h>
#include <dali-toolkit/internal/filters/blur-two-pass-filter.h>
customShader[ Toolkit::Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- mShadowVisualMap[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ mShadowVisualMap[ Toolkit::Visual::Property::SHADER ] = customShader;
// Create render targets needed for rendering from light's point of view
mSceneFromLightRenderTarget = FrameBufferImage::New( stageSize.width, stageSize.height, Pixel::RGBA8888 );
#define __DALI_TOOLKIT_INTERNAL_TABLE_VIEW_H__
/*
- * Copyright (c) 2014 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.
*/
// EXTERNAL INCLUDES
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/text/rendering-backend.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
#include <dali-toolkit/internal/text/text-effects-style.h>
#include <dali-toolkit/internal/text/text-font-style.h>
namespace
{
-
-const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "BEGIN", Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN },
- { "CENTER", Toolkit::Text::Layout::HORIZONTAL_ALIGN_CENTER },
- { "END", Toolkit::Text::Layout::HORIZONTAL_ALIGN_END },
-};
-const unsigned int HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE ) / sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE[0] );
-
-
-const Scripting::StringEnum LINE_WRAP_MODE_STRING_TABLE[] =
-{
- { "WORD", Toolkit::Text::Layout::LineWrap::WORD },
- { "CHARACTER", Toolkit::Text::Layout::LineWrap::CHARACTER }
-};
-const unsigned int LINE_WRAP_MODE_STRING_TABLE_COUNT = sizeof( LINE_WRAP_MODE_STRING_TABLE ) / sizeof( LINE_WRAP_MODE_STRING_TABLE[0] );
-
const char* const SCROLL_BAR_POSITION("sourcePosition");
const char* const SCROLL_BAR_POSITION_MIN("sourcePositionMin");
const char* const SCROLL_BAR_POSITION_MAX("sourcePositionMax");
DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "inputEmboss", MAP, INPUT_EMBOSS )
DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "outline", MAP, OUTLINE )
DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "inputOutline", MAP, INPUT_OUTLINE )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScroll", BOOLEAN, SMOOTH_SCROLL )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScrollDuration", FLOAT, SMOOTH_SCROLL_DURATION )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableScrollBar", BOOLEAN, ENABLE_SCROLL_BAR )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "scrollBarShowDuration", FLOAT, SCROLL_BAR_SHOW_DURATION )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "scrollBarFadeDuration", FLOAT, SCROLL_BAR_FADE_DURATION )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "pixelSize", FLOAT, PIXEL_SIZE )
-DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextEditor, "lineCount", INTEGER, LINE_COUNT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScroll", BOOLEAN, SMOOTH_SCROLL )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScrollDuration", FLOAT, SMOOTH_SCROLL_DURATION )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableScrollBar", BOOLEAN, ENABLE_SCROLL_BAR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "scrollBarShowDuration", FLOAT, SCROLL_BAR_SHOW_DURATION )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "scrollBarFadeDuration", FLOAT, SCROLL_BAR_FADE_DURATION )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "pixelSize", FLOAT, PIXEL_SIZE )
+DALI_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextEditor, "lineCount", INTEGER, LINE_COUNT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableSelection", BOOLEAN, ENABLE_SELECTION )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholder", MAP, PLACEHOLDER )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "lineWrapMode", INTEGER, LINE_WRAP_MODE )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderText", STRING, PLACEHOLDER_TEXT )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderTextColor", VECTOR4, PLACEHOLDER_TEXT_COLOR )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableSelection", BOOLEAN, ENABLE_SELECTION )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholder", MAP, PLACEHOLDER )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "lineWrapMode", STRING, LINE_WRAP_MODE )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED )
{
if( impl.mController )
{
- const std::string& alignStr = value.Get< std::string >();
- DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p HORIZONTAL_ALIGNMENT %s\n", impl.mController.Get(), alignStr.c_str() );
-
- Layout::HorizontalAlignment alignment( Layout::HORIZONTAL_ALIGN_BEGIN );
- if( Scripting::GetEnumeration< Layout::HorizontalAlignment >( alignStr.c_str(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ Text::HorizontalAlignment::Type alignment( static_cast< Text::HorizontalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( Text::GetHorizontalAlignmentEnumeration( value, alignment ) )
{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p HORIZONTAL_ALIGNMENT %d\n", impl.mController.Get(), alignment );
impl.mController->SetHorizontalAlignment( alignment );
}
}
}
break;
}
- case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL:
+ case Toolkit::TextEditor::Property::SMOOTH_SCROLL:
{
const bool enable = value.Get< bool >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor SMOOTH_SCROLL %d\n", enable );
impl.mScrollAnimationEnabled = enable;
break;
}
- case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL_DURATION:
+ case Toolkit::TextEditor::Property::SMOOTH_SCROLL_DURATION:
{
const float duration = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor SMOOTH_SCROLL_DURATION %f\n", duration );
}
break;
}
- case Toolkit::DevelTextEditor::Property::ENABLE_SCROLL_BAR:
+ case Toolkit::TextEditor::Property::ENABLE_SCROLL_BAR:
{
const bool enable = value.Get< bool >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor SHOW_SCROLL_BAR %d\n", enable );
impl.mScrollBarEnabled = enable;
break;
}
- case Toolkit::DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION:
+ case Toolkit::TextEditor::Property::SCROLL_BAR_SHOW_DURATION:
{
const float duration = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor SCROLL_BAR_SHOW_DURATION %f\n", duration );
impl.mAnimationPeriod.delaySeconds = duration;
break;
}
- case Toolkit::DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION:
+ case Toolkit::TextEditor::Property::SCROLL_BAR_FADE_DURATION:
{
const float duration = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor SCROLL_BAR_FADE_DURATION %f\n", duration );
impl.mAnimationPeriod.durationSeconds = duration;
break;
}
- case Toolkit::DevelTextEditor::Property::PIXEL_SIZE:
+ case Toolkit::TextEditor::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextEditor::Property::ENABLE_SELECTION:
+ case Toolkit::TextEditor::Property::ENABLE_SELECTION:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextEditor::Property::PLACEHOLDER:
+ case Toolkit::TextEditor::Property::PLACEHOLDER:
{
const Property::Map* map = value.GetMap();
if( map )
}
break;
}
- case Toolkit::DevelTextEditor::Property::LINE_WRAP_MODE:
+ case Toolkit::TextEditor::Property::LINE_WRAP_MODE:
{
- const std::string& wrapModeStr = value.Get< std::string >();
- DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p LINE_WRAP_MODE %s\n", impl.mController.Get(), wrapModeStr.c_str() );
-
- Layout::LineWrap::Mode lineWrapMode( Layout::LineWrap::WORD );
- if( Scripting::GetEnumeration< Layout::LineWrap::Mode >( wrapModeStr.c_str(),
- LINE_WRAP_MODE_STRING_TABLE,
- LINE_WRAP_MODE_STRING_TABLE_COUNT,
- lineWrapMode ) )
+ if( impl.mController )
{
- impl.mController->SetLineWrapMode( lineWrapMode );
+ Text::LineWrap::Mode lineWrapMode( static_cast< Text::LineWrap::Mode >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( GetLineWrapModeEnumeration( value, lineWrapMode ) )
+ {
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel %p LineWrap::MODE %d\n", impl.mController.Get(), lineWrapMode );
+ impl.mController->SetLineWrapMode( lineWrapMode );
+ }
}
break;
}
{
if( impl.mController )
{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::HorizontalAlignment >( impl.mController->GetHorizontalAlignment(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
+ const char* name = GetHorizontalAlignmentString( impl.mController->GetHorizontalAlignment() );
if( name )
{
value = std::string( name );
GetOutlineProperties( impl.mController, value, Text::EffectStyle::INPUT );
break;
}
- case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL:
+ case Toolkit::TextEditor::Property::SMOOTH_SCROLL:
{
value = impl.mScrollAnimationEnabled;
break;
}
- case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL_DURATION:
+ case Toolkit::TextEditor::Property::SMOOTH_SCROLL_DURATION:
{
value = impl.mScrollAnimationDuration;
break;
}
- case Toolkit::DevelTextEditor::Property::ENABLE_SCROLL_BAR:
+ case Toolkit::TextEditor::Property::ENABLE_SCROLL_BAR:
{
value = impl.mScrollBarEnabled;
break;
}
- case Toolkit::DevelTextEditor::Property::SCROLL_BAR_SHOW_DURATION:
+ case Toolkit::TextEditor::Property::SCROLL_BAR_SHOW_DURATION:
{
value = impl.mAnimationPeriod.delaySeconds;
break;
}
- case Toolkit::DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION:
+ case Toolkit::TextEditor::Property::SCROLL_BAR_FADE_DURATION:
{
value = impl.mAnimationPeriod.durationSeconds;
break;
}
- case Toolkit::DevelTextEditor::Property::PIXEL_SIZE:
+ case Toolkit::TextEditor::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextEditor::Property::LINE_COUNT:
+ case Toolkit::TextEditor::Property::LINE_COUNT:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextEditor::Property::ENABLE_SELECTION:
+ case Toolkit::TextEditor::Property::ENABLE_SELECTION:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextEditor::Property::PLACEHOLDER:
+ case Toolkit::TextEditor::Property::PLACEHOLDER:
{
Property::Map map;
impl.mController->GetPlaceholderProperty( map );
value = map;
break;
}
- case Toolkit::DevelTextEditor::Property::LINE_WRAP_MODE:
+ case Toolkit::TextEditor::Property::LINE_WRAP_MODE:
{
if( impl.mController )
{
return mInputStyleChangedSignal;
}
-Toolkit::DevelTextEditor::ScrollStateChangedSignalType& TextEditor::ScrollStateChangedSignal()
+Toolkit::TextEditor::ScrollStateChangedSignalType& TextEditor::ScrollStateChangedSignal()
{
return mScrollStateChangedSignal;
}
// Creates a background visual. Even if the color is transparent it updates the stencil.
mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, DevelVisual::COLOR ).
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ).
Add( ColorVisual::Property::MIX_COLOR, Color::TRANSPARENT ) );
// Enable the clipping property.
// Make sure the actors are parented correctly with/without clipping
Actor self = mStencil ? mStencil : Self();
- for( std::vector<Actor>::const_iterator it = mClippingDecorationActors.begin(),
+ for( std::vector<Actor>::iterator it = mClippingDecorationActors.begin(),
endIt = mClippingDecorationActors.end();
it != endIt;
++it )
{
self.Add( *it );
- DevelActor::LowerToBottom( *it );
+ it->LowerToBottom();
}
mClippingDecorationActors.clear();
{
mScrollStarted = true;
Dali::Toolkit::TextEditor handle( GetOwner() );
- mScrollStateChangedSignal.Emit( handle, DevelTextEditor::Scroll::STARTED );
+ mScrollStateChangedSignal.Emit( handle, Toolkit::TextEditor::Scroll::STARTED );
}
Actor indicator = mScrollBar.GetScrollIndicator();
{
mScrollStarted = false;
Dali::Toolkit::TextEditor handle( GetOwner() );
- mScrollStateChangedSignal.Emit( handle, DevelTextEditor::Scroll::FINISHED );
+ mScrollStateChangedSignal.Emit( handle, Toolkit::TextEditor::Scroll::FINISHED );
}
}
#include <dali/public-api/animation/animation.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
Toolkit::TextEditor::InputStyleChangedSignalType& InputStyleChangedSignal();
/**
- * @copydoc DevelTextEditor::ScrollStateChangedSignal()
+ * @copydoc TextEditor::ScrollStateChangedSignal()
*/
- Toolkit::DevelTextEditor::ScrollStateChangedSignalType& ScrollStateChangedSignal();
+ Toolkit::TextEditor::ScrollStateChangedSignalType& ScrollStateChangedSignal();
private: // From Control
// Signals
Toolkit::TextEditor::TextChangedSignalType mTextChangedSignal;
Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal;
- Toolkit::DevelTextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
+ Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
ImfManager mImfManager;
Text::ControllerPtr mController;
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/text/rendering-backend.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
#include <dali-toolkit/internal/text/text-effects-style.h>
#include <dali-toolkit/internal/text/text-font-style.h>
namespace
{
-
-const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "BEGIN", Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN },
- { "CENTER", Toolkit::Text::Layout::HORIZONTAL_ALIGN_CENTER },
- { "END", Toolkit::Text::Layout::HORIZONTAL_ALIGN_END },
-};
-const unsigned int HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE ) / sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE[0] );
-
-const Scripting::StringEnum VERTICAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "TOP", Toolkit::Text::Layout::VERTICAL_ALIGN_TOP },
- { "CENTER", Toolkit::Text::Layout::VERTICAL_ALIGN_CENTER },
- { "BOTTOM", Toolkit::Text::Layout::VERTICAL_ALIGN_BOTTOM },
-};
-const unsigned int VERTICAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( VERTICAL_ALIGNMENT_STRING_TABLE ) / sizeof( VERTICAL_ALIGNMENT_STRING_TABLE[0] );
-
// Type registration
BaseHandle Create()
{
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputEmboss", MAP, INPUT_EMBOSS )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "outline", MAP, OUTLINE )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputOutline", MAP, INPUT_OUTLINE )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "hiddenInputSettings", MAP, HIDDEN_INPUT_SETTINGS )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "pixelSize", FLOAT, PIXEL_SIZE )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "enableSelection", BOOLEAN, ENABLE_SELECTION )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "placeholder", MAP, PLACEHOLDER )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "ellipsis", BOOLEAN, ELLIPSIS )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "hiddenInputSettings", MAP, HIDDEN_INPUT_SETTINGS )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "pixelSize", FLOAT, PIXEL_SIZE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "enableSelection", BOOLEAN, ENABLE_SELECTION )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "placeholder", MAP, PLACEHOLDER )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "ellipsis", BOOLEAN, ELLIPSIS )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED )
{
if( impl.mController )
{
- const std::string& alignStr = value.Get< std::string >();
- DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p HORIZONTAL_ALIGNMENT %s\n", impl.mController.Get(), alignStr.c_str() );
-
- Layout::HorizontalAlignment alignment( Layout::HORIZONTAL_ALIGN_BEGIN );
- if( Scripting::GetEnumeration< Layout::HorizontalAlignment >( alignStr.c_str(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ Text::HorizontalAlignment::Type alignment( static_cast< Text::HorizontalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( GetHorizontalAlignmentEnumeration( value, alignment ) )
{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p HORIZONTAL_ALIGNMENT %d\n", impl.mController.Get(), alignment );
impl.mController->SetHorizontalAlignment( alignment );
}
}
{
if( impl.mController )
{
- const std::string& alignStr = value.Get< std::string >();
- DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p VERTICAL_ALIGNMENT %s\n", impl.mController.Get(), alignStr.c_str() );
-
- Layout::VerticalAlignment alignment( Layout::VERTICAL_ALIGN_BOTTOM );
- if( Scripting::GetEnumeration< Layout::VerticalAlignment >( alignStr.c_str(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ Toolkit::Text::VerticalAlignment::Type alignment( static_cast< Text::VerticalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( GetVerticalAlignmentEnumeration( value, alignment ) )
{
impl.mController->SetVerticalAlignment( alignment );
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p VERTICAL_ALIGNMENT %d\n", impl.mController.Get(), alignment );
}
}
break;
}
break;
}
- case Toolkit::DevelTextField::Property::HIDDEN_INPUT_SETTINGS:
+ case Toolkit::TextField::Property::HIDDEN_INPUT_SETTINGS:
{
const Property::Map* map = value.GetMap();
if (map)
}
break;
}
- case Toolkit::DevelTextField::Property::PIXEL_SIZE:
+ case Toolkit::TextField::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextField::Property::ENABLE_SELECTION:
+ case Toolkit::TextField::Property::ENABLE_SELECTION:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextField::Property::PLACEHOLDER:
+ case Toolkit::TextField::Property::PLACEHOLDER:
{
const Property::Map* map = value.GetMap();
if( map )
}
break;
}
- case Toolkit::DevelTextField::Property::ELLIPSIS:
+ case Toolkit::TextField::Property::ELLIPSIS:
{
if( impl.mController )
{
{
if( impl.mController )
{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::HorizontalAlignment >( impl.mController->GetHorizontalAlignment(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
- if( name )
+ const char* name = Text::GetHorizontalAlignmentString( impl.mController->GetHorizontalAlignment() );
+
+ if ( name )
{
value = std::string( name );
}
{
if( impl.mController )
{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::VerticalAlignment >( impl.mController->GetVerticalAlignment(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+ const char* name = Text::GetVerticalAlignmentString( impl.mController->GetVerticalAlignment() );
+
if( name )
{
value = std::string( name );
GetOutlineProperties( impl.mController, value, Text::EffectStyle::INPUT );
break;
}
- case Toolkit::DevelTextField::Property::HIDDEN_INPUT_SETTINGS:
+ case Toolkit::TextField::Property::HIDDEN_INPUT_SETTINGS:
{
Property::Map map;
impl.mController->GetHiddenInputOption(map);
value = map;
break;
}
- case Toolkit::DevelTextField::Property::PIXEL_SIZE:
+ case Toolkit::TextField::Property::PIXEL_SIZE:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextField::Property::ENABLE_SELECTION:
+ case Toolkit::TextField::Property::ENABLE_SELECTION:
{
if( impl.mController )
{
}
break;
}
- case Toolkit::DevelTextField::Property::PLACEHOLDER:
+ case Toolkit::TextField::Property::PLACEHOLDER:
{
Property::Map map;
impl.mController->GetPlaceholderProperty( map );
value = map;
break;
}
- case Toolkit::DevelTextField::Property::ELLIPSIS:
+ case Toolkit::TextField::Property::ELLIPSIS:
{
if( impl.mController )
{
// Make sure the actors are parented correctly with/without clipping
Actor self = mStencil ? mStencil : Self();
- for( std::vector<Actor>::const_iterator it = mClippingDecorationActors.begin(),
+ for( std::vector<Actor>::iterator it = mClippingDecorationActors.begin(),
endIt = mClippingDecorationActors.end();
it != endIt;
++it )
{
self.Add( *it );
- DevelActor::LowerToBottom(*it);
+ it->LowerToBottom();
}
mClippingDecorationActors.clear();
// Creates a background visual. Even if the color is transparent it updates the stencil.
mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND,
- Property::Map().Add( Toolkit::Visual::Property::TYPE, DevelVisual::COLOR ).
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR ).
Add( ColorVisual::Property::MIX_COLOR, Color::TRANSPARENT ) );
// Enable the clipping property.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/text/rendering-backend.h>
+#include <dali-toolkit/public-api/text/text-enumerations.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>
#include <dali-toolkit/internal/text/text-definitions.h>
#include <dali-toolkit/internal/styling/style-manager-impl.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
using namespace Dali::Toolkit::Text;
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] );
-const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "BEGIN", Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN },
- { "CENTER", Toolkit::Text::Layout::HORIZONTAL_ALIGN_CENTER },
- { "END", Toolkit::Text::Layout::HORIZONTAL_ALIGN_END },
-};
-const unsigned int HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE ) / sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE[0] );
-
-const Scripting::StringEnum VERTICAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "TOP", Toolkit::Text::Layout::VERTICAL_ALIGN_TOP },
- { "CENTER", Toolkit::Text::Layout::VERTICAL_ALIGN_CENTER },
- { "BOTTOM", Toolkit::Text::Layout::VERTICAL_ALIGN_BOTTOM },
-};
-const unsigned int VERTICAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( VERTICAL_ALIGNMENT_STRING_TABLE ) / sizeof( VERTICAL_ALIGNMENT_STRING_TABLE[0] );
-
-const Scripting::StringEnum LINE_WRAP_MODE_STRING_TABLE[] =
-{
- { "WRAP_MODE_WORD", Toolkit::Text::Layout::LineWrap::WORD },
- { "WRAP_MODE_CHARACTER", Toolkit::Text::Layout::LineWrap::CHARACTER }
-};
-const unsigned int LINE_WRAP_MODE_STRING_TABLE_COUNT = sizeof( LINE_WRAP_MODE_STRING_TABLE ) / sizeof( LINE_WRAP_MODE_STRING_TABLE[0] );
-
// Type registration
BaseHandle Create()
{
// 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", INTEGER, 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
{
if( impl.mController )
{
- Layout::HorizontalAlignment alignment( Layout::HORIZONTAL_ALIGN_BEGIN );
- if( Scripting::GetEnumeration< Toolkit::Text::Layout::HorizontalAlignment >( value.Get< std::string >().c_str(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ Text::HorizontalAlignment::Type alignment( static_cast< Text::HorizontalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( Text::GetHorizontalAlignmentEnumeration( value, alignment ) )
{
impl.mController->SetHorizontalAlignment( alignment );
}
{
if( impl.mController )
{
- Layout::VerticalAlignment alignment( Layout::VERTICAL_ALIGN_BOTTOM );
- if( Scripting::GetEnumeration< Toolkit::Text::Layout::VerticalAlignment >( value.Get< std::string >().c_str(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ Toolkit::Text::VerticalAlignment::Type alignment( static_cast< Text::VerticalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( Text::GetVerticalAlignmentEnumeration( value, alignment ) )
{
impl.mController->SetVerticalAlignment( alignment );
}
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() );
-
- Layout::LineWrap::Mode lineWrapMode( Layout::LineWrap::WORD );
- if( Scripting::GetEnumeration< Layout::LineWrap::Mode >( wrapModeStr.c_str(),
- LINE_WRAP_MODE_STRING_TABLE,
- LINE_WRAP_MODE_STRING_TABLE_COUNT,
- lineWrapMode ) )
+ if( impl.mController )
{
- impl.mController->SetLineWrapMode( lineWrapMode );
+ Text::LineWrap::Mode lineWrapMode( static_cast< Text::LineWrap::Mode >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( GetLineWrapModeEnumeration( value, lineWrapMode ) )
+ {
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel %p LineWrap::MODE %d\n", impl.mController.Get(), lineWrapMode );
+ impl.mController->SetLineWrapMode( lineWrapMode );
+ }
}
break;
}
{
if( impl.mController )
{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::HorizontalAlignment >( impl.mController->GetHorizontalAlignment(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
- if( name )
- {
- value = std::string( name );
- }
+ const char* name = Text::GetHorizontalAlignmentString( impl.mController->GetHorizontalAlignment() );
+
+ if ( name )
+ {
+ value = std::string( name );
+ }
}
break;
}
{
if( impl.mController )
{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::VerticalAlignment >( impl.mController->GetVerticalAlignment(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+ const char* name = Text::GetVerticalAlignmentString( impl.mController->GetVerticalAlignment() );
if( name )
{
value = std::string( name );
}
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 )
{
Actor self = Self();
Property::Map propertyMap;
- propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
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 )
Self().GetPadding( padding );
Property::Map visualTransform;
- visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, contentSize )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(padding.left, padding.top) )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
+ visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, contentSize )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(padding.left, padding.top) )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
mVisual.SetTransformAndSize( visualTransform, size );
if ( mController->IsAutoScrollEnabled() )
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/helpers/color-conversion.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
/*
- * 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.
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/controls/popup/popup-impl.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
if( typeValue )
{
// Set to an invalid value so it definitely changes if set in Scripting::GetEnumerationProperty
- Toolkit::DevelVisual::Type visualType = static_cast< Toolkit::DevelVisual::Type >( -1 );
+ Toolkit::Visual::Type visualType = static_cast< Toolkit::Visual::Type >( -1 );
if( Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, visualType ) )
{
- if( visualType == Toolkit::DevelVisual::TEXT )
+ if( visualType == Toolkit::Visual::TEXT )
{
// Visual Type is text, ensure we have a the TEXT property set before we connect to the signals.
if( value.Get( text ) )
{
mContentTextVisual[ Toolkit::TextVisual::Property::TEXT ] = text;
- mContentTextVisual[ Toolkit::Visual::Property::TYPE ] = DevelVisual::TEXT;
+ mContentTextVisual[ Toolkit::Visual::Property::TYPE ] = Visual::TEXT;
mContentArray.Clear();
connectSignals = true;
}
#define DALI_INTERNAL_TOOLTIP_H
/*
- * 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.
#include <dali/public-api/object/property-map.h>
#include <dali/public-api/object/ref-object.h>
#include <dali/public-api/signals/connection-tracker.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
$(toolkit_src_dir)/text/property-string-parser.cpp \
$(toolkit_src_dir)/text/segmentation.cpp \
$(toolkit_src_dir)/text/shaper.cpp \
+ $(toolkit_src_dir)/text/text-enumerations-impl.cpp \
$(toolkit_src_dir)/text/text-controller.cpp \
$(toolkit_src_dir)/text/text-controller-impl.cpp \
$(toolkit_src_dir)/text/text-effects-style.cpp \
/*
- * 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.
#include <dali/devel-api/images/texture-set-image.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
Property::Map customShader;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource.str();
Property::Map visualMap;
- visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader );
+ visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader );
mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
mActorForHorz.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
// Set up blend-two-image custom shader
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = BLEND_TWO_IMAGES_FRAGMENT_SOURCE;
- visualMap[ Toolkit::DevelVisual::Property::SHADER ] = customShader;
+ visualMap[ Toolkit::Visual::Property::SHADER ] = customShader;
mActorForBlending.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
mRootActor.Add( mActorForInput );
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
Property::Map customShader;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = EMBOSS_FRAGMENT_SOURCE;
Property::Map visualMap;
- visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader );
+ visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader );
// create actor to render input with applied emboss effect
mActorForInput1 = Toolkit::ImageView::New(mInputImage);
/*
- * 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.
#include <dali/public-api/render-tasks/render-task-list.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
Property::Map customShader;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = SPREAD_FRAGMENT_SOURCE;
Property::Map visualMap;
- visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader );
+ visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader );
// set SPREAD custom shader
mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap );
// EXTERNAL INCLUDES
#include <dali/public-api/object/base-object.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
#include <dali/public-api/common/vector-wrapper.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/hidden-text.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
using namespace Dali::Toolkit;
{
value.Get( mSubstituteCount );
}
- else if( key == Toolkit::HiddenInput::Property::SHOW_DURATION || key == PROPERTY_SHOW_DURATION )
+ else if( key == Toolkit::HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION || key == PROPERTY_SHOW_DURATION )
{
value.Get( mDisplayDuration );
}
map[Toolkit::HiddenInput::Property::MODE] = mHideMode;
map[Toolkit::HiddenInput::Property::SUBSTITUTE_CHARACTER] = mSubstituteText;
map[Toolkit::HiddenInput::Property::SUBSTITUTE_COUNT] = mSubstituteCount;
- map[Toolkit::HiddenInput::Property::SHOW_DURATION] = mDisplayDuration;
+ map[Toolkit::HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION] = mDisplayDuration;
}
void HiddenText::Substitute( const Vector<Character>& source, Vector<Character>& destination )
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/text-controls/hidden-input-properties.h>
+#include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
#include <dali-toolkit/internal/text/text-definitions.h>
namespace Dali
+++ /dev/null
-#ifndef DALI_TOOLKIT_TEXT_LAYOUT_ALIGNMENT_H
-#define DALI_TOOLKIT_TEXT_LAYOUT_ALIGNMENT_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.
- *
- */
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Text
-{
-
-namespace Layout
-{
-
-/**
- * @brief Speficies the horizontal alignment.
- *
- * BEGIN is on the left for Left To Right languages whereas is right for Right To Left.
- * Similarly, END is on the right for Left To Right languages and left for Right To Left.
- */
-enum HorizontalAlignment
-{
- HORIZONTAL_ALIGN_BEGIN,
- HORIZONTAL_ALIGN_CENTER,
- HORIZONTAL_ALIGN_END
-};
-
-/**
- * @brief Speficies the vertical alignment.
- */
-enum VerticalAlignment
-{
- VERTICAL_ALIGN_TOP,
- VERTICAL_ALIGN_CENTER,
- VERTICAL_ALIGN_BOTTOM
-};
-
-enum AlignmentCount
-{
- HORIZONTAL_ALIGN_COUNT = HORIZONTAL_ALIGN_END + 1,
- VERTICAL_ALIGN_COUNT = VERTICAL_ALIGN_BOTTOM + 1
-};
-
-} // namespace Layout
-
-} // namespace Text
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_TEXT_LAYOUT_ALIGNMENT_H
/*
- * Copyright (c) 2015 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.
LineLayout tmpLineLayout;
const bool isMultiline = mLayout == MULTI_LINE_BOX;
- const bool isWordLaidOut = parameters.lineWrapMode == Layout::LineWrap::WORD;
+ const bool isWordLaidOut = parameters.lineWrapMode == Text::LineWrap::WORD;
// The last glyph to be laid-out.
const GlyphIndex lastGlyphOfParagraphPlusOne = parameters.startGlyphIndex + parameters.numberOfGlyphs;
void Align( const Size& size,
CharacterIndex startIndex,
Length numberOfCharacters,
- HorizontalAlignment horizontalAlignment,
+ Text::HorizontalAlignment::Type horizontalAlignment,
Vector<LineRun>& lines,
float& alignmentOffset )
{
}
void CalculateHorizontalAlignment( float boxWidth,
- HorizontalAlignment horizontalAlignment,
+ HorizontalAlignment::Type horizontalAlignment,
LineRun& line )
{
line.alignmentOffset = 0.f;
const bool isRTL = RTL == line.direction;
float lineLength = line.width;
- HorizontalAlignment alignment = horizontalAlignment;
+ HorizontalAlignment::Type alignment = horizontalAlignment;
if( isRTL )
{
// Swap the alignment type if the line is right to left.
switch( alignment )
{
- case HORIZONTAL_ALIGN_BEGIN:
+ case HorizontalAlignment::BEGIN:
{
- alignment = HORIZONTAL_ALIGN_END;
+ alignment = HorizontalAlignment::END;
break;
}
- case HORIZONTAL_ALIGN_CENTER:
+ case HorizontalAlignment::CENTER:
{
// Nothing to do.
break;
}
- case HORIZONTAL_ALIGN_END:
+ case HorizontalAlignment::END:
{
- alignment = HORIZONTAL_ALIGN_BEGIN;
+ alignment = HorizontalAlignment::BEGIN;
break;
}
}
// Calculate the horizontal line offset.
switch( alignment )
{
- case HORIZONTAL_ALIGN_BEGIN:
+ case HorizontalAlignment::BEGIN:
{
line.alignmentOffset = 0.f;
}
break;
}
- case HORIZONTAL_ALIGN_CENTER:
+ case HorizontalAlignment::CENTER:
{
line.alignmentOffset = 0.5f * ( boxWidth - lineLength );
line.alignmentOffset = floorf( line.alignmentOffset ); // try to avoid pixel alignment.
break;
}
- case HORIZONTAL_ALIGN_END:
+ case HorizontalAlignment::END:
{
if( isRTL )
{
void Engine::Align( const Size& size,
CharacterIndex startIndex,
Length numberOfCharacters,
- Layout::HorizontalAlignment horizontalAlignment,
+ Text::HorizontalAlignment::Type horizontalAlignment,
Vector<LineRun>& lines,
float& alignmentOffset )
{
#include <dali/public-api/math/vector2.h>
// INTERNAL INCLUDE
-#include <dali-toolkit/internal/text/layouts/layout-alignment.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/line-run.h>
#include <dali-toolkit/internal/text/metrics.h>
void Align( const Size& size,
CharacterIndex startIndex,
Length numberOfCharacters,
- Layout::HorizontalAlignment horizontalAlignment,
+ Text::HorizontalAlignment::Type horizontalAlignment,
Vector<LineRun>& lines,
float& alignmentOffset );
#define DALI_TOOLKIT_TEXT_LAYOUT_PARAMETERS_H
/*
- * 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.
#include <dali/public-api/math/vector2.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/text-definitions.h>
-#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
namespace Dali
{
const GlyphIndex* const charactersToGlyphsBuffer,
const Length* const glyphsPerCharacterBuffer,
Length totalNumberOfGlyphs,
- HorizontalAlignment horizontalAlignment,
- LineWrap::Mode lineWrapMode )
+ Text::HorizontalAlignment::Type horizontalAlignment,
+ Text::LineWrap::Mode lineWrapMode )
: boundingBox( boundingBox ),
textBuffer( textBuffer ),
lineBreakInfoBuffer( lineBreakInfoBuffer ),
GlyphIndex startGlyphIndex; ///< Index to the first glyph to layout.
Length numberOfGlyphs; ///< The number of glyphs to layout.
Length totalNumberOfGlyphs; ///< The number of glyphs.
- HorizontalAlignment horizontalAlignment; ///< The horizontal alignment.
+ HorizontalAlignment::Type horizontalAlignment; ///< The horizontal alignment.
LineIndex startLineIndex; ///< The line index where to insert the new lines.
Length estimatedNumberOfLines; ///< The estimated number of lines.
- LineWrap::Mode lineWrapMode; ///< The line wrap mode for moving to next line.
+ Text::LineWrap::Mode lineWrapMode; ///< The line wrap mode for moving to next line.
bool isLastNewParagraph; ///< Whether the last character is a new paragraph character.
};
+++ /dev/null
-#ifndef DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_H
-#define DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_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.
- *
- */
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Text
-{
-
-namespace Layout
-{
-
-/**
- * @brief Unit of wrapping for moving to next line
- *
- * If layout width too short to show full text,
- * WRAP_MODE_WORD mode will move word to next line,
- * +---------+
- * |HELLO |
- * |WORLLD |
- * +---------+
- *
- * but WRAP_MODE_CHARACTER mode will move character by character to next line
- * +---------+
- * |HELLO WOR|
- * |LD |
- * +---------+
- */
-
-namespace LineWrap {
-
-enum Mode
-{
- WORD,
- CHARACTER
-};
-
-} // namespace LineWrap
-
-} // namespace Layout
-
-} // namespace Text
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_H
switch( mModel->GetVerticalAlignment() )
{
- case Layout::VERTICAL_ALIGN_TOP:
+ case VerticalAlignment::TOP:
{
// No offset to add.
break;
}
- case Layout::VERTICAL_ALIGN_CENTER:
+ case VerticalAlignment::CENTER:
{
penY = static_cast<int>( 0.5f * ( size.height - layoutSize.height ) );
break;
}
- case Layout::VERTICAL_ALIGN_BOTTOM:
+ case VerticalAlignment::BOTTOM:
{
penY = static_cast<int>( size.height - layoutSize.height );
break;
return mModel->GetScrollPosition();
}
-Layout::HorizontalAlignment ViewModel::GetHorizontalAlignment() const
+HorizontalAlignment::Type ViewModel::GetHorizontalAlignment() const
{
return mModel->GetHorizontalAlignment();
}
-Layout::VerticalAlignment ViewModel::GetVerticalAlignment() const
+VerticalAlignment::Type ViewModel::GetVerticalAlignment() const
{
return mModel->GetVerticalAlignment();
}
#include <dali/public-api/common/dali-vector.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/text-model-interface.h>
namespace Dali
/**
* @copydoc ModelInterface::GetHorizontalAlignment()
*/
- virtual Layout::HorizontalAlignment GetHorizontalAlignment() const;
+ virtual Text::HorizontalAlignment::Type GetHorizontalAlignment() const;
/**
* @copydoc ModelInterface::GetVerticalAlignment()
*/
- virtual Layout::VerticalAlignment GetVerticalAlignment() const;
+ virtual Text::VerticalAlignment::Type GetVerticalAlignment() const;
/**
* @copydoc ModelInterface::IsTextElideEnabled()
switch( mModel->mHorizontalAlignment )
{
- case Layout::HORIZONTAL_ALIGN_BEGIN:
+ case Text::HorizontalAlignment::BEGIN :
{
cursorInfo.primaryPosition.x = 0.f;
break;
}
- case Layout::HORIZONTAL_ALIGN_CENTER:
+ case Text::HorizontalAlignment::CENTER:
{
cursorInfo.primaryPosition.x = floorf( 0.5f * mModel->mVisualModel->mControlSize.width );
break;
}
- case Layout::HORIZONTAL_ALIGN_END:
+ case Text::HorizontalAlignment::END:
{
cursorInfo.primaryPosition.x = mModel->mVisualModel->mControlSize.width - mEventData->mDecorator->GetCursorWidth();
break;
mAutoScrollDirectionRTL( false ),
mUnderlineSetByString( false ),
mShadowSetByString( false ),
+ mOutlineSetByString( false ),
mFontStyleSetByString( false ),
mShouldClearFocusOnEscape( true )
{
bool mUnderlineSetByString:1; ///< Set when underline is set by string (legacy) instead of map
bool mShadowSetByString:1; ///< Set when shadow is set by string (legacy) instead of map
+ bool mOutlineSetByString:1; ///< Set when outline is set by string (legacy) instead of map
bool mFontStyleSetByString:1; ///< Set when font style is set by string (legacy) instead of map
bool mShouldClearFocusOnEscape:1; ///< Whether text control should clear key input focus
};
return Layout::Engine::MULTI_LINE_BOX == mImpl->mLayoutEngine.GetLayout();
}
-void Controller::SetHorizontalAlignment( Layout::HorizontalAlignment alignment )
+void Controller::SetHorizontalAlignment( Text::HorizontalAlignment::Type alignment )
{
if( alignment != mImpl->mModel->mHorizontalAlignment )
{
}
}
-Layout::HorizontalAlignment Controller::GetHorizontalAlignment() const
+Text::HorizontalAlignment::Type Controller::GetHorizontalAlignment() const
{
return mImpl->mModel->mHorizontalAlignment;
}
-void Controller::SetVerticalAlignment( Layout::VerticalAlignment alignment )
+void Controller::SetVerticalAlignment( VerticalAlignment::Type alignment )
{
if( alignment != mImpl->mModel->mVerticalAlignment )
{
}
}
-Layout::VerticalAlignment Controller::GetVerticalAlignment() const
+VerticalAlignment::Type Controller::GetVerticalAlignment() const
{
return mImpl->mModel->mVerticalAlignment;
}
-void Controller::SetLineWrapMode( Layout::LineWrap::Mode lineWrapMode )
+void Controller::SetLineWrapMode( Text::LineWrap::Mode lineWrapMode )
{
if( lineWrapMode != mImpl->mModel->mLineWrapMode )
{
}
}
-Layout::LineWrap::Mode Controller::GetLineWrapMode() const
+Text::LineWrap::Mode Controller::GetLineWrapMode() const
{
return mImpl->mModel->mLineWrapMode;
}
mImpl->mShadowSetByString = setByString;
}
+bool Controller::IsOutlineSetByString()
+{
+ return mImpl->mOutlineSetByString;
+}
+
+void Controller::OutlineSetByString( bool setByString )
+{
+ mImpl->mOutlineSetByString = setByString;
+}
+
bool Controller::IsFontStyleSetByString()
{
return mImpl->mFontStyleSetByString;
switch( mImpl->mModel->mVerticalAlignment )
{
- case Layout::VERTICAL_ALIGN_TOP:
+ case VerticalAlignment::TOP:
{
mImpl->mModel->mScrollPosition.y = 0.f;
break;
}
- case Layout::VERTICAL_ALIGN_CENTER:
+ case VerticalAlignment::CENTER:
{
mImpl->mModel->mScrollPosition.y = floorf( 0.5f * ( controlSize.height - layoutSize.height ) ); // try to avoid pixel alignment.
break;
}
- case Layout::VERTICAL_ALIGN_BOTTOM:
+ case VerticalAlignment::BOTTOM:
{
mImpl->mModel->mScrollPosition.y = controlSize.height - layoutSize.height;
break;
#include <dali/public-api/events/gesture.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
#include <dali-toolkit/internal/text/decorator/text-decorator.h>
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
-#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
#include <dali-toolkit/internal/text/hidden-text.h>
#include <dali-toolkit/internal/text/text-model-interface.h>
-
namespace Dali
{
*
* @param[in] alignment The horizontal alignment.
*/
- void SetHorizontalAlignment( Layout::HorizontalAlignment alignment );
+ void SetHorizontalAlignment( HorizontalAlignment::Type alignment );
/**
* @copydoc ModelInterface::GetHorizontalAlignment()
*/
- Layout::HorizontalAlignment GetHorizontalAlignment() const;
+ HorizontalAlignment::Type GetHorizontalAlignment() const;
/**
* @brief Sets the text's vertical alignment.
*
* @param[in] alignment The vertical alignment.
*/
- void SetVerticalAlignment( Layout::VerticalAlignment alignment );
+ void SetVerticalAlignment( VerticalAlignment::Type alignment );
/**
* @copydoc ModelInterface::GetVerticalAlignment()
*/
- Layout::VerticalAlignment GetVerticalAlignment() const;
+ VerticalAlignment::Type GetVerticalAlignment() const;
/**
* @brief Sets the text's wrap mode
* @param[in] text wrap mode The unit of wrapping
*/
- void SetLineWrapMode( Layout::LineWrap::Mode textWarpMode );
+ void SetLineWrapMode( Text::LineWrap::Mode textWarpMode );
/**
* @brief Retrieve text wrap mode previously set.
* @return text wrap mode
*/
- Layout::LineWrap::Mode GetLineWrapMode() const;
+ Text::LineWrap::Mode GetLineWrapMode() const;
/**
* @brief Enable or disable the text elide.
void ShadowSetByString( bool setByString );
/**
+ * @brief Query if outline settings were provided by string or map
+ * @return bool true if set by string
+ */
+ bool IsOutlineSetByString();
+
+ /**
+ * Set method outline setting were set by
+ * @param[in] bool, true if set by string
+ */
+ void OutlineSetByString( bool setByString );
+
+ /**
* @brief Query if font style settings were provided by string or map
* @return bool true if set by string
*/
bool empty = true;
- if ( !propertiesMap.Empty() )
+ if ( propertiesMap.Empty() )
+ {
+ // Map empty so check if a string provided
+ // This is purely to maintain backward compatibility, but we don't parse the string to be a property map.
+ const std::string propertyString = value.Get<std::string>();
+
+ // Stores the default outline's properties string to be recovered by the GetOutlineProperties() function.
+ controller->SetDefaultOutlineProperties( propertyString );
+
+ controller->OutlineSetByString( true );
+ }
+ else
{
empty = ParseOutlineProperties( propertiesMap,
colorDefined,
color,
widthDefined,
width );
+
+ controller->OutlineSetByString( false );
}
if( !empty )
{
case EffectStyle::DEFAULT:
{
- const Vector4& color = controller->GetOutlineColor();
- const float width = controller->GetOutlineWidth();
+ if ( controller->IsOutlineSetByString() )
+ {
+ value = controller->GetDefaultOutlineProperties();
+ break;
+ }
+ else
+ {
+ const Vector4& color = controller->GetOutlineColor();
+ const float width = controller->GetOutlineWidth();
- Property::Map map;
+ Property::Map map;
- std::string colorStr;
- Vector4ToColorString( color, colorStr );
- map.Insert( COLOR_KEY, colorStr );
+ std::string colorStr;
+ Vector4ToColorString( color, colorStr );
+ map.Insert( COLOR_KEY, colorStr );
- std::string widthStr;
- FloatToString( width, widthStr );
- map.Insert( WIDTH_KEY, widthStr );
+ std::string widthStr;
+ FloatToString( width, widthStr );
+ map.Insert( WIDTH_KEY, widthStr );
- value = map;
+ value = map;
- break;
+ break;
+ }
}
case EffectStyle::INPUT:
{
--- /dev/null
+/*
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/scripting/enum-helper.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+namespace
+{
+DALI_ENUM_TO_STRING_TABLE_BEGIN( HORIZONTAL_ALIGNMENT_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, BEGIN )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, END )
+DALI_ENUM_TO_STRING_TABLE_END( HORIZONTAL_ALIGNMENT_TYPE )
+
+DALI_ENUM_TO_STRING_TABLE_BEGIN( VERTICAL_ALIGNMENT_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment, TOP )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment, BOTTOM )
+DALI_ENUM_TO_STRING_TABLE_END( VERTICAL_ALIGNMENT_TYPE )
+
+DALI_ENUM_TO_STRING_TABLE_BEGIN( LINE_WRAP_MODE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::LineWrap, WORD )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::LineWrap, CHARACTER )
+DALI_ENUM_TO_STRING_TABLE_END( LINE_WRAP_MODE )
+} // namespace
+
+bool GetHorizontalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment )
+{
+ return Scripting::GetEnumerationProperty( propertyValue, HORIZONTAL_ALIGNMENT_TYPE_TABLE, HORIZONTAL_ALIGNMENT_TYPE_TABLE_COUNT, alignment );
+}
+
+bool GetVerticalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment )
+{
+ return Scripting::GetEnumerationProperty( propertyValue, VERTICAL_ALIGNMENT_TYPE_TABLE, VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT, alignment );
+}
+
+bool GetLineWrapModeEnumeration( const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode )
+{
+ return Scripting::GetEnumerationProperty( propertyValue, LINE_WRAP_MODE_TABLE, LINE_WRAP_MODE_TABLE_COUNT, lineWrapMode );
+}
+
+const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment )
+{
+ return Scripting::GetLinearEnumerationName< Toolkit::Text::HorizontalAlignment::Type >( alignment,
+ HORIZONTAL_ALIGNMENT_TYPE_TABLE,
+ HORIZONTAL_ALIGNMENT_TYPE_TABLE_COUNT );
+}
+
+const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::Type& alignment )
+{
+ return Scripting::GetLinearEnumerationName< Toolkit::Text::VerticalAlignment::Type >( alignment,
+ VERTICAL_ALIGNMENT_TYPE_TABLE,
+ VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT );
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
+#define DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/property-value.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+/**
+ * @brief Get the alignment from the provided property value.
+ * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
+ * @param[out] alignment The resulting alignment from the given source
+ * @return true if the resulting alignment has been updated
+ */
+bool GetHorizontalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment );
+
+/**
+ * @brief Get the alignment from the provided property value.
+ * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
+ * @param[out] alignment The resulting alignment from the given source
+ * @return true if the resulting alignment has been updated
+ */
+bool GetVerticalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment );
+
+/**
+ * @brief Get the line-wrap-mode from the provided property value.
+ * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
+ * @param[out] alignment The resulting lineWrapMode from the given source
+ * @return true if the resulting lineWrapMode has been updated
+ */
+bool GetLineWrapModeEnumeration( const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode );
+
+/**
+ * @brief Get the alignment string from the provided alignment string.
+ * @param[in] alignment the Text::Horizontal enum source
+ * @return the string equivalent
+ */
+const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment );
+
+/**
+ * @brief Get the alignment string from the provided alignment string.
+ * @param[in] alignment the Text::VerticalAlignment enum source
+ * @return the string equivalent
+ */
+const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::Type& alignment );
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
#include <dali/public-api/math/vector2.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/layouts/layout-alignment.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/line-run.h>
#include <dali-toolkit/internal/text/script-run.h>
#include <dali-toolkit/internal/text/text-definitions.h>
*
* @return The horizontal alignment.
*/
- virtual Layout::HorizontalAlignment GetHorizontalAlignment() const = 0;
+ virtual HorizontalAlignment::Type GetHorizontalAlignment() const = 0;
/**
* @brief Retrieves the text's vertical alignment.
*
* @return The vertical alignment.
*/
- virtual Layout::VerticalAlignment GetVerticalAlignment() const = 0;
+ virtual VerticalAlignment::Type GetVerticalAlignment() const = 0;
/**
* @brief Whether the text elide property is enabled.
return mScrollPosition;
}
-Layout::HorizontalAlignment Model::GetHorizontalAlignment() const
+HorizontalAlignment::Type Model::GetHorizontalAlignment() const
{
return mHorizontalAlignment;
}
-Layout::VerticalAlignment Model::GetVerticalAlignment() const
+VerticalAlignment::Type Model::GetVerticalAlignment() const
{
return mVerticalAlignment;
}
mVisualModel(),
mScrollPosition(),
mScrollPositionLast(),
- mHorizontalAlignment( Layout::HORIZONTAL_ALIGN_BEGIN ),
- mVerticalAlignment( Layout::VERTICAL_ALIGN_TOP ),
- mLineWrapMode( Layout::LineWrap::WORD ),
+ mHorizontalAlignment( Text::HorizontalAlignment::BEGIN ),
+ mVerticalAlignment( Text::VerticalAlignment::TOP ),
+ mLineWrapMode( Text::LineWrap::WORD ),
mAlignmentOffset( 0.0f ),
mElideEnabled( false )
{
#include <dali/public-api/object/ref-object.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/layouts/layout-alignment.h>
-#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/logical-model-impl.h>
#include <dali-toolkit/internal/text/text-model-interface.h>
#include <dali-toolkit/internal/text/visual-model-impl.h>
/**
* @copydoc ModelInterface::GetHorizontalAlignment()
*/
- virtual Layout::HorizontalAlignment GetHorizontalAlignment() const;
+ virtual HorizontalAlignment::Type GetHorizontalAlignment() const;
/**
* @copydoc ModelInterface::GetVerticalAlignment()
*/
- virtual Layout::VerticalAlignment GetVerticalAlignment() const;
+ virtual VerticalAlignment::Type GetVerticalAlignment() const;
/**
* @copydoc ModelInterface::IsTextElideEnabled()
* 0,0 means that the top-left corner of the layout matches the top-left corner of the UI control.
* Typically this will have a negative value with scrolling occurs.
*/
- Vector2 mScrollPosition; ///< The text is offset by this position when scrolling.
- Vector2 mScrollPositionLast; ///< The last offset value of mScrollPosition
- Layout::HorizontalAlignment mHorizontalAlignment; ///< The layout's horizontal alignment.
- Layout::VerticalAlignment mVerticalAlignment; ///< The layout's vertical alignment.
- Layout::LineWrap::Mode mLineWrapMode; ///< The text wrap mode
- float mAlignmentOffset; ///< The alignment offset.
- bool mElideEnabled:1; ///< Whether the text's elide is enabled.
+ Vector2 mScrollPosition; ///< The text is offset by this position when scrolling.
+ Vector2 mScrollPositionLast; ///< The last offset value of mScrollPosition
+ HorizontalAlignment::Type mHorizontalAlignment; ///< The layout's horizontal alignment.
+ VerticalAlignment::Type mVerticalAlignment; ///< The layout's vertical alignment.
+ Text::LineWrap::Mode mLineWrapMode; ///< The text wrap mode
+ float mAlignmentOffset; ///< The alignment offset.
+ bool mElideEnabled:1; ///< Whether the text's elide is enabled.
};
} // namespace Text
*
* -0.5f aligns the text to the left, 0.0f aligns the text to the center, 0.5f aligns the text to the right.
* The final alignment depends on two factors:
- * 1) The alignment value of the text label (Use Text::Layout::HorizontalAlignment enumerations).
+ * 1) The alignment value of the text label (Use Text::HorizontalAlignment enumerations).
* 2) The text direction, i.e. whether it's LTR or RTL (0 = LTR, 1 = RTL).
*/
-const float HORIZONTAL_ALIGNMENT_TABLE[ Text::Layout::HORIZONTAL_ALIGN_COUNT ][ 2 ] =
+const float HORIZONTAL_ALIGNMENT_TABLE[ Text::HorizontalAlignment::END+1 ][ 2 ] =
{
- // HORIZONTAL_ALIGN_BEGIN
+ // HorizontalAlignment::BEGIN
{
-0.5f, // LTR
0.5f // RTL
},
- // HORIZONTAL_ALIGN_CENTER
+ // HorizontalAlignment::CENTER
{
0.0f, // LTR
0.0f // RTL
},
- // HORIZONTAL_ALIGN_END
+ // HorizontalAlignment::END
{
0.5f, // LTR
-0.5f // RTL
* @brief How the text should be aligned vertically when scrolling the text.
*
* -0.5f aligns the text to the top, 0.0f aligns the text to the center, 0.5f aligns the text to the bottom.
- * The alignment depends on the alignment value of the text label (Use Text::Layout::VerticalAlignment enumerations).
+ * The alignment depends on the alignment value of the text label (Use Text::VerticalAlignment enumerations).
*/
-const float VERTICAL_ALIGNMENT_TABLE[ Text::Layout::VERTICAL_ALIGN_COUNT ] =
+const float VERTICAL_ALIGNMENT_TABLE[ Text::VerticalAlignment::BOTTOM+1 ] =
{
- -0.5f, // VERTICAL_ALIGN_TOP
- 0.0f, // VERTICAL_ALIGN_CENTER
- 0.5f // VERTICAL_ALIGN_BOTTOM
+ -0.5f, // VerticalAlignment::TOP
+ 0.0f, // VerticalAlignment::CENTER
+ 0.5f // VerticalAlignment::BOTTOM
};
} // namespace
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" );
}
{
}
-void TextScroller::SetParameters( Actor scrollingTextActor, Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& textNaturalSize, CharacterDirection direction, Layout::HorizontalAlignment horizontalAlignment, Layout::VerticalAlignment verticalAlignment )
+void TextScroller::SetParameters( Actor scrollingTextActor, Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& textNaturalSize, CharacterDirection direction, HorizontalAlignment::Type horizontalAlignment, VerticalAlignment::Type verticalAlignment )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters controlSize[%f,%f] offscreenSize[%f,%f] direction[%d]\n",
controlSize.x, controlSize.y, textNaturalSize.x, textNaturalSize.y, direction );
#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/text/text-enumerations.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>
namespace Dali
{
* @param[in] horizontalAlignment horizontal alignment of the text
* @param[in] verticalAlignment vertical alignment of the text
*/
- void SetParameters( Actor scrollingTextActor, Dali::Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, Layout::HorizontalAlignment horizontalAlignment, Layout::VerticalAlignment verticalAlignment );
+ void SetParameters( Actor scrollingTextActor, Dali::Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, HorizontalAlignment::Type horizontalAlignment, VerticalAlignment::Type verticalAlignment );
/**
* @brief Set the gap distance to elapse before the text wraps around
* @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
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::ANIMATED_IMAGE );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::ANIMATED_IMAGE );
if( mImageUrl.IsValid() )
{
map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_U, mWrapModeU );
map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_V, mWrapModeV );
- map.Insert( Toolkit::DevelImageVisual::Property::BATCH_SIZE, static_cast<int>(mBatchSize) );
- map.Insert( Toolkit::DevelImageVisual::Property::CACHE_SIZE, static_cast<int>(mCacheSize) );
- map.Insert( Toolkit::DevelImageVisual::Property::FRAME_DELAY, static_cast<int>(mFrameDelay) );
+ map.Insert( Toolkit::ImageVisual::Property::BATCH_SIZE, static_cast<int>(mBatchSize) );
+ map.Insert( Toolkit::ImageVisual::Property::CACHE_SIZE, static_cast<int>(mCacheSize) );
+ map.Insert( Toolkit::ImageVisual::Property::FRAME_DELAY, static_cast<int>(mFrameDelay) );
}
void AnimatedImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
}
else if( keyValue.first == BATCH_SIZE_NAME )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::BATCH_SIZE, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::BATCH_SIZE, keyValue.second );
}
else if( keyValue.first == CACHE_SIZE_NAME )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::CACHE_SIZE, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::CACHE_SIZE, keyValue.second );
}
else if( keyValue.first == FRAME_DELAY_NAME )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::FRAME_DELAY, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::FRAME_DELAY, keyValue.second );
}
}
}
break;
}
- case Toolkit::DevelImageVisual::Property::BATCH_SIZE:
+ case Toolkit::ImageVisual::Property::BATCH_SIZE:
{
int batchSize;
if( value.Get( batchSize ) )
break;
}
- case Toolkit::DevelImageVisual::Property::CACHE_SIZE:
+ case Toolkit::ImageVisual::Property::CACHE_SIZE:
{
int cacheSize;
if( value.Get( cacheSize ) )
break;
}
- case Toolkit::DevelImageVisual::Property::FRAME_DELAY:
+ case Toolkit::ImageVisual::Property::FRAME_DELAY:
{
int frameDelay;
if( value.Get( frameDelay ) )
#define DALI_TOOLKIT_INTERNAL_ANIMATED_IMAGE_VISUAL_H
/*
- * 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.
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/object/weak-handle.h>
#include <dali/public-api/adaptor-framework/timer.h>
// INTERNAL INCLUDES
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/border-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
void BorderVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::BORDER );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::BORDER );
map.Insert( Toolkit::BorderVisual::Property::COLOR, mBorderColor );
map.Insert( Toolkit::BorderVisual::Property::SIZE, mBorderSize );
map.Insert( Toolkit::BorderVisual::Property::ANTI_ALIASING, mAntiAliasing );
/*
- * 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.
//INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
void ColorVisual::DoSetProperties( const Property::Map& propertyMap )
{
// By virtue of DoSetProperties being called last, this will override
- // anything set by DevelVisual::Property::MIX_COLOR
+ // anything set by Toolkit::Visual::Property::MIX_COLOR
Property::Value* colorValue = propertyMap.Find( Toolkit::ColorVisual::Property::MIX_COLOR, MIX_COLOR );
if( colorValue )
{
void ColorVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::COLOR );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR );
map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mImpl->mMixColor );
}
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/gradient-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
void GradientVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::GRADIENT );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::GRADIENT );
map.Insert( Toolkit::GradientVisual::Property::UNITS, mGradient->GetGradientUnits() );
map.Insert( Toolkit::GradientVisual::Property::SPREAD_METHOD, mGradient->GetSpreadMethod() );
// INTERNAL HEADERS
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/texture-manager-impl.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
}
else if ( keyValue.first == IMAGE_ATLASING )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::ATLASING, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::ATLASING, keyValue.second );
}
else if ( keyValue.first == ALPHA_MASK_URL )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, keyValue.second );
}
else if ( keyValue.first == MASK_CONTENT_SCALE_NAME )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, keyValue.second );
}
else if ( keyValue.first == CROP_TO_MASK_NAME )
{
- DoSetProperty( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, keyValue.second );
+ DoSetProperty( Toolkit::ImageVisual::Property::CROP_TO_MASK, keyValue.second );
}
}
}
break;
}
- case Toolkit::DevelImageVisual::Property::ATLASING:
+ case Toolkit::ImageVisual::Property::ATLASING:
{
bool atlasing = false;
mAttemptAtlasing = value.Get( atlasing );
break;
}
- case Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL:
+ case Toolkit::ImageVisual::Property::ALPHA_MASK_URL:
{
std::string alphaUrl;
if( value.Get( alphaUrl ) )
break;
}
- case Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE:
+ case Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE:
{
float scale;
if( value.Get( scale ) )
break;
}
- case Toolkit::DevelImageVisual::Property::CROP_TO_MASK:
+ case Toolkit::ImageVisual::Property::CROP_TO_MASK:
{
bool crop=false;
if( value.Get( crop ) )
void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
bool sync = IsSynchronousResourceLoading();
map.Insert( SYNCHRONOUS_LOADING, sync );
map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_U, mWrapModeU );
map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_V, mWrapModeV );
- map.Insert( Toolkit::DevelImageVisual::Property::ATLASING, mAttemptAtlasing );
+ map.Insert( Toolkit::ImageVisual::Property::ATLASING, mAttemptAtlasing );
if( mMaskingData != NULL )
{
- map.Insert( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, mMaskingData->mAlphaMaskUrl.GetUrl() );
- map.Insert( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, mMaskingData->mContentScaleFactor );
- map.Insert( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask );
+ map.Insert( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, mMaskingData->mAlphaMaskUrl.GetUrl() );
+ map.Insert( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, mMaskingData->mContentScaleFactor );
+ map.Insert( Toolkit::ImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask );
}
}
void ImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
if( mImageUrl.IsValid() )
{
map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() );
#include <dali/public-api/images/image.h>
#include <dali/public-api/images/image-operations.h>
#include <dali/public-api/images/resource-image.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/image-loader/atlas-upload-observer.h>
/*
- * 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.
#include <fstream>
//INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::MESH );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::MESH );
map.Insert( Toolkit::MeshVisual::Property::OBJECT_URL, mObjectUrl );
map.Insert( Toolkit::MeshVisual::Property::MATERIAL_URL, mMaterialUrl );
map.Insert( Toolkit::MeshVisual::Property::TEXTURES_PATH, mTexturesPath );
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/npatch-loader.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
-
namespace Dali
{
borderOnlyValue->Get( mBorderOnly );
}
- Property::Value* borderValue = propertyMap.Find( Toolkit::DevelImageVisual::Property::BORDER, BORDER );
+ Property::Value* borderValue = propertyMap.Find( Toolkit::ImageVisual::Property::BORDER, BORDER );
if( borderValue && ! borderValue->Get( mBorder ) ) // If value exists and is rect, just set mBorder
{
// Not a rect so try vector4
void NPatchVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::N_PATCH );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::N_PATCH );
map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl.GetUrl() );
map.Insert( Toolkit::ImageVisual::Property::BORDER_ONLY, mBorderOnly );
- map.Insert( Toolkit::DevelImageVisual::Property::BORDER, mBorder );
+ map.Insert( Toolkit::ImageVisual::Property::BORDER, mBorder );
}
void NPatchVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
#include <dali/devel-api/scripting/scripting.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
}
// By virtue of DoSetProperties being called last, this will override
- // anything set by DevelVisual::Property::MIX_COLOR
+ // anything set by Toolkit::Visual::Property::MIX_COLOR
Property::Value* colorValue = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, MIX_COLOR );
if( colorValue )
{
void PrimitiveVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::PRIMITIVE );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::PRIMITIVE );
map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mImpl->mMixColor );
map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType );
map.Insert( Toolkit::PrimitiveVisual::Property::SLICES, mSlices );
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/third-party/nanosvg/nanosvg.h>
#include <dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h>
#include <dali-toolkit/internal/visuals/image/image-visual.h>
void SvgVisual::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::SVG );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::SVG );
if( mImageUrl.IsValid() )
{
map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl.GetUrl() );
#define DALI_TOOLKIT_INTERNAL_SVG_VISUAL_H
/*
- * 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.
// EXTERNAL INCLUDES
#include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
// INTERNAL HEADER
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/internal/visuals/image-atlas-manager.h>
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali-toolkit/internal/text/text-font-style.h>
#include <dali-toolkit/internal/text/text-effects-style.h>
#include <dali-toolkit/internal/text/script-run.h>
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
namespace Dali
{
const char * const SHADOW_PROPERTY( "shadow" );
const char * const UNDERLINE_PROPERTY( "underline" );
-const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "BEGIN", Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN },
- { "CENTER", Toolkit::Text::Layout::HORIZONTAL_ALIGN_CENTER },
- { "END", Toolkit::Text::Layout::HORIZONTAL_ALIGN_END },
-};
-const unsigned int HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE ) / sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE[0] );
-
-const Scripting::StringEnum VERTICAL_ALIGNMENT_STRING_TABLE[] =
-{
- { "TOP", Toolkit::Text::Layout::VERTICAL_ALIGN_TOP },
- { "CENTER", Toolkit::Text::Layout::VERTICAL_ALIGN_CENTER },
- { "BOTTOM", Toolkit::Text::Layout::VERTICAL_ALIGN_BOTTOM },
-};
-const unsigned int VERTICAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( VERTICAL_ALIGNMENT_STRING_TABLE ) / sizeof( VERTICAL_ALIGNMENT_STRING_TABLE[0] );
-
const Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
-std::string GetHorizontalAlignment( Toolkit::Text::Layout::HorizontalAlignment alignment )
-{
- const char* name = Scripting::GetEnumerationName<Toolkit::Text::Layout::HorizontalAlignment>( alignment,
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
-
- if( name )
- {
- return std::string( name );
- }
- return std::string();
-}
-
-std::string GetVerticalAlignment( Toolkit::Text::Layout::VerticalAlignment alignment )
-{
- const char* name = Scripting::GetEnumerationName< Toolkit::Text::Layout::VerticalAlignment >( alignment,
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
-
- if( name )
- {
- return std::string( name );
- }
- return std::string();
-}
-
const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
attribute mediump vec2 aPosition;\n
uniform mediump mat4 uMvpMatrix;\n
Property::Value value;
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
std::string text;
mController->GetText( text );
map.Insert( Toolkit::TextVisual::Property::MULTI_LINE, mController->IsMultiLineEnabled() );
- map.Insert( Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT, GetHorizontalAlignment( mController->GetHorizontalAlignment() ) );
+ map.Insert( Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT, mController->GetHorizontalAlignment() );
- map.Insert( Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT, GetVerticalAlignment( mController->GetVerticalAlignment() ) );
+ map.Insert( Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT, mController->GetVerticalAlignment() );
map.Insert( Toolkit::TextVisual::Property::TEXT_COLOR, mController->GetDefaultColor() );
void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
std::string text;
mController->GetText( text );
map.Insert( Toolkit::TextVisual::Property::TEXT, text );
}
case Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT:
{
- Toolkit::Text::Layout::HorizontalAlignment alignment( Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN );
- if( Scripting::GetEnumeration< Toolkit::Text::Layout::HorizontalAlignment >( propertyValue.Get< std::string >().c_str(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ if( mController )
{
- mController->SetHorizontalAlignment( alignment );
+ Text::HorizontalAlignment::Type alignment( static_cast< Text::HorizontalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( Toolkit::Text::GetHorizontalAlignmentEnumeration( propertyValue, alignment ) )
+ {
+ mController->SetHorizontalAlignment( alignment );
+ }
}
break;
}
case Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT:
{
- Toolkit::Text::Layout::VerticalAlignment alignment( Toolkit::Text::Layout::VERTICAL_ALIGN_BOTTOM );
- if( Scripting::GetEnumeration< Toolkit::Text::Layout::VerticalAlignment >( propertyValue.Get< std::string >().c_str(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT,
- alignment ) )
+ if( mController )
{
- mController->SetVerticalAlignment( alignment );
+ Toolkit::Text::VerticalAlignment::Type alignment( static_cast< Text::VerticalAlignment::Type >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
+ if( Toolkit::Text::GetVerticalAlignmentEnumeration( propertyValue, alignment) )
+ {
+ mController->SetVerticalAlignment( alignment );
+ }
}
break;
}
// EXTERNAL INCLUDES
#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/helpers/property-helper.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
DALI_ENUM_TO_STRING_TABLE_END( ALIGN )
DALI_ENUM_TO_STRING_TABLE_BEGIN( POLICY )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual::Transform::Policy, RELATIVE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual::Transform::Policy, ABSOLUTE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual::Transform::Policy, RELATIVE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual::Transform::Policy, ABSOLUTE )
DALI_ENUM_TO_STRING_TABLE_END( POLICY )
Dali::Vector2 PointToVector2( Toolkit::Align::Type point, Toolkit::Direction::Type direction )
Property::Array* array = value.GetArray();
if( array && array->Size() == 2 )
{
- DevelVisual::Transform::Policy::Type xPolicy = static_cast< DevelVisual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes
- DevelVisual::Transform::Policy::Type yPolicy = static_cast< DevelVisual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes
+ Toolkit::Visual::Transform::Policy::Type xPolicy = static_cast< Toolkit::Visual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes
+ Toolkit::Visual::Transform::Policy::Type yPolicy = static_cast< Toolkit::Visual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes
- if( Scripting::GetEnumerationProperty< DevelVisual::Transform::Policy::Type >( array->GetElementAt( 0 ), POLICY_TABLE, POLICY_TABLE_COUNT, xPolicy ) &&
- Scripting::GetEnumerationProperty< DevelVisual::Transform::Policy::Type >( array->GetElementAt( 1 ), POLICY_TABLE, POLICY_TABLE_COUNT, yPolicy ) )
+ if( Scripting::GetEnumerationProperty< Toolkit::Visual::Transform::Policy::Type >( array->GetElementAt( 0 ), POLICY_TABLE, POLICY_TABLE_COUNT, xPolicy ) &&
+ Scripting::GetEnumerationProperty< Toolkit::Visual::Transform::Policy::Type >( array->GetElementAt( 1 ), POLICY_TABLE, POLICY_TABLE_COUNT, yPolicy ) )
{
policy.x = xPolicy;
policy.y = yPolicy;
customShader.Insert( Toolkit::Visual::Shader::Property::HINTS, static_cast< int >( mHints ) );
}
- map.Insert( Toolkit::DevelVisual::Property::SHADER, customShader );
+ map.Insert( Toolkit::Visual::Property::SHADER, customShader );
}
}
{
switch( keyValue.first.indexKey )
{
- case Toolkit::DevelVisual::Transform::Property::OFFSET:
+ case Toolkit::Visual::Transform::Property::OFFSET:
{
keyValue.second.Get( mOffset );
break;
}
- case Toolkit::DevelVisual::Transform::Property::SIZE:
+ case Toolkit::Visual::Transform::Property::SIZE:
{
keyValue.second.Get( mSize );
break;
}
- case Toolkit::DevelVisual::Transform::Property::ORIGIN:
+ case Toolkit::Visual::Transform::Property::ORIGIN:
{
Scripting::GetEnumerationProperty< Toolkit::Align::Type >( keyValue.second, ALIGN_TABLE, ALIGN_TABLE_COUNT, mOrigin );
break;
}
- case Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT:
+ case Toolkit::Visual::Transform::Property::ANCHOR_POINT:
{
Scripting::GetEnumerationProperty< Toolkit::Align::Type >( keyValue.second, ALIGN_TABLE, ALIGN_TABLE_COUNT, mAnchorPoint );
break;
}
- case Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY:
+ case Toolkit::Visual::Transform::Property::OFFSET_POLICY:
{
Vector2 policy;
if( GetPolicyFromValue( keyValue.second, policy ) )
}
break;
}
- case Toolkit::DevelVisual::Transform::Property::SIZE_POLICY:
+ case Toolkit::Visual::Transform::Property::SIZE_POLICY:
{
Vector2 policy;
if( GetPolicyFromValue( keyValue.second, policy ) )
void Internal::Visual::Base::Impl::Transform::GetPropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Add( Toolkit::DevelVisual::Transform::Property::OFFSET, mOffset )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE, mSize )
- .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, mOrigin )
- .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, mAnchorPoint )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( mOffsetSizeMode.x, mOffsetSizeMode.y ) )
- .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( mOffsetSizeMode.z, mOffsetSizeMode.w ) );
+ map.Add( Toolkit::Visual::Transform::Property::OFFSET, mOffset )
+ .Add( Toolkit::Visual::Transform::Property::SIZE, mSize )
+ .Add( Toolkit::Visual::Transform::Property::ORIGIN, mOrigin )
+ .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, mAnchorPoint )
+ .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( mOffsetSizeMode.x, mOffsetSizeMode.y ) )
+ .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( mOffsetSizeMode.z, mOffsetSizeMode.w ) );
}
void Internal::Visual::Base::Impl::Transform::RegisterUniforms( Dali::Renderer renderer, Toolkit::Direction::Type direction )
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali-toolkit/internal/visuals/visual-resource-observer.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
namespace Dali
{
//INTERNAL HEARDER
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
{
if( matchKey == CUSTOM_SHADER )
{
- matchKey = Property::Key( DevelVisual::Property::SHADER );
+ matchKey = Property::Key( Toolkit::Visual::Property::SHADER );
}
else if( matchKey == TRANSFORM )
{
- matchKey = Property::Key( DevelVisual::Property::TRANSFORM );
+ matchKey = Property::Key( Toolkit::Visual::Property::TRANSFORM );
}
else if( matchKey == PREMULTIPLIED_ALPHA )
{
- matchKey = Property::Key( DevelVisual::Property::PREMULTIPLIED_ALPHA );
+ matchKey = Property::Key( Toolkit::Visual::Property::PREMULTIPLIED_ALPHA );
}
else if( matchKey == MIX_COLOR )
{
- matchKey = Property::Key( DevelVisual::Property::MIX_COLOR );
+ matchKey = Property::Key( Toolkit::Visual::Property::MIX_COLOR );
}
else if( matchKey == OPACITY )
{
- matchKey = Property::Key( DevelVisual::Property::OPACITY );
+ matchKey = Property::Key( Toolkit::Visual::Property::OPACITY );
}
}
switch( matchKey.indexKey )
{
- case DevelVisual::Property::SHADER:
+ case Toolkit::Visual::Property::SHADER:
{
Property::Map shaderMap;
if( value.Get( shaderMap ) )
break;
}
- case DevelVisual::Property::TRANSFORM:
+ case Toolkit::Visual::Property::TRANSFORM:
{
Property::Map map;
if( value.Get( map ) )
break;
}
- case DevelVisual::Property::PREMULTIPLIED_ALPHA:
+ case Toolkit::Visual::Property::PREMULTIPLIED_ALPHA:
{
bool premultipliedAlpha = false;
if( value.Get( premultipliedAlpha ) )
break;
}
- case DevelVisual::Property::MIX_COLOR:
+ case Toolkit::Visual::Property::MIX_COLOR:
{
Vector4 mixColor;
if( value.Get( mixColor ) )
}
break;
}
- case DevelVisual::Property::OPACITY:
+ case Toolkit::Visual::Property::OPACITY:
{
float opacity;
if( value.Get( opacity ) )
Property::Map transform;
mImpl->mTransform.GetPropertyMap( transform );
- map.Insert( DevelVisual::Property::TRANSFORM, transform );
+ map.Insert( Toolkit::Visual::Property::TRANSFORM, transform );
bool premultipliedAlpha( IsPreMultipliedAlphaEnabled() );
- map.Insert( DevelVisual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha );
+ map.Insert( Toolkit::Visual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha );
// Note, Color and Primitive will also insert their own mix color into the map
// which is ok, because they have a different key value range.
- map.Insert( DevelVisual::Property::MIX_COLOR, mImpl->mMixColor ); // vec4
- map.Insert( DevelVisual::Property::OPACITY, mImpl->mMixColor.a );
+ map.Insert( Toolkit::Visual::Property::MIX_COLOR, mImpl->mMixColor ); // vec4
+ map.Insert( Toolkit::Visual::Property::OPACITY, mImpl->mMixColor.a );
}
void Visual::Base::CreateInstancePropertyMap( Property::Map& map ) const
mImpl->mCustomShader->CreatePropertyMap( map );
}
- //map.Insert( DevelVisual::Property::DEPTH_INDEX, mImpl->mDepthIndex );
- //map.Insert( DevelVisual::Property::ENABLED, (bool) mImpl->mRenderer );
+ //map.Insert( Toolkit::Visual::Property::DEPTH_INDEX, mImpl->mDepthIndex );
+ //map.Insert( Toolkit::Visual::Property::ENABLED, (bool) mImpl->mRenderer );
}
{
mImpl->mMixColorIndex = DevelHandle::RegisterProperty(
mImpl->mRenderer,
- Toolkit::DevelVisual::Property::MIX_COLOR,
+ Toolkit::Visual::Property::MIX_COLOR,
MIX_COLOR,
Vector3(mImpl->mMixColor) );
}
{
mImpl->mOpacityIndex = DevelHandle::RegisterProperty(
mImpl->mRenderer,
- Toolkit::DevelVisual::Property::OPACITY,
+ Toolkit::Visual::Property::OPACITY,
OPACITY,
mImpl->mMixColor.a );
}
Property::Map map;
DoCreatePropertyMap( map );
- Property::Value* valuePtr = map.Find( Toolkit::DevelVisual::Property::TYPE );
+ Property::Value* valuePtr = map.Find( Toolkit::Visual::Property::TYPE );
int visualType = -1;
if( valuePtr )
{
valuePtr->Get( visualType );
}
- if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR ||
+ if( animator.propertyKey == Toolkit::Visual::Property::MIX_COLOR ||
animator.propertyKey == MIX_COLOR ||
( visualType == Toolkit::Visual::COLOR &&
animator.propertyKey == ColorVisual::Property::MIX_COLOR ) ||
{
AnimateMixColorProperty( transition, animator );
}
- else if(animator.propertyKey == Toolkit::DevelVisual::Property::OPACITY ||
+ else if(animator.propertyKey == Toolkit::Visual::Property::OPACITY ||
animator.propertyKey == OPACITY )
{
AnimateOpacityProperty( transition, animator );
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
#include <dali-toolkit/internal/visuals/transition-data-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
+#include <dali-toolkit/devel-api/direction-enums.h>
namespace Dali
{
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/shader.h>
#include <dali/devel-api/common/owner-container.h>
-#include <dali/devel-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/npatch-loader.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/border/border-visual.h>
#include <dali-toolkit/internal/visuals/color/color-visual.h>
#include <dali-toolkit/internal/visuals/gradient/gradient-visual.h>
Visual::BasePtr visualPtr;
- Property::Value* typeValue = propertyMap.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE );
- Toolkit::DevelVisual::Type visualType = Toolkit::DevelVisual::IMAGE; // Default to IMAGE type.
+ Property::Value* typeValue = propertyMap.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE );
+ Toolkit::Visual::Type visualType = Toolkit::Visual::IMAGE; // Default to IMAGE type.
if( typeValue )
{
Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, visualType );
break;
}
- case Toolkit::DevelVisual::TEXT:
+ case Toolkit::Visual::TEXT:
{
visualPtr = TextVisual::New( *( mFactoryCache.Get() ), propertyMap );
break;
}
- case Toolkit::DevelVisual::N_PATCH:
+ case Toolkit::Visual::N_PATCH:
{
Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
std::string imageUrl;
break;
}
- case Toolkit::DevelVisual::SVG:
+ case Toolkit::Visual::SVG:
{
Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
std::string imageUrl;
break;
}
- case Toolkit::DevelVisual::ANIMATED_IMAGE:
+ case Toolkit::Visual::ANIMATED_IMAGE:
{
Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
std::string imageUrl;
DALI_LOG_ERROR( "Renderer type unknown\n" );
}
- if( mDebugEnabled && visualType != Toolkit::DevelVisual::WIREFRAME )
+ if( mDebugEnabled && visualType != Toolkit::Visual::WIREFRAME )
{
//Create a WireframeVisual if we have debug enabled
visualPtr = WireframeVisual::New( *( mFactoryCache.Get() ), visualPtr, propertyMap );
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
namespace Dali
{
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, IMAGE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, MESH )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, PRIMITIVE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, TEXT )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, N_PATCH )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, SVG )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, ANIMATED_IMAGE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, TEXT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, N_PATCH )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, SVG )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, ANIMATED_IMAGE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, WIREFRAME )
DALI_ENUM_TO_STRING_TABLE_END( VISUAL_TYPE )
/*
- * 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.
#include "wireframe-visual.h"
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
WireframeVisualPtr wireframeVisual( new WireframeVisual( factoryCache, actualVisual ) );
// Instead of calling SetProperties, looking for the only valid property 'transform'
- Property::Value* transformValue = properties.Find( DevelVisual::Property::TRANSFORM, TRANSFORM );
+ Property::Value* transformValue = properties.Find( Toolkit::Visual::Property::TRANSFORM, TRANSFORM );
Property::Map transformMap;
if( transformValue && transformValue->Get( transformMap ) )
{
else
{
map.Clear();
- map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::WIREFRAME );
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::WIREFRAME );
}
}
void WireframeVisual::DoSetProperties( const Property::Map& propertyMap )
{
- Property::Value* mixValue = propertyMap.Find( Toolkit::DevelVisual::Property::MIX_COLOR, MIX_COLOR );
+ Property::Value* mixValue = propertyMap.Find( Toolkit::Visual::Property::MIX_COLOR, MIX_COLOR );
if( mixValue )
{
Vector4 mixColor;
--- /dev/null
+#ifndef __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_H__
+#define __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_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.
+ *
+ */
+
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @addtogroup dali_toolkit_controls
+ * @{
+ */
+
+/**
+ * @brief Enumerations for the alignment of Visuals
+ * @SINCE_1_2.60
+ */
+namespace Align
+{
+
+/**
+ * @brief Describes anchor point and parent origin of visuals
+ * @SINCE_1_2.60
+ */
+enum Type
+{
+ TOP_BEGIN = 0, ///< @SINCE_1_2.60
+ TOP_CENTER, ///< @SINCE_1_2.60
+ TOP_END, ///< @SINCE_1_2.60
+ CENTER_BEGIN, ///< @SINCE_1_2.60
+ CENTER, ///< @SINCE_1_2.60
+ CENTER_END, ///< @SINCE_1_2.60
+ BOTTOM_BEGIN, ///< @SINCE_1_2.60
+ BOTTOM_CENTER, ///< @SINCE_1_2.60
+ BOTTOM_END ///< @SINCE_1_2.60
+};
+}
+
+/**
+ * @}
+ */
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_H__
/*
- * Copyright (c) 2015 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.
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/buttons/button-impl.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/text-visual-properties.h>
namespace Dali
{
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
#include <dali-toolkit/internal/styling/style-manager-impl.h>
#include <dali-toolkit/internal/visuals/color/color-visual.h>
#include <dali-toolkit/internal/visuals/visual-string-constants.h>
-#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/public-api/align-enumerations.h>
#include <dali-toolkit/internal/controls/control/control-data-impl.h>
namespace Dali
{
mImpl->mBackgroundColor = color;
Property::Map map;
- map[ Toolkit::DevelVisual::Property::TYPE ] = Toolkit::Visual::COLOR;
+ map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR;
map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color;
SetBackground( map );
/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
namespace Dali
{
Internal::GetImplementation(*this).ClearBackground();
}
+bool Control::IsResourceReady() const
+{
+ const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+ const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
+
+ return controlDataImpl.IsResourceReady();
+}
+
Control::KeyEventSignalType& Control::KeyEventSignal()
{
return Internal::GetImplementation(*this).KeyEventSignal();
return Internal::GetImplementation(*this).KeyInputFocusLostSignal();
}
+Control::ResourceReadySignalType& Control::ResourceReadySignal()
+{
+ Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+ Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get( internalControl );
+
+ return controlImpl.mResourceReadySignal;
+}
+
Control::Control(Internal::Control& implementation)
: CustomActor(implementation)
{
#define __DALI_TOOLKIT_CONTROL_H__
/*
- * 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.
* | keyEvent | @ref KeyEventSignal() |
* | keyInputFocusGained | @ref KeyInputFocusGainedSignal() |
* | keyInputFocusLost | @ref KeyInputFocusLostSignal() |
+ * | resourceReady | @ref ResourceReadySignal() |
* | tapped | @ref GetTapGestureDetector().DetectedSignal() |
* | panned | @ref GetPanGestureDetector().DetectedSignal() |
* | pinched | @ref GetPinchGestureDetector().DetectedSignal() |
// Typedefs
- /// @brief Key Event signal type;
+ /// @brief Key Event signal type. @SINCE_1_0.0
typedef Signal<bool ( Control, const KeyEvent& ) > KeyEventSignalType;
- /// @brief Key InputFocusType signal type;
+ /// @brief Key InputFocusType signal type. @SINCE_1_0.0
typedef Signal<void ( Control ) > KeyInputFocusSignalType;
+ /// @brief ResourceReady signal type. @SINCE_1_2.60
+ typedef Signal<void ( Control ) > ResourceReadySignalType;
+
public: // Creation & Destruction
/**
*/
void ClearBackground();
+ // Resources
+
+ /**
+ * @brief Query if all resources required by a control are loaded and ready.
+ *
+ * Most resources are only loaded when the control is placed on stage.
+ * @SINCE_1_2.60
+ * @return true if the resources are loaded and ready, false otherwise
+ */
+ bool IsResourceReady() const;
+
// Signals
/**
KeyInputFocusSignalType& KeyInputFocusGainedSignal();
/**
- * @brief This signal is emitted when the control loses Key Input Focus
- * which could be due to it being gained by another Control or Actor or just cleared from
+ * @brief This signal is emitted when the control loses Key Input Focus.
+ *
+ * This could be due to it being gained by another Control or Actor or just cleared from
* this control as no longer required.
*
* A callback of the following type may be connected:
*/
KeyInputFocusSignalType& KeyInputFocusLostSignal();
+ /**
+ * @brief This signal is emitted after all resources required by a control are loaded and ready.
+ *
+ * Most resources are only loaded when the control is placed on stage.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Control control );
+ * @endcode
+ *
+ * @SINCE_1_2.60
+ * @note A RelayoutRequest is queued by Control before this signal is emitted
+ */
+ ResourceReadySignalType& ResourceReadySignal();
+
public: // Intended for control developers
/**
/*
- * 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.
*/
// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
+#include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h>
#define DALI_TOOLKIT_PROGRESS_BAR_H
/*
- * 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.
{
class ProgressBar;
}
+/**
+ * @addtogroup dali_toolkit_controls_progress_bar
+ * @{
+ */
/**
* @brief ProgressBar is a control to give the user an indication of the progress of an operation.
* =============================================
*
* Also progress value percentage is shown as text inside the progress bar.
- *
* Signals
* | %Signal Name | Method |
* |-------------------|-------------------------------|
* | valueChanged | @ref ValueChangedSignal() |
+ *
+ * @SINCE_1_2.60
*/
class DALI_IMPORT_API ProgressBar : public Control
/**
* @brief The start and end property ranges for this control.
+ * @SINCE_1_2.60
*/
enum PropertyRange
{
- PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< Start Index
- PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices
+ PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< Start Index. @SINCE_1_2.60
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices. @SINCE_1_2.60
};
/**
* @brief An enumeration of properties belonging to the ProgressBar class.
+ * @SINCE_1_2.60
*/
struct Property
{
enum
{
-
/**
* @brief The progress value of progress bar, progress runs form 0 to 1.
* @details Name "progressValue", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional. If not supplied, the default is 0.
* @note Value should be between 0 to 1.
* @note If Value is set to 0, progress bar will be set to beginning.
/**
* @brief The secondary progress value of progress bar, secondary progress runs form 0 to 1.
* @details Name "secondaryProgressValue", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional. If not supplied, the default is 0.
* @note Value should be between 0 to 1.
* @note If Value is set to 0, progress bar will be set secondary progress to beginning.
/**
* @brief Sets the progress-bar as \e indeterminate state.
- * @details name "indeterminate", type bool
+ * @details name "indeterminate", type Property::BOOLEAN.
+ * @SINCE_1_2.60
*/
INDETERMINATE,
/**
* @brief The track Visual value of progress bar, it's a full progress area and it's shown behind PROGRESS_VISUAL.
- * @details Name "trackVisual", type Property::STRING if it is a url, map otherwise.
+ * @details Name "trackVisual", type Property::MAP or Property::STRING (url to image).
+ * @SINCE_1_2.60
* @note Optional. If not supplied, the default track visual will be shown.
*/
TRACK_VISUAL,
/**
* @brief The progress Visual value of progress bar, size of the progress visual is changed based on PROGRESS_VALUE.
- * @details Name "progressVisual", type Property::STRING if it is a url, map otherwise.
+ * @details Name "progressVisual", type Property::MAP or Property::STRING (url to image).
+ * @SINCE_1_2.60
* @note Optional. If not supplied, the default progress visual will be shown.
*/
PROGRESS_VISUAL,
/**
* @brief The secondary progress visual of progress bar, size of the secondary progress visual is changed based on SECONDARY_PROGRESS_VALUE.
- * @details Name "secondaryProgressVisual", type Property::STRING if it is a url, map otherwise.
+ * @details Name "secondaryProgressVisual", type Property::MAP or Property::STRING (url to image).
+ * @SINCE_1_2.60
* @note Optional. If not supplied, the secondary progress visual will not be shown.
*/
SECONDARY_PROGRESS_VISUAL,
/**
* @brief The indeterminate visual of progress bar.
- * @details Name "inditerminateVisual", type Property::STRING if it is a url, map otherwise.
- * @note Optional. If not supplied, the default inditerminate visual will be shown.
+ * @details Name "inditerminateVisual", type Property::MAP or Property::STRING (url to image).
+ * @SINCE_1_2.60
+ * @note Optional. If not supplied, the default indeterminate visual will be shown.
*/
INDETERMINATE_VISUAL,
/**
* @brief The transition data for indeterminate visual animation.
- * @details Name "indeterminateVisualAnimation", type Property::STRING.
+ * @details Name "indeterminateVisualAnimation", type Property::MAP or Property::ARRAY.
+ * @SINCE_1_2.60
* @note Optional. If not supplied, default animation will be played.
*/
INDETERMINATE_VISUAL_ANIMATION,
/**
* @brief The Label visual of progress bar.
* @details Name "labelVisual", type Property::MAP.
+ * @SINCE_1_2.60
*/
LABEL_VISUAL,
};
/**
* @brief Creates the ProgressBar control.
+ * @SINCE_1_2.60
* @return A handle to the ProgressBar control
*/
static ProgressBar New();
/**
* @brief Creates an empty ProgressBar handle.
+ * @SINCE_1_2.60
*/
ProgressBar();
* @brief Copy constructor.
*
* Creates another handle that points to the same real object.
+ * @SINCE_1_2.60
*/
ProgressBar( const ProgressBar& handle );
* @brief Assignment operator.
*
* Changes this handle to point to another real object.
+ * @SINCE_1_2.60
*/
ProgressBar& operator=( const ProgressBar& handle );
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
+ * @SINCE_1_2.60
*/
~ProgressBar();
*
* If handle points to a ProgressBar the
* downcast produces valid handle. If not the returned handle is left uninitialized.
+ * @SINCE_1_2.60
* @param[in] handle Handle to an object
* @return handle to a ProgressBar or an uninitialized handle
*/
/**
* @brief Value changed signal type.
+ * @SINCE_1_2.60
*/
typedef Signal< void ( ProgressBar, float, float ) > ValueChangedSignalType;
* @code
* void YourCallbackName( ProgressBar progressBar, float progressValue, float secondaryProgressValue );
* @endcode
+ * @SINCE_1_2.60
* @return The signal to connect to
*/
ValueChangedSignalType& ValueChangedSignal();
-
public: // Not intended for application developers
/// @cond internal
/// @endcond
};
+/**
+ * @}
+ */
} // namespace Toolkit
} // namespace Dali
#define __DALI_TOOLKIT_SCROLL_BAR_H__
/*
- * 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.
enum
{
/**
- * @brief name "scrollDirection", type std::string.
+ * @brief The scrolling direction of the indicator.
+ * @details Name "scrollDirection", type Property::STRING.
+ * Possible values are "Vertical" and "Horizontal".
* @SINCE_1_0.0
* @see SetScrollDirection()
*/
SCROLL_DIRECTION = PROPERTY_START_INDEX,
+
/**
- * @brief name "indicatorHeightPolicy", type std::string.
+ * @brief The indicator height policy.
+ * @details Name "indicatorHeightPolicy", type Property::STRING.
+ * Possible values are "Variable" and "Fixed".
* @SINCE_1_0.0
* @see SetIndicatorHeightPolicy()
*/
INDICATOR_HEIGHT_POLICY,
+
/**
- * @brief name "indicatorFixedHeight", type float.
+ * @brief The fixed height of the indicator.
+ * @details Name "indicatorFixedHeight", type Property::FLOAT.
* @SINCE_1_0.0
* @see SetIndicatorFixedHeight()
*/
INDICATOR_FIXED_HEIGHT,
+
/**
- * @brief name "indicatorShowDuration", type float.
+ * @brief The duration in seconds to show the indicator.
+ * @details Name "indicatorShowDuration", type Property::FLOAT.
* @SINCE_1_0.0
* @see SetIndicatorShowDuration()
*/
INDICATOR_SHOW_DURATION,
+
/**
- * @brief name "indicatorHideDuration", type float.
+ * @brief The duration in seconds to hide the indicator.
+ * @details Name "indicatorHideDuration", type Property::FLOAT.
* @SINCE_1_0.0
* @see SetIndicatorHideDuration()
*/
INDICATOR_HIDE_DURATION,
+
/**
- * @brief name "scrollPositionIntervals", type Property::Array.
+ * @brief The intervals at which point a notification is emitted.
+ * @details Name "scrollPositionIntervals", type Property::ARRAY.
* @SINCE_1_0.0
* @see SetScrollPositionIntervals()
*/
SCROLL_POSITION_INTERVALS,
+
/**
- * @brief name "indicatorMinimumHeight", type float.
- * The minimum height for a variable size indicator.
+ * @brief The minimum height for a variable size indicator.
+ * @details Name "indicatorMinimumHeight", type Property::FLOAT.
* @SINCE_1_1.36
*/
INDICATOR_MINIMUM_HEIGHT,
+
/**
- * @brief name "indicatorStartPadding", type float.
- * The padding at the start of the indicator. For example, the top if scrollDirection is Vertical.
+ * @brief The padding at the start of the indicator.
+ * @details Name "indicatorStartPadding", type Property::FLOAT.
+ * For example, the padding at the top if scrollDirection is Vertical.
* @SINCE_1_1.36
*/
INDICATOR_START_PADDING,
+
/**
- * @brief name "indicatorEndPadding", type float.
- * The padding at the end of the indicator. For example, the bottom if scrollDirection is Vertical.
+ * @brief The padding at the end of the indicator.
+ * @details Name "indicatorEndPadding", type Property::FLOAT.
+ * For example, the padding at the bottom if scrollDirection is Vertical.
* @SINCE_1_1.36
*/
- INDICATOR_END_PADDING
+ INDICATOR_END_PADDING,
+
+ /**
+ * @brief The duration that transient indicators will remain fully visible.
+ * @details name "indicatorTransientDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ INDICATOR_TRANSIENT_DURATION,
};
};
#define DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H
/*
- * 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.
/**
* @brief Default item layout property.
+ * @SINCE_1_2.60
*/
namespace DefaultItemLayoutProperty
{
/**
* @brief The properties of each type of item layout.
+ * @SINCE_1_2.60
*/
enum Property
{
/**
* @brief The type of the Layout.
- * @details Name "type", type(Dali::Toolkit::DefaultItemLayout::Type),Property::INTEGER
+ * @details Name "type", type Dali::Toolkit::DefaultItemLayout::Type (Property::INTEGER).
+ * @SINCE_1_2.60
* @note Mandatory.
*/
TYPE = 0,
/**
* @brief The size of each item in the Layout.
- * @details Name "itemSize",Property::VECTOR3
+ * @details Name "itemSize", type Property::VECTOR3
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, see ItemLayout::GetDefaultItemSize().
*/
/**
* @brief The internal orientation of the Layout.
- * @details Name "orientation",type(@ref Dali::Toolkit::ControlOrientation::Type),Property::INTEGER
+ * @details Name "orientation", type Dali::Toolkit::ControlOrientation::Type (Property::INTEGER).
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is ControlOrientation::Up, The contents of control are in a vertical layout, from top to bottom.
*/
/**
* @brief The number of columns in the GridLayout.
- * @details Name "gridColumnNumber",Property::INTEGER.
+ * @details Name "gridColumnNumber", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 4.
*/
/**
* @brief The spacing between rows in the GridLayout.
- * @details Name "gridRowSpacing",Property::FLOAT
+ * @details Name "gridRowSpacing", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 20.0f.
*/
/**
* @brief The spacing between columns in the GridLayout.
- * @details Name "gridColumnSpacing",Property::FLOAT
+ * @details Name "gridColumnSpacing", type Property::FLOAT
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 20.0f.
*/
/**
* @brief The margin in the top of the GridLayout.
- * @details Name "gridTopMargin",Property::FLOAT
+ * @details Name "gridTopMargin", type Property::FLOAT
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 95.0f.
*/
/**
* @brief The margin in the bottom of the GridLayout.
- * @details Name "gridBottomMargin",Property::FLOAT
+ * @details Name "gridBottomMargin", type Property::FLOAT
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 20.0f.
*/
/**
* @brief The margin in the left and right of the GridLayout.
- * @details Name "gridSideMargin",Property::FLOAT
+ * @details Name "gridSideMargin", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 20.0f.
*/
/**
* @brief The factor used to customise the scroll speed while dragging and swiping the GridLayout.
- * @details Name "gridScrollSpeedFactor",Property::FLOAT
+ * @details Name "gridScrollSpeedFactor", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 0.03f.
*/
/**
* @brief The maximum swipe speed in pixels per second of GridLayout.
- * @details Name "gridMaximumSwipSpeed",Property::FLOAT
+ * @details Name "gridMaximumSwipSpeed", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 100.0f.
*/
/**
* @brief The duration of the flick animation in seconds of GridLayout.
- * @details Name "gridItemFlickAnimationDuration",Property::FLOAT
+ * @details Name "gridItemFlickAnimationDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
* @note Must be greater than zero;If not supplied, the default is 0.015f.
/**
* @brief The number of columns in the DepthLayout.
- * @details Name "depthColumnNumber",Property::INTEGER
+ * @details Name "depthColumnNumber", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 3.
*/
/**
* @brief The number of rows in the DepthLayout.
- * @details Name "depthRowNumber",Property::INTEGER
+ * @details Name "depthRowNumber", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 26.
*/
/**
* @brief The spacing between rows in the DepthLayout.
- * @details Name "depthRowSpacing",Property::FLOAT
+ * @details Name "depthRowSpacing", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 55.0f.
*/
/**
* @brief The factor used to customise the scroll speed while dragging and swiping the DepthLayout.
- * @details Name "depthScrollSpeedFactor",Property::FLOAT
+ * @details Name "depthScrollSpeedFactor", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 0.02f.
*/
/**
* @brief The maximumSwipSpeed of the DepthLayout.
- * @details Name "depthMaximumSwipSpeed",Property::FLOAT
+ * @details Name "depthMaximumSwipSpeed", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 50.0f.
*/
/**
* @brief The duration of the flick animation in seconds of DepthLayout.
- * @details Name "depthItemFlickAnimationDuration",Property::FLOAT
+ * @details Name "depthItemFlickAnimationDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
* @note Must be greater than zero; If not supplied, the default is 0.03f.
/**
* @brief The tilt angle of DepthLayout.
* @details Name "depthTiltAngle",Property::FLOAT
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is (Math::PI)*0.15f.
* @note This is clamped between -45 & 45 degrees.
/**
* @brief The tilt angle of the individual items in the DepthLayout.
- * @details Name "depthItemTiltAngle",Property::FLOAT
+ * @details Name "depthItemTiltAngle", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is -(Math::PI)*0.025f.
*/
/**
* @brief The spacing angle between items in the SpiralLayout.
- * @details Name "spiralItemSpacing",Property::FLOAT
+ * @details Name "spiralItemSpacing", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 9.5f.
*/
/**
* @brief The factor used to customise the scroll speed while dragging and swiping the SpiralLayout.
- * @details Name "spiralScrollSpeedFactor",Property::FLOAT
+ * @details Name "spiralScrollSpeedFactor", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 0.01f.
*/
/**
* @brief The maximum swipe speed in pixels per second of the SpiralLayout.
- * @details Name "spiralMaximumSwipSpeed",Property::FLOAT
+ * @details Name "spiralMaximumSwipSpeed", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 30.0f.
*/
/**
* @brief The duration of the flick animation in seconds of the SpiralLayout.
- * @details Name "spiralItemFlickAnimationDuration",Property::FLOAT
+ * @details Name "spiralItemFlickAnimationDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
* @note Must be greater than zero; If not supplied, the default is 0.1f.
/**
* @brief The vertical distance for one revolution of the SpiralLayout.
- * @details Name "spiralRevolutionDistance",Property::FLOAT
+ * @details Name "spiralRevolutionDistance", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note If not supplied, the default is 190.0f.
*/
/**
* @brief The alignment of the top-item, when at the beginning of the SpiralLayout.
- * @details Name "spiralTopItemAlignment",Property::FLOAT
+ * @details Name "spiralTopItemAlignment", type Property::FLOAT.
+ * @SINCE_1_2.60
* @note Optional.
* @note When at the beginning of the spiral (with a first-item layout-position of zero).A value of 0 indicates that the top-item is centered in the middle of the layout.
* A value of -0.5 or 0.5 indicates that the top-item is centred at the top or bottom of the layout respectively.
/*
- * Copyright (c) 2015 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
-#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
namespace Dali
{
#define __DALI_TOOLKIT_ITEM_VIEW_H__
/*
- * Copyright (c) 2015 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.
*/
enum
{
- // Event side properties
- MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX, ///< Property, name "minimumSwipeSpeed", @see SetMinimumSwipeSpeed(), type float, @SINCE_1_1.18
- MINIMUM_SWIPE_DISTANCE, ///< Property, name "minimumSwipeDistance", @see SetMinimumSwipeDistance(), type float, @SINCE_1_1.18
- WHEEL_SCROLL_DISTANCE_STEP, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type float, @SINCE_1_1.18
- SNAP_TO_ITEM_ENABLED, ///< Property, name "snapToItemEnabled", @see SetAnchoring(), type bool, @SINCE_1_1.18
- REFRESH_INTERVAL, ///< Property, name "refreshInterval", @see SetRefreshInterval(), type float, @SINCE_1_1.18
-
- // Animatable properties
- LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "layoutPosition", type float @SINCE_1_0.0
- SCROLL_SPEED, ///< Property, name "scrollSpeed", type float @SINCE_1_0.0
- OVERSHOOT, ///< Property, name "overshoot", type float @SINCE_1_0.0
- SCROLL_DIRECTION, ///< Property, name "scrollDirection", type Vector2 @SINCE_1_0.0
- LAYOUT_ORIENTATION, ///< Property, name "layoutOrientation", type integer @SINCE_1_0.0
- SCROLL_CONTENT_SIZE ///< Property, name "scrollContentSize", type float @SINCE_1_0.0
+ ///////////////////////////////////////////////////////////////////////////////
+ // Event side (non-animatable) properties
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief The minimum swipe speed in pixels per second.
+ * @details Name "minimumSwipeSpeed", type Property::FLOAT.
+ * @SINCE_1_1.18
+ * @see SetMinimumSwipeSpeed()
+ */
+ MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX,
+
+ /**
+ * @brief The minimum swipe distance in actor coordinates.
+ * @details Name "minimumSwipeDistance", type Property::FLOAT.
+ * @SINCE_1_1.18
+ * @see SetMinimumSwipeDistance()
+ */
+ MINIMUM_SWIPE_DISTANCE,
+
+ /**
+ * @brief The step of scroll distance in actor coordinates for each wheel event received.
+ * @details Name "wheelScrollDistanceStep", type Property::FLOAT.
+ * @SINCE_1_1.18
+ * @see SetWheelScrollDistanceStep()
+ */
+ WHEEL_SCROLL_DISTANCE_STEP,
+
+ /**
+ * @brief Whether the animation for the layout to scroll to its anchor position after dragging or swiping is enabled.
+ * @details Name "snapToItemEnabled", type Property::BOOLEAN.
+ * @SINCE_1_1.18
+ * @see SetAnchoring()
+ */
+ SNAP_TO_ITEM_ENABLED,
+
+ /**
+ * @brief The interval between refreshes.
+ * @details Name "refreshInterval", type Property::FLOAT.
+ * @SINCE_1_1.18
+ * @see SetRefreshInterval()
+ */
+ REFRESH_INTERVAL,
+
+ /**
+ * @brief The layout used.
+ * @details Name "layout", type Property::ARRAY.
+ * @SINCE_1_2.60
+ * @see Dali::Toolkit::DefaultItemLayoutProperty
+ */
+ LAYOUT,
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // Animatable Properties
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief The current logical position within the layout.
+ * @details Name "layoutPosition", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX,
+
+ /**
+ * @brief The scrolling speed when playing the flick animation.
+ * @details Name "scrollSpeed", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_SPEED,
+
+ /**
+ * @brief The amount that we can scroll beyond the boundary.
+ * @details Name "overshoot", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ OVERSHOOT,
+
+ /**
+ * @brief The current scrolling direction.
+ * @details Name "scrollDirection", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_DIRECTION,
+
+ /**
+ * @brief The current orientation of the layout.
+ * @details Name "layoutOrientation", type Property::INTEGER.
+ * @SINCE_1_0.0
+ */
+ LAYOUT_ORIENTATION,
+
+ /**
+ * @brief The size of the content.
+ * @details Name "scrollContentSize", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_CONTENT_SIZE,
};
};
--- /dev/null
+#ifndef DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H
+#define DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_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.
+ */
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @addtogroup dali_toolkit_controls_scroll_view
+ * @{
+ */
+
+/**
+ * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode.
+ * @SINCE_1_2.60
+ */
+namespace ScrollMode
+{
+
+/**
+ * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode.
+ * @SINCE_1_2.60
+ */
+enum Type
+{
+ /**
+ * @brief Whether the content can be scrolled along the X axis or not.
+ * @details Name "xAxisScrollEnabled", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ X_AXIS_SCROLL_ENABLED,
+
+ /**
+ * @brief When set, causes scroll view to snap to multiples of the
+ * value of the interval while flicking along the X axis.
+ * @details Name "xAxisSnapToInterval", type Property::FLOAT
+ * @SINCE_1_2.60
+ * @note By default, there is no snapping.
+ */
+ X_AXIS_SNAP_TO_INTERVAL,
+
+ /**
+ * @brief When set, the scroll view is unable to scroll beyond the
+ * value of the boundary along the X axis.
+ * @details Name "xAxisScrollBoundary", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @note By default, there is no boundary.
+ */
+ X_AXIS_SCROLL_BOUNDARY,
+
+ /**
+ * @brief Whether the content can be scrolled along the Y axis or not.
+ * @details Name "yAxisScrollEnabled", type Property::BOOLEAN
+ * @SINCE_1_2.60
+ */
+ Y_AXIS_SCROLL_ENABLED,
+
+ /**
+ * @brief When set, causes scroll view to snap to multiples of the
+ * value of the interval while flicking along the Y axis.
+ * @details Name "yAxisSnapToInterval", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @note By default, there is no snapping.
+ */
+ Y_AXIS_SNAP_TO_INTERVAL,
+
+ /**
+ * @brief When set, the scroll view is unable to scroll beyond the
+ * value of the boundary along the Y axis.
+ * @details Name "yAxisScrollBoundary", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @note By default, there is no boundary.
+ */
+ Y_AXIS_SCROLL_BOUNDARY
+};
+
+} // ScrollMode
+
+/**
+ * @}
+ */
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H
#define __DALI_TOOLKIT_SCROLL_VIEW_H__
/*
- * Copyright (c) 2015 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.
*/
enum
{
- // Event side properties
- WRAP_ENABLED = PROPERTY_START_INDEX, ///< Property, name "wrapEnabled", @see SetWrapMode(), type bool, @SINCE_1_1.18
- PANNING_ENABLED, ///< Property, name "panningEnabled", @see SetScrollSensitive(), type bool, @SINCE_1_1.18
- AXIS_AUTO_LOCK_ENABLED, ///< Property, name "axisAutoLockEnabled", @see SetAxisAutoLock(), type bool, @SINCE_1_1.18
- WHEEL_SCROLL_DISTANCE_STEP, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type Vector2, @SINCE_1_1.18
-
- SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollPosition", type Vector2 @SINCE_1_0.0
- SCROLL_PRE_POSITION, ///< Property, name "scrollPrePosition", type Vector2 @SINCE_1_0.0
- SCROLL_PRE_POSITION_X, ///< Property, name "scrollPrePositionX", type float @SINCE_1_0.0
- SCROLL_PRE_POSITION_Y, ///< Property, name "scrollPrePositionY", type float @SINCE_1_0.0
- SCROLL_PRE_POSITION_MAX, ///< Property, name "scrollPrePositionMax", type Vector2 @SINCE_1_0.0
- SCROLL_PRE_POSITION_MAX_X, ///< Property, name "scrollPrePositionMaxX", type float @SINCE_1_0.0
- SCROLL_PRE_POSITION_MAX_Y, ///< Property, name "scrollPrePositionMaxY", type float @SINCE_1_0.0
- OVERSHOOT_X, ///< Property, name "overshootX", type float @SINCE_1_0.0
- OVERSHOOT_Y, ///< Property, name "overshootY", type float @SINCE_1_0.0
- SCROLL_FINAL, ///< Property, name "scrollFinal", type Vector2 @SINCE_1_0.0
- SCROLL_FINAL_X, ///< Property, name "scrollFinalX", type float @SINCE_1_0.0
- SCROLL_FINAL_Y, ///< Property, name "scrollFinalY", type float @SINCE_1_0.0
- WRAP, ///< Property, name "wrap", type bool @SINCE_1_0.0
- PANNING, ///< Property, name "panning", type bool @SINCE_1_0.0
- SCROLLING, ///< Property, name "scrolling", type bool @SINCE_1_0.0
- SCROLL_DOMAIN_SIZE, ///< Property, name "scrollDomainSize", type Vector2 @SINCE_1_0.0
- SCROLL_DOMAIN_SIZE_X, ///< Property, name "scrollDomainSizeX", type float @SINCE_1_0.0
- SCROLL_DOMAIN_SIZE_Y, ///< Property, name "scrollDomainSizeY", type float @SINCE_1_0.0
- SCROLL_DOMAIN_OFFSET, ///< Property, name "scrollDomainOffset", type Vector2 @SINCE_1_0.0
- SCROLL_POSITION_DELTA, ///< Property, name "scrollPositionDelta", type Vector2 @SINCE_1_0.0
- START_PAGE_POSITION ///< Property, name "startPagePosition", type Vector3 @SINCE_1_0.0
+ ///////////////////////////////////////////////////////////////////////////////
+ // Event side (non-animatable) properties
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief Whether wrapping is enabled.
+ * @details Name "wrapEnabled", type Property::BOOLEAN.
+ * @SINCE_1_1.18
+ * @see SetWrapMode()
+ */
+ WRAP_ENABLED = PROPERTY_START_INDEX,
+
+ /**
+ * @brief Whether panning is enabled.
+ * @details Name "panningEnabled", type Property::BOOLEAN.
+ * @SINCE_1_1.18
+ * @see SetScrollSensitive()
+ */
+ PANNING_ENABLED,
+
+ /**
+ * @brief Whether the Axis Auto Lock mode for panning within the ScrollView is enabled.
+ * @details Name "axisAutoLockEnabled", type Property::BOOLEAN.
+ * @SINCE_1_1.18
+ * @see SetAxisAutoLock()
+ */
+ AXIS_AUTO_LOCK_ENABLED,
+
+ /**
+ * @brief The step of scroll distance in actor coordinates for each wheel event received in free panning mode.
+ * @details Name "wheelScrollDistanceStep", type Property::VECTOR2.
+ * @SINCE_1_1.18
+ * @see SetWheelScrollDistanceStep()
+ */
+ WHEEL_SCROLL_DISTANCE_STEP,
+
+ /**
+ * @brief The scroll mode.
+ * @details Name "scrollMode", type Property::MAP.
+ * The scroll mode map is a frontend for the Ruler helper class, containing the following keys:
+ *
+ * | %Property Name | Type | Required | Description |
+ * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------------------------|
+ * | xAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in X axis or false if not. |
+ * | xAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the X axis while flicking. (by default no snapping) |
+ * | xAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary) |
+ * | yAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in Y axis or false if not. |
+ * | yAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the Y axis while flicking. (by default no snapping) |
+ * | yAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary) |
+ *
+ * Alternatively, one can use the keys defined in the Dali::Toolkit::ScrollMode::Type enumeration.
+ * @SINCE_1_2.60
+ */
+ SCROLL_MODE,
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // Animatable Properties
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief The current scroll position.
+ * @details Name "scrollPosition", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX,
+
+ /**
+ * @brief The position before we set the clamp at scroll boundaries.
+ * @details Name "scrollPrePosition", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION,
+
+ /**
+ * @brief The X component of SCROLL_PRE_POSITION.
+ * @details Name "scrollPrePositionX", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION_X,
+
+ /**
+ * @brief The Y component of SCROLL_PRE_POSITION.
+ * @details Name "scrollPrePositionY", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION_Y,
+
+ /**
+ * @brief The maximum value that SCROLL_PRE_POSITION can be.
+ * @details Name "scrollPrePositionMax", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION_MAX,
+
+ /**
+ * @brief The X component of SCROLL_PRE_POSITION_MAX.
+ * @details Name "scrollPrePositionMaxX", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION_MAX_X,
+
+ /**
+ * @brief The Y component of SCROLL_PRE_POSITION_MAX.
+ * @details Name "scrollPrePositionMaxY", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_PRE_POSITION_MAX_Y,
+
+ /**
+ * @brief The amount that we can scroll beyond the boundary along the X axis.
+ * @details Name "overshootX", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ OVERSHOOT_X,
+
+ /**
+ * @brief The amount that we can scroll beyond the boundary along the Y axis.
+ * @details Name "overshootY", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ OVERSHOOT_Y,
+
+ /**
+ * @brief The position after the overshoot value has been considered in the calculation.
+ * @details Name "scrollFinal", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_FINAL,
+
+ /**
+ * @brief The X component of SCROLL_FINAL.
+ * @details Name "scrollFinalX", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_FINAL_X,
+
+ /**
+ * @brief The Y component of SCROLL_FINAL.
+ * @details Name "scrollFinalY", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_FINAL_Y,
+
+ /**
+ * @brief Whether scrolling wraps.
+ * @details Name "wrap", type Property::BOOLEAN.
+ * @SINCE_1_0.0
+ */
+ WRAP,
+
+ /**
+ * @brief Whether we are currently panning.
+ * @details Name "panning", type Property::BOOLEAN.
+ * @SINCE_1_0.0
+ */
+ PANNING,
+
+ /**
+ * @brief Whether we are currently scrolling.
+ * @details Name "scrolling", type Property::BOOLEAN.
+ * @SINCE_1_0.0
+ */
+ SCROLLING,
+
+ /**
+ * @brief The size of the scrolling domain.
+ * @details Name "scrollDomainSize", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_DOMAIN_SIZE,
+
+ /**
+ * @brief The X component of SCROLL_DOMAIN_SIZE.
+ * @details Name "scrollDomainSizeX", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_DOMAIN_SIZE_X,
+
+ /**
+ * @brief The Y component of SCROLL_DOMAIN_SIZE.
+ * @details Name "scrollDomainSizeY", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_DOMAIN_SIZE_Y,
+
+ /**
+ * @brief The offset of the scroll domain.
+ * @details Name "scrollDomainOffset", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_DOMAIN_OFFSET,
+
+ /**
+ * @brief The delta in the position when scrolling.
+ * @details Name "scrollPositionDelta", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SCROLL_POSITION_DELTA,
+
+ /**
+ * @brief The starting page position.
+ * @details Name "startPagePosition", type Property::VECTOR3.
+ * @SINCE_1_0.0
+ */
+ START_PAGE_POSITION,
};
};
void SetRulerY(RulerPtr ruler);
/**
- * @brief Sets scroll sensibility of pan gesture.
+ * @brief Sets scroll sensitivity of pan gesture.
*
* @SINCE_1_0.0
* @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
-#ifndef __DALI_HIDDEN_TEXT_PROPERTIES_H__
-#define __DALI_HIDDEN_TEXT_PROPERTIES_H__
+#ifndef DALI_HIDDEN_INPUT_PROPERTIES_H
+#define DALI_HIDDEN_INPUT_PROPERTIES_H
/*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
*/
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-
namespace Dali
{
namespace Toolkit
{
+/**
+ * @addtogroup dali_toolkit_controls_text_controls
+ * @{
+ */
+
namespace HiddenInput
{
/**
- * @brief HiddenInput Property
- * @SINCE_1_2.33
+ * @brief HiddenInput Property.
+ * @SINCE_1_2.60
*/
namespace Property
{
/**
- * @brief HiddenInput Property
- * @SINCE_1_2.33
+ * @brief HiddenInput Property.
+ * @SINCE_1_2.60
*/
enum
{
/**
* @brief The mode for input text display.
- * @details Name "mode", type HiddenInput::Mode or INTEGER.
- * @SINCE_1_2.33
+ * @details Name "mode", type HiddenInput::Mode (Property::INTEGER).
+ * @SINCE_1_2.60
* @note Optional.
* @see HiddenInput::Mode
*/
/**
* @brief All input characters are substituted by this character.
- * @details Name "substituteCharacter", type INTEGER.
- * @SINCE_1_2.33
+ * @details Name "substituteCharacter", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
*/
SUBSTITUTE_CHARACTER,
/**
* @brief Length of text to show or hide, available when HIDE_COUNT/SHOW_COUNT mode is used.
- * @details Name "substituteCount", type INTEGER.
- * @SINCE_1_2.33
+ * @details Name "substituteCount", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
*/
SUBSTITUTE_COUNT,
/**
* @brief Hide last character after this duration, available when SHOW_LAST_CHARACTER mode.
- * @details Name "showDuration", type INTEGER.
- * @SINCE_1_2.33
+ * @details Name "showDuration", type Property::INTEGER.
+ * @SINCE_1_2.60
* @note Optional.
*/
- SHOW_DURATION
+ SHOW_LAST_CHARACTER_DURATION
};
} // namespace Property
/**
* @brief The type for HiddenInput::Property::MODE.
- * @SINCE_1_2.33
+ * @SINCE_1_2.60
*/
namespace Mode
{
/**
* @brief The type for HiddenInput::Property::MODE.
- * @SINCE_1_2.33
+ * @SINCE_1_2.60
*/
enum Type
{
- HIDE_NONE, ///< Don't hide text
- HIDE_ALL, ///< Hide all the input text
- HIDE_COUNT, ///< Hide n characters from start
- SHOW_COUNT, ///< Show n characters from start
- SHOW_LAST_CHARACTER ///< Show last character for the duration(use SHOW_DURATION property to modify duration)
+ HIDE_NONE, ///< Do not hide text. @SINCE_1_2.60
+ HIDE_ALL, ///< Hide all the input text. @SINCE_1_2.60
+ HIDE_COUNT, ///< Hide n characters from start. @SINCE_1_2.60
+ SHOW_COUNT, ///< Show n characters from start. @SINCE_1_2.60
+ SHOW_LAST_CHARACTER ///< Show last character for the duration (use Property::SHOW_LAST_CHARACTER_DURATION to modify duration). @SINCE_1_2.60
};
} // namespace Mode
} // namespace HiddenInput
+/**
+ * @}
+ */
+
} // namespace Toolkit
} // namespace Dali
-#endif // __DALI_HIDDEN_TEXT_PROPERTIES_H__
+#endif // DALI_HIDDEN_INPUT_PROPERTIES_H
/*
- * 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.
return Dali::Toolkit::GetImpl( *this ).InputStyleChangedSignal();
}
+
+TextEditor::ScrollStateChangedSignalType& TextEditor::ScrollStateChangedSignal()
+{
+ return Dali::Toolkit::GetImpl( *this ).ScrollStateChangedSignal();
+}
+
TextEditor::TextEditor( Internal::TextEditor& implementation )
: Control( implementation )
{
#define __DALI_TOOLKIT_TEXT_EDITOR_H__
/*
- * 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.
*/
enum
{
- RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "renderingBackend", The type or rendering e.g. bitmap-based, type INT @SINCE_1_1.37
- TEXT, ///< name "text", The text to display in UTF-8 format, type STRING @SINCE_1_1.37
- TEXT_COLOR, ///< name "textColor", The text color, type VECTOR4 @SINCE_1_1.37
- FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING @SINCE_1_1.37
- FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING or MAP @SINCE_1_2.13
- POINT_SIZE, ///< name "pointSize", The size of font in points (Conversion from Pixel size to Point size : Point size = Pixel size * 72 / DPI), type FLOAT @SINCE_1_1.37
- HORIZONTAL_ALIGNMENT, ///< name "horizontalAlignment", The text horizontal alignment, type STRING, values "BEGIN", "CENTER", "END" @SINCE_1_1.37
- SCROLL_THRESHOLD, ///< name "scrollThreshold" Vertical scrolling will occur if the cursor is this close to the control border, type FLOAT @SINCE_1_1.37
- SCROLL_SPEED, ///< name "scrollSpeed" The scroll speed in pixels per second, type FLOAT @SINCE_1_1.37
- PRIMARY_CURSOR_COLOR, ///< name "primaryCursorColor", The color to apply to the primary cursor, type VECTOR4 @SINCE_1_1.37
- SECONDARY_CURSOR_COLOR, ///< name "secondaryCursorColor", The color to apply to the secondary cursor, type VECTOR4 @SINCE_1_1.37
- ENABLE_CURSOR_BLINK, ///< name "enableCursorBlink", Whether the cursor should blink or not, type BOOLEAN @SINCE_1_1.37
- CURSOR_BLINK_INTERVAL, ///< name "cursorBlinkInterval", The time interval in seconds between cursor on/off states, type FLOAT @SINCE_1_1.37
- CURSOR_BLINK_DURATION, ///< name "cursorBlinkDuration", The cursor will stop blinking after this number of seconds (if non-zero), type FLOAT @SINCE_1_1.37
- CURSOR_WIDTH, ///< name "cursorWidth", The cursor width, type INTEGER @SINCE_1_1.37
- GRAB_HANDLE_IMAGE, ///< name "grabHandleImage", The image to display for the grab handle, type STRING @SINCE_1_1.37
- GRAB_HANDLE_PRESSED_IMAGE, ///< name "grabHandlePressedImage", The image to display when the grab handle is pressed, type STRING @SINCE_1_1.37
- SELECTION_HANDLE_IMAGE_LEFT, ///< name "selectionHandleImageLeft", The image to display for the left selection handle, type MAP @SINCE_1_1.37
- SELECTION_HANDLE_IMAGE_RIGHT, ///< name "selectionHandleImageRight", The image to display for the right selection handle, type MAP @SINCE_1_1.37
- SELECTION_HANDLE_PRESSED_IMAGE_LEFT, ///< name "selectionHandlePressedImageLeft", The image to display when the left selection handle is pressed, type MAP @SINCE_1_1.37
- SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, ///< name "selectionHandlePressedImageRight", The image to display when the right selection handle is pressed, type MAP @SINCE_1_1.37
- SELECTION_HANDLE_MARKER_IMAGE_LEFT, ///< name "selectionHandleMarkerImageLeft", The image to display for the left selection handle marker, type MAP @SINCE_1_1.37
- SELECTION_HANDLE_MARKER_IMAGE_RIGHT, ///< name "selectionHandleMarkerImageRight", The image to display for the right selection handle marker, type MAP @SINCE_1_1.37
- SELECTION_HIGHLIGHT_COLOR, ///< name "selectionHighlightColor", The color of the selection highlight, type VECTOR4 @SINCE_1_1.37
- DECORATION_BOUNDING_BOX, ///< name "decorationBoundingBox", The decorations (handles etc) will positioned within this area on-screen, type RECTANGLE @SINCE_1_1.37
- ENABLE_MARKUP, ///< name "enableMarkup", Whether the mark-up processing is enabled. type BOOLEAN @SINCE_1_1.37
- INPUT_COLOR, ///< name "inputColor", The color of the new input text, type VECTOR4 @SINCE_1_1.37
- INPUT_FONT_FAMILY, ///< name "inputFontFamily", The font's family of the new input text, type STRING @SINCE_1_1.37
- INPUT_FONT_STYLE, ///< name "inputFontStyle", The font's style of the new input text, type STRING or MAP @SINCE_1_2.13
- INPUT_POINT_SIZE, ///< name "inputPointSize", The font's size of the new input text in points, type FLOAT @SINCE_1_1.37
- LINE_SPACING, ///< name "lineSpacing", The default extra space between lines in points, type FLOAT @SINCE_1_1.37
- INPUT_LINE_SPACING, ///< name "inputLineSpacing" The extra space between lines in points. It affects the whole paragraph where the new input text is inserted, type FLOAT @SINCE_1_1.37
- UNDERLINE, ///< name "underline" The default underline parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_UNDERLINE, ///< name "inputUnderline" The underline parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- SHADOW, ///< name "shadow" The default shadow parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_SHADOW, ///< name "inputShadow" The shadow parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- EMBOSS, ///< name "emboss" The default emboss parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_EMBOSS, ///< name "inputEmboss" The emboss parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- OUTLINE, ///< name "outline" The default outline parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_OUTLINE, ///< name "inputOutline" The outline parameters of the new input text, type STRING or MAP @SINCE_1_2.13
+ /**
+ * @brief The type or rendering e.g. bitmap-based.
+ * @details Name "renderingBackend", type Property::INTEGER.
+ * @SINCE_1_1.37
+ */
+ RENDERING_BACKEND = PROPERTY_START_INDEX,
+
+ /**
+ * @brief The text to display in UTF-8 format.
+ * @details Name "text", type Property::STRING.
+ * @SINCE_1_1.37
+ */
+ TEXT,
+
+ /**
+ * @brief The text color.
+ * @details Name "textColor", type Property::VECTOR4.
+ * @SINCE_1_1.37
+ */
+ TEXT_COLOR,
+
+ /**
+ * @brief The requested font family.
+ * @details Name "fontFamily", type Property::STRING.
+ * @SINCE_1_1.37
+ */
+ FONT_FAMILY,
+
+ /**
+ * @brief The requested font style.
+ * @details Name "fontStyle", type Property::STRING or Property::MAP.
+ * @SINCE_1_2.13
+ */
+ FONT_STYLE,
+
+ /**
+ * @brief The size of font in points.
+ * @details Name "pointSize", type Property::FLOAT.
+ * Conversion from Pixel size to Point size : Point size = Pixel size * 72 / DPI.
+ * @SINCE_1_1.37
+ */
+ POINT_SIZE,
+
+ /**
+ * @brief The text horizontal alignment.
+ * @details Name "horizontalAlignment", type Property::STRING or type HorizontalAlignment::Type (Property::INTEGER)
+ * Values "BEGIN" "CENTER" "END".
+ * @note Return type is Property::STRING
+ * @SINCE_1_1.37
+ */
+ HORIZONTAL_ALIGNMENT,
+
+ /**
+ * @brief Vertical scrolling will occur if the cursor is this close to the control border.
+ * @details Name "scrollThreshold", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ SCROLL_THRESHOLD,
+
+ /**
+ * @brief The scroll speed in pixels per second.
+ * @details Name "scrollSpeed", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ SCROLL_SPEED,
+
+ /**
+ * @brief The color to apply to the primary cursor.
+ * @details Name "primaryCursorColor", type Property::VECTOR4.
+ * @SINCE_1_1.37
+ */
+ PRIMARY_CURSOR_COLOR,
+
+ /**
+ * @brief The color to apply to the secondary cursor.
+ * @details Name "secondaryCursorColor", type Property::VECTOR4.
+ * @SINCE_1_1.37
+ */
+ SECONDARY_CURSOR_COLOR,
+
+ /**
+ * @brief Whether the cursor should blink or not.
+ * @details Name "enableCursorBlink", type Property::BOOLEAN.
+ * @SINCE_1_1.37
+ */
+ ENABLE_CURSOR_BLINK,
+
+ /**
+ * @brief The time interval in seconds between cursor on/off states.
+ * @details Name "cursorBlinkInterval", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ CURSOR_BLINK_INTERVAL,
+
+ /**
+ * @brief The cursor will stop blinking after this number of seconds (if non-zero).
+ * @details Name "cursorBlinkDuration", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ CURSOR_BLINK_DURATION,
+
+ /**
+ * @brief The cursor width.
+ * @details Name "cursorWidth", type Property::INTEGER.
+ * @SINCE_1_1.37
+ */
+ CURSOR_WIDTH,
+
+ /**
+ * @brief The image to display for the grab handle.
+ * @details Name "grabHandleImage", type Property::STRING.
+ * @SINCE_1_1.37
+ */
+ GRAB_HANDLE_IMAGE,
+
+ /**
+ * @brief The image to display when the grab handle is pressed.
+ * @details Name "grabHandlePressedImage", type Property::STRING.
+ * @SINCE_1_1.37
+ */
+ GRAB_HANDLE_PRESSED_IMAGE,
+
+ /**
+ * @brief The image to display for the left selection handle.
+ * @details Name "selectionHandleImageLeft", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display for the right selection handle.
+ * @details Name "selectionHandleImageRight", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_IMAGE_RIGHT,
+
+ /**
+ * @brief The image to display when the left selection handle is pressed.
+ * @details Name "selectionHandlePressedImageLeft", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_PRESSED_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display when the right selection handle is pressed.
+ * @details Name "selectionHandlePressedImageRight", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_PRESSED_IMAGE_RIGHT,
+
+ /**
+ * @brief The image to display for the left selection handle marker.
+ * @details Name "selectionHandleMarkerImageLeft", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_MARKER_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display for the right selection handle marker.
+ * @details Name "selectionHandleMarkerImageRight", type Property::MAP.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HANDLE_MARKER_IMAGE_RIGHT,
+
+ /**
+ * @brief The color of the selection highlight.
+ * @details Name "selectionHighlightColor", type Property::VECTOR4.
+ * @SINCE_1_1.37
+ */
+ SELECTION_HIGHLIGHT_COLOR,
+
+ /**
+ * @brief The decorations (handles etc) will positioned within this area on-screen.
+ * @details Name "decorationBoundingBox", type Property::RECTANGLE.
+ * @SINCE_1_1.37
+ */
+ DECORATION_BOUNDING_BOX,
+
+ /**
+ * @brief Whether the mark-up processing is enabled.
+ * @details Name "enableMarkup", type Property::BOOLEAN.
+ * @SINCE_1_1.37
+ */
+ ENABLE_MARKUP,
+
+ /**
+ * @brief The color of the new input text.
+ * @details Name "inputColor", type Property::VECTOR4.
+ * @SINCE_1_1.37
+ */
+ INPUT_COLOR,
+
+ /**
+ * @brief The font's family of the new input text.
+ * @details Name "inputFontFamily", type Property::STRING.
+ * @SINCE_1_1.37
+ */
+ INPUT_FONT_FAMILY,
+
+ /**
+ * @brief The font's style of the new input text.
+ * @details Name "inputFontStyle", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_FONT_STYLE,
+
+ /**
+ * @brief The font's size of the new input text in points.
+ * @details Name "inputPointSize", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ INPUT_POINT_SIZE,
+
+ /**
+ * @brief The default extra space between lines in points.
+ * @details Name "lineSpacing", type Property::FLOAT.
+ * @SINCE_1_1.37
+ */
+ LINE_SPACING,
+
+ /**
+ * @brief The extra space between lines in points.
+ * @details Name "inputLineSpacing", type Property::FLOAT.
+ * @SINCE_1_1.37
+ * @note This affects the whole paragraph where the new input text is inserted.
+ */
+ INPUT_LINE_SPACING,
+
+ /**
+ * @brief The default underline parameters.
+ * @details Name "underline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ UNDERLINE,
+
+ /**
+ * @brief The underline parameters of the new input text.
+ * @details Name "inputUnderline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_UNDERLINE,
+
+ /**
+ * @brief The default shadow parameters.
+ * @details Name "shadow", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ SHADOW,
+
+ /**
+ * @brief The shadow parameters of the new input text.
+ * @details Name "inputShadow", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_SHADOW,
+
+ /**
+ * @brief The default emboss parameters.
+ * @details Name "emboss", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ EMBOSS,
+
+ /**
+ * @brief The emboss parameters of the new input text.
+ * @details Name "inputEmboss", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_EMBOSS,
+
+ /**
+ * @brief The default outline parameters.
+ * @details Name "outline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ OUTLINE,
+
+ /**
+ * @brief The outline parameters of the new input text.
+ * @details Name "inputOutline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_OUTLINE,
+
+ /**
+ * @brief Enable or disable the smooth scroll animation.
+ * @details Name "smoothScroll", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ SMOOTH_SCROLL,
+
+ /**
+ * @brief Sets the duration of smooth scroll animation.
+ * @details Name "smoothScrollDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ SMOOTH_SCROLL_DURATION,
+
+ /**
+ * @brief Enable or disable the scroll bar.
+ * @details Name "enableScrollBar", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ ENABLE_SCROLL_BAR,
+
+ /**
+ * @brief Sets the duration of scroll bar to show.
+ * @details Name "scrollBarShowDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ SCROLL_BAR_SHOW_DURATION,
+
+ /**
+ * @brief Sets the duration of scroll bar to fade out.
+ * @details Name "scrollBarFadeDuration", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ SCROLL_BAR_FADE_DURATION,
+
+ /**
+ * @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 The line count of text.
+ * @details Name "lineCount", type Property::INTEGER.
+ * @SINCE_1_2.60
+ * @note This property is read-only.
+ */
+ LINE_COUNT,
+
+ /**
+ * @brief Enables Text selection, such as the cursor, handle, clipboard, and highlight color.
+ * @details Name "enableSelection", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ ENABLE_SELECTION,
+
+ /**
+ * @brief Sets the placeholder : text, color, font family, font style, point size, and pixel size.
+ * @details Name "placeholder", type Property::MAP.
+ * Example:
+ * @code
+ * Property::Map propertyMap;
+ * propertyMap["placeholderText"] = "Setting Placeholder Text";
+ * propertyMap["placeholderTextFocused"] = "Setting Placeholder Text Focused";
+ * propertyMap["placeholderColor"] = Color::RED;
+ * propertyMap["placeholderFontFamily"] = "Arial";
+ * propertyMap["placeholderPointSize"] = 12.0f;
+ *
+ * Property::Map fontStyleMap;
+ * fontStyleMap.Insert( "weight", "bold" );
+ * fontStyleMap.Insert( "width", "condensed" );
+ * fontStyleMap.Insert( "slant", "italic" );
+ * propertyMap["placeholderFontStyle"] = fontStyleMap;
+ *
+ * editor.SetProperty( TextEditor::Property::PLACEHOLDER, propertyMap );
+ * @endcode
+ *
+ * @SINCE_1_2.60
+ */
+ PLACEHOLDER,
+
+ /**
+ * @brief Line wrap mode when text lines are greater than the layout width.
+ * @details Name "lineWrapMode", type Text::LineWrap::Mode (Text::Property::INTEGER) or Property::STRING.
+ * @SINCE_1_2.60
+ * @note Default is Text::LineWrap::WORD.
+ * @note Return type is Text::LineWrap::Mode (Text::Property::INTEGER).
+ * @see Text::LineWrap
+ */
+ LINE_WRAP_MODE,
};
};
};
};
+ /**
+ * @brief Enumerations for the type of scrolling.
+ * @SINCE_1_2.60
+ * @see ScrollStateChangedSignal()
+ */
+ struct Scroll
+ {
+ /**
+ * @brief Enumerations for the type of scrolling.
+ * @SINCE_1_2.60
+ * @see ScrollStateChangedSignal()
+ */
+ enum Type
+ {
+ STARTED, ///< Scrolling has started. @SINCE_1_2.60
+ FINISHED ///< Scrolling has finished. @SINCE_1_2.60
+ };
+ };
+
// Type Defs
/**
typedef Signal<void ( TextEditor, InputStyle::Mask ) > InputStyleChangedSignalType;
/**
+ * @brief Scroll state changed signal type.
+ * @SINCE_1_2.60
+ */
+ typedef Signal< void ( TextEditor, Scroll::Type ) > ScrollStateChangedSignalType;
+
+ /**
* @brief Creates the TextEditor control.
*
* @SINCE_1_1.37
*/
InputStyleChangedSignalType& InputStyleChangedSignal();
+ /**
+ * @brief This signal is emitted when TextEditor scrolling is started or finished.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Scroll::Type type );
+ * @endcode
+ * type: Whether the scrolling is started or finished.
+ *
+ * @SINCE_1_2.60
+ * @return The signal to connect to
+ */
+ ScrollStateChangedSignalType& ScrollStateChangedSignal();
+
public: // Not intended for application developers
/// @cond internal
#define __DALI_TOOLKIT_TEXT_FIELD_H__
/*
- * 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.
*/
enum
{
- RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "renderingBackend", The type or rendering e.g. bitmap-based, type INT @SINCE_1_0.0
- TEXT, ///< name "text", The text to display in UTF-8 format, type STRING @SINCE_1_0.0
- PLACEHOLDER_TEXT, ///< name "placeholderText", The text to display when the TextField is empty and inactive, type STRING @SINCE_1_0.0
- PLACEHOLDER_TEXT_FOCUSED, ///< name "placeholderTextFocused", The text to display when the TextField is empty with key-input focus, type STRING @SINCE_1_0.0
- FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING @SINCE_1_0.0
- FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING or MAP @SINCE_1_2.13
- POINT_SIZE, ///< name "pointSize", The size of font in points (Conversion from Pixel size to Point size : Point size = Pixel size * 72 / DPI), type FLOAT @SINCE_1_0.0
- MAX_LENGTH, ///< name "maxLength" The maximum number of characters that can be inserted, type INTEGER @SINCE_1_0.0
- EXCEED_POLICY, ///< name "exceedPolicy" Specifies how the text is truncated when it does not fit, type INTEGER @SINCE_1_0.0
- HORIZONTAL_ALIGNMENT, ///< name "horizontalAlignment", The line horizontal alignment, type STRING, values "BEGIN", "CENTER", "END" @SINCE_1_0.0
- VERTICAL_ALIGNMENT, ///< name "verticalAlignment", The line vertical alignment, type STRING, values "TOP", "CENTER", "BOTTOM" @SINCE_1_0.0
- TEXT_COLOR, ///< name "textColor", The text color, type VECTOR4 @SINCE_1_0.0
- PLACEHOLDER_TEXT_COLOR, ///< name "placeholderTextColor", The placeholder-text color, type VECTOR4 @SINCE_1_0.0
- SHADOW_OFFSET, ///< name "shadowOffset", The drop shadow offset 0 indicates no shadow, type VECTOR2 @DEPRECATED_1_1.37 Use SHADOW instead.
- SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4 @DEPRECATED_1_1.37 Use SHADOW instead.
- PRIMARY_CURSOR_COLOR, ///< name "primaryCursorColor", The color to apply to the primary cursor, type VECTOR4 @SINCE_1_0.0
- SECONDARY_CURSOR_COLOR, ///< name "secondaryCursorColor", The color to apply to the secondary cursor, type VECTOR4 @SINCE_1_0.0
- ENABLE_CURSOR_BLINK, ///< name "enableCursorBlink", Whether the cursor should blink or not, type BOOLEAN @SINCE_1_0.0
- CURSOR_BLINK_INTERVAL, ///< name "cursorBlinkInterval", The time interval in seconds between cursor on/off states, type FLOAT @SINCE_1_0.0
- CURSOR_BLINK_DURATION, ///< name "cursorBlinkDuration", The cursor will stop blinking after this number of seconds (if non-zero), type FLOAT @SINCE_1_0.0
- CURSOR_WIDTH, ///< name "cursorWidth", The cursor width, type INTEGER @SINCE_1_0.0
- GRAB_HANDLE_IMAGE, ///< name "grabHandleImage", The image to display for the grab handle, type STRING @SINCE_1_0.0
- GRAB_HANDLE_PRESSED_IMAGE, ///< name "grabHandlePressedImage", The image to display when the grab handle is pressed, type STRING @SINCE_1_0.0
- SCROLL_THRESHOLD, ///< name "scrollThreshold" Horizontal scrolling will occur if the cursor is this close to the control border, type FLOAT @SINCE_1_0.0
- SCROLL_SPEED, ///< name "scrollSpeed" The scroll speed in pixels per second, type FLOAT @SINCE_1_0.0
- SELECTION_HANDLE_IMAGE_LEFT, ///< name "selectionHandleImageLeft", The image to display for the left selection handle, type MAP @SINCE_1_0.0
- SELECTION_HANDLE_IMAGE_RIGHT, ///< name "selectionHandleImageRight", The image to display for the right selection handle, type MAP @SINCE_1_0.0
- SELECTION_HANDLE_PRESSED_IMAGE_LEFT, ///< name "selectionHandlePressedImageLeft", The image to display when the left selection handle is pressed, type MAP @SINCE_1_0.0
- SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, ///< name "selectionHandlePressedImageRight", The image to display when the right selection handle is pressed, type MAP @SINCE_1_0.0
- SELECTION_HANDLE_MARKER_IMAGE_LEFT, ///< name "selectionHandleMarkerImageLeft", The image to display for the left selection handle marker, type MAP @SINCE_1_0.0
- SELECTION_HANDLE_MARKER_IMAGE_RIGHT, ///< name "selectionHandleMarkerImageRight", The image to display for the right selection handle marker, type MAP @SINCE_1_0.0
- SELECTION_HIGHLIGHT_COLOR, ///< name "selectionHighlightColor", The color of the selection highlight, type VECTOR4 @SINCE_1_0.0
- DECORATION_BOUNDING_BOX, ///< name "decorationBoundingBox", The decorations (handles etc) will positioned within this area on-screen, type RECTANGLE @SINCE_1_0.0
- INPUT_METHOD_SETTINGS, ///< name "inputMethodSettings", The settings to relating to the System's Input Method, Key and Value type MAP @SINCE_1_0.0
- INPUT_COLOR, ///< name "inputColor", The color of the new input text, type VECTOR4 @SINCE_1_0.0
- ENABLE_MARKUP, ///< name "enableMarkup", Whether the mark-up processing is enabled. type BOOLEAN @SINCE_1_0.0
- INPUT_FONT_FAMILY, ///< name "inputFontFamily", The font's family of the new input text, type STRING @SINCE_1_0.0
- INPUT_FONT_STYLE, ///< name "inputFontStyle", The font's style of the new input text, type STRING or MAP @SINCE_1_2.13
- INPUT_POINT_SIZE, ///< name "inputPointSize", The font's size of the new input text in points, type FLOAT @SINCE_1_0.0
- UNDERLINE, ///< name "underline" The default underline parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_UNDERLINE, ///< name "inputUnderline" The underline parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- SHADOW, ///< name "shadow" The default shadow parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_SHADOW, ///< name "inputShadow" The shadow parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- EMBOSS, ///< name "emboss" The default emboss parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_EMBOSS, ///< name "inputEmboss" The emboss parameters of the new input text, type STRING or MAP @SINCE_1_2.13
- OUTLINE, ///< name "outline" The default outline parameters, type STRING or MAP @SINCE_1_2.13
- INPUT_OUTLINE, ///< name "inputOutline" The outline parameters of the new input text, type STRING or MAP @SINCE_1_2.13
+ /**
+ * @brief The type or rendering e.g. bitmap-based.
+ * @details Name "renderingBackend", type Property::INTEGER.
+ * @SINCE_1_0.0
+ */
+ RENDERING_BACKEND = PROPERTY_START_INDEX,
+
+ /**
+ * @brief The text to display in UTF-8 format.
+ * @details Name "text", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ TEXT,
+
+ /**
+ * @brief The text to display when the TextField is empty and inactive.
+ * @details Name "placeholderText", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ PLACEHOLDER_TEXT,
+
+ /**
+ * @brief The text to display when the TextField is empty with key-input focus.
+ * @details Name "placeholderTextFocused", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ PLACEHOLDER_TEXT_FOCUSED,
+
+ /**
+ * @brief The requested font family.
+ * @details Name "fontFamily", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ FONT_FAMILY,
+
+ /**
+ * @brief The requested font style
+ * @details Name "fontStyle", type Property::STRING or Property::MAP.
+ * @SINCE_1_2.13
+ */
+ FONT_STYLE,
+
+ /**
+ * @brief The size of font in points.
+ * @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 maximum number of characters that can be inserted.
+ * @details Name "maxLength", type Property::INTEGER.
+ * @SINCE_1_0.0
+ */
+ MAX_LENGTH,
+
+ /**
+ * @brief Specifies how the text is truncated when it does not fit.
+ * @details Name "exceedPolicy", type Property::INTEGER.
+ * @SINCE_1_0.0
+ */
+ EXCEED_POLICY,
+
+ /**
+ * @brief The line horizontal alignment.
+ * @details Name "horizontalAlignment", type Property::STRING or type HorizontalAlignment::Type (Property::INTEGER)
+ * Values "BEGIN", "CENTER", "END".
+ * @note Return type is Property::STRING
+ * @SINCE_1_0.0
+ */
+ HORIZONTAL_ALIGNMENT,
+
+ /**
+ * @brief The line vertical alignment.
+ * @details Name "verticalAlignment", type Property::STRING type VerticalAlignment::Type (Property::INTEGER)
+ * Values "TOP", "CENTER", "BOTTOM".
+ * @note Return type is Property::STRING
+ * @SINCE_1_0.0
+ */
+ VERTICAL_ALIGNMENT,
+
+ /**
+ * @brief The text color.
+ * @details Name "textColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ TEXT_COLOR,
+
+ /**
+ * @brief The placeholder-text color.
+ * @details Name "placeholderTextColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ PLACEHOLDER_TEXT_COLOR,
+
+ /**
+ * @DEPRECATED_1_1.37 Use SHADOW instead.
+ * @brief The drop shadow offset 0 indicates no shadow.
+ * @details Name "shadowOffset", type Property::VECTOR2.
+ * @SINCE_1_0.0
+ */
+ SHADOW_OFFSET,
+
+ /**
+ * @DEPRECATED_1_1.37 Use SHADOW instead.
+ * @brief The color of a drop shadow.
+ * @details Name "shadowColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ SHADOW_COLOR,
+
+ /**
+ * @brief The color to apply to the primary cursor.
+ * @details Name "primaryCursorColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ PRIMARY_CURSOR_COLOR,
+
+ /**
+ * @brief The color to apply to the secondary cursor.
+ * @details Name "secondaryCursorColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ SECONDARY_CURSOR_COLOR,
+
+ /**
+ * @brief Whether the cursor should blink or not.
+ * @details Name "enableCursorBlink", type Property::BOOLEAN.
+ * @SINCE_1_0.0
+ */
+ ENABLE_CURSOR_BLINK,
+
+ /**
+ * @brief The time interval in seconds between cursor on/off states.
+ * @details Name "cursorBlinkInterval", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ CURSOR_BLINK_INTERVAL,
+
+ /**
+ * @brief The cursor will stop blinking after this number of seconds (if non-zero)
+ * @details Name "cursorBlinkDuration", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ CURSOR_BLINK_DURATION,
+
+ /**
+ * @brief The cursor width.
+ * @details Name "cursorWidth", type Property::INTEGER.
+ * @SINCE_1_0.0
+ */
+ CURSOR_WIDTH,
+
+ /**
+ * @brief The image to display for the grab handle.
+ * @details Name "grabHandleImage", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ GRAB_HANDLE_IMAGE,
+
+ /**
+ * @brief The image to display when the grab handle is pressed
+ * @details Name "grabHandlePressedImage", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ GRAB_HANDLE_PRESSED_IMAGE,
+
+ /**
+ * @brief Horizontal scrolling will occur if the cursor is this close to the control border.
+ * @details Name "scrollThreshold", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_THRESHOLD,
+
+ /**
+ * @brief The scroll speed in pixels per second.
+ * @details Name "scrollSpeed", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ SCROLL_SPEED,
+
+ /**
+ * @brief The image to display for the left selection handle.
+ * @details Name "selectionHandleImageLeft", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display for the right selection handle.
+ * @details Name "selectionHandleImageRight", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_IMAGE_RIGHT,
+
+ /**
+ * @brief The image to display when the left selection handle is pressed.
+ * @details Name "selectionHandlePressedImageLeft", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_PRESSED_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display when the right selection handle is pressed.
+ * @details Name "selectionHandlePressedImageRight", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_PRESSED_IMAGE_RIGHT,
+
+ /**
+ * @brief The image to display for the left selection handle marker.
+ * @details Name "selectionHandleMarkerImageLeft", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_MARKER_IMAGE_LEFT,
+
+ /**
+ * @brief The image to display for the right selection handle marker.
+ * @details Name "selectionHandleMarkerImageRight", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HANDLE_MARKER_IMAGE_RIGHT,
+
+ /**
+ * @brief The color of the selection highlight.
+ * @details Name "selectionHighlightColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ SELECTION_HIGHLIGHT_COLOR,
+
+ /**
+ * @brief The decorations (handles etc) will positioned within this area on-screen.
+ * @details Name "decorationBoundingBox", type Property::RECTANGLE.
+ * @SINCE_1_0.0
+ */
+ DECORATION_BOUNDING_BOX,
+
+ /**
+ * @brief The settings to relating to the System's Input Method, Key and Value.
+ * @details Name "inputMethodSettings", type Property::MAP.
+ * @SINCE_1_0.0
+ */
+ INPUT_METHOD_SETTINGS,
+
+ /**
+ * @brief The color of the new input text.
+ * @details Name "inputColor", type Property::VECTOR4.
+ * @SINCE_1_0.0
+ */
+ INPUT_COLOR,
+
+ /**
+ * @brief Whether the mark-up processing is enabled.
+ * @details Name "enableMarkup", type Property::BOOLEAN.
+ * @SINCE_1_0.0
+ */
+ ENABLE_MARKUP,
+
+ /**
+ * @brief The font's family of the new input text.
+ * @details Name "inputFontFamily", type Property::STRING.
+ * @SINCE_1_0.0
+ */
+ INPUT_FONT_FAMILY,
+
+ /**
+ * @brief The font's style of the new input text.
+ * @details Name "inputFontStyle", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_FONT_STYLE,
+
+ /**
+ * @brief The font's size of the new input text in points.
+ * @details Name "inputPointSize", type Property::FLOAT.
+ * @SINCE_1_0.0
+ */
+ INPUT_POINT_SIZE,
+
+ /**
+ * @brief The default underline parameters.
+ * @details Name "underline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ UNDERLINE,
+
+ /**
+ * @brief The underline parameters of the new input text.
+ * @details Name "inputUnderline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_UNDERLINE,
+
+ /**
+ * @brief The default shadow parameters.
+ * @details Name "shadow", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ SHADOW,
+
+ /**
+ * @brief The shadow parameters of the new input text.
+ * @details Name "inputShadow", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_SHADOW,
+
+ /**
+ * @brief The default emboss parameters.
+ * @details Name "emboss", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ EMBOSS,
+
+ /**
+ * @brief The emboss parameters of the new input text.
+ * @details Name "inputEmboss", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_EMBOSS,
+
+ /**
+ * @brief The default outline parameters.
+ * @details Name "outline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ OUTLINE,
+
+ /**
+ * @brief The outline parameters of the new input text.
+ * @details Name "inputOutline", type Property::MAP.
+ * @SINCE_1_2.13
+ */
+ INPUT_OUTLINE,
+
+ /**
+ * @brief Hides the input characters and instead shows a default character for password or pin entry.
+ * @details Name "hiddenInputSettings", type Property::MAP.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @see HiddenInput::Property
+ */
+ HIDDEN_INPUT_SETTINGS,
+
+ /**
+ * @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 Enables Text selection, such as the cursor, handle, clipboard, and highlight color.
+ * @details Name "enableSelection", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ ENABLE_SELECTION,
+
+ /**
+ * @brief Sets the placeholder : text, color, font family, font style, point size, and pixel size.
+ * @details Name "placeholder", type Property::MAP.
+ * Example Usage:
+ * @code
+ * Property::Map propertyMap;
+ * propertyMap["placeholderText"] = "Setting Placeholder Text";
+ * propertyMap["placeholderTextFocused"] = "Setting Placeholder Text Focused";
+ * propertyMap["placeholderColor"] = Color::RED;
+ * propertyMap["placeholderFontFamily"] = "Arial";
+ * propertyMap["placeholderPointSize"] = 12.0f;
+ * propertyMap["placeholderEllipsis"] = true;
+ *
+ * Property::Map fontStyleMap;
+ * fontStyleMap.Insert( "weight", "bold" );
+ * fontStyleMap.Insert( "width", "condensed" );
+ * fontStyleMap.Insert( "slant", "italic" );
+ * propertyMap["placeholderFontStyle"] = fontStyleMap;
+ *
+ * field.SetProperty( TextField::Property::PLACEHOLDER, propertyMap );
+ * @endcode
+ * @SINCE_1_2.60
+ */
+ PLACEHOLDER,
+
+ /**
+ * @brief Whether we should show the ellipsis if it is required.
+ * @details Name "ellipsis", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ * @note PLACEHOLDER map is used to add ellipsis to placeholder text.
+ */
+ ELLIPSIS,
};
};
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 or type HorizontalAlignment::Type (Property::INTEGER)
+ * Values "BEGIN", "CENTER", "END", default BEGIN.
+ * @note Return type is Property::STRING
* @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 or type VerticalAlignment::Type (Property::INTEGER).
+ * Values "TOP", "CENTER", "BOTTOM" @SINCE_1_0.0, default TOP.
+ * @note Return type is Property::STRING
* @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 Text::LineWrap::Mode (Text::Property::INTEGER) or Property::STRING.
+ * @SINCE_1_2.60
+ * @note Default is Text::LineWrap::WORD.
+ * @note Return type is Text::LineWrap::Mode (Text::Property::INTEGER).
+ * @see Text::LineWrap
+ */
+ 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
};
};
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 59;
+const unsigned int TOOLKIT_MICRO_VERSION = 60;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
$(public_api_src_dir)/controls/flex-container/flex-container.cpp \
$(public_api_src_dir)/controls/image-view/image-view.cpp \
$(public_api_src_dir)/controls/model3d-view/model3d-view.cpp \
+ $(public_api_src_dir)/controls/progress-bar/progress-bar.cpp \
$(public_api_src_dir)/controls/scroll-bar/scroll-bar.cpp \
$(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.cpp \
$(public_api_src_dir)/controls/scrollable/item-view/item-layout.cpp \
public_api_header_files = \
$(public_api_src_dir)/dali-toolkit-version.h \
$(public_api_src_dir)/enums.h \
+ $(public_api_src_dir)/align-enumerations.h \
$(public_api_src_dir)/toolkit-property-index-ranges.h
public_api_controls_header_files = \
public_api_item_view_header_files = \
$(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \
+ $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout-property.h \
$(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \
$(public_api_src_dir)/controls/scrollable/item-view/item-layout.h \
$(public_api_src_dir)/controls/scrollable/item-view/item-view-declarations.h \
$(public_api_src_dir)/image-loader/async-image-loader.h \
$(public_api_src_dir)/image-loader/sync-image-loader.h
+public_api_progress_bar_header_files = \
+ $(public_api_src_dir)/controls/progress-bar/progress-bar.h
+
public_api_scrollable_header_files = \
$(public_api_src_dir)/controls/scrollable/scrollable.h
$(public_api_src_dir)/controls/scroll-bar/scroll-bar.h
public_api_scroll_view_header_files = \
+ $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-mode.h \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-constraints.h \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.h \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-path-effect.h \
$(public_api_src_dir)/controls/table-view/table-view.h
public_api_text_controls_header_files = \
+ $(public_api_src_dir)/controls/text-controls/hidden-input-properties.h \
$(public_api_src_dir)/controls/text-controls/text-editor.h \
$(public_api_src_dir)/controls/text-controls/text-label.h \
$(public_api_src_dir)/controls/text-controls/text-field.h
public_api_focus_manager_header_files = \
$(public_api_src_dir)/focus-manager/keyboard-focus-manager.h
-public_api_rendering_backend_header_files = \
- $(public_api_src_dir)/text/rendering-backend.h
+public_api_text_header_files = \
+ $(public_api_src_dir)/text/rendering-backend.h \
+ $(public_api_src_dir)/text/text-enumerations.h
public_api_video_view_header_files = \
$(public_api_src_dir)/controls/video-view/video-view.h
$(public_api_src_dir)/visuals/image-visual-properties.h \
$(public_api_src_dir)/visuals/mesh-visual-properties.h \
$(public_api_src_dir)/visuals/primitive-visual-properties.h \
- $(public_api_src_dir)/visuals/visual-properties.h
+ $(public_api_src_dir)/visuals/visual-properties.h \
+ $(public_api_src_dir)/visuals/text-visual-properties.h
--- /dev/null
+#ifndef DALI_TOOLKIT_TEXT_ENUMERATIONS_H
+#define DALI_TOOLKIT_TEXT_ENUMERATIONS_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.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @addtogroup dali_toolkit_controls
+ * @{
+ */
+
+namespace Text
+{
+
+/**
+ * @brief The available Horizontal alignments for text.
+ *
+ * @SINCE_1_2.60
+ */
+namespace HorizontalAlignment
+{
+
+/**
+ * @brief Enumerations for Horizontal alignment.
+ *
+ * @SINCE_1_2.60
+ */
+enum Type
+{
+ BEGIN, ///< @SINCE_1_2.60
+ CENTER, ///< @SINCE_1_2.60
+ END ///< @SINCE_1_2.60
+};
+
+} // namespace HorizontalAlignment
+
+/**
+ * @brief The available Vertical alignments for text.
+ *
+ * @SINCE_1_2.60
+ */
+namespace VerticalAlignment
+{
+
+/**
+ * @brief Enumerations for Vertical alignment.
+ *
+ * @SINCE_1_2.60
+ */
+enum Type
+{
+ TOP, ///< @SINCE_1_2.60
+ CENTER, ///< @SINCE_1_2.60
+ BOTTOM ///< @SINCE_1_2.60
+};
+
+} // namespace VerticalAlignment
+
+/**
+ * @brief Contains modes which specify how lines are wrapped.
+ *
+ * If the layout width is too short to show the full text, then a wrapping mode can be specified.
+ *
+ * LineWrap::WORD mode will move an entire word to the next line:
+ * @code
+ * +---------+
+ * |HELLO |
+ * |WORLD |
+ * +---------+
+ * @endcode
+ *
+ * LineWrap::CHARACTER mode will move character by character to the next line:
+ * @code
+ * +---------+
+ * |HELLO WOR|
+ * |LD |
+ * +---------+
+ * @endcode
+ *
+ * @SINCE_1_2.60
+ */
+namespace LineWrap
+{
+
+/**
+ * @brief Enumerations specifying how a line is wrapped.
+ * @SINCE_1_2.60
+ * @see LineWrap
+ */
+enum Mode
+{
+ WORD, ///< @SINCE_1_2.60
+ CHARACTER ///< @SINCE_1_2.60
+};
+
+} // namespace LineWrap
+
+} // namespace Text
+
+/**
+ * @}
+ */
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif //DALI_TOOLKIT_TEXT_ENUMERATIONS_H
{
/**
* @brief The URL of the image.
- * @details Name "url", type Property::STRING or Property::ARRAY of Property::STRING
+ * @details Name "url", type Property::STRING or Property::ARRAY of Property::STRING.
* @note The array form is used for generating animated image visuals.
* @note The number of threads used for local and remote image loading can be controlled by the
* environment variables DALI_TEXTURE_LOCAL_THREADS and DALI_TEXTURE_REMOTE_THREADS respectively.
/**
* @brief The wrap mode for u coordinate.
- * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
+ * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING.
* It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
* @SINCE_1_2.1
* @note Optional. If not specified, the default is CLAMP.
/**
* @brief The wrap mode for v coordinate.
- * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
+ * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING.
* it decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
* @SINCE_1_2.1
* @note Optional. If not specified, the default is CLAMP.
* @note For Normal QUAD image only.
*/
WRAP_MODE_V,
+
+ /**
+ * @brief The border of the image.
+ * @details Name "border", type Property::RECTANGLE or Property::VECTOR4.
+ * The border of the image in the order: left, right, bottom, top.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @note For N-Patch images only.
+ */
+ BORDER,
+
+ /**
+ * @brief Whether to use the texture atlas
+ * @details Name "atlasing", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ * @note Optional. By default atlasing is off.
+ */
+ ATLASING,
+
+ /**
+ * @brief URL of a masking image
+ * @details Name "alphaMaskUrl", type Property::STRING, URL of image to apply as
+ * a mask after image loading. If set after the main URL has finished loading, this
+ * may necessitate a re-load of the main image. The alpha mask image will be scaled
+ * on load to match the size of the main image, then applied to the pixel data
+ * before uploading to GL.
+ * @SINCE_1_2.60
+ * @note Optional.
+ */
+ ALPHA_MASK_URL,
+
+ /**
+ * @brief Defines the batch size for pre-loading images in the AnimatedImageVisual
+ * @details Name "batchSize", type Property::INTEGER, number of images to pre-load
+ * before starting to play. Default value: 1
+ * @SINCE_1_2.60
+ * @note Optional.
+ */
+ BATCH_SIZE,
+
+ /**
+ * @brief Defines the cache size for loading images in the AnimatedImageVisual
+ * @details Name "cacheSize", type Property::INTEGER, number of images to keep
+ * cached ahead during playback. Default value: 1
+ *
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @note, cacheSize should be >= batchSize.
+ * If it isn't, then the cache will automatically be changed to batchSize.
+ * @note, because of the defaults, it is expected that the application developer
+ * tune the batch and cache sizes to their particular use case.
+ */
+ CACHE_SIZE,
+
+ /**
+ * @brief The number of milliseconds between each frame in the AnimatedImageVisual
+ * @details Name "frameDelay", type Property::INTEGER, The number of milliseconds between each frame.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @note This is only used when multiple URLs are provided.
+ */
+ FRAME_DELAY,
+
+ /**
+ * @brief The scale factor to apply to the content image before masking
+ * @details Name "maskContentScale", type Property::FLOAT, The scale factor
+ * to apply to the content before masking. Note, scaled images are cropped to
+ * the same size as the alpha mask.
+ * @SINCE_1_2.60
+ * @note Optional.
+ */
+ MASK_CONTENT_SCALE,
+
+ /**
+ * @brief Whether to crop image to mask or scale mask to fit image
+ * @details Name "cropToMask", type Property::BOOLEAN, True if the image should
+ * be cropped to match the mask size, or false if the image should remain the same size.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @note If this is false, then the mask is scaled to fit the image before being applied.
+ */
+ CROP_TO_MASK,
};
} // namespace Property
--- /dev/null
+#ifndef DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H
+#define DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_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/toolkit-property-index-ranges.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+/**
+ * @addtogroup dali_toolkit_visuals
+ * @{
+ */
+
+/**
+ * @brief TextVisual Properties
+ * @SINCE_1_2.60
+ */
+namespace TextVisual
+{
+
+namespace Property
+{
+
+enum
+{
+ /**
+ * @brief The text to display in UTF-8 format.
+ * @details name "text", type Property::STRING.
+ * @SINCE_1_2.60
+ */
+ TEXT = VISUAL_PROPERTY_START_INDEX,
+
+ /**
+ * @brief The requested font family to use.
+ * @details name "fontFamily", type Property::STRING.
+ * @SINCE_1_2.60
+ */
+ FONT_FAMILY,
+
+ /**
+ * @brief The requested font style to use.
+ * @details name "fontStyle", type Property::MAP.
+ * @SINCE_1_2.60
+ */
+ FONT_STYLE,
+
+ /**
+ * @brief The size of font in points.
+ * @details name "pointSize", type Property::FLOAT.
+ * @SINCE_1_2.60
+ */
+ POINT_SIZE,
+
+ /**
+ * @brief The single-line or multi-line layout option.
+ * @details name "multiLine", type Property::BOOLEAN, default false.
+ * @SINCE_1_2.60
+ */
+ MULTI_LINE,
+
+ /**
+ * @brief The line horizontal alignment.
+ * @details Name "horizontalAlignment", type HorizontalAlignment::Type (Property::INTEGER) or Property::STRING.
+ * @note Optional. If not specified, the default is HorizontalAlignment::BEGIN
+ * @note Return type is HorizontalAlignment::Type (Property::INTEGER)
+ * @SINCE_1_2.60
+ */
+ HORIZONTAL_ALIGNMENT,
+
+ /**
+ * @brief The line vertical alignment.
+ * @details name "verticalAlignment", VerticalAlignment::Type (Property::INTEGER) or Property::STRING
+ * @note Optional. If not specified, the default is VerticalAlignment::TOP
+ * @note Return type is VerticalAlignment::Type (Property::INTEGER)`
+ * @SINCE_1_2.60
+ */
+ VERTICAL_ALIGNMENT,
+
+ /**
+ * @brief The color of the text.
+ * @details name "textColor", type Property::VECTOR4.
+ * @SINCE_1_2.60
+ */
+ TEXT_COLOR,
+
+ /**
+ * @brief Whether the mark-up processing is enabled.
+ * @details name "enableMarkup", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ */
+ ENABLE_MARKUP,
+
+ /**
+ * @brief The shadow parameters.
+ * @details name "shadow", type Property::MAP.
+ * @SINCE_1_2.60
+ */
+ SHADOW,
+
+ /**
+ * @brief The default underline parameters.
+ * @details name "underline", type Property::MAP.
+ * @SINCE_1_2.60
+ */
+ UNDERLINE,
+};
+
+} // namespace Property
+
+} // namespace TextVisual
+
+/**
+ * @}
+ */
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H
*/
enum Type
{
- BORDER, ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45
- COLOR, ///< Renders a solid color to the control's quad. @SINCE_1_1.45
- GRADIENT, ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45
- IMAGE, ///< Renders an image into the control's quad. @SINCE_1_1.45
- MESH, ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45
- PRIMITIVE, ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45
- WIREFRAME ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2
+ BORDER, ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45
+ COLOR, ///< Renders a solid color to the control's quad. @SINCE_1_1.45
+ GRADIENT, ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45
+ IMAGE, ///< Renders an image into the control's quad. @SINCE_1_1.45
+ MESH, ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45
+ PRIMITIVE, ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45
+ WIREFRAME, ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2
+ TEXT, ///< Renders text @SINCE_1_2.60
+ N_PATCH, ///< Renders an n-patch image. @SINCE_1_2.60
+ SVG, ///< Renders an SVG image. @SINCE_1_2.60
+ ANIMATED_IMAGE, ///< Renders a animated image. @SINCE_1_2.60
};
/**
/**
* @brief The shader to use in the visual.
- * @details Name "shader", type Property::Map.
+ * @details Name "shader", type Property::MAP.
* @SINCE_1_1.45
* @note Optional.
* @note Will override the existing shaders.
* @see Shader::Property
*/
- SHADER
+ SHADER,
+
+ /**
+ * @brief The transform used by the visual.
+ * @details Name "transform", type Property::MAP.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @see DevelVisual::Transform::Property
+ */
+ TRANSFORM,
+
+ /**
+ * @brief Enables/disables premultiplied alpha.
+ * @details Name "premultipliedAlpha", type Property::BOOLEAN.
+ * @SINCE_1_2.60
+ * @note Optional.
+ * @note The premultiplied alpha is false by default unless this behaviour is modified
+ * by the derived Visual type.
+ */
+ PREMULTIPLIED_ALPHA,
+
+ /**
+ * @brief Mix color is a blend color for any visual.
+ * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4.
+ * @SINCE_1_2.60
+ * @note Optional
+ */
+ MIX_COLOR,
+
+ /**
+ * @brief Opacity is the alpha component of the mixColor, above.
+ * @details Name "opacity", type Property::FLOAT.
+ * @SINCE_1_2.60
+ * @note Optional
+ */
+ OPACITY,
};
} // namespace Property
+namespace Transform
+{
+
+/**
+ * @brief Policies used by the transform for the offset or size.
+ * @SINCE_1_2.60
+ *
+ */
+namespace Policy
+{
+
+enum Type
+{
+ RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control).
+ ABSOLUTE = 1 ///< Absolute value in world units.
+};
+
+} // namespace Policy
+
+namespace Property
+{
+
+enum Type
+{
+ /**
+ * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
+ * @details Name "offset", type Property::VECTOR2.
+ * @SINCE_1_2.60
+ *
+ * @see OFFSET_POLICY
+ */
+ OFFSET,
+
+ /**
+ * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
+ * @details Name "size", type Property::VECTOR2.
+ * @see SIZE_POLICY
+ */
+ SIZE,
+
+ /**
+ * @brief The origin of the visual within its control area.
+ * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING.
+ * @see Toolkit::Align
+ * @SINCE_1_2.60
+ * @note The default is Align::TOP_BEGIN.
+ */
+ ORIGIN,
+
+ /**
+ * @brief The anchor-point of the visual
+ * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING.
+ * @see Toolkit::Align
+ * @SINCE_1_2.60
+ * @note The default is Align::TOP_BEGIN.
+ */
+ ANCHOR_POINT,
+
+ /**
+ * @brief Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ * @details Name "offsetPolicy", type Vector2 or Property::ARRAY of Property::STRING.
+ * If Property::ARRAY then 2 strings expected for the x and y.
+ *
+ * C++:
+ * @code
+ * control.SetProperty( ..., // Some visual based property
+ * Property::Map().Add( ... ) // Properties to set up visual
+ * .Add( Visual::Property::TRANSFORM,
+ * Property::Array().Add( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Policy::ABSOLUTE, Policy::RELATIVE ) ) )
+ * .Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 1.0f ) ) );
+ * @endcode
+ *
+ * JSON:
+ * @code
+ * {
+ * ...
+ * "transition":
+ * {
+ * "offsetPolicy" : [ "ABSOLUTE", "RELATIVE" ],
+ * "offset" : [ 10, 1.0 ]
+ * }
+ * ...
+ * }
+ *
+ * @endcode
+ * @see Policy::Type
+ * @SINCE_1_2.60
+ * @note By default, both the x and the y offset is RELATIVE.
+ */
+ OFFSET_POLICY,
+
+ /**
+ * @brief Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ * @details Name "sizePolicy", type Vector2 or Property::ARRAY of Property::STRING.
+ * If Property::ARRAY then 2 strings expected for the width and height.
+ *
+ * @see Policy::Type
+ * @see OFFSET_POLICY for example
+ * @SINCE_1_2.60
+ * @note By default, both the width and the height is RELATIVE to the control's size.
+ */
+ SIZE_POLICY,
+};
+
+} // namespace Property
+
+} // namespace Transform
+
/**
* @brief Shader for Visuals
* @SINCE_1_1.45
/*
- * 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.
| Property | String | Type | Required | Description |
|----------------------------------------------------------------|--------------|:-----------------:|:--------:|---------------------------------------------------------------------------------------------|
-| Dali::Toolkit::DevelVisual::Transform::Property::OFFSET | offset | VECTOR2 | No | The offset of the visual. |
-| Dali::Toolkit::DevelVisual::Transform::Property::SIZE | size | VECTOR2 | No | The size of the visual. |
-| Dali::Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY | offsetPolicy | VECTOR4 | No | Whether the offset components are Relative or Absolute [More info](@ref offset-size-policy) |
-| Dali::Toolkit::DevelVisual::Transform::Property::SIZE_POLICY | sizePolicy | VECTOR4 | No | Whether the size components are Relative or Absolute [More info](@ref offset-size-policy) |
-| Dali::Toolkit::DevelVisual::Transform::Property::ORIGIN | origin | INTEGER or STRING | No | The origin of the visual within the control's area. [More info](@ref align-type) |
-| Dali::Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT | anchorPoint | INTEGER or STRING | No | The anchor point of the visual. [More info](@ref align-type) |
+| Dali::Toolkit::Visual::Transform::Property::OFFSET | offset | VECTOR2 | No | The offset of the visual. |
+| Dali::Toolkit::Visual::Transform::Property::SIZE | size | VECTOR2 | No | The size of the visual. |
+| Dali::Toolkit::Visual::Transform::Property::OFFSET_POLICY | offsetPolicy | VECTOR4 | No | Whether the offset components are Relative or Absolute [More info](@ref offset-size-policy) |
+| Dali::Toolkit::Visual::Transform::Property::SIZE_POLICY | sizePolicy | VECTOR4 | No | Whether the size components are Relative or Absolute [More info](@ref offset-size-policy) |
+| Dali::Toolkit::Visual::Transform::Property::ORIGIN | origin | INTEGER or STRING | No | The origin of the visual within the control's area. [More info](@ref align-type) |
+| Dali::Toolkit::Visual::Transform::Property::ANCHOR_POINT | anchorPoint | INTEGER or STRING | No | The anchor point of the visual. [More info](@ref align-type) |
## Offset & Size Policy {#offset-size-policy}
| Enumeration | String | Description |
|---------------------------------------------------------|----------|-------------------------------------------------------------------------------|
-| Dali::Toolkit::DevelVisual::Transform::Policy::RELATIVE | RELATIVE | *Default*. The size or offset value represents a ratio of the control's size |
-| Dali::Toolkit::DevelVisual::Transform::Policy::ABSOLUTE | ABSOLUTE | The size or offset value represents world units (pixels) |
+| Dali::Toolkit::Visual::Transform::Policy::RELATIVE | RELATIVE | *Default*. The size or offset value represents a ratio of the control's size |
+| Dali::Toolkit::Visual::Transform::Policy::ABSOLUTE | ABSOLUTE | The size or offset value represents world units (pixels) |
For example, an offsetPolicy of [ RELATIVE, RELATIVE ], a sizePolicy of [ ABSOLUTE, ABSOLUTE ], an offset of ( 0, 0.25 ) and a size of ( 20, 20 ) means the visual will be 20 pixels by 20 pixels in size, positioned 25% above the center of the control.
Name: dali-toolkit
Summary: Dali 3D engine Toolkit
-Version: 1.2.59
+Version: 1.2.60
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT
/*
- * Copyright (c) 2015 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.
// EXTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
#include <dali-toolkit/devel-api/builder/builder.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
/*
- * Copyright (c) 2015 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.
#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/events/pan-gesture.h>
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <v8-utils.h>