From: Tom Robinson Date: Fri, 29 Jan 2016 11:34:17 +0000 (+0000) Subject: [dali_1.1.19] Merge branch 'devel/master' X-Git-Tag: dali_1.9.8~5^2~214 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=912e891b33f2b3b10392094c57b17eefa560b1fa;hp=a0a33727b8aa3ba5f32d4541f07718151f9574af [dali_1.1.19] Merge branch 'devel/master' Change-Id: I48b20bc2e82d0e6ab23a5d3d8b1c3d14429edf6d --- diff --git a/build/tizen/dali-toolkit/Makefile.am b/build/tizen/dali-toolkit/Makefile.am index 0e36158..3d63299 100644 --- a/build/tizen/dali-toolkit/Makefile.am +++ b/build/tizen/dali-toolkit/Makefile.am @@ -106,6 +106,7 @@ develapitoolbardir = $(develapicontrolsdir)/tool-bar develapitextselectionpopupdir = $(develapicontrolsdir)/text-controls # devel headers +develapicontrols_HEADERS = $(devel_api_controls_header_files) develapibloomview_HEADERS = $(devel_api_bloom_view_header_files) develapibubbleemitter_HEADERS = $(devel_api_bubble_emitter_header_files) develapibuilder_HEADERS = $(devel_api_builder_header_files) @@ -126,44 +127,44 @@ develapitransitioneffects_HEADERS = $(devel_api_transition_effects_header_files) develapitextselectionpopup_HEADERS = $(devel_api_text_controls_header_files) # public api source -publicapidir = $(topleveldir)/public-api -publicapicontrolsdir = $(publicapidir)/controls -develapiaccessibilitymanagerdir = $(publicapidir)/accessibility-manager -publicapialignmentdir = $(publicapicontrolsdir)/alignment -publicapibuttonsdir = $(publicapicontrolsdir)/buttons -publicapidefaultcontrolsdir = $(publicapicontrolsdir)/default-controls -publicapigaussianblurviewdir = $(publicapicontrolsdir)/gaussian-blur-view -publicapiimageviewdir = $(publicapicontrolsdir)/image-view -publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view -publicapipageturnviewdir = $(publicapicontrolsdir)/page-turn-view -publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar -publicapiscrollabledir = $(publicapicontrolsdir)/scrollable -publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view -publicapiitemviewdir = $(publicapicontrolsdir)/scrollable/item-view -publicapitableviewdir = $(publicapicontrolsdir)/table-view -publicapitextcontrolsdir = $(publicapicontrolsdir)/text-controls -publicapifocusmanagerdir = $(publicapidir)/focus-manager -publicapirenderingbackenddir = $(publicapidir)/text +publicapidir = $(topleveldir)/public-api +publicapicontrolsdir = $(publicapidir)/controls +publicapiaccessibilitymanagerdir = $(publicapidir)/accessibility-manager +publicapialignmentdir = $(publicapicontrolsdir)/alignment +publicapibuttonsdir = $(publicapicontrolsdir)/buttons +publicapidefaultcontrolsdir = $(publicapicontrolsdir)/default-controls +publicapigaussianblurviewdir = $(publicapicontrolsdir)/gaussian-blur-view +publicapiimageviewdir = $(publicapicontrolsdir)/image-view +publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view +publicapipageturnviewdir = $(publicapicontrolsdir)/page-turn-view +publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar +publicapiscrollabledir = $(publicapicontrolsdir)/scrollable +publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view +publicapiitemviewdir = $(publicapicontrolsdir)/scrollable/item-view +publicapitableviewdir = $(publicapicontrolsdir)/table-view +publicapitextcontrolsdir = $(publicapicontrolsdir)/text-controls +publicapifocusmanagerdir = $(publicapidir)/focus-manager +publicapirenderingbackenddir = $(publicapidir)/text # public api headers -publicapi_HEADERS = $(public_api_header_files) -publicapicontrols_HEADERS = $(public_api_controls_header_files) -develapiaccessibilitymanager_HEADERS = $(public_api_accessibility_manager_header_files) -publicapialignment_HEADERS = $(public_api_alignment_header_files) -publicapibuttons_HEADERS = $(public_api_buttons_header_files) -publicapidefaultcontrols_HEADERS = $(public_api_default_controls_header_files) -publicapigaussianblurview_HEADERS = $(public_api_gaussian_blur_view_header_files) -publicapiimageview_HEADERS = $(public_api_image_view_header_files) -publicapiitemview_HEADERS = $(public_api_item_view_header_files) -publicapimodel3dview_HEADERS = $(public_api_model3d_view_header_files) -publicapipageturnview_HEADERS = $(public_api_page_turn_view_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) +publicapi_HEADERS = $(public_api_header_files) +publicapicontrols_HEADERS = $(public_api_controls_header_files) +publicapiaccessibilitymanager_HEADERS = $(public_api_accessibility_manager_header_files) +publicapialignment_HEADERS = $(public_api_alignment_header_files) +publicapibuttons_HEADERS = $(public_api_buttons_header_files) +publicapidefaultcontrols_HEADERS = $(public_api_default_controls_header_files) +publicapigaussianblurview_HEADERS = $(public_api_gaussian_blur_view_header_files) +publicapiimageview_HEADERS = $(public_api_image_view_header_files) +publicapiitemview_HEADERS = $(public_api_item_view_header_files) +publicapimodel3dview_HEADERS = $(public_api_model3d_view_header_files) +publicapipageturnview_HEADERS = $(public_api_page_turn_view_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) # package doxygen file (contains doxygen grouping information) packagedoxydir = $(topleveldir)/doc diff --git a/build/tizen/docs/dali.doxy.in b/build/tizen/docs/dali.doxy.in index f9a5f53..72ed846 100644 --- a/build/tizen/docs/dali.doxy.in +++ b/build/tizen/docs/dali.doxy.in @@ -236,6 +236,137 @@ ALIASES = # Shows all lines between public and private *inclusive*. ALIASES += clip{3}="\dontinclude \1 \n \skip \2 \n \until \3" +# +# +# Use @SINCE_1_0, @SINCE_1_1, ... instead of @since, +# and use @DEPRECATED_1_0, @DEPRECATED_1_1, ... instead of @deprecated. +# It enables integrated management of version tagging between +# the open source DALi API reference and Tizen API reference. +# Using those tags with different ALIASES settings in each doxygen config file allows us +# to generate two versions of "Since" and "Deprecated" generated output +# from one set of public header files. +# +# If you need a newer version number like @SINCE_1_5 or @SINCE_2_0, just add new ALIASES for it. +# +# ##################################################3 +# # Guide for Open Source DALi API Reference +# +# ### @SINCE example: +# [some-public-header.h] +# /** +# * ... +# * @SINCE_1_0.1 +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# ... +# Since: +# 1.0.1 +# +# ### @DEPRECATED example 1: +# [some-public-header.h] +# /** +# * @DEPRECATED_1_0.3 +# * ... +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# Deprecated: +# Deprecated since 1.0.3 +# ... +# +# ### @DEPRECATED example 2: +# [some-public-header.h] +# ... +# /** +# * @DEPRECATED_1_0.3. Use SomeFunction2() instead. +# * ... +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# Deprecated: +# Deprecated since 1.0.3. Use SomeFunction2() instead. +# ... +# +# ##################################################3 +# # Guide for Tizen Native API Reference +# +# ### @SINCE example: +# [some-public-header.h] +# /** +# * ... +# * @SINCE_1_0.1 +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# ... +# Since: +# 2.4, DALi Version 1.0.1 +# +# ### @DEPRECATED example 1: +# [some-public-header.h] +# /** +# * @DEPRECATED_1_0.3 +# * ... +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# Deprecated: +# Deprecated since 3.0, DALi version 1.0.3 +# ... +# +# ### @DEPRECATED example 2: +# [some-public-header.h] +# ... +# /** +# * @DEPRECATED_1_0.3. Use SomeFunction2() instead. +# * ... +# */ +# void SomeFunction(); +# +# [generated html file] +# void SomeFunction() +# Deprecated: +# Deprecated since 3.0, DALi version 1.0.3. Use SomeFunction2() instead. +# ... + +########################################### +# For Open Source DALi API Reference +ALIASES += SINCE_1_0="@since 1.0" +ALIASES += SINCE_1_1="@since 1.1" + +ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0" +ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1" + +ALIASES += PLATFORM="" +ALIASES += PRIVLEVEL_PLATFORM="" +ALIASES += PRIVILEGE_KEYGRAB="" + +############################################ +## For Tizen Native API Reference +#ALIASES += SINCE_1_0="\par Since:\n 2.4, DALi version 1.0" +#ALIASES += SINCE_1_1="\par Since:\n 3.0, DALi version 1.1" + +## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release. +## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0. +#ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 3.0, DALi version 1.0" +#ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 3.0, DALi version 1.1" + +#ALIASES += PLATFORM="@platform" +#ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform" +#ALIASES += PRIVILEGE_KEYGRAB="\par Privilege:\n http://tizen.org/privilege/keygrab" + + # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index ff91aa7..a2220cd 100755 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -30,6 +30,9 @@ devel_api_src_files = \ # Add devel header files here +devel_api_controls_header_files = \ + $(devel_api_src_dir)/controls/control-depth-index-ranges.h + devel_api_bloom_view_header_files = \ $(devel_api_src_dir)/controls/bloom-view/bloom-view.h diff --git a/dali-toolkit/internal/builder/builder-actor.cpp b/dali-toolkit/internal/builder/builder-actor.cpp index 69bf0e6..3807b08 100644 --- a/dali-toolkit/internal/builder/builder-actor.cpp +++ b/dali-toolkit/internal/builder/builder-actor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * 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. @@ -34,7 +34,7 @@ namespace Internal { using namespace Dali::Scripting; -extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& constant ); +extern void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& constant ); /* * Handles special case actor configuration (anything thats not already a property) @@ -82,11 +82,9 @@ Actor SetupActor( const TreeNode& child, Actor& actor, const Replacement& consta std::string key( keyChild.first ); Property::Value value; - if( SetPropertyFromNode( keyChild.second, value, constant )) - { - // Register/Set property. - actor.RegisterProperty( key, value, Property::READ_WRITE ); - } + DeterminePropertyFromNode( keyChild.second, value, constant ); + // Register/Set property. + actor.RegisterProperty( key, value, Property::READ_WRITE ); } } diff --git a/dali-toolkit/internal/builder/builder-impl.cpp b/dali-toolkit/internal/builder/builder-impl.cpp index de40d44..f7b89e1 100644 --- a/dali-toolkit/internal/builder/builder-impl.cpp +++ b/dali-toolkit/internal/builder/builder-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * 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. @@ -52,10 +52,10 @@ namespace Internal class Replacement; extern Animation CreateAnimation(const TreeNode& child, const Replacement& replacements, const Dali::Actor searchRoot, Builder* const builder ); -extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value ); -extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& replacements ); -extern bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value ); -extern bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, const Replacement& replacements ); +extern void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ); +extern void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& replacements ); +extern bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value ); +extern bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, const Replacement& replacements ); extern Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder); extern Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder); extern Actor SetupActor( const TreeNode& node, Actor& actor, const Replacement& constant ); @@ -298,7 +298,7 @@ void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replace Property::Type type = propertyObject.GetPropertyType(index); Property::Value value; - if( !SetPropertyFromNode( keyChild.second, type, value, constant ) ) + if( !DeterminePropertyFromNode( keyChild.second, type, value, constant ) ) { // verbose as this might not be a problem // eg parentOrigin can be a string which is picked up later @@ -677,7 +677,7 @@ ShaderEffect Builder::GetShaderEffect( const std::string &name, const Replacemen if( OptionalChild effect = IsChild( *effects, name ) ) { Dali::Property::Value propertyMap(Property::MAP); - if( SetPropertyFromNode( *effect, Property::MAP, propertyMap, constant ) ) + if( DeterminePropertyFromNode( *effect, Property::MAP, propertyMap, constant ) ) { ret = Dali::Scripting::NewShaderEffect( propertyMap ); mShaderEffectLut[ name ] = ret; @@ -713,7 +713,7 @@ FrameBufferImage Builder::GetFrameBufferImage( const std::string &name, const Re if( OptionalChild image = IsChild( *images, name ) ) { Dali::Property::Value property(Property::MAP); - if( SetPropertyFromNode( *image, Property::MAP, property, constant ) ) + if( DeterminePropertyFromNode( *image, Property::MAP, property, constant ) ) { Property::Map* map = property.GetMap(); @@ -752,7 +752,7 @@ Path Builder::GetPath( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *path, "points") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret = Path::New(); ret.SetProperty( Path::Property::POINTS, points); @@ -761,7 +761,7 @@ Path Builder::GetPath( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *path, "controlPoints") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret.SetProperty( Path::Property::CONTROL_POINTS, points); } @@ -826,7 +826,7 @@ PathConstrainer Builder::GetPathConstrainer( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *pathConstrainer, "points") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret = PathConstrainer::New(); ret.SetProperty( PathConstrainer::Property::POINTS, points); @@ -835,7 +835,7 @@ PathConstrainer Builder::GetPathConstrainer( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *pathConstrainer, "controlPoints") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret.SetProperty( PathConstrainer::Property::CONTROL_POINTS, points); } @@ -935,7 +935,7 @@ Dali::LinearConstrainer Builder::GetLinearConstrainer( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *linearConstrainer, "value") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret = Dali::LinearConstrainer::New(); ret.SetProperty( LinearConstrainer::Property::VALUE, points); @@ -944,7 +944,7 @@ Dali::LinearConstrainer Builder::GetLinearConstrainer( const std::string& name ) if( OptionalChild pointsProperty = IsChild( *linearConstrainer, "progress") ) { Dali::Property::Value points(Property::ARRAY); - if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) + if( DeterminePropertyFromNode( *pointsProperty, Property::ARRAY, points ) ) { ret.SetProperty( LinearConstrainer::Property::PROGRESS, points); } @@ -1200,15 +1200,8 @@ void Builder::LoadConstants( const TreeNode& root, Property::Map& intoMap ) #if defined(DEBUG_ENABLED) DALI_SCRIPT_VERBOSE("Constant set from json '%s'\n", (*iter).second.GetName()); #endif - if( SetPropertyFromNode( (*iter).second, property, replacer ) ) - { - intoMap[ (*iter).second.GetName() ] = property; - } - else - { - DALI_SCRIPT_WARNING("Cannot convert property for constant %s\n", - (*iter).second.GetName() == NULL ? "no name?" : (*iter).second.GetName()); - } + DeterminePropertyFromNode( (*iter).second, property, replacer ); + intoMap[ (*iter).second.GetName() ] = property; } } } diff --git a/dali-toolkit/internal/builder/builder-set-property.cpp b/dali-toolkit/internal/builder/builder-set-property.cpp index 7cd45b6..d17a392 100644 --- a/dali-toolkit/internal/builder/builder-set-property.cpp +++ b/dali-toolkit/internal/builder/builder-set-property.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * 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. @@ -38,22 +38,22 @@ namespace Internal /* * Set a property value from a tree node. - * This function guesses the type of the property from the format of the string in the node. - * This is not always possible and could be surprising. + * This function determines the type of the property from the format of the string in the node. + * This is not always possible and if the type cannot be determined then then the type will default to Array. * @param node The node string to convert from * @param value The property value to set - * @return true if the string could be converted. */ -bool SetPropertyFromNode( const TreeNode& node, Property::Value& value ); +void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ); /* * Set a property value from a tree node as SetPropertyFromNode() above + * This function determines the type of the property from the format of the string in the node. + * This is not always possible and if the type cannot be determined then then the type will default to Array. * @param node The node string to convert from * @param value The property value to set * @param replacement The overriding replacement map (if any) - * @return true if the string could be converted. */ -bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, +void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& replacement ); /* @@ -63,7 +63,7 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, * @param value The property value to set * @return true if the string could be converted to the correct type. */ -bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value ); +bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value ); /* * Set a property value as the given type from a tree node as SetPropertyFromNode() above @@ -73,7 +73,7 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V * @param replacement The overriding replacement map (if any) * @return true if the string could be converted to the correct type. */ -bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, +bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, const Replacement& replacement ); @@ -123,43 +123,43 @@ bool Disambiguated(const TreeNode& child, // ConstantLut& constantLut, // type-cast and value keys. If they do then a work around is to add a bogus key to not run this case. if(*childType == "boolean") { - return SetPropertyFromNode( *childValue, Dali::Property::BOOLEAN, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::BOOLEAN, value, replacement); } else if(*childType == "float") { - return SetPropertyFromNode( *childValue, Dali::Property::FLOAT, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::FLOAT, value, replacement); } else if(*childType == "vector2") { - return SetPropertyFromNode( *childValue, Dali::Property::VECTOR2, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::VECTOR2, value, replacement); } else if(*childType == "vector3") { - return SetPropertyFromNode( *childValue, Dali::Property::VECTOR3, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::VECTOR3, value, replacement); } else if(*childType == "vector4") { - return SetPropertyFromNode( *childValue, Dali::Property::VECTOR4, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::VECTOR4, value, replacement); } else if(*childType == "rotation") { - return SetPropertyFromNode( *childValue, Dali::Property::ROTATION, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::ROTATION, value, replacement); } else if(*childType == "rect") { - return SetPropertyFromNode( *childValue, Dali::Property::RECTANGLE, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::RECTANGLE, value, replacement); } else if(*childType == "string") { - return SetPropertyFromNode( *childValue, Dali::Property::STRING, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::STRING, value, replacement); } else if(*childType == "map") { - return SetPropertyFromNode( *childValue, Dali::Property::MAP, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::MAP, value, replacement); } else if(*childType == "array") { - return SetPropertyFromNode( *childValue, Dali::Property::ARRAY, value, replacement); + return DeterminePropertyFromNode( *childValue, Dali::Property::ARRAY, value, replacement); } } @@ -168,13 +168,13 @@ bool Disambiguated(const TreeNode& child, // ConstantLut& constantLut, } -bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value) +bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value) { Replacement noReplacement; - return SetPropertyFromNode( node, type, value, noReplacement ); + return DeterminePropertyFromNode( node, type, value, noReplacement ); } -bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, +bool DeterminePropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, const Replacement& replacer ) { bool done = false; @@ -352,20 +352,11 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V for( ; i < node.Size(); ++i, ++iter) { Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) - { - array->PushBack( childValue ); - } + DeterminePropertyFromNode( (*iter).second, childValue, replacer ); + array->PushBack( childValue ); } - if( array->Count() == node.Size() ) - { - done = true; - } - else - { - done = false; - } + done = ( array->Count() == node.Size() ); } } break; @@ -389,20 +380,11 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V for( ; i < node.Size(); ++i, ++iter) { Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) - { - map->Insert( (*iter).first, childValue ); - } + DeterminePropertyFromNode( (*iter).second, childValue, replacer ); + map->Insert( (*iter).first, childValue ); } - if( map->Count() == node.Size() ) - { - done = true; - } - else - { - done = false; - } + done = ( map->Count() == node.Size() ); } } break; @@ -416,164 +398,107 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V return done; } -bool SetPropertyFromNode( const TreeNode& node, Property::Value& value ) +void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ) { Replacement replacer; - return SetPropertyFromNode( node, value, replacer ); + DeterminePropertyFromNode( node, value, replacer ); } -bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, +void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& replacer ) { - bool done = false; - // some values are ambiguous as we have no Property::Type but can be disambiguated in the json + TreeNode::NodeType nodeType = node.GetType(); - // Currently Rotations and Rectangle must always be disambiguated when a type isnt available - if( Disambiguated( node, value, replacer ) ) - { - done = true; - } - else + // Some values are ambiguous as we have no Property::Type but can be disambiguated in the JSON. + // Currently Rotations and Rectangle must always be disambiguated when a type isn't available + if( !Disambiguated( node, value, replacer ) ) { + bool done = false; + + // Here, nodes are handled with the following precedence order: + // 1) Nodes with children, that have type ARRAY: Checked for array types including vectors and matrices. + // 2) Nodes without children, that do not have type ARRAY OR OBJECT: Checked for primitive types (int / float /etc). + // 3) If no match so far; If type is OBJECT: attempt to create as a Property::Map. + // 4) If no match still; Create as array. + + // First handle nodes with children. if( node.Size() ) { - // our current heuristic for deciding an array is actually a vector and not say a map - // is to check if the values are all floats - bool allNumbers = true; - for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter) + // Handle array types. + if( nodeType == TreeNode::ARRAY ) { - OptionalFloat f = IsFloat((*iter).second); - if(!f) + // our current heuristic for deciding an array is actually a vector and not say a map + // is to check if the values are all floats + bool allNumbers = true; + for( TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter ) { - allNumbers = false; - break; + OptionalFloat checkFloat = IsFloat( ( *iter ).second ); + if( !checkFloat ) + { + allNumbers = false; + break; + } } - } - if( allNumbers ) - { - // prefer finding vectors over presuming composite Property::Array... - if( OptionalMatrix v = IsMatrix(node) ) - { - value = *v; - done = true; - } - else if( OptionalMatrix3 v = IsMatrix3(node) ) - { - value = *v; - done = true; - } - else if( OptionalVector4 v = IsVector4(node) ) - { - value = *v; - done = true; - } - else if( OptionalVector3 v = IsVector3(node) ) - { - value = *v; - done = true; - } - else if( OptionalVector2 v = IsVector2(node) ) - { - value = *v; - done = true; - } - else if( 4 == node.Size() ) + if( allNumbers ) { - if( OptionalVector4 v = IsVector4(node) ) + // prefer finding vectors over presuming composite Property::Array... + if( OptionalMatrix v = IsMatrix( node ) ) { value = *v; done = true; } - } - else - { - value = Property::Value(Property::ARRAY); - Property::Array* array = value.GetArray(); - - if( array ) + else if( OptionalMatrix3 v = IsMatrix3( node ) ) { - for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter) - { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) - { - array->PushBack( childValue ); - done = true; - } - } + value = *v; + done = true; } - } - } - - if(!done) - { - // presume an array or map - // container of size 1 - TreeNode::ConstIterator iter = node.CBegin(); - - // its seems legal with current json parser for a map to have an empty key - // but here we take that to mean the structure is a list - if( ((*iter).first) == 0 ) - { - value = Property::Value(Property::ARRAY); - Property::Array* array = value.GetArray(); - - if( array ) + else if( OptionalVector4 v = IsVector4( node ) ) { - for(unsigned int i = 0; i < node.Size(); ++i, ++iter) - { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) - { - array->PushBack( childValue ); - done = true; - } - } + value = *v; + done = true; } - } - else - { - value = Property::Value(Property::MAP); - Property::Map* map = value.GetMap(); - - if( map ) + else if( OptionalVector3 v = IsVector3( node ) ) { - for(unsigned int i = 0; i < node.Size(); ++i, ++iter) + value = *v; + done = true; + } + else if( OptionalVector2 v = IsVector2( node ) ) + { + value = *v; + done = true; + } + else if( 4 == node.Size() ) + { + if( OptionalVector4 v = IsVector4( node ) ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) - { - map->Insert( (*iter).first, childValue ); - done = true; - } + value = *v; + done = true; } } } - } // if!done + } } // if node.size() - else // if( 0 == node.size() ) + else if( ( nodeType != TreeNode::OBJECT ) && ( nodeType != TreeNode::ARRAY ) ) { // no children so either one of bool, float, integer, string - OptionalBoolean aBool = replacer.IsBoolean(node); - OptionalInteger anInt = replacer.IsInteger(node); - OptionalFloat aFloat = replacer.IsFloat(node); - OptionalString aString = replacer.IsString(node); + OptionalBoolean aBool = replacer.IsBoolean( node ); + OptionalInteger anInt = replacer.IsInteger( node ); + OptionalFloat aFloat = replacer.IsFloat( node ); + OptionalString aString = replacer.IsString( node ); - if(aBool) + if( aBool ) { // a bool is also an int but here we presume int - if(anInt) + if( anInt ) { value = *anInt; - done = true; } else { value = *aBool; - done = true; } } else @@ -582,31 +507,71 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, // {"value":"123"} // {"value":123} // This means we can't have a string with purely numeric content without disambiguation. - if(aFloat) + if( aFloat ) { value = *aFloat; - done = true; } - else if(anInt) + else if( anInt ) { value = *anInt; - done = true; } else { // string always succeeds with the current json parser so its last value = *aString; - done = true; } - } // if aBool + done = true; } // if( node.size() ) - } // if Disambiguated() + // If we have not created a value so far, attempt to create a Map or Array. + if( !done ) + { + // We are guaranteed to have at least one entry as this has been checked already. + TreeConstIter containerIterator = node.CBegin(); + TreeConstIter containerEnd = node.CEnd(); - return done; -} // bool SetPropertyFromNode( const TreeNode& node, Property::Value& value ) + // The TreeNode::OBJECT type implies a Property::Map. + if( nodeType == TreeNode::OBJECT ) + { + // We have a key, treat container as a Map. + value = Property::Value( Property::MAP ); + Property::Map* map = value.GetMap(); + + if( map ) + { + // Iterate through container to add all entries. + for( ; containerIterator != containerEnd; ++containerIterator ) + { + Property::Value childValue; + DeterminePropertyFromNode( ( *containerIterator ).second, childValue, replacer ); + map->Insert( ( *containerIterator ).first, childValue ); + } + } + } + else + { + // We don't have a key, treat container as an array. + // Note: We don't check if the node type is array here, as we want to cope with unknowns by creating an array also. + // This is the fall-back if no other types could be created. + value = Property::Value( Property::ARRAY ); + Property::Array* array = value.GetArray(); + + if( array ) + { + // Iterate through container to add all entries. + for( ; containerIterator != containerEnd; ++containerIterator ) + { + Property::Value childValue; + DeterminePropertyFromNode( ( *containerIterator ).second, childValue, replacer ); + array->PushBack( childValue ); + } + } + } + } // if !done + } // if !Disambiguated() +} } // namespace Internal diff --git a/dali-toolkit/internal/builder/builder-signals.cpp b/dali-toolkit/internal/builder/builder-signals.cpp index ed22ef3..55809bd 100644 --- a/dali-toolkit/internal/builder/builder-signals.cpp +++ b/dali-toolkit/internal/builder/builder-signals.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * 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. @@ -35,7 +35,7 @@ namespace Toolkit namespace Internal { extern Animation CreateAnimation( const TreeNode& child, Dali::Toolkit::Internal::Builder* const builder ); -extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value ); +extern bool DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ); } } } @@ -342,7 +342,7 @@ Property::Value GetPropertyValue(const TreeNode &child) if(0 == nChildren) { // cast away unused return for static analyzers - static_cast( Dali::Toolkit::Internal::SetPropertyFromNode( child, ret ) ); + static_cast( Dali::Toolkit::Internal::DeterminePropertyFromNode( child, ret ) ); } else if(1 == nChildren) { @@ -484,10 +484,7 @@ void SetActionOnSignal(const TreeNode &root, const TreeNode &child, Actor actor, action.actorName = *actorName; action.propertyName = *propertyName; // actor may not exist yet so we can't check the property type - if( !Dali::Toolkit::Internal::SetPropertyFromNode( *valueChild, action.value ) ) - { - DALI_SCRIPT_WARNING("Cannot set property for set property action\n"); - } + Dali::Toolkit::Internal::DeterminePropertyFromNode( *valueChild, action.value ); connector.Connect( action ); } else diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index c19b920..61388ac 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -355,7 +355,8 @@ void TextSelectionPopup::RaiseAbove( Layer target ) void TextSelectionPopup::ShowPopup() { - if ( !mPopupShowing || mButtonsChanged ) + if( ( !mPopupShowing || mButtonsChanged ) && + ( Toolkit::TextSelectionPopup::NONE != mEnabledButtons ) ) { Actor self = Self(); AddPopupOptionsToToolbar( mShowIcons, mShowCaptions ); diff --git a/dali-toolkit/public-api/accessibility-manager/accessibility-manager.h b/dali-toolkit/public-api/accessibility-manager/accessibility-manager.h index 1deee33..59ec876 100644 --- a/dali-toolkit/public-api/accessibility-manager/accessibility-manager.h +++ b/dali-toolkit/public-api/accessibility-manager/accessibility-manager.h @@ -54,6 +54,7 @@ class AccessibilityManager; * | focusChanged | @ref FocusChangedSignal() | * | focusOvershot | @ref FocusOvershotSignal() | * | focusedActorActivated | @ref FocusedActorActivatedSignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API AccessibilityManager : public BaseHandle { @@ -66,30 +67,32 @@ public: * * The connected signal callback should return true if handled. */ - typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType; ///< Generic signal type - typedef Signal< bool ( AccessibilityManager&, const Dali::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type + typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType; ///< Generic signal type @SINCE_1_0.0 + typedef Signal< bool ( AccessibilityManager&, const Dali::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0 /** * @brief Accessibility needs four information which will be read by screen-reader. * * Reading order : Label -> Trait -> Optional (Value and Hint) + * @SINCE_1_0.0 */ enum AccessibilityAttribute { - ACCESSIBILITY_LABEL = 0, ///< Simple text which contained in ui-control - ACCESSIBILITY_TRAIT, ///< Description of ui-control trait - ACCESSIBILITY_VALUE, ///< Current value of ui-control (Optional) - ACCESSIBILITY_HINT, ///< Hint for action (Optional) - ACCESSIBILITY_ATTRIBUTE_NUM ///< Number of attributes + ACCESSIBILITY_LABEL = 0, ///< Simple text which contained in ui-control @SINCE_1_0.0 + ACCESSIBILITY_TRAIT, ///< Description of ui-control trait @SINCE_1_0.0 + ACCESSIBILITY_VALUE, ///< Current value of ui-control (Optional) @SINCE_1_0.0 + ACCESSIBILITY_HINT, ///< Hint for action (Optional) @SINCE_1_0.0 + ACCESSIBILITY_ATTRIBUTE_NUM ///< Number of attributes @SINCE_1_0.0 }; /** * @brief Overshoot direction. + * @SINCE_1_0.0 */ enum FocusOvershotDirection { - OVERSHOT_PREVIOUS = -1, ///< Try to move previous of the first actor - OVERSHOT_NEXT = 1, ///< Try to move next of the last actor + OVERSHOT_PREVIOUS = -1, ///< Try to move previous of the first actor @SINCE_1_0.0 + OVERSHOT_NEXT = 1, ///< Try to move next of the last actor @SINCE_1_0.0 }; public: @@ -107,6 +110,7 @@ public: * @brief Create a AccessibilityManager handle; this can be initialised with AccessibilityManager::New(). * * Calling member functions with an uninitialised handle is not allowed. + * @SINCE_1_0.0 */ AccessibilityManager(); @@ -114,12 +118,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~AccessibilityManager(); /** * @brief Get the singleton of AccessibilityManager object. * + * @SINCE_1_0.0 * @return A handle to the AccessibilityManager control. */ static AccessibilityManager Get(); @@ -127,22 +133,24 @@ public: /** * @brief Set the information of the specified actor's accessibility attribute. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor the text to be set with * @param type The attribute type the text to be set with * @param text The text for the actor's accessibility information + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ void SetAccessibilityAttribute(Actor actor, AccessibilityAttribute type, const std::string& text); /** * @brief Get the text of the specified actor's accessibility attribute. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be queried * @param type The attribute type to be queried * @return The text of the actor's accessibility information + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ std::string GetAccessibilityAttribute(Actor actor, AccessibilityAttribute type) const; @@ -159,10 +167,11 @@ public: * description but with no focus order being set yet) and therefore * that actor is not focusable. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor the focus order to be set with * @param order The focus order of the actor + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ void SetFocusOrder(Actor actor, const unsigned int order); @@ -172,10 +181,11 @@ public: * When the focus order is 0, it means the focus order of the actor * is undefined. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be queried * @return The focus order of the actor + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ unsigned int GetFocusOrder(Actor actor) const; @@ -190,8 +200,9 @@ public: * 1 where FOLast is the focus order of the very last control in the * focus chain. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return The focus order of the actor + * @pre The AccessibilityManager has been initialized. */ unsigned int GenerateNewFocusOrder() const; @@ -201,11 +212,12 @@ public: * It will return an empty handle if the actor is not in the stage * or has a focus order of 0. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @param order The focus order of the actor * * @return The actor that has the specified focus order or an empty * handle if no actor in the stage has the specified focus order. + * @pre The AccessibilityManager has been initialized. */ Actor GetActorByFocusOrder(const unsigned int order); @@ -216,38 +228,42 @@ public: * have a defined focus order and must be focusable, visible and in * the stage. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be focused * @return Whether the focus is successful or not + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ bool SetCurrentFocusActor(Actor actor); /** * @brief Get the current focused actor. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return A handle to the current focused actor or an empty handle if no actor is focused. + * @pre The AccessibilityManager has been initialized. */ Actor GetCurrentFocusActor(); /** * @brief Get the focus group of current focused actor. * - * @pre The AccessibilityManager has been initialized. - * + * @SINCE_1_0.0 * @return A handle to the immediate parent of the current focused * actor which is also a focus group, or an empty handle if no actor * is focused. + * @pre The AccessibilityManager has been initialized. + * */ Actor GetCurrentFocusGroup(); /** * @brief Get the focus order of currently focused actor. - * @pre The AccessibilityManager has been initialized. - * + * @SINCE_1_0.0 * @return The focus order of the currently focused actor or 0 if no * actor is in focus. + * @pre The AccessibilityManager has been initialized. + * */ unsigned int GetCurrentFocusOrder(); @@ -258,8 +274,9 @@ public: * When the focus movement is wrapped around, the focus will be moved * to the first focusable actor when it reaches the end of the focus chain. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return true if the moving was successful + * @pre The AccessibilityManager has been initialized. */ bool MoveFocusForward(); @@ -271,8 +288,9 @@ public: * moved to the last focusable actor when it reaches the beginning * of the focus chain. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return true if the moving was successful + * @pre The AccessibilityManager has been initialized. */ bool MoveFocusBackward(); @@ -281,12 +299,14 @@ public: * that no actor is focused in the focus chain. * * It will emit focus changed signal without current focused actor + * @SINCE_1_0.0 * @pre The AccessibilityManager has been initialized. */ void ClearFocus(); /** * @brief Clear the every registered focusable actor from focus-manager. + * @SINCE_1_0.0 * @pre The AccessibilityManager has been initialized. */ void Reset(); @@ -295,20 +315,22 @@ public: * @brief Set whether an actor is a focus group that can limit the * scope of focus movement to its child actors in the focus chain. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be set as a focus group. * @param isFocusGroup Whether to set the actor to be a focus group or not. + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ void SetFocusGroup(Actor actor, bool isFocusGroup); /** * @brief Check whether the actor is set as a focus group or not. * - * @pre The AccessibilityManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be checked. * @return Whether the actor is set as a focus group. + * @pre The AccessibilityManager has been initialized. + * @pre The Actor has been initialized. */ bool IsFocusGroup(Actor actor) const; @@ -318,16 +340,18 @@ public: * When the group mode is enabled, the focus movement will be limited to the child actors * of the current focus group including the current focus group itself. The current focus * group is the closest ancestor of the current focused actor that set as a focus group. - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @param enabled Whether the group mode is enabled or not + * @pre The AccessibilityManager has been initialized. */ void SetGroupMode(bool enabled); /** * @brief Get whether the group mode is enabled or not. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return Whether the group mode is enabled or not. + * @pre The AccessibilityManager has been initialized. */ bool GetGroupMode() const; @@ -337,16 +361,18 @@ public: * * When both the wrap mode and the group mode are enabled, focus will be * wrapped within the current focus group. Focus will not be wrapped in default. - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @param wrapped Whether the focus movement is wrapped around or not + * @pre The AccessibilityManager has been initialized. */ void SetWrapMode(bool wrapped); /** * @brief Get whether the wrap mode is enabled or not. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return Whether the wrap mode is enabled or not. + * @pre The AccessibilityManager has been initialized. */ bool GetWrapMode() const; @@ -357,23 +383,26 @@ public: * AccessibilityManager and will be added to the focused actor as a * highlight. * + * @SINCE_1_0.0 + * @param indicator The indicator actor to be added * @pre The AccessibilityManager has been initialized. * @pre The indicator actor has been initialized. - * @param indicator The indicator actor to be added */ void SetFocusIndicatorActor(Actor indicator); /** * @brief Get the focus indicator actor. * - * @pre The AccessibilityManager has been initialized. + * @SINCE_1_0.0 * @return A handle to the focus indicator actor + * @pre The AccessibilityManager has been initialized. */ Actor GetFocusIndicatorActor(); /** * @brief Returns the closest ancestor of the given actor that is a focus group. * + * @SINCE_1_0.0 * @param actor The actor to be checked for its focus group * @return The focus group the given actor belongs to or an empty handle if the given actor doesn't belong to any focus group */ @@ -381,6 +410,7 @@ public: /** * @brief Returns the current position of the read action. + * @SINCE_1_0.0 * @return The current event position. */ Vector2 GetReadPosition() const; @@ -394,8 +424,9 @@ public: * @code * void YourCallbackName(Actor originalFocusedActor, Actor currentFocusedActor); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusChangedSignalType& FocusChangedSignal(); @@ -406,8 +437,9 @@ public: * @code * void YourCallbackName(Actor currentFocusedActor, FocusOvershotDirection direction); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusOvershotSignalType& FocusOvershotSignal(); @@ -418,8 +450,9 @@ public: * @code * void YourCallbackName(Actor activatedActor); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusedActorActivatedSignalType& FocusedActorActivatedSignal(); @@ -432,6 +465,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& StatusChangedSignal(); @@ -444,6 +478,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionNextSignal(); @@ -456,6 +491,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionPreviousSignal(); @@ -468,6 +504,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionActivateSignal(); @@ -480,6 +517,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadSignal(); @@ -492,6 +530,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionOverSignal(); @@ -504,6 +543,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadNextSignal(); @@ -516,6 +556,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadPreviousSignal(); @@ -528,6 +569,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionUpSignal(); @@ -540,6 +582,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionDownSignal(); @@ -552,6 +595,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionClearFocusSignal(); @@ -564,6 +608,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionBackSignal(); @@ -576,6 +621,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionScrollUpSignal(); @@ -588,6 +634,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionScrollDownSignal(); @@ -600,6 +647,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionPageLeftSignal(); @@ -612,6 +660,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionPageRightSignal(); @@ -624,6 +673,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionPageUpSignal(); @@ -636,6 +686,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionPageDownSignal(); @@ -648,6 +699,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionMoveToFirstSignal(); @@ -660,6 +712,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionMoveToLastSignal(); @@ -672,6 +725,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadFromTopSignal(); @@ -684,6 +738,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadFromNextSignal(); @@ -696,6 +751,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionZoomSignal(); @@ -708,6 +764,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadIndicatorInformationSignal(); @@ -720,6 +777,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionReadPauseResumeSignal(); @@ -732,6 +790,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionSignalType& ActionStartStopSignal(); @@ -744,6 +803,7 @@ public: * @code * bool YourCallback( AccessibilityManager& manager, const TouchEvent& event ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ AccessibilityActionScrollSignalType& ActionScrollSignal(); diff --git a/dali-toolkit/public-api/controls/alignment/alignment.h b/dali-toolkit/public-api/controls/alignment/alignment.h index a879c48..8f0e1d5 100644 --- a/dali-toolkit/public-api/controls/alignment/alignment.h +++ b/dali-toolkit/public-api/controls/alignment/alignment.h @@ -40,6 +40,7 @@ class Alignment; * @brief Alignment is a container which provides an easy way to align other actors inside its boundary. * * Additionaly it provides a scaling property to resize the contained actors @see Scaling. + * @SINCE_1_0.0 * @note The use of scaling property will override all constraints applied to actors. * * All actors added to an alignment are going to be set with the same anchor point and parent origin. And, if the scaling property is set to a value @@ -50,6 +51,7 @@ class DALI_IMPORT_API Alignment : public Control public: /** * @brief Different types of alignment. + * @SINCE_1_0.0 */ enum Type { @@ -63,24 +65,27 @@ public: /** * @brief Scaling determines how actors are scaled, to match the alignment's boundary. + * @SINCE_1_0.0 */ enum Scaling { - ScaleNone, ///< The original size is kept. - ScaleToFill, ///< Scale added actors to fill alignment's boundary. Aspect ratio is not maintained. - ScaleToFitKeepAspect, ///< Scale added actors to fit within the alignment's boundary. Aspect ratio is maintained. - ScaleToFillKeepAspect, ///< Scale added actors to fill the alignment's boundary. Aspect ratio is maintained, and the actor may exceed the alignment's boundary. - ShrinkToFit, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is not maintained - ShrinkToFitKeepAspect, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is maintained + ScaleNone, ///< The original size is kept. @SINCE_1_0.0 + ScaleToFill, ///< Scale added actors to fill alignment's boundary. Aspect ratio is not maintained. @SINCE_1_0.0 + ScaleToFitKeepAspect, ///< Scale added actors to fit within the alignment's boundary. Aspect ratio is maintained. @SINCE_1_0.0 + ScaleToFillKeepAspect, ///< Scale added actors to fill the alignment's boundary. Aspect ratio is maintained, and the actor may exceed the alignment's boundary. @SINCE_1_0.0 + ShrinkToFit, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is not maintained @SINCE_1_0.0 + ShrinkToFitKeepAspect, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is maintained @SINCE_1_0.0 }; /** * @brief Structure describing the padding values. + * @SINCE_1_0.0 */ struct Padding { /** * @brief Constructor + * @SINCE_1_0.0 */ Padding() : left( 0.f ), @@ -93,6 +98,7 @@ public: /** * @brief Constructor * + * @SINCE_1_0.0 * @param[in] l Left padding * @param[in] r Right padding * @param[in] t Top padding @@ -116,12 +122,14 @@ public: * @brief Create an Alignment handle; this can be initialised with Alignment::New(). * * Calling member functions with an uninitialised handle is not allowed. + * @SINCE_1_0.0 */ Alignment(); /** * @brief Creates an alignment control. * + * @SINCE_1_0.0 * @param [in] horizontal Specifies how to align actors horizontally. Could be HorizontalLeft, HorizontalCenter or HorizontalRight. By default HorizontalCenter. * @param [in] vertical Specifies how to align actors vertically. Could be VerticalTop, VerticalCenter or VerticalBottom. By default VerticalCenter. * @return A handle to the Alignment control. @@ -131,6 +139,7 @@ public: /** * @brief Copy constructor. Creates another handle that points to the same real object. * + * @SINCE_1_0.0 * @param[in] alignment Object to copy. */ Alignment(const Alignment& alignment); @@ -139,6 +148,7 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~Alignment(); @@ -148,6 +158,7 @@ public: * If handle points to a Alignment the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a Alignment or an uninitialized handle */ @@ -156,8 +167,9 @@ public: /** * @brief Sets the new alignment. By default ( HorizontalCenter | VerticalCenter ). * - * @note there should only be one horizontal and one vertical policy + * @SINCE_1_0.0 * @param [in] type The new alignment option. + * @note there should only be one horizontal and one vertical policy */ void SetAlignmentType( Type type ); @@ -173,6 +185,7 @@ public: * } * @endcode * + * @SINCE_1_0.0 * @return the alignment value. */ Type GetAlignmentType() const; @@ -180,22 +193,25 @@ public: /** * @brief Sets how added actors scale to fit the alignment's boundary. * - * @see Scaling. + * @SINCE_1_0.0 * @param[in] scaling The scaling property. + * @see Scaling. */ void SetScaling( Scaling scaling ); /** * @brief Retrieves the scaling property. * - * @see Scaling. + * @SINCE_1_0.0 * @return The scaling. + * @see Scaling. */ Scaling GetScaling() const; /** * @brief Set a padding value. * + * @SINCE_1_0.0 * @param [in] padding The left, right, top, bottom padding values. */ void SetPadding( const Padding& padding ); @@ -203,6 +219,7 @@ public: /** * @brief Get the padding values. * + * @SINCE_1_0.0 * @return The left, right, top, bottom padding values. */ const Padding& GetPadding() const; @@ -211,6 +228,7 @@ public: * @brief Assignment operator. * * Changes this handle to point to another real object. + * @SINCE_1_0.0 * @param[in] alignment Object to copy * @return A reference to this */ @@ -221,6 +239,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL Alignment( Internal::Alignment& implementation ); @@ -228,6 +247,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL Alignment( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/buttons/button.h b/dali-toolkit/public-api/controls/buttons/button.h index cce1c66..f486118 100644 --- a/dali-toolkit/public-api/controls/buttons/button.h +++ b/dali-toolkit/public-api/controls/buttons/button.h @@ -80,6 +80,7 @@ class Button; * | %Action Name | %Button method called | * |------------------|-----------------------------| * | buttonClick | %DoClickAction() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API Button : public Control { @@ -87,35 +88,37 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + 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 }; /** * @brief An enumeration of properties belonging to the Button class. + * @SINCE_1_0.0 */ struct Property { enum { - DISABLED = PROPERTY_START_INDEX, ///< name "disabled", @see SetDisabled(), type bool - AUTO_REPEATING, ///< name "autoRepeating", @see SetAutoRepeating(), type bool - INITIAL_AUTO_REPEATING_DELAY, ///< name "initialAutoRepeatingDelay", @see SetInitialAutoRepeatingDelay(), type float - NEXT_AUTO_REPEATING_DELAY, ///< name "nextAutoRepeatingDelay", @see SetNextAutoRepeatingDelay(), type float - TOGGLABLE, ///< name "togglable", @see SetTogglableButton(), type bool - SELECTED, ///< name "selected", @see SetSelected(), type bool - UNSELECTED_STATE_IMAGE, ///< name "unselectedStateImage", @see SetUnselectedImage(), type std::string - SELECTED_STATE_IMAGE, ///< name "selectedStateImage", @see SetSelectedImage(), type std::string - DISABLED_STATE_IMAGE, ///< name "disabledStateImage", @see SetDisabledImage(), type std::string - UNSELECTED_COLOR, ///< name "unselectedColor", type Vector4 - SELECTED_COLOR, ///< name "selectedColor", type Vector4 - LABEL, ///< name "label", type Property::Map + DISABLED = PROPERTY_START_INDEX, ///< name "disabled", @see SetDisabled(), type bool @SINCE_1_0.0 + AUTO_REPEATING, ///< name "autoRepeating", @see SetAutoRepeating(), type bool @SINCE_1_0.0 + INITIAL_AUTO_REPEATING_DELAY, ///< name "initialAutoRepeatingDelay", @see SetInitialAutoRepeatingDelay(), type float @SINCE_1_0.0 + NEXT_AUTO_REPEATING_DELAY, ///< name "nextAutoRepeatingDelay", @see SetNextAutoRepeatingDelay(), type float @SINCE_1_0.0 + TOGGLABLE, ///< name "togglable", @see SetTogglableButton(), type bool @SINCE_1_0.0 + SELECTED, ///< name "selected", @see SetSelected(), type bool @SINCE_1_0.0 + UNSELECTED_STATE_IMAGE, ///< name "unselectedStateImage", @see SetUnselectedImage(), type std::string @SINCE_1_0.0 + SELECTED_STATE_IMAGE, ///< name "selectedStateImage", @see SetSelectedImage(), type std::string @SINCE_1_0.0 + DISABLED_STATE_IMAGE, ///< name "disabledStateImage", @see SetDisabledImage(), type std::string @SINCE_1_0.0 + UNSELECTED_COLOR, ///< name "unselectedColor", type Vector4 @SINCE_1_0.0 + SELECTED_COLOR, ///< name "selectedColor", type Vector4 @SINCE_1_0.0 + LABEL, ///< name "label", type Property::Map @SINCE_1_0.0 // Deprecated properties: - LABEL_TEXT, ///< name "labelText", @see SetLabelText(), type std::string + LABEL_TEXT, ///< name "labelText", @see SetLabelText(), type std::string @SINCE_1_0.0 }; }; @@ -126,16 +129,19 @@ public: * * Only derived versions can be instantiated. Calling member * functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ Button(); /** * @brief Copy constructor. + * @SINCE_1_0.0 */ Button( const Button& button ); /** * @brief Assignment operator. + * @SINCE_1_0.0 */ Button& operator=( const Button& button ); @@ -145,6 +151,7 @@ public: * If handle points to a Button the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a Button or an uninitialized handle */ @@ -154,6 +161,7 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~Button(); @@ -162,11 +170,13 @@ public: * * No signals are emitted when the \e disabled property is set. * + * @SINCE_1_0.0 * @param[in] disabled property. */ void SetDisabled( bool disabled ); /** + * @SINCE_1_0.0 * @return \e true if the button is \e disabled. */ bool IsDisabled() const; @@ -177,11 +187,13 @@ public: * If the \e autorepeating property is set to \e true, then the \e togglable property is set to false * but no signal is emitted. * + * @SINCE_1_0.0 * @param[in] autoRepeating \e autorepeating property. */ void SetAutoRepeating( bool autoRepeating ); /** + * @SINCE_1_0.0 * @return \e true if the \e autorepeating property is set. */ bool IsAutoRepeating() const; @@ -191,12 +203,14 @@ public: * * By default this value is set to 0.15 seconds. * - * @pre initialAutoRepeatingDelay must be greater than zero. + * @SINCE_1_0.0 * @param[in] initialAutoRepeatingDelay in seconds. + * @pre initialAutoRepeatingDelay must be greater than zero. */ void SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay ); /** + * @SINCE_1_0.0 * @return the initial autorepeating delay in seconds. */ float GetInitialAutoRepeatingDelay() const; @@ -206,12 +220,14 @@ public: * * By default this value is set to 0.05 seconds. * - * @pre nextAutoRepeatingDelay must be greater than zero. + * @SINCE_1_0.0 * @param[in] nextAutoRepeatingDelay in seconds. + * @pre nextAutoRepeatingDelay must be greater than zero. */ void SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay ); /** + * @SINCE_1_0.0 * @return the next autorepeating delay in seconds. */ float GetNextAutoRepeatingDelay() const; @@ -221,27 +237,31 @@ public: * * If the \e togglable property is set to \e true, then the \e autorepeating property is set to false. * + * @SINCE_1_0.0 * @param[in] togglable property. */ void SetTogglableButton( bool togglable ); /** + * @SINCE_1_0.0 * @return \e true if the \e togglable property is set. */ bool IsTogglableButton() const; /** - * Sets the button as selected or unselected. + * @brief Sets the button as selected or unselected. * * \e togglable property must be set to \e true. * * Emits a Button::StateChangedSignal() signal. * + * @SINCE_1_0.0 * @param[in] selected property. */ void SetSelected( bool selected ); /** + * @SINCE_1_0.0 * @return \e true if the \e selected property is set and the button is togglable. */ bool IsSelected() const; @@ -249,6 +269,7 @@ public: /** * @brief Sets the animation time. * + * @SINCE_1_0.0 * @param[in] animationTime The animation time in seconds. */ void SetAnimationTime( float animationTime ); @@ -256,6 +277,7 @@ public: /** * @brief Retrieves button's animation time. * + * @SINCE_1_0.0 * @return The animation time in seconds. */ float GetAnimationTime() const; @@ -263,6 +285,7 @@ public: /** * @brief Sets the button's label. * + * @SINCE_1_0.0 * @param[in] label The label text. */ void SetLabelText( const std::string& label ); @@ -270,6 +293,7 @@ public: /** * @brief Gets the label. * + * @SINCE_1_0.0 * @return The label text. */ std::string GetLabelText() const; @@ -277,6 +301,7 @@ public: /** * @brief Sets the unselected button image. * + * @SINCE_1_0.0 * @param[in] filename The button image. */ void SetUnselectedImage( const std::string& filename ); @@ -284,6 +309,7 @@ public: /** * @brief Sets the background image. * + * @SINCE_1_0.0 * @param[in] filename The background image. */ void SetBackgroundImage( const std::string& filename ); @@ -291,6 +317,7 @@ public: /** * @brief Sets the selected image. * + * @SINCE_1_0.0 * @param[in] filename The selected image. */ void SetSelectedImage( const std::string& filename ); @@ -298,6 +325,7 @@ public: /** * @brief Sets the selected background image. * + * @SINCE_1_0.0 * @param[in] filename The selected background image. */ void SetSelectedBackgroundImage( const std::string& filename ); @@ -305,6 +333,7 @@ public: /** * @brief Sets the disabled background image. * + * @SINCE_1_0.0 * @param[in] filename The disabled background image. */ void SetDisabledBackgroundImage( const std::string& filename ); @@ -312,6 +341,7 @@ public: /** * @brief Sets the disabled button image. * + * @SINCE_1_0.0 * @param[in] filename The disabled button image. */ void SetDisabledImage( const std::string& filename ); @@ -319,6 +349,7 @@ public: /** * @brief Sets the disabled selected button image. * + * @SINCE_1_0.0 * @param[in] filename The disabled selected button image. */ void SetDisabledSelectedImage( const std::string& filename ); @@ -326,46 +357,51 @@ public: // Deprecated API /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the label with an actor. * + * @SINCE_1_0.0 * @param[in] label The actor to use as a label */ void SetLabel( Actor label ); /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the button image. * + * @SINCE_1_0.0 * @param[in] image The button image. */ void SetButtonImage( Image image ); /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the selected image. * + * @SINCE_1_0.0 * @param[in] image The selected image. */ void SetSelectedImage( Image image ); /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Gets the button image. * + * @SINCE_1_0.0 * @return An actor with the button image. */ Actor GetButtonImage() const; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Gets the selected image. * + * @SINCE_1_0.0 * @return An actor with the selected image. */ Actor GetSelectedImage() const; @@ -374,6 +410,7 @@ public: //Signals /** * @brief Button signal type + * @SINCE_1_0.0 */ typedef Signal< bool ( Button ) > ButtonSignalType; @@ -384,6 +421,7 @@ public: //Signals * @code * bool YourCallbackName( Button button ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ ButtonSignalType& PressedSignal(); @@ -395,6 +433,7 @@ public: //Signals * @code * bool YourCallbackName( Button button ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ ButtonSignalType& ReleasedSignal(); @@ -406,6 +445,7 @@ public: //Signals * @code * bool YourCallbackName( Button button ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ ButtonSignalType& ClickedSignal(); @@ -418,6 +458,7 @@ public: //Signals * @code * bool YourCallbackName( Button button ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ ButtonSignalType& StateChangedSignal(); @@ -427,6 +468,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL Button( Internal::Button& implementation ); @@ -434,6 +476,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL Button( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/buttons/check-box-button.h b/dali-toolkit/public-api/controls/buttons/check-box-button.h index 7a5e073..735bcfc 100644 --- a/dali-toolkit/public-api/controls/buttons/check-box-button.h +++ b/dali-toolkit/public-api/controls/buttons/check-box-button.h @@ -39,7 +39,7 @@ class CheckBoxButton; */ /** - * CheckBoxButton provides a check box button which user can check or uncheck. + * @brief CheckBoxButton provides a check box button which user can check or uncheck. * * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected. * @@ -53,24 +53,28 @@ class CheckBoxButton; * * CheckBoxButton doesn't have a text. However, a Dali::Toolkit::TableView with a Dali::TextActor or a Dali::Toolkit::TextView * and a CheckBoxButton could be used instead. + * @SINCE_1_0.0 */ class DALI_IMPORT_API CheckBoxButton : public Button { public: /** - * Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New() + * @brief Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New() * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ CheckBoxButton(); /** - * Copy constructor. + * @brief Copy constructor. + * @SINCE_1_0.0 */ CheckBoxButton( const CheckBoxButton& checkBox ); /** - * Assignment operator. + * @brief Assignment operator. + * @SINCE_1_0.0 */ CheckBoxButton& operator=( const CheckBoxButton& checkBox ); @@ -78,18 +82,21 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~CheckBoxButton(); /** - * Create an initialized CheckBoxButton. + * @brief Create an initialized CheckBoxButton. + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali resource. */ static CheckBoxButton New(); /** - * Downcast an Object handle to CheckBoxButton. If handle points to a CheckBoxButton the + * @brief Downcast an Object handle to CheckBoxButton. If handle points to a CheckBoxButton the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a CheckBoxButton or an uninitialized handle */ @@ -98,13 +105,15 @@ public: public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL CheckBoxButton( Internal::CheckBoxButton& implementation ); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/buttons/push-button.h b/dali-toolkit/public-api/controls/buttons/push-button.h index 48ad719..b772aa6 100644 --- a/dali-toolkit/public-api/controls/buttons/push-button.h +++ b/dali-toolkit/public-api/controls/buttons/push-button.h @@ -47,6 +47,7 @@ class PushButton; * and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button. * * See Button for more detail on signals and modifying appearance via properties. + * @SINCE_1_0.0 */ class DALI_IMPORT_API PushButton : public Button { @@ -54,25 +55,27 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Button::PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices + PROPERTY_START_INDEX = Button::PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices @SINCE_1_0.0 }; /** * @brief An enumeration of properties belonging to the PushButton class. + * @SINCE_1_0.0 */ struct Property { enum { - UNSELECTED_ICON = PROPERTY_START_INDEX, ///< Property, name "unselectedIcon", type std::string - SELECTED_ICON, ///< Property, name "selectedIcon", type std::string - ICON_ALIGNMENT, ///< Property, name "iconAlignment", type std::string - LABEL_PADDING, ///< Property, name "labelPadding", type Vector4 - ICON_PADDING, ///< Property, name "iconPadding", type Vector4 + UNSELECTED_ICON = PROPERTY_START_INDEX, ///< Property, name "unselectedIcon", type std::string @SINCE_1_0.0 + SELECTED_ICON, ///< Property, name "selectedIcon", type std::string @SINCE_1_0.0 + ICON_ALIGNMENT, ///< Property, name "iconAlignment", type std::string @SINCE_1_0.0 + LABEL_PADDING, ///< Property, name "labelPadding", type Vector4 @SINCE_1_0.0 + ICON_PADDING, ///< Property, name "iconPadding", type Vector4 @SINCE_1_0.0 }; }; @@ -82,16 +85,19 @@ public: * @brief Create an uninitialized PushButton; this can be initialized with PushButton::New(). * * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ PushButton(); /** * @brief Copy constructor. + * @SINCE_1_0.0 */ PushButton( const PushButton& pushButton ); /** * @brief Assignment operator. + * @SINCE_1_0.0 */ PushButton& operator=( const PushButton& pushButton ); @@ -99,12 +105,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~PushButton(); /** * @brief Create an initialized PushButton. * + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali resource. */ static PushButton New(); @@ -115,6 +123,7 @@ public: * If handle points to a PushButton the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a PushButton or an uninitialized handle */ @@ -126,10 +135,11 @@ public: using Button::SetButtonImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the unselected image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetButtonImage( Actor image ); @@ -137,10 +147,11 @@ public: using Button::SetBackgroundImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the background image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetBackgroundImage( Actor image ); @@ -148,10 +159,11 @@ public: using Button::SetSelectedImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the selected image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetSelectedImage( Actor image ); @@ -159,10 +171,11 @@ public: using Button::SetSelectedBackgroundImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the selected background image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetSelectedBackgroundImage( Actor image ); @@ -170,10 +183,11 @@ public: using Button::SetDisabledBackgroundImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the disabled background image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetDisabledBackgroundImage( Actor image ); @@ -181,10 +195,11 @@ public: using Button::SetDisabledImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the disabled image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetDisabledImage( Actor image ); @@ -192,10 +207,11 @@ public: using Button::SetDisabledSelectedImage; /** - * @deprecated DALi 1.0.50 + * @DEPRECATED_1_0.50 * * @brief Sets the disabled selected image with an Actor. * + * @SINCE_1_0.0 * @param[in] image The Actor to use. */ void SetDisabledSelectedImage( Actor image ); @@ -206,6 +222,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL PushButton( Internal::PushButton& implementation ); @@ -213,6 +230,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/buttons/radio-button.h b/dali-toolkit/public-api/controls/buttons/radio-button.h index e597ca1..f99afae 100644 --- a/dali-toolkit/public-api/controls/buttons/radio-button.h +++ b/dali-toolkit/public-api/controls/buttons/radio-button.h @@ -56,6 +56,7 @@ class RadioButton; * When \e selected RadioButton is set to \e unselected no other RadioButtons in his group is set to \e selected. * * A Button::StateChangedSignal() is emitted when the RadioButton change its state to \e selected or \e unselected. + * @SINCE_1_0.0 */ class DALI_IMPORT_API RadioButton: public Button { @@ -64,16 +65,19 @@ class DALI_IMPORT_API RadioButton: public Button * @brief Create an uninitialized RadioButton; this can be initialized with RadioButton::New(). * * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ RadioButton(); /** * @brief Copy constructor. + * @SINCE_1_0.0 */ RadioButton( const RadioButton& radioButton ); /** * @brief Assignment operator. + * @SINCE_1_0.0 */ RadioButton& operator=( const RadioButton& radioButton ); @@ -81,12 +85,14 @@ class DALI_IMPORT_API RadioButton: public Button * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~RadioButton(); /** * @brief Create an initialized RadioButton. * + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali resource. */ static RadioButton New(); @@ -94,6 +100,7 @@ class DALI_IMPORT_API RadioButton: public Button /** * @brief Create an initialized RadioButton with given label. * + * @SINCE_1_0.0 * @param[in] label The button label. * * @return A handle to a newly allocated Dali resource. @@ -106,6 +113,7 @@ class DALI_IMPORT_API RadioButton: public Button * If handle points to a RadioButton the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a RadioButton or an uninitialized handle */ @@ -116,6 +124,7 @@ class DALI_IMPORT_API RadioButton: public Button /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL RadioButton( Internal::RadioButton& implementation ); @@ -123,6 +132,7 @@ class DALI_IMPORT_API RadioButton: public Button /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL RadioButton( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/control-depth-index-ranges.h b/dali-toolkit/public-api/controls/control-depth-index-ranges.h deleted file mode 100644 index d0f4187..0000000 --- a/dali-toolkit/public-api/controls/control-depth-index-ranges.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __DALI_TOOLKIT_CONTROL_DEPTH_INDEX_RANGES_H__ -#define __DALI_TOOLKIT_CONTROL_DEPTH_INDEX_RANGES_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. - * - */ - -// EXTERNAL INCLUDES -#include - -namespace Dali -{ -namespace Toolkit -{ -/** - * @addtogroup dali_toolkit_controls - * @{ - */ - -/** - * @deprecated DALi 1.1.16 - * - * @brief These depth indices should not be used. - */ -enum DepthIndexRanges -{ - BACKGROUND_DEPTH_INDEX = static_cast( -Dali::Layer::TREE_DEPTH_MULTIPLIER * 0.1f ), ///< @deprecated DALi 1.1.16 - CONTENT_DEPTH_INDEX = 0, ///< @deprecated DALi 1.1.16 - DECORATION_DEPTH_INDEX = static_cast( Dali::Layer::TREE_DEPTH_MULTIPLIER * 0.1f ) ///< @deprecated DALi 1.1.16 -}; - -/** - * @} - */ -} - -} - -#endif diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index aa86d6a..ba6315d 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -50,6 +50,7 @@ namespace Internal * It will provide some common functionality required by all controls. * Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will * be disconnected automatically when the control is destroyed. + * @SINCE_1_0.0 */ class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface { @@ -63,12 +64,14 @@ public: * @brief Create a new ControlImpl instance that does not require touch by default. * * If touch is required then the user can connect to this class' touch signal. + * @SINCE_1_0.0 * @return A handle to the ControlImpl instance. */ static Toolkit::Control New(); /** * @brief Virtual destructor. + * @SINCE_1_0.0 */ virtual ~Control(); @@ -104,6 +107,7 @@ public: /** * @brief Set the background with a property map. * + * @SINCE_1_0.0 * @param[in] map The background property map. */ void SetBackground(const Property::Map& map); @@ -122,6 +126,7 @@ public: * @code * EnableGestureDetection(Gesture::Type(Gesture::Pinch | Gesture::Tap | Gesture::Pan)); * @endcode + * @SINCE_1_0.0 * @param[in] type The gesture type(s) to enable. */ void EnableGestureDetection( Gesture::Type type ); @@ -130,6 +135,7 @@ public: * @brief Allows deriving classes to disable any of the gesture detectors. * * Like EnableGestureDetection, this can also be called using bitwise or. + * @SINCE_1_0.0 * @param[in] type The gesture type(s) to disable. * @see EnableGetureDetection */ @@ -140,6 +146,7 @@ public: * detection then they can access the gesture detector through this * API and modify the detection. * + * @SINCE_1_0.0 * @return The pinch gesture detector. * @pre Pinch detection should have been enabled via EnableGestureDetection(). * @see EnableGestureDetection @@ -151,6 +158,7 @@ public: * detection then they can access the gesture detector through this * API and modify the detection. * + * @SINCE_1_0.0 * @return The pan gesture detector. * @pre Pan detection should have been enabled via EnableGestureDetection(). * @see EnableGestureDetection @@ -162,6 +170,7 @@ public: * detection then they can access the gesture detector through this * API and modify the detection. * + * @SINCE_1_0.0 * @return The tap gesture detector. * @pre Tap detection should have been enabled via EnableGestureDetection(). * @see EnableGestureDetection @@ -173,6 +182,7 @@ public: * detection then they can access the gesture detector through this * API and modify the detection. * + * @SINCE_1_0.0 * @return The long press gesture detector. * @pre Long press detection should have been enabled via EnableGestureDetection(). * @see EnableGestureDetection @@ -187,6 +197,7 @@ public: * keyboard focus movement between its child actors). * * The control doesn't support it by default. + * @SINCE_1_0.0 * @param[in] isSupported Whether this control supports two dimensional keyboard navigation. */ void SetKeyboardNavigationSupport( bool isSupported ); @@ -194,6 +205,7 @@ public: /** * @brief Gets whether this control supports two dimensional keyboard navigation. * + * @SINCE_1_0.0 * @return true if this control supports two dimensional keyboard navigation. */ bool IsKeyboardNavigationSupported(); @@ -222,6 +234,7 @@ public: * * (i.e. the scope of keyboard focus movement * can be limitied to its child actors). The control is not a focus group by default. + * @SINCE_1_0.0 * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation. */ void SetAsKeyboardFocusGroup( bool isFocusGroup ); @@ -229,17 +242,20 @@ public: /** * @brief Gets whether this control is a focus group for keyboard navigation. * + * @SINCE_1_0.0 * @return true if this control is set as a focus group for keyboard navigation. */ bool IsKeyboardFocusGroup(); /** * @brief Called by the AccessibilityManager to activate the Control. + * @SINCE_1_0.0 */ DALI_INTERNAL void AccessibilityActivate(); /** * @brief Called by the KeyboardFocusManager. + * @SINCE_1_0.0 */ DALI_INTERNAL void KeyboardEnter(); @@ -263,6 +279,7 @@ public: /** * @brief Called by the KeyInputFocusManager to emit key event signals. * + * @SINCE_1_0.0 * @param[in] event The key event. * @return True if the event was consumed. */ @@ -275,6 +292,7 @@ protected: // For derived classes to call * * Should be called last by the control after it acts on the Input Focus change. * + * @SINCE_1_0.0 * @param[in] focusGained True if gained, False if lost */ void EmitKeyInputFocusSignal( bool focusGained ); @@ -383,8 +401,8 @@ protected: // Helpers for deriving classes // Flags for the constructor enum ControlBehaviour { - REQUIRES_STYLE_CHANGE_SIGNALS = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 0 ), ///< True if needs to monitor style change signals such as theme/font change - REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 1 ), ///< True if needs to support keyboard navigation + REQUIRES_STYLE_CHANGE_SIGNALS = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 0 ), ///< True if needs to monitor style change signals such as theme/font change @SINCE_1_0.0 + REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 1 ), ///< True if needs to support keyboard navigation @SINCE_1_0.0 LAST_CONTROL_BEHAVIOUR_FLAG }; @@ -394,12 +412,14 @@ protected: // Helpers for deriving classes /** * @brief Control constructor * + * @SINCE_1_0.0 * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum */ Control( ControlBehaviour behaviourFlags ); /** * @brief Second phase initialization. + * @SINCE_1_0.0 */ void Initialize(); @@ -411,6 +431,7 @@ public: // API for derived classes to override * @brief This method is called after the Control has been initialized. * * Derived classes should do any second phase initialization by overriding this method. + * @SINCE_1_0.0 */ virtual void OnInitialize(); @@ -419,6 +440,7 @@ public: // API for derived classes to override * * Could be overridden by derived classes. * + * @SINCE_1_0.0 * @param[in] child The added actor. */ virtual void OnControlChildAdd( Actor& child ); @@ -428,6 +450,7 @@ public: // API for derived classes to override * * Could be overridden by derived classes. * + * @SINCE_1_0.0 * @param[in] child The removed actor. */ virtual void OnControlChildRemove( Actor& child ); @@ -437,6 +460,7 @@ public: // API for derived classes to override /** * @brief This method should be overridden by deriving classes requiring notifications when the style changes. * + * @SINCE_1_0.0 * @param[in] styleManager The StyleManager object. * @param[in] change Information denoting what has changed. */ @@ -448,6 +472,7 @@ public: // API for derived classes to override * @brief This method is called when the control is accessibility activated. * * Derived classes should override this to perform custom accessibility activation. + * @SINCE_1_0.0 * @return true if this control can perform accessibility activation. */ virtual bool OnAccessibilityActivated(); @@ -456,6 +481,7 @@ public: // API for derived classes to override * @brief This method should be overridden by deriving classes when they wish to respond the accessibility * pan gesture. * + * @SINCE_1_0.0 * @param[in] gesture The pan gesture. * @return true if the pan gesture has been consumed by this control */ @@ -465,6 +491,7 @@ public: // API for derived classes to override * @brief This method should be overridden by deriving classes when they wish to respond the accessibility * touch event. * + * @SINCE_1_0.0 * @param[in] touchEvent The touch event. * @return true if the touch event has been consumed by this control */ @@ -474,6 +501,7 @@ public: // API for derived classes to override * @brief This method should be overridden by deriving classes when they wish to respond * the accessibility up and down action (i.e. value change of slider control). * + * @SINCE_1_0.0 * @param[in] isIncrease Whether the value should be increased or decreased * @return true if the value changed action has been consumed by this control */ @@ -483,6 +511,7 @@ public: // API for derived classes to override * @brief This method should be overridden by deriving classes when they wish to respond * the accessibility zoom action * + * @SINCE_1_0.0 * @return true if the zoom action has been consumed by this control */ virtual bool OnAccessibilityZoom(); @@ -493,6 +522,7 @@ public: // API for derived classes to override * @brief Called when the control gains key input focus. * * Should be overridden by derived classes if they need to customize what happens when focus is gained. + * @SINCE_1_0.0 */ virtual void OnKeyInputFocusGained(); @@ -500,6 +530,7 @@ public: // API for derived classes to override * @brief Called when the control loses key input focus. * * Should be overridden by derived classes if they need to customize what happens when focus is lost. + * @SINCE_1_0.0 */ virtual void OnKeyInputFocusLost(); @@ -507,6 +538,7 @@ public: // API for derived classes to override * @brief Gets the next keyboard focusable actor in this control towards the given direction. * * A control needs to override this function in order to support two dimensional keyboard navigation. + * @SINCE_1_0.0 * @param[in] currentFocusedActor The current focused actor. * @param[in] direction The direction to move the focus towards. * @param[in] loopEnabled Whether the focus movement should be looped within the control. @@ -520,6 +552,7 @@ public: // API for derived classes to override * This allows the application to preform any actions if wishes * before the focus is actually moved to the chosen actor. * + * @SINCE_1_0.0 * @param[in] commitedFocusableActor The commited focusable actor. */ virtual void OnKeyboardFocusChangeCommitted( Actor commitedFocusableActor ); @@ -528,6 +561,7 @@ public: // API for derived classes to override * @brief This method is called when the control has enter pressed on it. * * Derived classes should override this to perform custom actions. + * @SINCE_1_0.0 * @return true if this control supported this action. */ virtual bool OnKeyboardEnter(); @@ -541,9 +575,10 @@ public: // API for derived classes to override * is enabled. The default behaviour is to scale the control by the * pinch scale. * + * @SINCE_1_0.0 + * @param[in] pinch The pinch gesture. * @note If overridden, then the default behaviour will not occur. * @note Pinch detection should be enabled via EnableGestureDetection(). - * @param[in] pinch The pinch gesture. * @see EnableGestureDetection */ virtual void OnPinch( const PinchGesture& pinch ); @@ -554,9 +589,10 @@ public: // API for derived classes to override * This should be overridden by deriving classes when pan detection * is enabled. * + * @SINCE_1_0.0 + * @param[in] pan The pan gesture. * @note There is no default behaviour with panning. * @note Pan detection should be enabled via EnableGestureDetection(). - * @param[in] pan The pan gesture. * @see EnableGestureDetection */ virtual void OnPan( const PanGesture& pan ); @@ -567,9 +603,10 @@ public: // API for derived classes to override * This should be overridden by deriving classes when tap detection * is enabled. * + * @SINCE_1_0.0 + * @param[in] tap The tap gesture. * @note There is no default behaviour with a tap. * @note Tap detection should be enabled via EnableGestureDetection(). - * @param[in] tap The tap gesture. * @see EnableGestureDetection */ virtual void OnTap( const TapGesture& tap ); @@ -580,9 +617,10 @@ public: // API for derived classes to override * This should be overridden by deriving classes when long press * detection is enabled. * + * @SINCE_1_0.0 + * @param[in] longPress The long press gesture. * @note There is no default behaviour associated with a long press. * @note Long press detection should be enabled via EnableGestureDetection(). - * @param[in] longPress The long press gesture. * @see EnableGestureDetection */ virtual void OnLongPress( const LongPressGesture& longPress ); @@ -600,8 +638,9 @@ public: // API for derived classes to override virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback ); /** - * Retrieve the extension for this control + * @brief Retrieve the extension for this control * + * @SINCE_1_0.0 * @return The extension if available, NULL otherwise */ virtual Extension* GetControlExtension() @@ -623,18 +662,20 @@ private: /** * @brief Get implementation from the handle * - * @pre handle is initialized and points to a control + * @SINCE_1_0.0 * @param handle * @return implementation + * @pre handle is initialized and points to a control */ DALI_IMPORT_API Internal::Control& GetImplementation( Dali::Toolkit::Control& handle ); /** * @brief Get implementation from the handle * - * @pre handle is initialized and points to a control + * @SINCE_1_0.0 * @param handle * @return implementation + * @pre handle is initialized and points to a control */ DALI_IMPORT_API const Internal::Control& GetImplementation( const Dali::Toolkit::Control& handle ); diff --git a/dali-toolkit/public-api/controls/control.h b/dali-toolkit/public-api/controls/control.h index 76f646f..3bada38 100644 --- a/dali-toolkit/public-api/controls/control.h +++ b/dali-toolkit/public-api/controls/control.h @@ -49,6 +49,7 @@ class Control; * @brief Control is the base class for all controls. * * The implementation of the control must be supplied; see Internal::Control for more details. + * @SINCE_1_0.0 * @see Internal::Control * * Signals @@ -73,40 +74,68 @@ public: /** * @brief The start and end property ranges for control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX, ///< Start index is used by the property registration macro. - CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX, ///< Start index of Control properties. - CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices. + PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX, ///< Start index is used by the property registration macro. @SINCE_1_0.0 + CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX, ///< Start index of Control properties. @SINCE_1_0.0 + CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices. @SINCE_1_0.0 }; /** * @brief An enumeration of properties belonging to the Control class. + * @SINCE_1_0.0 */ struct Property { enum { - STYLE_NAME = PROPERTY_START_INDEX, ///< name "styleName", @see SetStyleName, type std::string - BACKGROUND_COLOR, ///< name "background-color", @deprecated DALi 1.1.3 mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4 - BACKGROUND_IMAGE, ///< name "background-image", @deprecated DALi 1.1.3 mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map - KEY_INPUT_FOCUS, ///< name "keyInputFocus", @see SetKeyInputFocus, type bool - BACKGROUND, ///< name "background", @since DALi 1.1.3 mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map + /** + * @brief name "styleName", type std::string + * @SINCE_1_0.0 + * @see SetStyleName + */ + STYLE_NAME = PROPERTY_START_INDEX, + /** + * @DEPRECATED_1_1.3 + * @brief name "background-color", mutually exclusive with BACKGROUND_IMAGE & BACKGROUND, type Vector4 + * @SINCE_1_0.0 + * @see SetStyleName + */ + BACKGROUND_COLOR, + /** + * @DEPRECATED_1_1.3 + * @brief name "background-image", mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map + * @SINCE_1_0.0 + */ + BACKGROUND_IMAGE, + /** + * @brief name "keyInputFocus", type bool + * @SINCE_1_0.0 + * @see SetKeyInputFocus + */ + KEY_INPUT_FOCUS, + /** + * @brief name "background", mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map + * @SINCE_1_1.3 + */ + BACKGROUND, }; }; /** * @brief Describes the direction to move the keyboard focus towards. + * @SINCE_1_0.0 */ struct KeyboardFocus { enum Direction { - LEFT, ///< Move keyboard focus towards the left direction - RIGHT, ///< Move keyboard focus towards the right direction - UP, ///< Move keyboard focus towards the up direction - DOWN ///< Move keyboard focus towards the down direction + LEFT, ///< Move keyboard focus towards the left direction @SINCE_1_0.0 + RIGHT, ///< Move keyboard focus towards the right direction @SINCE_1_0.0 + UP, ///< Move keyboard focus towards the up direction @SINCE_1_0.0 + DOWN ///< Move keyboard focus towards the down direction @SINCE_1_0.0 }; }; @@ -123,6 +152,7 @@ public: // Creation & Destruction /** * @brief Create a new instance of a Control. * + * @SINCE_1_0.0 * @return A handle to a new Control. */ static Control New(); @@ -132,6 +162,7 @@ public: // Creation & Destruction * * Only derived versions can be instantiated. Calling member * functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ Control(); @@ -139,6 +170,7 @@ public: // Creation & Destruction * @brief Copy constructor. * * Creates another handle that points to the same real object + * @SINCE_1_0.0 * @param[in] uiControl Handle to copy */ Control(const Control& uiControl); @@ -147,6 +179,7 @@ public: // Creation & Destruction * @brief Dali::Control is intended as a base class * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~Control(); @@ -156,6 +189,7 @@ public: // operators * @brief Assignment operator. * * Changes this handle to point to another real object + * @SINCE_1_0.0 * @param[in] handle Object to assign this to * @return reference to this */ @@ -169,6 +203,7 @@ public: * If handle points to a Control the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a Control or an uninitialized handle */ @@ -180,9 +215,10 @@ public: * @brief This sets the control to receive key events. * * The key event can originate from a virtual or physical keyboard. + * @SINCE_1_0.0 + * @return True if the control has foucs, False otherwise. * @pre The Control has been initialized. * @pre The Control should be on the stage before setting keyboard focus. - * @return True if the control has foucs, False otherwise. */ void SetKeyInputFocus(); @@ -194,9 +230,10 @@ public: * unhandled events to the controls below in the stack. A control in the stack will regain key input focus when there are no more * controls above it in the focus stack. * To query for the conrol which is on top of the focus stack use Dali::Toolkit::KeyInputFocusManager::GetCurrentKeyboardFocusActor() + * @SINCE_1_0.0 + * @return true if this control has keyboard input focus * @pre The Control has been initialized. * @pre The Control should be on the stage before setting keyboard focus. - * @return true if this control has keyboard input focus */ bool HasKeyInputFocus(); @@ -204,6 +241,7 @@ public: * @brief Once an actor is Set to receive key input focus this function is called to stop it receiving key events. * * A check is performed to ensure it was previously set, if this check fails then nothing is done. + * @SINCE_1_0.0 * @pre The Actor has been initialized. */ void ClearKeyInputFocus(); @@ -213,6 +251,7 @@ public: /** * @brief Retrieves the pinch gesture detector of the control. * + * @SINCE_1_0.0 * @return The pinch gesture detector. * @note Will return an empty handle if the control does not handle the gesture itself. */ @@ -221,6 +260,7 @@ public: /** * @brief Retrieves the pan gesture detector of the control. * + * @SINCE_1_0.0 * @return The pan gesture detector. * @note Will return an empty handle if the control does not handle the gesture itself. */ @@ -229,6 +269,7 @@ public: /** * @brief Retrieves the tap gesture detector of the control. * + * @SINCE_1_0.0 * @return The tap gesture detector. * @note Will return an empty handle if the control does not handle the gesture itself. */ @@ -237,6 +278,7 @@ public: /** * @brief Retrieves the long press gesture detector of the control. * + * @SINCE_1_0.0 * @return The long press gesture detector. * @note Will return an empty handle if the control does not handle the gesture itself. */ @@ -247,13 +289,14 @@ public: /** * @brief Sets the name of the style to be applied to the control. * + * @SINCE_1_0.0 * @param[in] styleName A string matching a style described in a stylesheet. */ void SetStyleName( const std::string& styleName ); /** * @brief Retrieves the name of the style to be applied to the control (if any). - * + * @SINCE_1_0.0 * @return A string matching a style or an empty string. */ const std::string& GetStyleName() const; @@ -263,19 +306,21 @@ public: /** * @brief Sets the background color of the control. * - * @note if SetBackgroundImage is called later, this background color is removed. - * + * @SINCE_1_0.0 * @param[in] color The required background color of the control * + * @note if SetBackgroundImage is called later, this background color is removed. + * * @note The background color fully blends with the actor color. */ void SetBackgroundColor( const Vector4& color ); /** - * @brief Retrieves the background color of the control. + * @DEPRECATED_1_1.3 * - * @deprecated DALi 1.1.3 API removed. + * @brief Retrieves the background color of the control. * + * @SINCE_1_0.0 * @return The background color of the control. */ Vector4 GetBackgroundColor() const; @@ -283,12 +328,14 @@ public: /** * @brief Sets an image as the background of the control. * + * @SINCE_1_0.0 * @param[in] image The image to set as the background. */ void SetBackgroundImage( Image image ); /** * @brief Clears the background. + * @SINCE_1_0.0 */ void ClearBackground(); @@ -303,8 +350,9 @@ public: * @endcode * The return value of True, indicates that the event should be consumed. * Otherwise the signal will be emitted on the next parent of the actor. - * @pre The Control has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Control has been initialized. */ KeyEventSignalType& KeyEventSignal(); @@ -317,8 +365,9 @@ public: * @endcode * The return value of True, indicates that the event should be consumed. * Otherwise the signal will be emitted on the next parent of the actor. - * @pre The Control has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Control has been initialized. */ KeyInputFocusSignalType& KeyInputFocusGainedSignal(); @@ -333,8 +382,9 @@ public: * @endcode * The return value of True, indicates that the event should be consumed. * Otherwise the signal will be emitted on the next parent of the actor. - * @pre The Control has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Control has been initialized. */ KeyInputFocusSignalType& KeyInputFocusLostSignal(); @@ -343,6 +393,7 @@ public: // Intended for control developers /** * @brief Create an initialised Control. * + * @SINCE_1_0.0 * @param[in] implementation The implementation for this control. * @return A handle to a newly allocated Dali resource. * @@ -354,6 +405,7 @@ public: // Intended for control developers * @brief This constructor is used by CustomActor within Dali core to create additional Control handles * using an Internal CustomActor pointer. * + * @SINCE_1_0.0 * @param [in] internal A pointer to a newly allocated Dali resource */ explicit Control(Dali::Internal::CustomActor* internal); @@ -365,6 +417,7 @@ public: // Templates for Deriving Classes * * @tparam T The handle class * @tparam I The implementation class + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return Handle to a class T or an uninitialized handle. * @see DownCast(BaseHandle) @@ -395,6 +448,7 @@ public: // Templates for Deriving Classes * implementation of their class. * * @tparam I The implementation class + * @SINCE_1_0.0 * @param[in] internal Pointer to the Internal::CustomActor */ template diff --git a/dali-toolkit/public-api/controls/default-controls/solid-color-actor.h b/dali-toolkit/public-api/controls/default-controls/solid-color-actor.h index 6c88108..b8fb26c 100644 --- a/dali-toolkit/public-api/controls/default-controls/solid-color-actor.h +++ b/dali-toolkit/public-api/controls/default-controls/solid-color-actor.h @@ -32,6 +32,7 @@ namespace Toolkit * * If the \e border parameter is set to \e true, the Dali::ImageActor's style is set to Dali::ImageActor::STYLE_NINE_PATCH. * + * @SINCE_1_0.0 * @param[in] color The ImageActor's color. * @param[in] border If \e true, a border is created. By default, the value is set to \e false. * @param[in] borderColor The color for the ImageActor's border. By default, the value is set to Color::WHITE. diff --git a/dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h b/dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h index 7ffdaca..1da50f6 100644 --- a/dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h +++ b/dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h @@ -53,7 +53,7 @@ class BloomView; */ /** - * + * @brief * GaussianBlurView is a class for applying a render process that blurs an image. * * Basic idea:- @@ -97,28 +97,33 @@ class BloomView; * // Stop rendering the GaussianBlurView\n * Stage::GetCurrent().Remove(gaussianBlurView);\n * gaussianBlurView.Deactivate();\n + * @SINCE_1_0.0 */ class DALI_IMPORT_API GaussianBlurView : public Control { public: /** - * Signal type for notifications + * @brief Signal type for notifications + * @SINCE_1_0.0 */ typedef Signal< void (GaussianBlurView source) > GaussianBlurViewSignal; /** - * Create an uninitialized GaussianBlurView; this can be initialized with GaussianBlurView::New() + * @brief Create an uninitialized GaussianBlurView; this can be initialized with GaussianBlurView::New() * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ GaussianBlurView(); /** - * Copy constructor. Creates another handle that points to the same real object + * @brief Copy constructor. Creates another handle that points to the same real object + * @SINCE_1_0.0 */ GaussianBlurView(const GaussianBlurView& handle); /** - * Assignment operator. Changes this handle to point to another real object + * @brief Assignment operator. Changes this handle to point to another real object + * @SINCE_1_0.0 */ GaussianBlurView& operator=(const GaussianBlurView& ZoomView); @@ -126,19 +131,21 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~GaussianBlurView(); /** - * Downcast an Object handle to GaussianBlurView. If handle points to a GaussianBlurView the + * @brief Downcast an Object handle to GaussianBlurView. If handle points to a GaussianBlurView the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a GaussianBlurView or an uninitialized handle */ static GaussianBlurView DownCast( BaseHandle handle ); /** - * Create an initialized GaussianBlurView, using default settings. The default settings are:-\n + * @brief Create an initialized GaussianBlurView, using default settings. The default settings are:-\n * * numSamples = 5\n * blurBellCurveWidth = 1.5\n @@ -146,12 +153,14 @@ public: * downsampleWidthScale = 0.5\n * downsampleHeightScale = 0.5\n * blurUserImage = false + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali resource */ static GaussianBlurView New(); /** - * Create an initialized GaussianBlurView. + * @brief Create an initialized GaussianBlurView. + * @SINCE_1_0.0 * @param numSamples The size of the Gaussian blur kernel (number of samples in horizontal / vertical blur directions). * @param blurBellCurveWidth The constant controlling the Gaussian function, must be > 0.0. Controls the width of the bell curve, i.e. the look of the blur and also indirectly * the amount of blurriness Smaller numbers for a tighter curve. Useful values in the range [0.5..3.0] - near the bottom of that range the curve is weighted heavily towards @@ -172,90 +181,101 @@ public: bool blurUserImage = false); /** - * Adds a child Actor to this Actor. + * @brief Adds a child Actor to this Actor. * NOTE! if the child already has a parent, it will be removed from old parent * and reparented to this actor. This may change childs position, color, shader effect, * scale etc as it now inherits them from this actor + * @SINCE_1_0.0 + * @param [in] child The child. * @pre This Actor (the parent) has been initialized. * @pre The child actor has been initialized. * @pre The child actor is not the same as the parent actor. * @pre The actor is not the Root actor - * @param [in] child The child. * @post The child will be referenced by its parent. This means that the child will be kept alive, * even if the handle passed into this method is reset or destroyed. */ void Add(Actor child); /** - * Removes a child Actor from this Actor. + * @brief Removes a child Actor from this Actor. * If the actor was not a child of this actor, this is a no-op. + * @SINCE_1_0.0 + * @param [in] child The child. * @pre This Actor (the parent) has been initialized. * @pre The child actor is not the same as the parent actor. - * @param [in] child The child. */ void Remove(Actor child); /** - * Start rendering the GaussianBlurView. Must be called after you Add() it to the stage. + * @brief Start rendering the GaussianBlurView. Must be called after you Add() it to the stage. + * @SINCE_1_0.0 */ void Activate(); /** - * Render the GaussianBlurView once. Must be called after you Add() it to the stage. + * @brief Render the GaussianBlurView once. Must be called after you Add() it to the stage. * Only works with a gaussian blur view created with blurUserImage = true. * Listen to the Finished signal to determine when the rendering has completed. + * @SINCE_1_0.0 */ void ActivateOnce(); /** - * Stop rendering the GaussianBlurView. Must be called after you Remove() it from the stage. + * @brief Stop rendering the GaussianBlurView. Must be called after you Remove() it from the stage. + * @SINCE_1_0.0 */ void Deactivate(); /** - * Sets a custom image to be blurred and a render target to receive the blurred result. If this is called the children of the GaussianBlurObject will not be rendered blurred, + * @brief Sets a custom image to be blurred and a render target to receive the blurred result. If this is called the children of the GaussianBlurObject will not be rendered blurred, * instead the inputImage will get blurred. * To retrieve the blurred image the user can either pass a handle on a render target they own as the second parameter to SetUserImageAndOutputRenderTarget( ... ), or they * can pass NULL for this parameter and instead call GetBlurredRenderTarget() which will return a handle on a render target created internally to the GaussianBlurView object. - * @pre This object was created with a New( ... ) call where the blurUserImage argument was set to true. If this was not the case an exception will be thrown. + * @SINCE_1_0.0 * @param inputImage The image that the user wishes to blur. * @param outputRenderTarget A render target to receive the blurred result. Passing NULL is allowed. See also GetBlurredRenderTarget(). + * @pre This object was created with a New( ... ) call where the blurUserImage argument was set to true. If this was not the case an exception will be thrown. */ void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget); /** - * Get the index of the property that can be used to fade the blur in / out. This is the overall strength of the blur. + * @brief Get the index of the property that can be used to fade the blur in / out. This is the overall strength of the blur. * User can use this to animate the blur. A value of 0.0 is zero blur and 1.0 is full blur. Default is 1.0. * Note that if you set the blur to 0.0, the result will be no blur BUT the internal rendering will still be happening. If you wish to turn the blur off, you should remove * the GaussianBlurView object from the stage also. + * @SINCE_1_0.0 * @return Index of the property that can be used to fade the blur in / out */ Dali::Property::Index GetBlurStrengthPropertyIndex() const; /** - * Get the final blurred image. + * @brief Get the final blurred image. * Use can call this function to get the blurred result as an image, to use as they wish. It is not necessary to call this unless you specifically require it. - * @pre The user must call Activate() before the render target will be returned. + * @SINCE_1_0.0 * @return A handle on the blurred image, contained in a render target. + * @pre The user must call Activate() before the render target will be returned. */ FrameBufferImage GetBlurredRenderTarget() const; /** - * Set background color for the view. The background will be filled with this color. + * @brief Set background color for the view. The background will be filled with this color. + * @SINCE_1_0.0 * @param[in] color The background color. */ void SetBackgroundColor( const Vector4& color ); /** - * Get the background color. + * @brief Get the background color. + * @SINCE_1_0.0 * @return The background color. */ Vector4 GetBackgroundColor() const; public: // Signals /** - * If ActivateOnce has been called, then connect to this signal to be notified when the + * @brief If ActivateOnce has been called, then connect to this signal to be notified when the * target actor has been rendered. + * @SINCE_1_0.0 * @return The Finished signal */ GaussianBlurViewSignal& FinishedSignal(); @@ -263,13 +283,15 @@ public: // Signals public: /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_0.0 * @param[in] implementation The UI Control implementation. */ DALI_INTERNAL GaussianBlurView( Internal::GaussianBlurView& implementation ); /** - * Allows the creation of this UI Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this UI Control from an Internal::CustomActor pointer. + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL GaussianBlurView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/image-view/image-view.h b/dali-toolkit/public-api/controls/image-view/image-view.h index 898fd3f..877ceef 100644 --- a/dali-toolkit/public-api/controls/image-view/image-view.h +++ b/dali-toolkit/public-api/controls/image-view/image-view.h @@ -40,38 +40,63 @@ class ImageView; */ /** - * * @brief ImageView is a class for displaying an Image. + * @SINCE_1_0.0 + * */ class DALI_IMPORT_API ImageView : public Control { public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices + 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 - ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @since DALi 1.1.18 - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices, @since DALi 1.1.18 + ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_1.18 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices, @SINCE_1_1.18 }; /** * @brief An enumeration of properties belonging to the ImageView class. + * @SINCE_1_0.0 */ struct Property { enum { // Event side properties - RESOURCE_URL = PROPERTY_START_INDEX, ///< name "resourceUrl", @deprecated DALi 1.1.16 Use IMAGE instead. type string - IMAGE, ///< name "image", @see SetImage(), type string if it is a url, map otherwise - PRE_MULTIPLIED_ALPHA, ///< name "preMultipliedAlpha", @since DALi 1.1.18 type Boolean @pre image must be initialized. + + /** + * @DEPRECATED_1_1.16. Use IMAGE instead. + * @brief name "resourceUrl", type string + * @SINCE_1_0.0 + */ + RESOURCE_URL = PROPERTY_START_INDEX, + /** + * @brief name "image", type string if it is a url, map otherwise + * @SINCE_1_0.0 + */ + IMAGE, + /** + * @brief name "preMultipliedAlpha", type Boolean + * @SINCE_1_1.18 + * @pre image must be initialized. + */ + PRE_MULTIPLIED_ALPHA, // Animatable properties - PIXEL_AREA = ANIMATABLE_PROPERTY_START_INDEX, ///< name "pixelArea", @since DALi 1.1.18 type Vector4, Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0]. + + + /** + * @brief name "pixelArea", type Vector4 + * @details Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0]. + * @SINCE_1_0.18 + */ + PIXEL_AREA = ANIMATABLE_PROPERTY_START_INDEX, }; }; @@ -79,12 +104,14 @@ public: /** * @brief Create an uninitialized ImageView. + * @SINCE_1_0.0 */ ImageView(); /** * @brief Create an initialized ImageView. * + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali ImageView. * * @note ImageView will not display anything. @@ -96,6 +123,7 @@ public: * * If the handle is empty, ImageView will not display anything. * + * @SINCE_1_0.0 * @param[in] image The Image to display. * @return A handle to a newly allocated ImageView. */ @@ -106,6 +134,7 @@ public: * * If the string is empty, ImageView will not display anything. * + * @SINCE_1_0.0 * @param[in] url The url of the image resource to display. * @return A handle to a newly allocated ImageView. */ @@ -116,8 +145,7 @@ public: * * If the string is empty, ImageView will not display anything. * - * @since DALi 1.1.10 - * + * @SINCE_1_1.10 * @param[in] url The url of the image resource to display. * @param [in] size The width and height to fit the loaded image to. * @return A handle to a newly allocated ImageView. @@ -132,12 +160,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~ImageView(); /** * @brief Copy constructor. * + * @SINCE_1_0.0 * @param[in] imageView ImageView to copy. The copied ImageView will point at the same implementation */ ImageView( const ImageView& imageView ); @@ -145,6 +175,7 @@ public: /** * @brief Assignment operator. * + * @SINCE_1_0.0 * @param[in] imageView The ImageView to assign from. * @return The updated ImageView. */ @@ -156,6 +187,7 @@ public: * If handle points to a ImageView the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a ImageView or an uninitialized handle */ @@ -165,6 +197,7 @@ public: * @brief Sets this ImageView from an Image * * If the handle is empty, ImageView will display nothing + * @SINCE_1_0.0 * @param[in] image The Image to display. */ void SetImage( Image image ); @@ -174,8 +207,7 @@ public: * * If the URL is empty, ImageView will not display anything. * - * @since DALi 1.1.4 - * + * @SINCE_1_1.4 * @param[in] url The Image resource to display. */ void SetImage( const std::string& url ); @@ -185,16 +217,17 @@ public: * * If the URL is empty, ImageView will not display anything. * - * @since DALi 1.1.10 - * + * @SINCE_1_1.10 * @param[in] url A URL to the image resource to display. * @param [in] size The width and height to fit the loaded image to. */ void SetImage( const std::string& url, ImageDimensions size ); /** - * @deprecated Gets the Image + * @DEPRECATED_1_1.4 + * @brief Gets the Image * + * @SINCE_1_0.0 * @return The Image currently set to this ImageView */ Image GetImage() const; @@ -204,6 +237,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The ImageView implementation. */ DALI_INTERNAL ImageView( Internal::ImageView& implementation ); @@ -211,6 +245,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this ImageView from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL ImageView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/model3d-view/model3d-view.h b/dali-toolkit/public-api/controls/model3d-view/model3d-view.h index e1ad741..536df51 100644 --- a/dali-toolkit/public-api/controls/model3d-view/model3d-view.h +++ b/dali-toolkit/public-api/controls/model3d-view/model3d-view.h @@ -37,7 +37,7 @@ class Model3dView; * All the geometry loaded with the control is automatically centered and scaled to fit * the size of all the other controls. So the max is (0.5,0.5) and the min is (-0.5,-0.5) * - * @since DALi 1.1.4 + * @SINCE_1_1.4 */ class DALI_IMPORT_API Model3dView : public Control { @@ -45,32 +45,34 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_1.4 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices + PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_1.4 - ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices + ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_1.4 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_1.4 }; /** * @brief An enumeration of properties belonging to the TextLabel class. + * @SINCE_1_1.4 */ struct Property { enum { - GEOMETRY_URL = PROPERTY_START_INDEX, ///< name "geometryUrl", The path to the geometry file, type STRING - MATERIAL_URL, ///< name "materialUrl", The path to the material file, type STRING - IMAGES_URL, ///< name "imagesUrl", The path to the images directory, type STRING - ILLUMINATION_TYPE, ///< name "illuminationType", The type of illumination, type INTEGER - TEXTURE0_URL, ///< name "texture0Url", The path to first texture, type STRING - TEXTURE1_URL, ///< name "texture1Url", The path to second texture, type STRING - TEXTURE2_URL, ///< name "texture2Url", The path to third texture, type STRING - - LIGHT_POSITION = ANIMATABLE_PROPERTY_START_INDEX ///< name "lightPosition", The coordinates of the light, type Vector3 + GEOMETRY_URL = PROPERTY_START_INDEX, ///< name "geometryUrl", The path to the geometry file, type STRING @SINCE_1_1.4 + MATERIAL_URL, ///< name "materialUrl", The path to the material file, type STRING @SINCE_1_1.4 + IMAGES_URL, ///< name "imagesUrl", The path to the images directory, type STRING @SINCE_1_1.4 + ILLUMINATION_TYPE, ///< name "illuminationType", The type of illumination, type INTEGER @SINCE_1_1.4 + TEXTURE0_URL, ///< name "texture0Url", The path to first texture, type STRING @SINCE_1_1.4 + TEXTURE1_URL, ///< name "texture1Url", The path to second texture, type STRING @SINCE_1_1.4 + TEXTURE2_URL, ///< name "texture2Url", The path to third texture, type STRING @SINCE_1_1.4 + + LIGHT_POSITION = ANIMATABLE_PROPERTY_START_INDEX ///< name "lightPosition", The coordinates of the light, type Vector3 @SINCE_1_1.4 }; }; @@ -85,6 +87,7 @@ public: /** * @brief Create a new instance of a Model3dView control. * + * @SINCE_1_1.4 * @return A handle to the new Model3dView control. */ static Model3dView New(); @@ -92,6 +95,7 @@ public: /** * @brief Create a new instance of a Model3dView control. * + * @SINCE_1_1.4 * @return A handle to the new Model3dView control. */ static Model3dView New( const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl ); @@ -102,6 +106,7 @@ public: * * Only derived versions can be instantiated. Calling member * functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_1.4 */ Model3dView(); @@ -109,16 +114,19 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_1.4 */ ~Model3dView(); /** * @brief Copy constructor. + * @SINCE_1_1.4 */ Model3dView( const Model3dView& model3dView ); /** * @brief Assignment operator. + * @SINCE_1_1.4 */ Model3dView& operator=( const Model3dView& model3dView ); @@ -128,6 +136,7 @@ public: * If handle points to a Model3dView the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_1.4 * @param[in] handle Handle to an object * @return handle to a Model3dView or an uninitialized handle */ @@ -138,6 +147,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_1.4 * @param[in] implementation The Control implementation. */ DALI_INTERNAL Model3dView( Internal::Model3dView& implementation ); @@ -145,6 +155,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_1.4 * @param[in] internal A pointer to the internal CustomActor. */ DALI_INTERNAL Model3dView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-factory.h b/dali-toolkit/public-api/controls/page-turn-view/page-factory.h index b236f04..99d036a 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-factory.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-factory.h @@ -28,28 +28,31 @@ namespace Toolkit { /** - * PageFactory is an abstract interface for providing image actors to PageTurnView + * @brief PageFactory is an abstract interface for providing image actors to PageTurnView * Each image actor is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1 * - * @since DALi 1.1.4 + * @SINCE_1_1.4 */ class DALI_IMPORT_API PageFactory { public: /** - * Virtual destructor + * @brief Virtual destructor + * @SINCE_1_1.4 */ virtual ~PageFactory(){}; /** - * Query the number of pages available from the factory. + * @brief Query the number of pages available from the factory. * The maximum available page has an ID of GetNumberOfPages()-1. + * @SINCE_1_1.4 */ virtual unsigned int GetNumberOfPages() = 0; /** - * Create an actor to represent the page content. + * @brief Create an actor to represent the page content. + * @SINCE_1_1.4 * @param[in] pageId The ID of the page to create. * @return An actor, or an uninitialized pointer if the ID is out of range. */ diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h index 37215a1..da8a4cd 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h @@ -34,24 +34,28 @@ class PageTurnLandscapeView; } /** - * PageTurnLandscapeView provides a page turn view in landscape mode + * @brief PageTurnLandscapeView provides a page turn view in landscape mode + * @SINCE_1_0.0 */ class DALI_IMPORT_API PageTurnLandscapeView : public PageTurnView { public: /** - * Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New() + * @brief Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New() * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ PageTurnLandscapeView(); /** - * Copy constructor. + * @brief Copy constructor. + * @SINCE_1_0.0 */ PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView ); /** - * Assignment operator. + * @brief Assignment operator. + * @SINCE_1_0.0 */ PageTurnLandscapeView& operator=( const PageTurnLandscapeView& pageTurnLandscapeView ); @@ -59,11 +63,13 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~PageTurnLandscapeView(); /** - * Create an initialized PageTurnLandscapeView control + * @brief Create an initialized PageTurnLandscapeView control + * @SINCE_1_0.0 * @param[in] pageFactory The factory which provides PageTurnView with pages. * @param[in] pageSize The size of the page * @return A handle to the PageTurnLandscapeView control. @@ -71,8 +77,9 @@ public: static PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& pageSize ); /** - * Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the + * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a PageTurnLandscapeView or an uninitialized handle */ @@ -81,13 +88,15 @@ public: public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation ); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL PageTurnLandscapeView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h index 1fac650..deab41e 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h @@ -34,26 +34,29 @@ class PageTurnPortraitView; } /** - * PageTurnLandscapeView provides a page turn view in portrait mode + * @brief PageTurnPortraitView provides a page turn view in portrait mode * - * @since DALi 1.1.4 + * @SINCE_1_1.4 */ class DALI_IMPORT_API PageTurnPortraitView : public PageTurnView { public: /** - * Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New() + * @brief Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New() * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_1.4 */ PageTurnPortraitView(); /** - * Copy constructor. + * @brief Copy constructor. + * @SINCE_1_1.4 */ PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView ); /** - * Assignment operator. + * @brief Assignment operator. + * @SINCE_1_1.4 */ PageTurnPortraitView& operator=( const PageTurnPortraitView& pageTurnPortraitView ); @@ -61,11 +64,13 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_1.4 */ ~PageTurnPortraitView(); /** - * Create an initialized PageTurnPortraitView control + * @brief Create an initialized PageTurnPortraitView control + * @SINCE_1_1.4 * @param[in] pageFactory The factory which provides PageTurnView with pages. * @param[in] pageSize The size of the page * @return A handle to the PageTurnPortraitView control. @@ -73,8 +78,9 @@ public: static PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& pageSize ); /** - * Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the + * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_1.4 * @param[in] handle Handle to an object * @return handle to a PageTurnPortraitView or an uninitialized handle */ @@ -83,13 +89,15 @@ public: public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_1.4 * @param[in] implementation The Control implementation. */ DALI_INTERNAL PageTurnPortraitView( Internal::PageTurnPortraitView& implementation ); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_1.4 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL PageTurnPortraitView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h index 3a0943c..42c8b48 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h @@ -61,7 +61,7 @@ class PageTurnView; * | pagePanStarted | @ref PagePanStartedSignal() | * | pagePanFinished | @ref PagePanFinishedSignal() | * - * @since DALi 1.1.4 + * @SINCE_1_1.4 */ class DALI_IMPORT_API PageTurnView : public Control { @@ -69,42 +69,46 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_1.4 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_1.4 }; struct Property { enum { - PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize", type Vector2 - CURRENT_PAGE_ID, ///< name "currentPageId", type Integer + PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize", type Vector2 @SINCE_1_1.4 + CURRENT_PAGE_ID, ///< name "currentPageId", type Integer @SINCE_1_1.4 /** * The two values are the major&minor radius (in pixels) to form an ellipse shape. * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow. */ - SPINE_SHADOW, ///< name "spineShadow", type Vector2 + SPINE_SHADOW, ///< name "spineShadow", type Vector2 @SINCE_1_1.4 }; }; /** - * Creates an empty PageTurnView handle. Only derived versions can be instantiated. + * @brief Creates an empty PageTurnView handle. Only derived versions can be instantiated. * Calling member function with an uninitialized handle is not allowed. + * @SINCE_1_1.4 */ PageTurnView(); /** - * Copy constructor. Creates another handle that points to the same real object + * @brief Copy constructor. Creates another handle that points to the same real object + * @SINCE_1_1.4 * @param[in] handle Handle to copy from */ PageTurnView( const PageTurnView& handle ); /** - * Assignment operator. Changes this handle to point to another real object + * @brief Assignment operator. Changes this handle to point to another real object + * @SINCE_1_1.4 */ PageTurnView& operator=( const PageTurnView& handle ); @@ -112,13 +116,15 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_1.4 */ ~PageTurnView(); /** - * Downcast an Object handle to PageTurnView. + * @brief Downcast an Object handle to PageTurnView. * If handle points to an PageTurnView the downcast produces valid handle. * If not the returned handle is left uninitialized. + * @SINCE_1_1.4 * @param[in] handle Handle to an object * @return handle to a PageTurnView or an uninitialized handle */ @@ -131,41 +137,45 @@ public: //Signal typedef Signal< void ( PageTurnView ) > PagePanSignal; /** - * Signal emitted when a page has started to turn over. + * @brief Signal emitted when a page has started to turn over. * A callback of the following type may be connected: * @code * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward ); * @endcode + * @SINCE_1_1.4 * @return The signal to connect to */ PageTurnSignal& PageTurnStartedSignal(); /** - * Signal emitted when a page has finished turning over. + * @brief Signal emitted when a page has finished turning over. * A callback of the following type may be connected: * @code * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward ); * @endcode + * @SINCE_1_1.4 * @return The signal to connect to */ PageTurnSignal& PageTurnFinishedSignal(); /** - * Signal emitted when a page pan has commenced + * @brief Signal emitted when a page pan has commenced * A callback of the following type may be connected: * @code * void YourCallBackName( PageTurnView pageTurnView ); * @endcode + * @SINCE_1_1.4 * @return The signal to connect to */ PagePanSignal& PagePanStartedSignal(); /** - * Signal emitted when a page pan has finished + * @brief Signal emitted when a page pan has finished * A callback of the following type may be connected: * @code * void YourCallBackName( PageTurnView pageTurnView ); * @endcode + * @SINCE_1_1.4 * @return The signal to connect to */ PagePanSignal& PagePanFinishedSignal(); @@ -173,13 +183,15 @@ public: //Signal public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_1.4 * @param[in] implementation The Control implementation. */ DALI_INTERNAL PageTurnView(Internal::PageTurnView& implementation); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_1.4 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL PageTurnView(Dali::Internal::CustomActor* internal); diff --git a/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h b/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h index 819d42d..dc42d9f 100755 --- a/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h +++ b/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h @@ -39,7 +39,7 @@ class ScrollBar; */ /** - * ScrollBar is a UI component that can be linked to the scrollable objects + * @brief ScrollBar is a UI component that can be linked to the scrollable objects * indicating the current scroll position of the scrollable object. * * Signals @@ -47,6 +47,7 @@ class ScrollBar; * |-------------------------------|--------------------------------------------| * | panFinished | @ref PanFinishedSignal() | * | scrollPositionIntervalReached | @ref ScrollPositionIntervalReachedSignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API ScrollBar : public Control { @@ -56,26 +57,28 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + 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 }; /** * @brief An enumeration of properties belonging to the ScrollBar class. + * @SINCE_1_0.0 */ struct Property { enum { - SCROLL_DIRECTION = PROPERTY_START_INDEX, ///< name "scrollDirection", @see SetScrollDirection(), type std::string - INDICATOR_HEIGHT_POLICY, ///< name "indicatorHeightPolicy", @see SetIndicatorHeightPolicy(), type std::string - INDICATOR_FIXED_HEIGHT, ///< name "indicatorFixedHeight", @see SetIndicatorFixedHeight(), type float - INDICATOR_SHOW_DURATION, ///< name "indicatorShowDuration", @see SetIndicatorShowDuration(), type float - INDICATOR_HIDE_DURATION, ///< name "indicatorHideDuration", @see SetIndicatorHideDuration(), type float - SCROLL_POSITION_INTERVALS ///< name "scrollPositionIntervals", @see SetScrollPositionIntervals() type Property::Array + SCROLL_DIRECTION = PROPERTY_START_INDEX, ///< name "scrollDirection", @see SetScrollDirection(), type std::string @SINCE_1_0.0 + INDICATOR_HEIGHT_POLICY, ///< name "indicatorHeightPolicy", @see SetIndicatorHeightPolicy(), type std::string @SINCE_1_0.0 + INDICATOR_FIXED_HEIGHT, ///< name "indicatorFixedHeight", @see SetIndicatorFixedHeight(), type float @SINCE_1_0.0 + INDICATOR_SHOW_DURATION, ///< name "indicatorShowDuration", @see SetIndicatorShowDuration(), type float @SINCE_1_0.0 + INDICATOR_HIDE_DURATION, ///< name "indicatorHideDuration", @see SetIndicatorHideDuration(), type float @SINCE_1_0.0 + SCROLL_POSITION_INTERVALS ///< name "scrollPositionIntervals", @see SetScrollPositionIntervals() type Property::Array @SINCE_1_0.0 }; }; @@ -88,35 +91,40 @@ public: /** * @brief Direction. + * @SINCE_1_0.0 */ enum Direction { - Vertical = 0, ///< Scroll in the vertical direction - Horizontal ///< Scroll in the horizontal direction + Vertical = 0, ///< Scroll in the vertical direction @SINCE_1_0.0 + Horizontal ///< Scroll in the horizontal direction @SINCE_1_0.0 }; /** * @brief Indicator height policy. + * @SINCE_1_0.0 */ enum IndicatorHeightPolicy { - Variable = 0, ///< Variable height changed dynamically according to the length of scroll content - Fixed ///< Fixed height regardless of the length of scroll content + Variable = 0, ///< Variable height changed dynamically according to the length of scroll content @SINCE_1_0.0 + Fixed ///< Fixed height regardless of the length of scroll content @SINCE_1_0.0 }; /** * @brief Create an uninitialized ScrollBar; this can be initialized with ScrollBar::New() * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ ScrollBar(); /** * @brief Copy constructor. + * @SINCE_1_0.0 */ ScrollBar( const ScrollBar& scrollBar ); /** * @brief Assignment operator. + * @SINCE_1_0.0 */ ScrollBar& operator=( const ScrollBar& scrollBar ); @@ -124,11 +132,13 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~ScrollBar(); /** * @brief Create an initialized ScrollBar + * @SINCE_1_0.0 * @param[in] direction The direction of scroll bar (either vertically or horizontally). * @return A pointer to the created ScrollBar. */ @@ -137,6 +147,7 @@ public: /** * @brief Downcast an Object handle to ScrollBar. If handle points to a ScrollBar the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a ScrollBar or an uninitialized handle */ @@ -147,6 +158,7 @@ public: * * * @pre The handle to the object owing the scroll properties has been initialised and the property index must be vaild. * + * @SINCE_1_0.0 * @param[in] handle The handle of the object owing the scroll properties. * @param[in] propertyScrollPosition The index of the scroll position property (The scroll position, type float). * @param[in] propertyMinScrollPosition The index of the minimum scroll position property (The minimum scroll position, type float). @@ -158,18 +170,20 @@ public: /** * @brief Sets the indicator of scroll bar. * + * @SINCE_1_0.0 + * @param[in] indicator The indicator that moves to indicate the current scroll position. * @pre The scroll bar actor has been initialised. * - * @param[in] indicator The indicator that moves to indicate the current scroll position. */ void SetScrollIndicator( Actor indicator ); /** * @brief Gets the indicator of scroll bar. * + * @SINCE_1_0.0 + * @return The indicator indicates the current scroll position of the scrollable content. * @pre The scroll bar actor has been initialised. * - * @return The indicator indicates the current scroll position of the scrollable content. */ Actor GetScrollIndicator(); @@ -177,9 +191,10 @@ public: * @brief Sets the list of values to get notification when the current scroll position of the scrollable * object goes above or below any of these values. * + * @SINCE_1_0.0 + * @param[in] positions List of values to receive notifications for when the current scroll position crosses them * @pre The scroll bar actor has been initialised. * - * @param[in] positions List of values to receive notifications for when the current scroll position crosses them */ void SetScrollPositionIntervals( const Dali::Vector& positions ); @@ -187,24 +202,27 @@ public: * @brief Gets the list of values to receive notifications when the current scroll position of the scrollable * object goes above or below any of these values. * + * @SINCE_1_0.0 + * @return The list of values to receive notifications for when the current scroll position crosses them * @pre The scroll bar actor has been initialised. * - * @return The list of values to receive notifications for when the current scroll position crosses them */ Dali::Vector GetScrollPositionIntervals() const; /** * @brief Sets the direction of scroll bar to scroll either vertically or horizontally. * + * @SINCE_1_0.0 + * @param[in] direction The direction of scroll bar (either vertically or horizontally). * @pre The scroll bar actor has been initialised. * - * @param[in] direction The direction of scroll bar (either vertically or horizontally). */ void SetScrollDirection( Direction direction ); /** * @brief Gets the direction of scroll bar. * + * @SINCE_1_0.0 * @return The direction of scroll bar. */ Direction GetScrollDirection() const; @@ -212,15 +230,17 @@ public: /** * @brief Sets the height policy of scroll indicator to have either variable or fixed height. * + * @SINCE_1_0.0 + * @param[in] policy The height policy of scroll indicator * @pre The scroll bar actor has been initialised. * - * @param[in] policy The height policy of scroll indicator */ void SetIndicatorHeightPolicy( IndicatorHeightPolicy policy ); /** * @brief Gets the height policy of scroll indicator. * + * @SINCE_1_0.0 * @return The height policy of scroll indicator */ IndicatorHeightPolicy GetIndicatorHeightPolicy() const; @@ -231,14 +251,16 @@ public: * However, when the height policy of scroll indicator is set to be fixed, the height will keep fixed * regardless of the length of scroll content. * + * @SINCE_1_0.0 + * @param[in] height The fixed height of the scroll indicator * @pre The scroll bar actor has been initialised. * - * @param[in] height The fixed height of the scroll indicator */ void SetIndicatorFixedHeight( float height ); /** * @brief Gets the fix height of scroll indicator. + * @SINCE_1_0.0 * @return The fixed height of the scroll indicator */ float GetIndicatorFixedHeight() const; @@ -246,14 +268,16 @@ public: /** * @brief Sets the duration in second for the scroll indicator to become fully visible * + * @SINCE_1_0.0 + * @param[in] durationSeconds The duration for the scroll indicator to become fully visible * @pre The scroll bar actor has been initialised; durationSeconds must be zero or greater; zero means the indicator will be shown instantly. * - * @param[in] durationSeconds The duration for the scroll indicator to become fully visible */ void SetIndicatorShowDuration( float durationSeconds ); /** * @brief Gets the duration in second for the scroll indicator to become fully visible + * @SINCE_1_0.0 * @return The duration for the scroll indicator to become fully visible */ float GetIndicatorShowDuration() const; @@ -261,25 +285,29 @@ public: /** * @brief Sets the duration in second for the scroll indicator to become fully invisible * + * @SINCE_1_0.0 + * @param[in] durationSeconds The duration for the scroll indicator to become fully invisible * @pre The scroll bar actor has been initialised; durationSeconds must be zero or greater; zero means the indicator will be hidden instantly. * - * @param[in] durationSeconds The duration for the scroll indicator to become fully invisible */ void SetIndicatorHideDuration( float durationSeconds ); /** * @brief Gets the duration in second for the scroll indicator to become fully invisible + * @SINCE_1_0.0 * @return The duration for the scroll indicator to become fully invisible */ float GetIndicatorHideDuration() const; /** * @brief Shows the scroll indicator + * @SINCE_1_0.0 */ void ShowIndicator(); /** * @brief Hides the scroll indicator + * @SINCE_1_0.0 */ void HideIndicator(); @@ -293,8 +321,9 @@ public: // Signals * @code * void YourCallbackName(); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ScrollBar::PanFinishedSignalType& PanFinishedSignal(); @@ -307,21 +336,24 @@ public: // Signals * @code * void YourCallbackName(float currentScrollPosition); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollPositionIntervalReachedSignal(); public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL ScrollBar( Internal::ScrollBar& implementation ); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL ScrollBar( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h b/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h index 56de533..a08c525 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h @@ -36,15 +36,16 @@ namespace DefaultItemLayout enum Type { - DEPTH, ///< Items arranged in a grid, scrolling along the Z-Axis. - GRID, ///< Items arranged in a grid, scrolling along the Y-Axis. - LIST, ///< One item per line, scrolling along the Y-Axis. - SPIRAL ///< Items arranged in a spiral, centered around the Y-Axis. + DEPTH, ///< Items arranged in a grid, scrolling along the Z-Axis. @SINCE_1_0.0 + GRID, ///< Items arranged in a grid, scrolling along the Y-Axis. @SINCE_1_0.0 + LIST, ///< One item per line, scrolling along the Y-Axis. @SINCE_1_0.0 + SPIRAL ///< Items arranged in a spiral, centered around the Y-Axis. @SINCE_1_0.0 }; /** * @brief Creates a built-in default item-layout * + * @SINCE_1_0.0 * @param[in] type The type of layout required. * * @return An ItemLayoutPtr to the newly created layout. diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h index 22e5261..36c34f0 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h @@ -34,6 +34,7 @@ namespace Toolkit /** * @brief ItemFactory is for providing actors to ItemView. * Each actor is identified by a unique ID, and has a linear order from 0 to GetNumberOfItems()-1. + * @SINCE_1_0.0 */ class ItemFactory { @@ -43,6 +44,7 @@ public: /** * @brief Virtual destructor. + * @SINCE_1_0.0 */ DALI_EXPORT_API virtual ~ItemFactory() {}; @@ -50,6 +52,7 @@ public: * @brief Query the number of items available from the factory. * * The maximum available item has an ID of GetNumberOfItems() - 1. + * @SINCE_1_0.0 * @return the number of items */ virtual unsigned int GetNumberOfItems() = 0; @@ -57,6 +60,7 @@ public: /** * @brief Create an Actor to represent a visible item. * + * @SINCE_1_0.0 * @param[in] itemId The ID of the newly visible item. * @return An actor, or an uninitialized pointer if the ID is out of range. */ @@ -65,14 +69,16 @@ public: /** * @brief Notify the factory the actor representing the item is removed from ItemView. * + * @SINCE_1_0.0 * @param[in] itemId The ID of the released item. * @param[in] actor The actor that represents the released item. */ virtual void ItemReleased(unsigned int itemId, Actor actor) {}; /** - * Retrieve the extension for this control + * @brief Retrieve the extension for this control * + * @SINCE_1_0.0 * @return The extension if available, NULL otherwise */ virtual Extension* GetExtension() diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h index 51f051a..264e48e 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h @@ -37,16 +37,18 @@ namespace Toolkit class ItemLayout; -typedef IntrusivePtr ItemLayoutPtr; ///< Pointer to a Dali::Toolkit::ItemLayout object +typedef IntrusivePtr ItemLayoutPtr; ///< Pointer to a Dali::Toolkit::ItemLayout object @SINCE_1_0.0 /** * @brief A support class for managing ranges of items. + * @SINCE_1_0.0 */ struct ItemRange { /** * @brief Create a range of item identifiers. * + * @SINCE_1_0.0 * @param[in] beginItem The first item within the range. * @param[in] endItem The past-the-end item. */ @@ -59,6 +61,7 @@ struct ItemRange /** * @brief Copy Constructor. * + * @SINCE_1_0.0 * @param[in] copy ItemRange we should copy from. */ ItemRange(const ItemRange& copy) @@ -70,6 +73,7 @@ struct ItemRange /** * @brief Assignment operator. * + * @SINCE_1_0.0 * @param[in] range The Range to assign from. * @return The updated range. */ @@ -83,6 +87,7 @@ struct ItemRange /** * @brief Test whether an item is within the range. * + * @SINCE_1_0.0 * @param[in] itemId The item identifier. * @return True if the item is within the range. */ @@ -95,6 +100,7 @@ struct ItemRange /** * @brief Create the intersection of two ranges. * + * @SINCE_1_0.0 * @param[in] second The second range. * @return The intersection. */ @@ -125,6 +131,7 @@ struct ItemRange * * An ItemLayout also describes the direction of input gestures, used to scroll through the layout. * Whilst scrolling, the layout provides a range of items that are within a layout-area (3D bounding volume). + * @SINCE_1_0.0 */ class DALI_IMPORT_API ItemLayout : public RefObject { @@ -134,12 +141,14 @@ public: /** * @brief Virtual destructor. + * @SINCE_1_0.0 */ DALI_IMPORT_API virtual ~ItemLayout(); /** * @brief Set the orientation of the layout. * + * @SINCE_1_0.0 * @param[in] orientation The orientation of the layout. */ DALI_IMPORT_API void SetOrientation(ControlOrientation::Type orientation); @@ -147,6 +156,7 @@ public: /** * @brief Query the orientation of the layout. * + * @SINCE_1_0.0 * @return the orientation of the layout. */ DALI_IMPORT_API ControlOrientation::Type GetOrientation() const; @@ -156,17 +166,19 @@ public: * * This will return the default size for the layout unless overridden by calling SetItemSize(). * - * @note layout-position is not provided as a parameter, since applying size constraints is not recommended. - * Animating to target-sizes is preferable, since this allows controls to perform layouting without constraints. + * @SINCE_1_0.0 * @param[in] itemId The ID of an item in the layout. * @param[in] layoutSize The layout size * @param[out] itemSize The target size of an item. + * @note layout-position is not provided as a parameter, since applying size constraints is not recommended. + * Animating to target-sizes is preferable, since this allows controls to perform layouting without constraints. */ DALI_IMPORT_API void GetItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const; /** * @brief Overrides the default size for the layout. * + * @SINCE_1_0.0 * @param[in] itemSize The size of each item. */ DALI_IMPORT_API void SetItemSize( const Vector3& itemSize ); @@ -175,6 +187,7 @@ public: * @brief Query the minimum valid layout position; this is a negative value. * * When scrolling, the first item will move within the range 0 to GetMinimumLayoutPosition(). + * @SINCE_1_0.0 * @param[in] numberOfItems The current number of items in the layout. * @param[in] layoutSize The size of the layout area. * @return The minimum layout position. @@ -186,6 +199,7 @@ public: * * This anchor position is the position where all the items in the layout are aligned to * their rounded layout positions in integer. + * @SINCE_1_0.0 * @param[in] layoutPosition The layout position. * @return The closest anchor position for the given layout position. */ @@ -195,6 +209,7 @@ public: * @brief Query the layout position for the first item in the layout to move to when the layout * needs to scroll to a particular item. * + * @SINCE_1_0.0 * @param[in] itemId The ID of an item in the layout. * @return The layout position for the first item in the layout to move to. */ @@ -203,6 +218,7 @@ public: /** * @brief Query the items within a given layout-area. * + * @SINCE_1_0.0 * @param[in] firstItemPosition The layout-position of the first item in the layout. * @param[in] layoutSize The size of the layout area. * @return The ID of the first & last visible item. @@ -220,6 +236,7 @@ public: * implementations should provide their own version of this function * to ensure proper functionality of internal toolkit systems. * + * @SINCE_1_0.0 * @param[in] itemID id of the item to bring within the viewable screen area * @param[in] currentLayoutPosition the current layout position of the item view instance * @param[in] layoutSize the current size of the item view instance @@ -230,6 +247,7 @@ public: /** * @brief Query the number of items that should be reserved, for scrolling purposes. * + * @SINCE_1_0.0 * @param[in] layoutSize The size of the layout area. * @return The number of extra items. ItemView will populate itself with actors within the layout-area * (see GetItemsWithinArea), plus this number of additional items on either-side. @@ -239,11 +257,12 @@ public: /** * @brief Retrieve the default size of an item in the layout. * - * @note layout-position is not provided as a parameter, since applying size constraints is not recommended. - * Animating to target-sizes is preferable, since this allows controls to perform layouting without constraints. + * @SINCE_1_0.0 * @param[in] itemId The ID of an item in the layout. * @param[in] layoutSize The layout size * @param[out] itemSize The target size of an item. + * @note layout-position is not provided as a parameter, since applying size constraints is not recommended. + * Animating to target-sizes is preferable, since this allows controls to perform layouting without constraints. */ virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const = 0; @@ -252,6 +271,7 @@ public: * * When an input gesture follows this direction, the layout-position of items will be increased. * If the input gesture points in the opposite direction, then the layout-positions will decrease. + * @SINCE_1_0.0 * @return The scroll direction in degrees. */ virtual Degree GetScrollDirection() const = 0; @@ -266,6 +286,7 @@ public: * position of actors will be moved by 1. * Therefore, the bigger the factor is, the faster the scroll speed will be. * + * @SINCE_1_0.0 * @return The scroll speed factor of the layout. */ virtual float GetScrollSpeedFactor() const = 0; @@ -274,6 +295,7 @@ public: * @brief Query the maximum swipe speed in pixels per second. * * Swipe gestures will be clamped when exceeding this speed limit. + * @SINCE_1_0.0 * @return speed The maximum swipe speed. */ virtual float GetMaximumSwipeSpeed() const = 0; @@ -284,6 +306,7 @@ public: * 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. + * @SINCE_1_0.0 * @return The duration of the flick animation. */ virtual float GetItemFlickAnimationDuration() const = 0; @@ -291,6 +314,7 @@ public: /** * @brief Gets the id of the next item for KeyboardFocusManager to focus on depending on the inputted item ID. * + * @SINCE_1_0.0 * @param[in] itemID The current focused item * @param[in] maxItems The maximum number of items in the list * @param[in] direction The directional key pressed on the keyboard @@ -309,6 +333,7 @@ public: * position of actors will be moved by 1. * Therefore, the bigger the factor is, the faster the flick speed will be. * + * @SINCE_1_0.0 * @return The scroll speed factor of the layout. */ DALI_IMPORT_API virtual float GetFlickSpeedFactor() const; @@ -326,6 +351,7 @@ public: /** * @brief Gets the position of a given item * + * @SINCE_1_0.0 * @param[in] itemID id of the item we want to get its position * @param[in] currentLayoutPosition the current layout position of the item view instance * @param[in] layoutSize the current size of the item view instance @@ -334,8 +360,9 @@ public: DALI_IMPORT_API virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const = 0; /** - * Retrieve the extension for this layout. + * @brief Retrieve the extension for this layout. * + * @SINCE_1_0.0 * @return The extension if available, NULL otherwise */ virtual Extension* GetExtension() @@ -347,18 +374,21 @@ protected: /** * @brief Create a new ItemLayout; Only derived versions are instantiatable. + * @SINCE_1_0.0 */ DALI_IMPORT_API ItemLayout(); private: /** - * Don't allow copy constructor + * @brief Don't allow copy constructor + * @SINCE_1_0.0 */ ItemLayout( const ItemLayout& handle ); /** - * Don't allow copy operator + * @brief Don't allow copy operator + * @SINCE_1_0.0 */ ItemLayout& operator=( const ItemLayout& handle ); diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h index 0f79dc2..050f1b5 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h @@ -33,7 +33,7 @@ namespace Toolkit * @{ */ -typedef unsigned int ItemId; ///< Unique identity for each item in the view. +typedef unsigned int ItemId; ///< Unique identity for each item in the view. @SINCE_1_0.0 typedef std::vector ItemIdContainer; typedef ItemIdContainer::iterator ItemIdIter; diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h index 0bb0d1b..b63f0cd 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h @@ -55,6 +55,7 @@ typedef IntrusivePtr ItemLayoutPtr; * | %Signal Name | Method | * |---------------------------------|--------------------------------------------| * | layoutActivated | @ref LayoutActivatedSignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API ItemView : public Scrollable @@ -63,34 +64,35 @@ public: enum PropertyRange { - PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @since DALi 1.1.18 - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices, @since DALi 1.1.18 + PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.18 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices, @SINCE_1_1.18 ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 }; /** * @brief An enumeration of properties belonging to the ScrollView class. + * @SINCE_1_0.0 */ struct Property { enum { // Event side properties - MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX, ///< Property, name "minimumSwipeSpeed", @see SetMinimumSwipeSpeed(), type float, @since DALi 1.1.18 - MINIMUM_SWIPE_DISTANCE, ///< Property, name "minimumSwipeDistance", @see SetMinimumSwipeDistance(), type float, @since DALi 1.1.18 - WHEEL_SCROLL_DISTANCE_STEP, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type float, @since DALi 1.1.18 - SNAP_TO_ITEM_ENABLED, ///< Property, name "snapToItemEnabled", @see SetAnchoring(), type bool, @since DALi 1.1.18 - REFRESH_INTERVAL, ///< Property, name "refreshInterval", @see SetRefreshInterval(), type float, @since DALi 1.1.18 + 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 - SCROLL_SPEED, ///< Property, name "scrollSpeed", type float - OVERSHOOT, ///< Property, name "overshoot", type float - SCROLL_DIRECTION, ///< Property, name "scrollDirection", type Vector2 - LAYOUT_ORIENTATION, ///< Property, name "layoutOrientation", type integer - SCROLL_CONTENT_SIZE ///< Property, name "scrollContentSize", type float + 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 }; }; @@ -104,16 +106,19 @@ public: * @brief Create an uninitialized ItemView; this can be initialized with ItemView::New(). * * Calling member functions with an uninitialized Dali::Object is not allowed. + * @SINCE_1_0.0 */ ItemView(); /** * @brief Copy constructor. + * @SINCE_1_0.0 */ ItemView( const ItemView& itemView ); /** * @brief Assignment operator. + * @SINCE_1_0.0 */ ItemView& operator=( const ItemView& itemView ); @@ -121,12 +126,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~ItemView(); /** * @brief Create an initialized ItemView. * + * @SINCE_1_0.0 * @param[in] factory The factory which provides ItemView with items. * @return A handle to a newly allocated Dali resource. */ @@ -138,6 +145,7 @@ public: * If handle points to a ItemView the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a ItemView or an uninitialized handle */ @@ -146,6 +154,7 @@ public: /** * @brief Query the number of layouts. * + * @SINCE_1_0.0 * @return The number of layouts. */ unsigned int GetLayoutCount() const; @@ -153,6 +162,7 @@ public: /** * @brief Add a layout. * + * @SINCE_1_0.0 * @param[in] layout The layout. */ void AddLayout(ItemLayout& layout); @@ -160,23 +170,26 @@ public: /** * @brief Remove a layout. * - * @pre layoutIndex is less than GetLayoutCount(). + * @SINCE_1_0.0 * @param[in] layoutIndex The index of one of the ItemView layouts. + * @pre layoutIndex is less than GetLayoutCount(). */ void RemoveLayout(unsigned int layoutIndex); /** * @brief Retrieve a layout. * - * @pre layoutIndex is less than GetLayoutCount(). + * @SINCE_1_0.0 * @param[in] layoutIndex The index of the layout to retrieve. * @return The layout + * @pre layoutIndex is less than GetLayoutCount(). */ ItemLayoutPtr GetLayout(unsigned int layoutIndex) const; /** * @brief Retrieve the currently active layout, if any. * + * @SINCE_1_0.0 * @return The layout, or an uninitialized pointer if no layout is active. */ ItemLayoutPtr GetActiveLayout() const; @@ -184,6 +197,7 @@ public: /** * @brief Retrieve the current layout-position of an item in the ItemView. * + * @SINCE_1_0.0 * @param[in] itemId The item identifier. * @return The current layout-position. */ @@ -196,11 +210,12 @@ public: * This is done by applying constraints from the new layout, and * removing constraints from the previous layout. * - * @pre layoutIndex is less than GetLayoutCount(). - * @pre durationSeconds is greater or equal to zero. + * @SINCE_1_0.0 * @param[in] layoutIndex The index of one of the ItemView layouts. * @param[in] targetSize The target ItemView & layout size. * @param[in] durationSeconds The time taken to relayout in seconds (zero for immediate). + * @pre layoutIndex is less than GetLayoutCount(). + * @pre durationSeconds is greater or equal to zero. */ void ActivateLayout(unsigned int layoutIndex, Vector3 targetSize, float durationSeconds); @@ -208,6 +223,7 @@ public: * @brief Deactivate the current layout, if any. * * The constraints applied by the layout will be removed. + * @SINCE_1_0.0 */ void DeactivateCurrentLayout(); @@ -215,6 +231,7 @@ public: * @brief Set the minimum swipe speed in pixels per second; A pan * gesture must exceed this to trigger a swipe. * + * @SINCE_1_0.0 * @param[in] speed The minimum swipe speed */ void SetMinimumSwipeSpeed(float speed); @@ -222,6 +239,7 @@ public: /** * @brief Get the minimum swipe speed in pixels per second. * + * @SINCE_1_0.0 * @return The minimum swipe speed */ float GetMinimumSwipeSpeed() const; @@ -230,6 +248,7 @@ public: * @brief Set the minimum swipe distance in actor coordinates; A pan * gesture must exceed this to trigger a swipe. * + * @SINCE_1_0.0 * @param[in] distance The minimum swipe distance. */ void SetMinimumSwipeDistance(float distance); @@ -237,6 +256,7 @@ public: /** * @brief Get the minimum swipe distance in actor coordinates. * + * @SINCE_1_0.0 * @return The minimum swipe distance */ float GetMinimumSwipeDistance() const; @@ -244,6 +264,7 @@ public: /** * @brief Set the step of scroll distance in actor coordinates for each wheel event received. * + * @SINCE_1_0.0 * @param[in] step The step of scroll distance(pixel). */ void SetWheelScrollDistanceStep(float step); @@ -251,6 +272,7 @@ public: /** * @brief Get the step of scroll distance in actor coordinates for each wheel event received. * + * @SINCE_1_0.0 * @return The step of scroll distance(pixel) */ float GetWheelScrollDistanceStep() const; @@ -262,6 +284,7 @@ public: * The anchor position is the position where all the items in the layout * are aligned to their closest rounded layout positions in integer. * + * @SINCE_1_0.0 * @param[in] enabled Whether the anchor animation is enabled or not. */ void SetAnchoring(bool enabled); @@ -269,6 +292,7 @@ public: /** * @brief Get whether the anchor animation is enabled or not. * + * @SINCE_1_0.0 * @return Whether the anchor animation is enabled or not. */ bool GetAnchoring() const; @@ -279,14 +303,16 @@ public: * This is the time taken to reach the nearest anchor position after * a drag or swipe gesture ends. * - * @pre durationSeconds must be greater than zero. + * @SINCE_1_0.0 * @param[in] durationSeconds The duration of the anchor animation in seconds. + * @pre durationSeconds must be greater than zero. */ void SetAnchoringDuration(float durationSeconds); /** * @brief Get the duration of the anchor animation in seconds. * + * @SINCE_1_0.0 * @return The duration of the anchor animation */ float GetAnchoringDuration() const; @@ -294,11 +320,12 @@ public: /** * @brief Scroll the current layout to a particular item. * + * @SINCE_1_0.0 + * @param[in] itemId The ID of an item in the layout. + * @param[in] durationSeconds How long the scrolling takes in seconds. * @pre durationSeconds must be zero or greater; zero means the layout should scroll to the particular item instantly. * If calling this with zero second of duration immediately after calling ActivateLayout, it might not work unless * the duration of relayout animation for ActivateLayout is also set to be zero. - * @param[in] itemId The ID of an item in the layout. - * @param[in] durationSeconds How long the scrolling takes in seconds. */ void ScrollToItem(ItemId itemId, float durationSeconds); @@ -306,6 +333,7 @@ public: * @brief Set the interval between refreshes. When the layout-position of items is changed by this interval, * new items are requested from ItemFactory. * + * @SINCE_1_0.0 * @param[in] intervalLayoutPositions The refresh interval in layout position. */ void SetRefreshInterval(float intervalLayoutPositions); @@ -313,18 +341,21 @@ public: /** * @brief Get the interval between refreshes in layout position. * + * @SINCE_1_0.0 * @return The refresh interval */ float GetRefreshInterval() const; /** * @brief Do a refresh of the item view. + * @SINCE_1_0.0 */ void Refresh(); /** * @brief Given the Item ID, this returns the accompanying actor. * + * @SINCE_1_0.0 * @param[in] itemId The Item ID of the actor required. * @return The Actor corresponding to the Item ID. */ @@ -333,6 +364,7 @@ public: /** * @brief Returns the Item ID of the specified actor. * + * @SINCE_1_0.0 * @param[in] actor The actor whose Item ID is required. * @return The Item ID of the item. * @pre The actor should be an item of ItemView. @@ -349,18 +381,20 @@ public: * ID 2 - ActorB ID 2 - ActorZ ! * ID 3 - ActorC ID 3 - ActorB * ID 4 - ActorC - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] newItem The item to insert. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void InsertItem(Item newItem, float durationSeconds); /** * @brief Insert a set of items; this is more efficient than calling InsertItem() repeatedly. * - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] newItems The items to insert. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void InsertItems(const ItemContainer& newItems, float durationSeconds); @@ -374,18 +408,20 @@ public: * ID 2 - ActorB ID 2 - ActorC (previously ID 3) * ID 3 - ActorC ID 3 - ActorB (previously ID 4) * ID 4 - ActorD - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] itemId The Item ID of the item to remove. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void RemoveItem(ItemId itemId, float durationSeconds); /** * @brief Remove a set of items; this is more efficient than calling RemoveItem() repeatedly. * - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] itemIds The IDs of the items to remove. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void RemoveItems(const ItemIdContainer& itemIds, float durationSeconds); @@ -393,9 +429,10 @@ public: * @brief Replace an item. * * A relayout will occur for the replacement item only. - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] replacementItem The replacement for an existing item. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void ReplaceItem(Item replacementItem, float durationSeconds); @@ -403,9 +440,10 @@ public: * @brief Replace a set of items. * * A relayout will occur for the replacement items only. - * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. + * @SINCE_1_0.0 * @param[in] replacementItems The replacements for a set of existing items. * @param[in] durationSeconds How long the relayout takes in seconds. + * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly. */ void ReplaceItems(const ItemContainer& replacementItems, float durationSeconds); @@ -413,6 +451,7 @@ public: * @brief Set the parent origin of the items * * A relayout will occur for all the items if the parent origin is different than the current one. + * @SINCE_1_0.0 * @param[in] parentOrigin New parent origin position vector */ void SetItemsParentOrigin( const Vector3& parentOrigin ); @@ -420,6 +459,7 @@ public: /** * @brief Get the parent origin of the items * + * @SINCE_1_0.0 * @return The current parent origin of the items */ Vector3 GetItemsParentOrigin() const; @@ -428,6 +468,7 @@ public: * @brief Set the anchor point of the items * * A relayout will occur for all the items if the anchor point is different than the current one. + * @SINCE_1_0.0 * @param[in] anchorPoint New anchor point position vector */ void SetItemsAnchorPoint( const Vector3& anchorPoint ); @@ -435,6 +476,7 @@ public: /** * @brief Get the anchor point of the items * + * @SINCE_1_0.0 * @return The current anchor point of the items */ Vector3 GetItemsAnchorPoint() const; @@ -442,6 +484,7 @@ public: /** * @brief Get the range of items that are currently in ItemView. * + * @SINCE_1_0.0 * @param[out] range The range of items. */ void GetItemsRange(ItemRange& range); @@ -455,8 +498,9 @@ public: // Signals * @code * void YourCallbackName(); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ItemView::LayoutActivatedSignalType& LayoutActivatedSignal(); @@ -465,6 +509,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL ItemView(Internal::ItemView& implementation); @@ -472,6 +517,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL ItemView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h index 50962f2..c5fd689 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h @@ -43,16 +43,18 @@ namespace Toolkit */ /** - * Move Actor constraint. + * @brief Move Actor constraint. * * Moves an Actor in accordance to scroll position. + * @SINCE_1_0.0 */ DALI_IMPORT_API void MoveActorConstraint( Vector3& current, const PropertyInputContainer& inputs ); /** - * Wrap Actor constraint. + * @brief Wrap Actor constraint. * * Wraps an Actors position in accordance to min/max bounds of domain. + * @SINCE_1_0.0 */ DALI_IMPORT_API void WrapActorConstraint( Vector3& position, const PropertyInputContainer& inputs ); diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h index 73b97b0..72758a3 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h @@ -53,6 +53,7 @@ class ScrollViewEffect; * properties that can be used with visual effects. Such as creating * constraints that are applied to ShaderEffects or Actors using these * properties as inputs. + * @SINCE_1_0.0 */ class DALI_IMPORT_API ScrollViewEffect : public Dali::BaseHandle { @@ -63,6 +64,7 @@ public: * @brief Create an uninitialized ScrollViewEffect; this can only be initialized with derived classes. * * Calling member functions with an uninitialized Toolkit::BaseObject is not allowed. + * @SINCE_1_0.0 */ ScrollViewEffect(); @@ -71,6 +73,7 @@ public: // Not intended for application developers /** * @brief This constructor is used by Dali New() methods. * + * @SINCE_1_0.0 * @param [in] impl A pointer to a newly allocated Dali resource */ explicit DALI_INTERNAL ScrollViewEffect(Internal::ScrollViewEffect *impl); diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h index 4939ac7..e7742e9 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h @@ -40,7 +40,7 @@ class ScrollViewPagePathEffect; */ /** - * ScrollView Page Path Effect. + * @brief ScrollView Page Path Effect. * This effect causes Actors to follow a given path. The opacity of the actor will be 0.0 at * the beginning of the path and will go to 1.0 as it is approximating to half of the path to return * to 0.0 at the end of the path @@ -59,6 +59,7 @@ class ScrollViewPagePathEffect; * * Automatic operation: * not implemented. + * @SINCE_1_0.0 */ class DALI_IMPORT_API ScrollViewPagePathEffect : public ScrollViewEffect { @@ -66,7 +67,8 @@ class DALI_IMPORT_API ScrollViewPagePathEffect : public ScrollViewEffect public: /** - * Create an initialized ScrollViewPagePathEffect. + * @brief Create an initialized ScrollViewPagePathEffect. + * @SINCE_1_0.0 * @param[in] path The path that will be used by the scroll effect * @param[in] forward Vector in page object space which will be aligned with the tangent of the path * @param[in] inputPropertyIndex Index of a property of the scroll-view which will be used as the input for the path. @@ -77,21 +79,24 @@ public: static ScrollViewPagePathEffect New(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& pageSize, unsigned int pageCount); /** - * Create an uninitialized ScrollViewPagePathEffect; this can be initialized with ScrollViewPagePathEffect::New() + * @brief Create an uninitialized ScrollViewPagePathEffect; this can be initialized with ScrollViewPagePathEffect::New() * Calling member functions with an uninitialized Toolkit::ScrollViewPagePathEffect is not allowed. + * @SINCE_1_0.0 */ ScrollViewPagePathEffect(); /** - * Downcast an Object handle to ScrollViewPagePathEffect. If handle points to a ScrollViewPagePathEffect the + * @brief Downcast an Object handle to ScrollViewPagePathEffect. If handle points to a ScrollViewPagePathEffect the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a ScrollViewPagePathEffect or an uninitialized handle */ static ScrollViewPagePathEffect DownCast( BaseHandle handle ); /** - * Manually apply effect to a page in the scroll-view. + * @brief Manually apply effect to a page in the scroll-view. + * @SINCE_1_0.0 * @param[in] page The page to be affected by this effect. * @param[in] pageOrder The order of the page in the scroll-view */ @@ -100,7 +105,8 @@ public: protected: /** - * This constructor is used by Dali New() methods. + * @brief This constructor is used by Dali New() methods. + * @SINCE_1_0.0 * @param [in] impl A pointer to a newly allocated Dali resource */ explicit DALI_INTERNAL ScrollViewPagePathEffect( Internal::ScrollViewPagePathEffect *impl ); diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h index 0e656d4..cdc1937 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h @@ -41,16 +41,18 @@ class ScrollView; /** * @brief How axes/rotation or scale are clamped + * @SINCE_1_0.0 */ enum ClampState { - NotClamped, ///< The quantity isn't clamped - ClampedToMin, ///< The quantity is clamped to the min value - ClampedToMax ///< The quantity is clamped to the max value + NotClamped, ///< The quantity isn't clamped @SINCE_1_0.0 + ClampedToMin, ///< The quantity is clamped to the min value @SINCE_1_0.0 + ClampedToMax ///< The quantity is clamped to the max value @SINCE_1_0.0 }; /** * @brief A 2 dimensional clamp + * @SINCE_1_0.0 */ struct ClampState2D { @@ -60,25 +62,28 @@ struct ClampState2D /** * @brief The snap type + * @SINCE_1_0.0 */ enum SnapType { - Snap, ///< Snap - Flick ///< Flick + Snap, ///< Snap @SINCE_1_0.0 + Flick ///< Flick @SINCE_1_0.0 }; /** * @brief DirectionBias types. + * @SINCE_1_0.0 */ enum DirectionBias { - DirectionBiasLeft = -1, ///< Bias scroll snap to Left - DirectionBiasNone = 0, ///< Don't bias scroll snap - DirectionBiasRight = 1 ///< Bias scroll snap to Right + DirectionBiasLeft = -1, ///< Bias scroll snap to Left @SINCE_1_0.0 + DirectionBiasNone = 0, ///< Don't bias scroll snap @SINCE_1_0.0 + DirectionBiasRight = 1 ///< Bias scroll snap to Right @SINCE_1_0.0 }; /** * @brief Used for specifying minimum/maximum extents of a ruler. + * @SINCE_1_0.0 */ class DALI_IMPORT_API RulerDomain { @@ -87,6 +92,7 @@ public: /** * @brief Creates Ruler domain allowing a point to traverse between min and max extents. * + * @SINCE_1_0.0 * @param[in] min Minimum extent (point cannot traverse less than this) * @param[in] max Maximum extent (point cannot traverse greater than this) * @param[in] enabled Whether domain has been enabled or not. @@ -105,6 +111,7 @@ public: * An optional length parameter can be specified to suggest that the * subject is not a point but a line to that should be clamped. * + * @SINCE_1_0.0 * @param[in] x X point to be clamped between (min) and (max) extents. * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped. * @param[in] scale Scaling parameter which treats domain as scaled in calculations. @@ -118,6 +125,7 @@ public: * An optional length parameter can be specified to suggest that the * subject is not a point but a line to that should be clamped. * + * @SINCE_1_0.0 * @param[in] x X point to be clamped between (min) and (max) extents. * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped. * @param[in] scale Scaling parameter which treats domain as scaled in calculations. @@ -129,6 +137,7 @@ public: /** * @brief Returns (max-min) size of ruler. * + * @SINCE_1_0.0 * @return The size of the ruler from min to max. */ float GetSize() const; @@ -143,26 +152,29 @@ class RulerExtension; * * It can specify whether they are traversable, where their snap * points are and their domain. + * @SINCE_1_0.0 */ class DALI_IMPORT_API Ruler : public RefObject { public: /// @brief The type of the ruler enum RulerType { - Fixed, ///< A fixed ruler - Free ///< A free ruler + Fixed, ///< A fixed ruler @SINCE_1_0.0 + Free ///< A free ruler @SINCE_1_0.0 }; public: /** * @brief Constructs ruler, default enabled, with limitless domain. + * @SINCE_1_0.0 */ Ruler(); /** * @brief Snaps (x) in accordance to the ruler settings. * + * @SINCE_1_0.0 * @param[in] x The input value on the ruler to be snapped. * @param[in] bias (optional) The biasing employed for snapping * 0 floor input (floor x) "Used for Flick Left" @@ -181,6 +193,7 @@ public: * number of pages within the domain), while wrapping the position * within the domain. * + * @SINCE_1_0.0 * @param[in] page The page index * @param[out] volume The overflow volume when the page exceeds the domain (wrap must be enabled) * @param[in] wrap Enable wrap mode @@ -194,6 +207,7 @@ public: * * If (wrap) is true, then will return a page wrapped within the domain. * + * @SINCE_1_0.0 * @param[in] position The position on the domain * @param[in] wrap Enable wrap mode * @return The page where this position resides. @@ -203,6 +217,7 @@ public: /** * @brief Returns the total number of pages within this Ruler. * + * @SINCE_1_0.0 * @return The number of pages in the Ruler. */ virtual unsigned int GetTotalPages() const = 0; @@ -210,6 +225,7 @@ public: /** * @brief Gets the extension interface of the Ruler. * + * @SINCE_1_0.0 * @return The extension interface of the Ruler */ virtual RulerExtension* GetExtension() { return NULL; } @@ -219,6 +235,7 @@ public: /** * @brief Gets the ruler type. * + * @SINCE_1_0.0 * @return The ruler type. */ Ruler::RulerType GetType() const; @@ -226,23 +243,27 @@ public: /** * @brief Returns whether this axis has been enabled or not. * + * @SINCE_1_0.0 * @return true if axis is enabled */ bool IsEnabled() const; /** * @brief Enables ruler (ruler must be enabled in order to traverse along it). + * @SINCE_1_0.0 */ void Enable(); /** * @brief Disables ruler. + * @SINCE_1_0.0 */ void Disable(); /** * @brief Sets Domain. * + * @SINCE_1_0.0 * @param[in] domain Ruler domain object. */ void SetDomain(RulerDomain domain); @@ -250,12 +271,14 @@ public: /** * @brief Gets Domain. * + * @SINCE_1_0.0 * @return The domain */ const RulerDomain &GetDomain() const; /** * @brief Disables Domain (minimum/maximum extents for this axis). + * @SINCE_1_0.0 */ void DisableDomain(); @@ -265,6 +288,7 @@ public: * An optional length parameter can be specified to suggest that the * subject is not a point but a line that should be clamped. * + * @SINCE_1_0.0 * @param[in] x X point to be clamped between (min) and (max) extents. * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped. * @param[in] scale Scaling parameter which treats domain as scaled in calculations. @@ -279,6 +303,7 @@ public: * An optional length parameter can be specified to suggest that the * subject is not a point but a line to that should be clamped. * + * @SINCE_1_0.0 * @param[in] x X point to be clamped between (min) and (max) extents. * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped. * @param[in] scale Scaling parameter which treats domain as scaled in calculations. @@ -290,6 +315,7 @@ public: /** * @brief Snaps and Clamps (x) in accordance to ruler settings. * + * @SINCE_1_0.0 * @param[in] x value to be snapped in accordance to ruler snap value, * and clamped in accordance to the ruler's domain (if set). * @param[in] bias (optional) The biasing employed for snapping @@ -306,6 +332,7 @@ public: /** * @brief Snaps and Clamps (x) in accordance to ruler settings. * + * @SINCE_1_0.0 * @param[in] x value to be snapped in accordance to ruler snap value, * and clamped in accordance to the ruler's domain (if set). * @param[in] bias (optional) The biasing employed for snapping @@ -324,6 +351,7 @@ protected: /** * @brief Destructor - A reference counted object may only be deleted by calling Unreference(). + * @SINCE_1_0.0 */ virtual ~Ruler(); @@ -335,16 +363,18 @@ protected: }; -typedef IntrusivePtr RulerPtr; ///< Pointer to Dali::Toolkit::Ruler object +typedef IntrusivePtr RulerPtr; ///< Pointer to Dali::Toolkit::Ruler object @SINCE_1_0.0 /** * @brief Concrete implementation of Ruler that has no snapping and has one single page. + * @SINCE_1_0.0 */ class DALI_IMPORT_API DefaultRuler : public Ruler { public: /** * @brief DefaultRuler constructor. + * @SINCE_1_0.0 */ DefaultRuler(); @@ -371,6 +401,7 @@ public: /** * @brief Concrete implementation of Ruler that has fixed snapping. + * @SINCE_1_0.0 */ class DALI_IMPORT_API FixedRuler : public Ruler { @@ -378,6 +409,7 @@ public: /** * @brief Constructor * + * @SINCE_1_0.0 * @param[in] spacing The spacing between each interval on this ruler. */ FixedRuler(float spacing = 1.0f); @@ -417,6 +449,7 @@ class ScrollView; * | %Signal Name | Method | * |-------------------|----------------------------| * | snap-started | @ref SnapStartedSignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API ScrollView : public Scrollable { @@ -425,6 +458,7 @@ public: /** * @brief Clamp signal event's data + * @SINCE_1_0.0 */ struct ClampEvent { @@ -435,6 +469,7 @@ public: /** * @brief Snap signal event's data. + * @SINCE_1_0.0 */ struct SnapEvent { @@ -445,61 +480,64 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @since DALi 1.1.18 - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices, @since DALi 1.1.18 + PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.18 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices, @SINCE_1_1.18 ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 }; /** * @brief An enumeration of properties belonging to the ScrollView class. + * @SINCE_1_0.0 */ struct Property { enum { // Event side properties - WRAP_ENABLED = PROPERTY_START_INDEX, ///< Property, name "wrapEnabled", @see SetWrapMode(), type bool, @since DALi 1.1.18 - PANNING_ENABLED, ///< Property, name "panningEnabled", @see SetScrollSensitive(), type bool, @since DALi 1.1.18 - AXIS_AUTO_LOCK_ENABLED, ///< Property, name "axisAutoLockEnabled", @see SetAxisAutoLock(), type bool, @since DALi 1.1.18 - WHEEL_SCROLL_DISTANCE_STEP, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type Vector2, @since DALi 1.1.18 - - SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollPosition", type Vector2 - SCROLL_PRE_POSITION, ///< Property, name "scrollPrePosition", type Vector2 - SCROLL_PRE_POSITION_X, ///< Property, name "scrollPrePositionX", type float - SCROLL_PRE_POSITION_Y, ///< Property, name "scrollPrePositionY", type float - SCROLL_PRE_POSITION_MAX, ///< Property, name "scrollPrePositionMax", type Vector2 - SCROLL_PRE_POSITION_MAX_X, ///< Property, name "scrollPrePositionMaxX", type float - SCROLL_PRE_POSITION_MAX_Y, ///< Property, name "scrollPrePositionMaxY", type float - OVERSHOOT_X, ///< Property, name "overshootX", type float - OVERSHOOT_Y, ///< Property, name "overshootY", type float - SCROLL_FINAL, ///< Property, name "scrollFinal", type Vector2 - SCROLL_FINAL_X, ///< Property, name "scrollFinalX", type float - SCROLL_FINAL_Y, ///< Property, name "scrollFinalY", type float - WRAP, ///< Property, name "wrap", type bool - PANNING, ///< Property, name "panning", type bool - SCROLLING, ///< Property, name "scrolling", type bool - SCROLL_DOMAIN_SIZE, ///< Property, name "scrollDomainSize", type Vector2 - SCROLL_DOMAIN_SIZE_X, ///< Property, name "scrollDomainSizeX", type float - SCROLL_DOMAIN_SIZE_Y, ///< Property, name "scrollDomainSizeY", type float - SCROLL_DOMAIN_OFFSET, ///< Property, name "scrollDomainOffset", type Vector2 - SCROLL_POSITION_DELTA, ///< Property, name "scrollPositionDelta", type Vector2 - START_PAGE_POSITION ///< Property, name "startPagePosition", type Vector3 + 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 }; }; // Typedefs - typedef Signal< void ( const SnapEvent& ) > SnapStartedSignalType; ///< SnapStarted signal type + typedef Signal< void ( const SnapEvent& ) > SnapStartedSignalType; ///< SnapStarted signal type @SINCE_1_0.0 public: /** * @brief Creates an empty ScrollView handle. + * @SINCE_1_0.0 */ ScrollView(); @@ -508,6 +546,7 @@ public: * * Creates another handle that points to the same real object * + * @SINCE_1_0.0 * @param[in] handle to copy from */ ScrollView( const ScrollView& handle ); @@ -516,6 +555,7 @@ public: * @brief Assignment operator. * * Changes this handle to point to another real object + * @SINCE_1_0.0 * @param[in] handle The handle to copy from * @return A reference to this */ @@ -525,12 +565,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~ScrollView(); /** * @brief Create an initialized ScrollView. * + * @SINCE_1_0.0 * @return A handle to a newly allocated Dali resource. */ static ScrollView New(); @@ -541,6 +583,7 @@ public: * If handle points to a ScrollView the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a ScrollView or an uninitialized handle */ @@ -551,6 +594,7 @@ public: /** * @brief Get snap-animation's AlphaFunction. * + * @SINCE_1_0.0 * @return Current easing alpha function of the snap animation. */ AlphaFunction GetScrollSnapAlphaFunction() const; @@ -558,6 +602,7 @@ public: /** * @brief Set snap-animation's AlphaFunction. * + * @SINCE_1_0.0 * @param[in] alpha Easing alpha function of the snap animation. */ void SetScrollSnapAlphaFunction(AlphaFunction alpha); @@ -565,6 +610,7 @@ public: /** * @brief Get flick-animation's AlphaFunction. * + * @SINCE_1_0.0 * @return Current easing alpha function of the flick animation. */ AlphaFunction GetScrollFlickAlphaFunction() const; @@ -572,6 +618,7 @@ public: /** * @brief Set flick-animation's AlphaFunction. * + * @SINCE_1_0.0 * @param[in] alpha Easing alpha function of the flick animation. */ void SetScrollFlickAlphaFunction(AlphaFunction alpha); @@ -581,6 +628,7 @@ public: * * This animation occurs when the user drags, and releases. * + * @SINCE_1_0.0 * @return The time in seconds for the animation to take. */ float GetScrollSnapDuration() const; @@ -590,6 +638,7 @@ public: * * This animation occurs when the user drags, and releases. * + * @SINCE_1_0.0 * @param[in] time The time in seconds for the animation to take. */ void SetScrollSnapDuration(float time); @@ -599,6 +648,7 @@ public: * * This animation occurs when the user flicks scroll view. * + * @SINCE_1_0.0 * @return The time in seconds for the animation to take. */ float GetScrollFlickDuration() const; @@ -608,6 +658,7 @@ public: * * This animation occurs when the user flicks scroll view. * + * @SINCE_1_0.0 * @param[in] time The time in seconds for the animation to take. */ void SetScrollFlickDuration(float time); @@ -618,6 +669,7 @@ public: * Defines how scrolling horizontally is snapped, and * the boundary (domain) in which the ScrollView can pan. * + * @SINCE_1_0.0 * @param[in] ruler The ruler to be used for the X axis */ void SetRulerX(RulerPtr ruler); @@ -628,6 +680,7 @@ public: * Defines how scrolling vertically is snapped, and the boundary * (domain) in which the ScrollView can pan. * + * @SINCE_1_0.0 * @param[in] ruler The ruler to be used for the Y axis */ void SetRulerY(RulerPtr ruler); @@ -635,10 +688,11 @@ public: /** * @brief Set Scroll's touch sensitivity. * + * @SINCE_1_0.0 + * @param[in] sensitive true to enable scroll, false to disable scrolling * @note Unlike SetSensitive(), this determines whether this ScrollView * should react (e.g. pan), without disrupting the sensitivity of it's children. * - * @param[in] sensitive true to enable scroll, false to disable scrolling */ void SetScrollSensitive(bool sensitive); @@ -650,6 +704,7 @@ public: * edge of a scrollable area and the maximum overshoot is 100 then * the final overshoot value will be 0.75f) * + * @SINCE_1_0.0 * @param[in] overshootX the maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f * @param[in] overshootY the maximum number of vertically scrolled pixels before overshoot Y reaches 1.0f */ @@ -658,6 +713,7 @@ public: /** * @brief Set Snap Overshoot animation's AlphaFunction. * + * @SINCE_1_0.0 * @param[in] alpha Easing alpha function of the overshoot snap animation. */ void SetSnapOvershootAlphaFunction(AlphaFunction alpha); @@ -665,9 +721,10 @@ public: /** * @brief Set Snap Overshoot animation's Duration. * + * @SINCE_1_0.0 + * @param[in] duration The duration of the overshoot snap animation. * @note Set duration to 0 seconds, to disable Animation. * - * @param[in] duration The duration of the overshoot snap animation. */ void SetSnapOvershootDuration(float duration); @@ -678,6 +735,7 @@ public: * snap to the closest actor (The closest actor will appear in the center of * the ScrollView). * + * @SINCE_1_0.0 * @param[in] enable Enables (true), or disables (false) Actor AutoSnap */ void SetActorAutoSnap(bool enable); @@ -687,16 +745,18 @@ public: * * When enabled, the ScrollView contents are wrapped over the X/Y Domain. * + * @SINCE_1_0.0 + * @param[in] enable Enables (true), or disables (false) Wrap Mode. * @note You must apply a position constraint that causes Wrapping * to all children. * - * @param[in] enable Enables (true), or disables (false) Wrap Mode. */ void SetWrapMode(bool enable); /** * @brief Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted * + * @SINCE_1_0.0 * @return Current scroll update distance */ int GetScrollUpdateDistance() const; @@ -707,6 +767,7 @@ public: * The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application. * Each time the ScrollView crosses this distance the signal will be emitted * + * @SINCE_1_0.0 * @param[in] distance The distance for ScrollView to move before emitting update signal */ void SetScrollUpdateDistance(int distance); @@ -714,6 +775,7 @@ public: /** * @brief Returns state of Axis Auto Lock mode. * + * @SINCE_1_0.0 * @return Whether Axis Auto Lock mode has been enabled or not. */ bool GetAxisAutoLock() const; @@ -725,6 +787,7 @@ public: * vertical, will be automatically restricted to horizontal only or vertical * only panning, until the pan gesture has completed. * + * @SINCE_1_0.0 * @param[in] enable Enables (true), or disables (false) AxisAutoLock mode. */ void SetAxisAutoLock(bool enable); @@ -733,6 +796,7 @@ public: * @brief Gets the gradient threshold at which a panning gesture * should be locked to the Horizontal or Vertical axis. * + * @SINCE_1_0.0 * @return The gradient, a value between 0.0 and 1.0f. */ float GetAxisAutoLockGradient() const; @@ -747,6 +811,7 @@ public: * @note: Specifying a value of 1.0 (the maximum value accepted) indicates that * all panning gestures will auto-lock. Either to the horizontal or vertical axis. * + * @SINCE_1_0.0 * @param[in] gradient A value between 0.0 and 1.0 (auto-lock for all angles) */ void SetAxisAutoLockGradient(float gradient); @@ -757,6 +822,7 @@ public: * * This is a value in stage-diagonals per second^2. * stage-diagonal = Length( stage.width, stage.height ) + * @SINCE_1_0.0 * @return Friction coefficient is returned. */ float GetFrictionCoefficient() const; @@ -771,6 +837,7 @@ public: * A stage 480x800 in size has a diagonal length of 933. * Friction coefficient of 1.0 means the swipe velocity will * reduce by 1.0 * 933 pixels/sec^2. + * @SINCE_1_0.0 * @param[in] friction Friction coefficient, must be greater than 0.0 (default = 1.0) */ void SetFrictionCoefficient(float friction); @@ -782,6 +849,7 @@ public: * This is a constant which multiplies the input touch * flick velocity to determine the actual velocity at * which to move the scrolling area. + * @SINCE_1_0.0 * @return The flick speed coefficient is returned. */ float GetFlickSpeedCoefficient() const; @@ -793,6 +861,7 @@ public: * This is a constant which multiplies the input touch * flick velocity to determine the actual velocity at * which to move the scrolling area. + * @SINCE_1_0.0 * @param[in] speed The flick speed coefficient (default = 1.0). */ void SetFlickSpeedCoefficient(float speed); @@ -800,6 +869,7 @@ public: /** * @brief Returns the minimum pan distance required for a flick gesture in pixels * + * @SINCE_1_0.0 * @return Minimum pan distance vector with separate x and y distance */ Vector2 GetMinimumDistanceForFlick() const; @@ -809,6 +879,7 @@ public: * * Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes a flick will be allowed * + * @SINCE_1_0.0 * @param[in] distance The minimum pan distance for a flick */ void SetMinimumDistanceForFlick( const Vector2& distance ); @@ -816,6 +887,7 @@ public: /** * @brief Returns the minimum pan speed required for a flick gesture in pixels per second * + * @SINCE_1_0.0 * @return Minimum pan speed */ float GetMinimumSpeedForFlick() const; @@ -823,6 +895,7 @@ public: /** * @brief Sets the minimum pan speed required for a flick in pixels per second * + * @SINCE_1_0.0 * @param[in] speed The minimum pan speed for a flick */ void SetMinimumSpeedForFlick( float speed ); @@ -833,6 +906,7 @@ public: * * This is a value in stage-diagonals per second. * stage-diagonal = Length( stage.width, stage.height ) + * @SINCE_1_0.0 * @return Maximum flick speed is returned */ float GetMaxFlickSpeed() const; @@ -847,6 +921,7 @@ public: * A stage 480x800 in size has a diagonal length of 933. * Max Flick speed of 1.0 means the maximum velocity of * a swipe can be 1.0 * 933 pixels/sec. + * @SINCE_1_0.0 * @param[in] speed Maximum flick speed (default = 3.0) */ void SetMaxFlickSpeed(float speed); @@ -855,6 +930,7 @@ public: * @brief Gets the step of scroll distance in actor coordinates for * each wheel event received in free panning mode. * + * @SINCE_1_0.0 * @return The step of scroll distance(pixel) in X and Y axes. */ Vector2 GetWheelScrollDistanceStep() const; @@ -863,6 +939,7 @@ public: * @brief Sets the step of scroll distance in actor coordinates for * each wheel event received in free panning mode. * + * @SINCE_1_0.0 * @param[in] step The step of scroll distance(pixel) in X and Y axes. * * @note: If snap points are defined in the rulers, it will always @@ -876,6 +953,7 @@ public: * @brief Retrieves current scroll position. * * @returns The current scroll position. + * @SINCE_1_0.0 */ Vector2 GetCurrentScrollPosition() const; @@ -888,6 +966,7 @@ public: * @note: Pages start from 0 as the first page, not 1. * * @returns The Current page. + * @SINCE_1_0.0 */ unsigned int GetCurrentPage() const; @@ -898,9 +977,10 @@ public: * increasing Y scrolls contents up. * - If Rulers have been applied to the axes, then the contents will scroll until * reaching the domain boundary. + * @SINCE_1_0.0 + * @param[in] position The position to scroll to. * @note Contents will not snap to ruler snap points. * - * @param[in] position The position to scroll to. */ void ScrollTo(const Vector2& position); @@ -911,10 +991,11 @@ public: * increasing Y scrolls contents up. * - If Rulers have been applied to the axes, then the contents will scroll until * reaching the domain boundary. - * @note Contents will not snap to ruler snap points. - * + * @SINCE_1_0.0 * @param[in] position The position to scroll to. * @param[in] duration The duration of the animation in seconds + * @note Contents will not snap to ruler snap points. + * */ void ScrollTo(const Vector2& position, float duration); @@ -925,11 +1006,12 @@ public: * increasing Y scrolls contents up. * - If Rulers have been applied to the axes, then the contents will scroll until * reaching the domain boundary. - * @note Contents will not snap to ruler snap points. - * + * @SINCE_1_0.0 * @param[in] position The position to scroll to. * @param[in] duration The duration of the animation in seconds * @param[in] alpha The alpha function to use + * @note Contents will not snap to ruler snap points. + * */ void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha); @@ -940,15 +1022,16 @@ public: * increasing Y scrolls contents up. * - If Rulers have been applied to the axes, then the contents will scroll until * reaching the domain boundary. + * @SINCE_1_0.0 + * @param[in] position The position to scroll to. + * @param[in] duration The duration of the animation in seconds + * @param[in] horizontalBias Whether to bias scrolling to left or right. + * @param[in] verticalBias Whether to bias scrolling to top or bottom. * @note Contents will not snap to ruler snap points. * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in * wrap mode, the application developer can decide whether to scroll left or right * to get to the target page * - * @param[in] position The position to scroll to. - * @param[in] duration The duration of the animation in seconds - * @param[in] horizontalBias Whether to bias scrolling to left or right. - * @param[in] verticalBias Whether to bias scrolling to top or bottom. */ void ScrollTo(const Vector2& position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias); @@ -960,16 +1043,17 @@ public: * increasing Y scrolls contents up. * - If Rulers have been applied to the axes, then the contents will scroll until * reaching the domain boundary. - * @note Contents will not snap to ruler snap points. - * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in - * wrap mode, the application developer can decide whether to scroll left or right - * to get to the target page - * + * @SINCE_1_0.0 * @param[in] position The position to scroll to. * @param[in] duration The duration of the animation in seconds * @param[in] horizontalBias Whether to bias scrolling to left or right. * @param[in] verticalBias Whether to bias scrolling to top or bottom. * @param[in] alpha Alpha function to use + * @note Contents will not snap to ruler snap points. + * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in + * wrap mode, the application developer can decide whether to scroll left or right + * to get to the target page + * */ void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias); @@ -978,11 +1062,12 @@ public: * @brief Scrolls View to page currently based on assumption that each page is * "(page) * ScrollViewSize.width, 0". * + * @SINCE_1_0.0 + * @param[in] page to scroll to * @note Should probably be upgraded so that page is an abstract class, that can be * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be * orchestrated in a 2D grid fashion, or variable width. * - * @param[in] page to scroll to */ void ScrollTo(unsigned int page); @@ -990,12 +1075,13 @@ public: * @brief Scrolls View to page currently based on assumption that each page is * "(page) * ScrollViewSize.width, 0". * + * @SINCE_1_0.0 + * @param[in] page to scroll to + * @param[in] duration The duration of the animation in seconds * @note Should probably be upgraded so that page is an abstract class, that can be * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be * orchestrated in a 2D grid fashion, or variable width. * - * @param[in] page to scroll to - * @param[in] duration The duration of the animation in seconds */ void ScrollTo(unsigned int page, float duration); @@ -1003,6 +1089,10 @@ public: * @brief Scrolls View to page currently based on assumption that each page is * "(page) * ScrollViewSize.width, 0". * + * @SINCE_1_0.0 + * @param[in] page to scroll to + * @param[in] duration The duration of the animation in seconds + * @param[in] bias Whether to bias scrolling to left or right. * @note Should probably be upgraded so that page is an abstract class, that can be * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be * orchestrated in a 2D grid fashion, or variable width. @@ -1010,28 +1100,27 @@ public: * the application developer can decide whether to scroll left or right to get to * the target page. * - * @param[in] page to scroll to - * @param[in] duration The duration of the animation in seconds - * @param[in] bias Whether to bias scrolling to left or right. */ void ScrollTo(unsigned int page, float duration, DirectionBias bias); /** * @brief Scrolls View such that actor appears in the center of the ScrollView. * + * @SINCE_1_0.0 + * @param[in] actor The actor to center in on (via Scrolling). * @note Actor must be a direct child of ScrollView, otherwise will * cause an assertion failure. - * @param[in] actor The actor to center in on (via Scrolling). */ void ScrollTo(Actor& actor); /** * @brief Scrolls View such that actor appears in the center of the ScrollView. * - * @note Actor must be a direct child of ScrollView, otherwise will - * cause an assertion failure. + * @SINCE_1_0.0 * @param[in] actor The actor to center in on (via Scrolling). * @param[in] duration The duration of the animation in seconds + * @note Actor must be a direct child of ScrollView, otherwise will + * cause an assertion failure. */ void ScrollTo(Actor& actor, float duration); @@ -1040,6 +1129,7 @@ public: * * If already at snap points, then will return false, and not scroll. * + * @SINCE_1_0.0 * @return True if Snapping necessary. */ bool ScrollToSnapPoint(); @@ -1047,14 +1137,16 @@ public: /** * @brief Applies a constraint that will affect the children of ScrollView. * - * @note this affects all existing and future Actors that are added to scrollview. + * @SINCE_1_0.0 * @param[in] constraint The constraint to apply + * @note this affects all existing and future Actors that are added to scrollview. */ void ApplyConstraintToChildren(Constraint constraint); /** * @brief Removes all constraints that will affect the children of ScrollView. * + * @SINCE_1_0.0 * @note this removes all constraints from actors that have been added * to scrollview. */ @@ -1063,6 +1155,7 @@ public: /** * @brief Apply Effect to ScrollView. * + * @SINCE_1_0.0 * @param[in] effect The effect to apply to scroll view */ void ApplyEffect(ScrollViewEffect effect); @@ -1070,12 +1163,14 @@ public: /** * @brief Remove Effect from ScrollView. * + * @SINCE_1_0.0 * @param[in] effect The effect to remove. */ void RemoveEffect(ScrollViewEffect effect); /** * @brief Remove All Effects from ScrollView. + * @SINCE_1_0.0 */ void RemoveAllEffects(); @@ -1085,6 +1180,7 @@ public: * Once an actor is bound to a ScrollView, it will be subject to * that ScrollView's properties. * + * @SINCE_1_0.0 * @param[in] child The actor to add to this ScrollView. */ void BindActor(Actor child); @@ -1093,15 +1189,17 @@ public: * @brief Unbind Actor from this ScrollView. * * Once Unbound, this ScrollView will not affect the actor. + * @SINCE_1_0.0 + * @param[in] child The actor to be unbound. * @note this does not remove the child from the ScrollView container * - * @param[in] child The actor to be unbound. */ void UnbindActor(Actor child); /** * @brief Allows the user to constrain the scroll view in a particular direction. * + * @SINCE_1_0.0 * @param[in] direction The axis to constrain the scroll-view to. * Usually set to PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired). * @param[in] threshold The threshold to apply around the axis. @@ -1112,6 +1210,7 @@ public: /** * @brief Remove a direction constraint from the scroll view. * + * @SINCE_1_0.0 * @param[in] direction The axis to stop constraining to. * Usually will be PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired). */ @@ -1127,8 +1226,9 @@ public: // Signals * @code * void YourCallbackName(const SnapEvent& event); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ SnapStartedSignalType& SnapStartedSignal(); @@ -1137,6 +1237,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL ScrollView(Internal::ScrollView& implementation); @@ -1144,6 +1245,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL ScrollView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/scrollable/scrollable.h b/dali-toolkit/public-api/controls/scrollable/scrollable.h index c14f203..71ad8ab 100644 --- a/dali-toolkit/public-api/controls/scrollable/scrollable.h +++ b/dali-toolkit/public-api/controls/scrollable/scrollable.h @@ -48,6 +48,7 @@ class Scrollable; * | scrollStarted | @ref ScrollStartedSignal() | * | scrollCompleted | @ref ScrollUpdatedSignal() | * | scrollUpdated | @ref ScrollCompletedSignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API Scrollable : public Control { @@ -55,51 +56,54 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices + 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 ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 }; /** * @brief An enumeration of properties belonging to the Scrollable class. + * @SINCE_1_0.0 */ struct Property { enum { // Event side properties - OVERSHOOT_EFFECT_COLOR = PROPERTY_START_INDEX, ///< Property, name "overshootEffectColor", @see SetOvershootEffectColor(), type Vector4 - OVERSHOOT_ANIMATION_SPEED, ///< Property, name "overshootAnimationSpeed", @see SetOvershootAnimationSpeed(), type float - OVERSHOOT_ENABLED, ///< Property, name "overshootEnabled", @see SetOvershootEnabled(), type bool, @since DALi 1.1.18 + OVERSHOOT_EFFECT_COLOR = PROPERTY_START_INDEX, ///< Property, name "overshootEffectColor", @see SetOvershootEffectColor(), type Vector4 @SINCE_1_0.0 + OVERSHOOT_ANIMATION_SPEED, ///< Property, name "overshootAnimationSpeed", @see SetOvershootAnimationSpeed(), type float @SINCE_1_0.0 + OVERSHOOT_ENABLED, ///< Property, name "overshootEnabled", @see SetOvershootEnabled(), type bool, @SINCE_1_1.18 // Animatable properties - SCROLL_RELATIVE_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollRelativePosition", type Vector2 - SCROLL_POSITION_MIN, ///< Property, name "scrollPositionMin", type Vector2 - SCROLL_POSITION_MIN_X, ///< Property, name "scrollPositionMinX", type float - SCROLL_POSITION_MIN_Y, ///< Property, name "scrollPositionMinY", type float - SCROLL_POSITION_MAX, ///< Property, name "scrollPositionMax", type Vector2 - SCROLL_POSITION_MAX_X, ///< Property, name "scrollPositionMaxX", type float - SCROLL_POSITION_MAX_Y, ///< Property, name "scrollPositionMaxY", type float - CAN_SCROLL_VERTICAL, ///< Property, name "canScrollVertical", type bool - CAN_SCROLL_HORIZONTAL ///< Property, name "canScrollHorizontal", type bool + SCROLL_RELATIVE_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollRelativePosition", type Vector2 @SINCE_1_0.0 + SCROLL_POSITION_MIN, ///< Property, name "scrollPositionMin", type Vector2 @SINCE_1_0.0 + SCROLL_POSITION_MIN_X, ///< Property, name "scrollPositionMinX", type float @SINCE_1_0.0 + SCROLL_POSITION_MIN_Y, ///< Property, name "scrollPositionMinY", type float @SINCE_1_0.0 + SCROLL_POSITION_MAX, ///< Property, name "scrollPositionMax", type Vector2 @SINCE_1_0.0 + SCROLL_POSITION_MAX_X, ///< Property, name "scrollPositionMaxX", type float @SINCE_1_0.0 + SCROLL_POSITION_MAX_Y, ///< Property, name "scrollPositionMaxY", type float @SINCE_1_0.0 + CAN_SCROLL_VERTICAL, ///< Property, name "canScrollVertical", type bool @SINCE_1_0.0 + CAN_SCROLL_HORIZONTAL ///< Property, name "canScrollHorizontal", type bool @SINCE_1_0.0 }; }; // Typedefs - typedef Signal< void ( const Vector2& ) > ScrollStartedSignalType; ///< ScrollStarted signal type - typedef Signal< void ( const Vector2& ) > ScrollCompletedSignalType; ///< ScrollCompleted signal type - typedef Signal< void ( const Vector2& ) > ScrollUpdatedSignalType; ///< Scroll updated signal type + typedef Signal< void ( const Vector2& ) > ScrollStartedSignalType; ///< ScrollStarted signal type @SINCE_1_0.0 + typedef Signal< void ( const Vector2& ) > ScrollCompletedSignalType; ///< ScrollCompleted signal type @SINCE_1_0.0 + typedef Signal< void ( const Vector2& ) > ScrollUpdatedSignalType; ///< Scroll updated signal type @SINCE_1_0.0 public: /** * @brief Creates an uninitialized Scrollable handle. + * @SINCE_1_0.0 */ Scrollable(); @@ -108,6 +112,7 @@ public: * * Creates another handle that points to the same real object * + * @SINCE_1_0.0 * @param handle to copy from */ Scrollable( const Scrollable& handle ); @@ -116,6 +121,7 @@ public: * @brief Assignment operator. * * Changes this handle to point to another real object + * @SINCE_1_0.0 * @param[in] handle to copy from * @return A reference to this */ @@ -125,6 +131,7 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~Scrollable(); @@ -134,6 +141,7 @@ public: * If handle points to a Scrollable the downcast produces valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a Scrollable or an uninitialized handle */ @@ -142,6 +150,7 @@ public: /** * @brief Checks if scroll overshoot has been enabled or not. * + * @SINCE_1_0.0 * @return Whether the scroll obvershoot is enabled */ bool IsOvershootEnabled() const; @@ -149,6 +158,7 @@ public: /** * @brief Sets whether to enables or disable scroll overshoot. * + * @SINCE_1_0.0 * @param[in] enable Whether to enable the scroll obvershoot or not */ void SetOvershootEnabled(bool enable); @@ -156,12 +166,14 @@ public: /** * @brief Set the color of the overshoot effect. * + * @SINCE_1_0.0 * @param[in] color The color of the overshoot effect. */ void SetOvershootEffectColor( const Vector4& color ); /** * @brief Get the color of the overshoot effect. + * @SINCE_1_0.0 * @return The color of the overshoot effect. */ Vector4 GetOvershootEffectColor() const; @@ -169,12 +181,14 @@ public: /** * @brief Set the speed of overshoot animation in pixels per second. * When the speed is not greater than 0, the overshoot is set instantly with no animation. + * @SINCE_1_0.0 * @param[in] pixelsPerSecond The speed of the overshoot animation. */ void SetOvershootAnimationSpeed( float pixelsPerSecond ); /** * @brief Get the speed of overshoot animation in pixels per second. + * @SINCE_1_0.0 * @return The speed of the overshoot animation. */ float GetOvershootAnimationSpeed() const; @@ -188,8 +202,9 @@ public: // Signals * @code * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ScrollStartedSignalType& ScrollStartedSignal(); @@ -200,8 +215,9 @@ public: // Signals * @code * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ScrollUpdatedSignalType& ScrollUpdatedSignal(); @@ -212,8 +228,9 @@ public: // Signals * @code * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ ScrollCompletedSignalType& ScrollCompletedSignal(); @@ -222,6 +239,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL Scrollable(Internal::Scrollable& implementation); @@ -229,6 +247,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL Scrollable( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/table-view/table-view.h b/dali-toolkit/public-api/controls/table-view/table-view.h index 1774f60..3e8ce7d 100644 --- a/dali-toolkit/public-api/controls/table-view/table-view.h +++ b/dali-toolkit/public-api/controls/table-view/table-view.h @@ -81,6 +81,7 @@ class TableView; * "cellVerticalAlignment": "center" // property to specify how to align vertically inside the cells, if not set, default value is 'top' * } * @endcode + * @SINCE_1_0.0 */ class DALI_IMPORT_API TableView : public Control { @@ -88,11 +89,12 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + 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 }; /** @@ -102,54 +104,58 @@ public: * It has the format as follows in script: * @code * "layoutRows": - { - "0": { "policy": "fixed", "value": 40 }, //@see SetFixedHight - "2": { "policy": "relative", "value": 0.33 }, //@see SetRelativeHeight - "3": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its height is decided by the children in this row - } + * { + * "0": { "policy": "fixed", "value": 40 }, //@see SetFixedHight + * "2": { "policy": "relative", "value": 0.33 }, //@see SetRelativeHeight + * "3": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its height is decided by the children in this row + * } * @endcode * * LayoutColumns: set the height of the rows. * It has the format as follows in script: * @code * "layoutColumns": - { - "0": { "policy": "fixed", "value": 40 }, //@see SetFixedWidth - "1": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its width is decided by the children in this column - "2": { "policy": "relative", "value": 0.33 } //@see SetRelativeWidth - } + * { + * "0": { "policy": "fixed", "value": 40 }, //@see SetFixedWidth + * "1": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its width is decided by the children in this column + * "2": { "policy": "relative", "value": 0.33 } //@see SetRelativeWidth + * } * @endcode + * @SINCE_1_0.0 */ struct Property { enum { - ROWS = PROPERTY_START_INDEX, ///< name "rows", type unsigned int - COLUMNS, ///< name "columns", type unsigned int - CELL_PADDING, ///< name "cellPadding", type Vector2 - LAYOUT_ROWS, ///< name "layoutRows", type Map - LAYOUT_COLUMNS, ///< name "layoutColumns", type Map + ROWS = PROPERTY_START_INDEX, ///< name "rows", type unsigned int @SINCE_1_0.0 + COLUMNS, ///< name "columns", type unsigned int @SINCE_1_0.0 + CELL_PADDING, ///< name "cellPadding", type Vector2 @SINCE_1_0.0 + LAYOUT_ROWS, ///< name "layoutRows", type Map @SINCE_1_0.0 + LAYOUT_COLUMNS, ///< name "layoutColumns", type Map @SINCE_1_0.0 }; }; /** * @brief Describes how the size of a row / column been set + * @SINCE_1_0.0 */ enum LayoutPolicy { - FIXED, ///< Fixed with the given value. - RELATIVE, ///< Calculated as percentage of the remainder after subtracting Padding and Fixed height/width - FILL, ///< Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns - FIT ///< Fit around its children. + FIXED, ///< Fixed with the given value. @SINCE_1_0.0 + RELATIVE, ///< Calculated as percentage of the remainder after subtracting Padding and Fixed height/width @SINCE_1_0.0 + FILL, ///< Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns @SINCE_1_0.0 + FIT ///< Fit around its children. @SINCE_1_0.0 }; /** - * Structure to specify layout position for child actor + * @brief Structure to specify layout position for child actor + * @SINCE_1_0.0 */ struct CellPosition { /** - * Constructor to initialise values to defaults for convenience + * @brief Constructor to initialise values to defaults for convenience + * @SINCE_1_0.0 */ CellPosition( unsigned int rowIndex = 0, unsigned int columnIndex = 0, unsigned int rowSpan = 1, unsigned int columnSpan = 1 ) @@ -164,19 +170,22 @@ public: }; /** - * Create a TableView handle; this can be initialised with TableView::New() + * @brief Create a TableView handle; this can be initialised with TableView::New() * Calling member functions with an uninitialised handle is not allowed. + * @SINCE_1_0.0 */ TableView(); /** - * Copy constructor. Creates another handle that points to the same real object + * @brief Copy constructor. Creates another handle that points to the same real object + * @SINCE_1_0.0 * @param handle to copy from */ TableView( const TableView& handle ); /** - * Assignment operator. Changes this handle to point to another real object + * @brief Assignment operator. Changes this handle to point to another real object + * @SINCE_1_0.0 */ TableView& operator=( const TableView& handle ); @@ -184,11 +193,13 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~TableView(); /** - * Create the TableView control. + * @brief Create the TableView control. + * @SINCE_1_0.0 * @param[in] initialRows for the table * @param[in] initialColumns for the table * @return A handle to the TableView control. @@ -196,42 +207,47 @@ public: static TableView New( unsigned int initialRows, unsigned int initialColumns ); /** - * Downcast an Object handle to TableView. If handle points to a TableView the + * @brief Downcast an Object handle to TableView. If handle points to a TableView the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a TableView or an uninitialized handle */ static TableView DownCast( BaseHandle handle ); /** - * Adds a child to the table + * @brief Adds a child to the table * If the row or column index is outside the table, the table gets resized bigger - * @pre The child actor has been initialized. + * @SINCE_1_0.0 * @param[in] child to add * @param[in] position for the child * @return true if the addition succeeded, false if the cell is already occupied + * @pre The child actor has been initialized. */ bool AddChild( Actor child, CellPosition position ); /** - * Returns a child from the given layout position + * @brief Returns a child from the given layout position * Note! if there is no child in this position this method returns an uninitialized * Actor handle + * @SINCE_1_0.0 * @param[in] position in the table * @return child that was in the cell or an uninitialized handle */ Actor GetChildAt( CellPosition position ); /** - * Removes a child from the given layout position + * @brief Removes a child from the given layout position * Note! if there is no child in this position this method does nothing + * @SINCE_1_0.0 * @param[in] position for the child to remove * @return child that was removed or an uninitialized handle */ Actor RemoveChildAt( CellPosition position ); /** - * Finds the childs layout position + * @brief Finds the childs layout position + * @SINCE_1_0.0 * @param[in] child to search for * @param[out] position for the child * @return true if the child was included in this TableView @@ -239,59 +255,67 @@ public: bool FindChildPosition( Actor child, CellPosition& position ); /** - * Insert a new row to given index + * @brief Insert a new row to given index + * @SINCE_1_0.0 * @param [in] rowIndex of the new row */ void InsertRow( unsigned int rowIndex ); /** - * Delete a row from given index + * @brief Delete a row from given index * Removed elements are deleted + * @SINCE_1_0.0 * @param [in] rowIndex of the row to delete */ void DeleteRow( unsigned int rowIndex ); /** - * Delete a row from given index + * @brief Delete a row from given index + * @SINCE_1_0.0 * @param [in] rowIndex of the row to delete * @param [out] removed elements */ void DeleteRow( unsigned int rowIndex, std::vector& removed ); /** - * Insert a new column to given index + * @brief Insert a new column to given index + * @SINCE_1_0.0 * @param [in] columnIndex of the new column */ void InsertColumn( unsigned int columnIndex ); /** - * Delete a column from given index. + * @brief Delete a column from given index. * Removed elements are deleted + * @SINCE_1_0.0 * @param [in] columnIndex of the column to delete */ void DeleteColumn( unsigned int columnIndex ); /** - * Delete a column from given index + * @brief Delete a column from given index + * @SINCE_1_0.0 * @param [in] columnIndex of the column to delete * @param [out] removed elements */ void DeleteColumn( unsigned int columnIndex, std::vector& removed ); /** - * Resize the TableView. Note! if the new size is smaller than old, + * @brief Resize the TableView. Note! if the new size is smaller than old, * superfluous actors get removed. If you want to relayout removed children, * use the variant that returns the removed Actors and reinsert them into the table * If an actor spans to a removed row or column it gets removed from the table + * @SINCE_1_0.0 * @param[in] rows for the table * @param[in] columns for the table */ void Resize( unsigned int rows, unsigned int columns ); /** - * Resize the TableView. Note! if the new size is smaller than old, + * @brief Resize the TableView. Note! if the new size is smaller than old, * superfluous actors get removed. * If an actor spans to a removed row or column it gets removed from the table + * @SINCE_1_0.0 * @param[in] rows for the table * @param[in] columns for the table * @param[out] removed actor handles @@ -299,12 +323,14 @@ public: void Resize( unsigned int rows, unsigned int columns, std::vector& removed ); /** - * Set horizontal and vertical padding between cells + * @brief Set horizontal and vertical padding between cells + * @SINCE_1_0.0 * @param[in] padding width and height */ void SetCellPadding( Size padding ); /** + * @SINCE_1_0.0 * @return the current padding as width and height */ Size GetCellPadding(); @@ -312,6 +338,7 @@ public: /** * @brief Specify this row as fitting its height to its children * + * @SINCE_1_0.0 * @param[in] rowIndex The row to set */ void SetFitHeight( unsigned int rowIndex ); @@ -319,6 +346,7 @@ public: /** * @brief Is the row a fit row * + * @SINCE_1_0.0 * @param[in] rowIndex The row to check * @return Return true if the row is fit */ @@ -327,6 +355,7 @@ public: /** * @brief Specify this column as fitting its width to its children * + * @SINCE_1_0.0 * @param[in] columnIndex The column to set */ void SetFitWidth( unsigned int columnIndex ); @@ -334,87 +363,98 @@ public: /** * @brief Is the column a fit column * + * @SINCE_1_0.0 * @param[in] columnIndex The column to check * @return Return true if the column is fit */ bool IsFitWidth( unsigned int columnIndex ) const; /** - * Sets a row to have fixed height + * @brief Sets a row to have fixed height * Setting a fixed height of 0 has no effect - * @pre The row rowIndex must exist. + * @SINCE_1_0.0 * @param rowIndex for row with fixed height * @param height in world coordinate units + * @pre The row rowIndex must exist. */ void SetFixedHeight( unsigned int rowIndex, float height ); /** - * Gets a row's fixed height. + * @brief Gets a row's fixed height. * Note! The returned value is valid if it has been set before. - * @pre The row rowIndex must exist. + * @SINCE_1_0.0 * @return height in world coordinate units. + * @pre The row rowIndex must exist. */ float GetFixedHeight( unsigned int rowIndex ) const; /** - * Sets a row to have relative height. Relative height means percentage of + * @brief Sets a row to have relative height. Relative height means percentage of * the remainder of the table height after subtracting Padding and Fixed height rows * Setting a relative height of 0 has no effect - * @pre The row rowIndex must exist. + * @SINCE_1_0.0 * @param rowIndex for row with relative height * @param heightPercentage between 0.0f and 1.0f + * @pre The row rowIndex must exist. */ void SetRelativeHeight( unsigned int rowIndex, float heightPercentage ); /** - * Gets a row's relative height. + * @brief Gets a row's relative height. * Note! The returned value is valid if it has been set before. - * @pre The row rowIndex must exist. + * @SINCE_1_0.0 * @return height in percentage units, between 0.0f and 1.0f. + * @pre The row rowIndex must exist. */ float GetRelativeHeight( unsigned int rowIndex ) const; /** - * Sets a column to have fixed width + * @brief Sets a column to have fixed width * Setting a fixed width of 0 has no effect - * @pre The column columnIndex must exist. + * @SINCE_1_0.0 * @param columnIndex for column with fixed width * @param width in world coordinate units + * @pre The column columnIndex must exist. */ void SetFixedWidth( unsigned int columnIndex, float width ); /** - * Gets a column's fixed width. + * @brief Gets a column's fixed width. * Note! The returned value is valid if it has been set before. - * @pre The column columnIndex must exist. + * @SINCE_1_0.0 * @return width in world coordinate units. + * @pre The column columnIndex must exist. */ float GetFixedWidth( unsigned int columnIndex ) const; /** - * Sets a column to have relative width. Relative width means percentage of + * @brief Sets a column to have relative width. Relative width means percentage of * the remainder of table width after subtracting Padding and Fixed width columns * Setting a relative width of 0 has no effect - * @pre The column columnIndex must exist. + * @SINCE_1_0.0 * @param columnIndex for column with fixed width * @param widthPercentage between 0.0f and 1.0f + * @pre The column columnIndex must exist. */ void SetRelativeWidth( unsigned int columnIndex, float widthPercentage ); /** - * Gets a column's relative width. + * @brief Gets a column's relative width. * Note! The returned value is valid if it has been set before. - * @pre The column columnIndex must exist. + * @SINCE_1_0.0 * @return width in percentage units, between 0.0f and 1.0f. + * @pre The column columnIndex must exist. */ float GetRelativeWidth( unsigned int columnIndex ) const; /** + * @SINCE_1_0.0 * @return the amount of rows in the table */ unsigned int GetRows(); /** + * @SINCE_1_0.0 * @return the amount of columns in the table */ unsigned int GetColumns(); @@ -424,6 +464,7 @@ public: * * Cells without calling this function have the default values of LEFT and TOP respectively. * + * @SINCE_1_0.0 * @param[in] position The cell to set alignment on. * @param[in] horizontal The horizontal alignment. * @param[in] vertical The vertical alignment. @@ -433,13 +474,15 @@ public: public: // Not intended for application developers /** - * Creates a handle using the Toolkit::Internal implementation. + * @brief Creates a handle using the Toolkit::Internal implementation. + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL TableView(Internal::TableView& implementation); /** - * Allows the creation of this Control from an Internal::CustomActor pointer. + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL TableView( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/text-controls/text-field.h b/dali-toolkit/public-api/controls/text-controls/text-field.h index 1ada2cd..e5115fe 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-field.h +++ b/dali-toolkit/public-api/controls/text-controls/text-field.h @@ -45,6 +45,7 @@ class TextField; * | textChanged | @ref TextChangedSignal() | * | maxLengthReached | @ref MaxLengthReachedSignal() | * + * @SINCE_1_0.0 */ class DALI_IMPORT_API TextField : public Control { @@ -52,59 +53,61 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + 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 }; /** * @brief An enumeration of properties belonging to the TextField class. + * @SINCE_1_0.0 */ struct Property { enum { - RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "renderingBackend", The type or rendering e.g. bitmap-based, type INT - TEXT, ///< name "text", The text to display in UTF-8 format, type STRING - PLACEHOLDER_TEXT, ///< name "placeholderText", The text to display when the TextField is empty and inactive, type STRING - PLACEHOLDER_TEXT_FOCUSED, ///< name "placeholderTextFocused", The text to display when the TextField is empty with key-input focus, type STRING - FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING - FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING - POINT_SIZE, ///< name "pointSize", The size of font in points, type FLOAT - MAX_LENGTH, ///< name "maxLength" The maximum number of characters that can be inserted, type INTEGER - EXCEED_POLICY, ///< name "exceedPolicy" Specifies how the text is truncated when it does not fit, type INTEGER - HORIZONTAL_ALIGNMENT, ///< name "horizontalAlignment", The line horizontal alignment, type STRING, values "BEGIN", "CENTER", "END" - VERTICAL_ALIGNMENT, ///< name "verticalAlignment", The line vertical alignment, type STRING, values "TOP", "CENTER", "BOTTOM" - TEXT_COLOR, ///< name "textColor", The text color, type VECTOR4 - PLACEHOLDER_TEXT_COLOR, ///< name "placeholderTextColor", The placeholder-text color, type VECTOR4 - SHADOW_OFFSET, ///< name "shadowOffset", The drop shadow offset 0 indicates no shadow, type VECTOR2 - SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4 - PRIMARY_CURSOR_COLOR, ///< name "primaryCursorColor", The color to apply to the primary cursor, type VECTOR4 - SECONDARY_CURSOR_COLOR, ///< name "secondaryCursorColor", The color to apply to the secondary cursor, type VECTOR4 - ENABLE_CURSOR_BLINK, ///< name "enableCursorBlink", Whether the cursor should blink or not, type BOOLEAN - CURSOR_BLINK_INTERVAL, ///< name "cursorBlinkInterval", The time interval in seconds between cursor on/off states, type FLOAT - CURSOR_BLINK_DURATION, ///< name "cursorBlinkDuration", The cursor will stop blinking after this number of seconds (if non-zero), type FLOAT - CURSOR_WIDTH, ///< name "cursorWidth", The cursor width, type INTEGER - GRAB_HANDLE_IMAGE, ///< name "grabHandleImage", The image to display for the grab handle, type STRING - GRAB_HANDLE_PRESSED_IMAGE, ///< name "grabHandlePressedImage", The image to display when the grab handle is pressed, type STRING - SCROLL_THRESHOLD, ///< name "scrollThreshold" Horizontal scrolling will occur if the cursor is this close to the control border, type FLOAT - SCROLL_SPEED, ///< name "scrollSpeed" The scroll speed in pixels per second, type FLOAT - SELECTION_HANDLE_IMAGE_LEFT, ///< name "selectionHandleImageLeft", The image to display for the left selection handle, type MAP - SELECTION_HANDLE_IMAGE_RIGHT, ///< name "selectionHandleImageRight", The image to display for the right selection handle, type MAP - SELECTION_HANDLE_PRESSED_IMAGE_LEFT, ///< name "selectionHandlePressedImageLeft", The image to display when the left selection handle is pressed, type MAP - SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, ///< name "selectionHandlePressedImageRight", The image to display when the right selection handle is pressed, type MAP - SELECTION_HANDLE_MARKER_IMAGE_LEFT, ///< name "selectionHandleMarkerImageLeft", The image to display for the left selection handle marker, type MAP - SELECTION_HANDLE_MARKER_IMAGE_RIGHT, ///< name "selectionHandleMarkerImageRight", The image to display for the right selection handle marker, type MAP - SELECTION_HIGHLIGHT_COLOR, ///< name "selectionHighlightColor", The color of the selection highlight, type VECTOR4 - DECORATION_BOUNDING_BOX, ///< name "decorationBoundingBox", The decorations (handles etc) will positioned within this area on-screen, type RECTANGLE - INPUT_METHOD_SETTINGS, ///< name "inputMethodSettings", The settings to relating to the System's Input Method, Key and Value type MAP - INPUT_COLOR, ///< name "inputColor", The color of the new input text, type VECTOR4 - ENABLE_MARKUP, ///< name "enableMarkup", Whether the mark-up processing is enabled. type BOOLEAN - INPUT_FONT_FAMILY, ///< name "inputFontFamily", The font's family of the new input text, type STRING - INPUT_FONT_STYLE, ///< name "inputFontStyle", The font's style of the new input text, type STRING - INPUT_POINT_SIZE ///< name "inputPointSize", The font's size of the new input text in points, type FLOAT + 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 @SINCE_1_0.0 + POINT_SIZE, ///< name "pointSize", The size of font in points, 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 @SINCE_1_0.0 + SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4 @SINCE_1_0.0 + 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 @SINCE_1_0.0 + INPUT_POINT_SIZE ///< name "inputPointSize", The font's size of the new input text in points, type FLOAT @SINCE_1_0.0 }; }; @@ -112,11 +115,12 @@ public: * @brief Specifies how the text is truncated when it does not fit * * The default value is \e EXCEED_POLICY_CLIP. + * @SINCE_1_0.0 */ enum ExceedPolicy { - EXCEED_POLICY_ORIGINAL, ///< The text will be display at original size, and may exceed the TextField boundary. - EXCEED_POLICY_CLIP ///< The end of text will be clipped to fit within the TextField. + EXCEED_POLICY_ORIGINAL, ///< The text will be display at original size, and may exceed the TextField boundary. @SINCE_1_0.0 + EXCEED_POLICY_CLIP ///< The end of text will be clipped to fit within the TextField. @SINCE_1_0.0 }; // Type Defs @@ -128,18 +132,21 @@ public: /** * @brief Create the TextField control. + * @SINCE_1_0.0 * @return A handle to the TextField control. */ static TextField New(); /** * @brief Creates an empty handle. + * @SINCE_1_0.0 */ TextField(); /** * @brief Copy constructor. * + * @SINCE_1_0.0 * @param[in] handle The handle to copy from. */ TextField( const TextField& handle ); @@ -147,6 +154,7 @@ public: /** * @brief Assignment operator. * + * @SINCE_1_0.0 * @param[in] handle The handle to copy from. * @return A reference to this. */ @@ -156,6 +164,7 @@ public: * @brief Destructor. * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~TextField(); @@ -165,6 +174,7 @@ public: * If the BaseHandle points is a TextField the downcast returns a valid handle. * If not the returned handle is left empty. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object. * @return handle to a TextField or an empty handle. */ @@ -179,6 +189,7 @@ public: * @code * void YourCallbackName( TextField textField ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ TextChangedSignalType& TextChangedSignal(); @@ -190,6 +201,7 @@ public: * @code * void YourCallbackName( TextField textField ); * @endcode + * @SINCE_1_0.0 * @return The signal to connect to. */ MaxLengthReachedSignalType& MaxLengthReachedSignal(); @@ -199,6 +211,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL TextField( Internal::TextField& implementation ); @@ -206,6 +219,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL TextField( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/controls/text-controls/text-label.h b/dali-toolkit/public-api/controls/text-controls/text-label.h index 6abc9fd..317918e 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-label.h +++ b/dali-toolkit/public-api/controls/text-controls/text-label.h @@ -40,6 +40,7 @@ class TextLabel; * @brief A control which renders a short text string. * * Text labels are lightweight, non-editable and do not respond to user input. + * @SINCE_1_0.0 */ class DALI_IMPORT_API TextLabel : public Control { @@ -47,41 +48,44 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + 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 }; /** * @brief An enumeration of properties belonging to the TextLabel class. + * @SINCE_1_0.0 */ struct Property { enum { - RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "renderingBackend", The type or rendering e.g. bitmap-based, type INT - TEXT, ///< name "text", The text to display in UTF-8 format, type STRING - FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING - FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING - POINT_SIZE, ///< name "pointSize", The size of font in points, type FLOAT - MULTI_LINE, ///< name "multiLine", The single-line or multi-line layout option, type BOOLEAN - HORIZONTAL_ALIGNMENT, ///< name "horizontalAlignment", The line horizontal alignment, type STRING, values "BEGIN", "CENTER", "END" - VERTICAL_ALIGNMENT, ///< name "verticalAlignment", The line vertical alignment, type STRING, values "TOP", "CENTER", "BOTTOM" - TEXT_COLOR, ///< name "textColor", The text color, type VECTOR4 - SHADOW_OFFSET, ///< name "shadowOffset", The drop shadow offset 0 indicates no shadow, type VECTOR2 - SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4 - UNDERLINE_ENABLED, ///< name "underlineEnabled", The underline enabled flag, type BOOLEAN - UNDERLINE_COLOR, ///< name "underlineColor", The color of the underline, type VECTOR4 - UNDERLINE_HEIGHT, ///< name "underlineHeight", Overrides the underline height from font metrics, type FLOAT - ENABLE_MARKUP ///< name "enableMarkup", Whether the mark-up processing is enabled. type BOOLEAN + 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 + FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING @SINCE_1_0.0 + FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING @SINCE_1_0.0 + POINT_SIZE, ///< name "pointSize", The size of font in points, type FLOAT @SINCE_1_0.0 + MULTI_LINE, ///< name "multiLine", The single-line or multi-line layout option, type BOOLEAN @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 + SHADOW_OFFSET, ///< name "shadowOffset", The drop shadow offset 0 indicates no shadow, type VECTOR2 @SINCE_1_0.0 + SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4 @SINCE_1_0.0 + UNDERLINE_ENABLED, ///< name "underlineEnabled", The underline enabled flag, type BOOLEAN @SINCE_1_0.0 + UNDERLINE_COLOR, ///< name "underlineColor", The color of the underline, type VECTOR4 @SINCE_1_0.0 + UNDERLINE_HEIGHT, ///< name "underlineHeight", Overrides the underline height from font metrics, type FLOAT @SINCE_1_0.0 + ENABLE_MARKUP ///< name "enableMarkup", Whether the mark-up processing is enabled. type BOOLEAN @SINCE_1_0.0 }; }; /** * @brief Create the TextLabel control. * + * @SINCE_1_0.0 * @return A handle to the TextLabel control. */ static TextLabel New(); @@ -89,6 +93,7 @@ public: /** * @brief Create the TextLabel control. * + * @SINCE_1_0.0 * @param[in] text The text to display. * @return A handle to the TextLabel control. */ @@ -96,12 +101,14 @@ public: /** * @brief Creates an empty handle. + * @SINCE_1_0.0 */ TextLabel(); /** * @brief Copy constructor. * + * @SINCE_1_0.0 * @param[in] handle The handle to copy from. */ TextLabel( const TextLabel& handle ); @@ -109,6 +116,7 @@ public: /** * @brief Assignment operator. * + * @SINCE_1_0.0 * @param[in] handle The handle to copy from. * @return A reference to this. */ @@ -118,6 +126,7 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~TextLabel(); @@ -127,6 +136,7 @@ public: * If the BaseHandle points is a TextLabel the downcast returns a valid handle. * If not the returned handle is left empty. * + * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return handle to a TextLabel or an empty handle */ @@ -137,6 +147,7 @@ public: // Not intended for application developers /** * @brief Creates a handle using the Toolkit::Internal implementation. * + * @SINCE_1_0.0 * @param[in] implementation The Control implementation. */ DALI_INTERNAL TextLabel( Internal::TextLabel& implementation ); @@ -144,6 +155,7 @@ public: // Not intended for application developers /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * + * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL TextLabel( Dali::Internal::CustomActor* internal ); diff --git a/dali-toolkit/public-api/dali-toolkit-version.cpp b/dali-toolkit/public-api/dali-toolkit-version.cpp index afebe0a..5586f32 100644 --- a/dali-toolkit/public-api/dali-toolkit-version.cpp +++ b/dali-toolkit/public-api/dali-toolkit-version.cpp @@ -31,7 +31,7 @@ namespace Toolkit const unsigned int TOOLKIT_MAJOR_VERSION = 1; const unsigned int TOOLKIT_MINOR_VERSION = 1; -const unsigned int TOOLKIT_MICRO_VERSION = 18; +const unsigned int TOOLKIT_MICRO_VERSION = 19; const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/dali-toolkit/public-api/enums.h b/dali-toolkit/public-api/enums.h index f3f893f..70bddb0 100644 --- a/dali-toolkit/public-api/enums.h +++ b/dali-toolkit/public-api/enums.h @@ -25,6 +25,7 @@ namespace Dali { /** * @brief DALi Toolkit namespace. + * @SINCE_1_0.0 */ namespace Toolkit { @@ -35,19 +36,21 @@ namespace Toolkit /** * @brief Control Orientation namespace. + * @SINCE_1_0.0 */ namespace ControlOrientation { /** * @brief The internal orientation of a control. + * @SINCE_1_0.0 */ enum Type { - Up, ///< The contents of control are in a vertical layout, from top to bottom - Left, ///< The contents of control are in a horizontal layout, from left to right - Down, ///< The contents of control are in a vertical layout, from bottom to top - Right ///< The contents of control are in a horizontal layout, from right to left + Up, ///< The contents of control are in a vertical layout, from top to bottom @SINCE_1_0.0 + Left, ///< The contents of control are in a horizontal layout, from left to right @SINCE_1_0.0 + Down, ///< The contents of control are in a vertical layout, from bottom to top @SINCE_1_0.0 + Right ///< The contents of control are in a horizontal layout, from right to left @SINCE_1_0.0 }; } // namespace ControlOrientation @@ -63,6 +66,7 @@ DALI_IMPORT_API bool IsVertical(ControlOrientation::Type orientation); /** * @brief Query whether an orientation is horizontal. * + * @SINCE_1_0.0 * @param[in] orientation The orientation. * @return True if the orientation is horizontal. */ diff --git a/dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h b/dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h index 78152a1..79951ae 100644 --- a/dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h +++ b/dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h @@ -52,6 +52,7 @@ class KeyboardFocusManager; * | keyboardFocusChanged | @ref FocusChangedSignal() | * | keyboardFocusGroupChanged | @ref FocusGroupChangedSignal() | * | keyboardFocusedActorAenterKey | @ref FocusedActorEnterKeySignal() | + * @SINCE_1_0.0 */ class DALI_IMPORT_API KeyboardFocusManager : public BaseHandle { @@ -74,6 +75,7 @@ public: * @brief Create a KeyboardFocusManager handle; this can be initialised with KeyboardFocusManager::New(). * * Calling member functions with an uninitialised handle is not allowed. + * @SINCE_1_0.0 */ KeyboardFocusManager(); @@ -81,12 +83,14 @@ public: * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~KeyboardFocusManager(); /** * @brief Get the singleton of KeyboardFocusManager object. * + * @SINCE_1_0.0 * @return A handle to the KeyboardFocusManager control. */ static KeyboardFocusManager Get(); @@ -97,18 +101,20 @@ public: * Only one actor can be focused at the same time. The actor must * be in the stage already and keyboard focusable. * - * @pre The KeyboardFocusManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be focused * @return Whether the focus is successful or not + * @pre The KeyboardFocusManager has been initialized. + * @pre The Actor has been initialized. */ bool SetCurrentFocusActor(Actor actor); /** * @brief Get the current focused actor. * - * @pre The KeyboardFocusManager has been initialized. + * @SINCE_1_0.0 * @return A handle to the current focused actor or an empty handle if no actor is focused. + * @pre The KeyboardFocusManager has been initialized. */ Actor GetCurrentFocusActor(); @@ -117,9 +123,10 @@ public: * chain in the given direction (according to the focus traversal * order). * - * @pre The KeyboardFocusManager has been initialized. + * @SINCE_1_0.0 * @param direction The direction of focus movement * @return true if the movement was successful + * @pre The KeyboardFocusManager has been initialized. */ bool MoveFocus(Control::KeyboardFocus::Direction direction); @@ -128,6 +135,7 @@ public: * that no actor is focused in the focus chain. * * It will emit focus changed signal without current focused actor + * @SINCE_1_0.0 * @pre The KeyboardFocusManager has been initialized. */ void ClearFocus(); @@ -136,16 +144,18 @@ public: * @brief Set whether the focus movement should be looped within the same focus group. * * The focus movement is not looped by default. - * @pre The KeyboardFocusManager has been initialized. + * @SINCE_1_0.0 * @param enabled Whether the focus movement should be looped + * @pre The KeyboardFocusManager has been initialized. */ void SetFocusGroupLoop(bool enabled); /** * @brief Get whether the focus movement should be looped within the same focus group. * - * @pre The KeyboardFocusManager has been initialized. + * @SINCE_1_0.0 * @return Whether the focus movement should be looped + * @pre The KeyboardFocusManager has been initialized. */ bool GetFocusGroupLoop() const; @@ -155,26 +165,29 @@ public: * * Layout controls set themselves as focus groups by default. * - * @pre The KeyboardFocusManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be set as a focus group. * @param isFocusGroup Whether to set the actor as a focus group or not. + * @pre The KeyboardFocusManager has been initialized. + * @pre The Actor has been initialized. */ void SetAsFocusGroup(Actor actor, bool isFocusGroup); /** * @brief Check whether the actor is set as a focus group or not. * - * @pre The KeyboardFocusManager has been initialized. - * @pre The Actor has been initialized. + * @SINCE_1_0.0 * @param actor The actor to be checked. * @return Whether the actor is set as a focus group. + * @pre The KeyboardFocusManager has been initialized. + * @pre The Actor has been initialized. */ bool IsFocusGroup(Actor actor) const; /** * @brief Returns the closest ancestor of the given actor that is a focus group. * + * @SINCE_1_0.0 * @param actor The actor to be checked for its focus group * @return The focus group the given actor belongs to or an empty handle if the given actor * doesn't belong to any focus group @@ -188,17 +201,19 @@ public: * KeyboardFocusManager and will be added to the focused actor as a * highlight. * + * @SINCE_1_0.0 + * @param indicator The indicator actor to be added * @pre The KeyboardFocusManager has been initialized. * @pre The indicator actor has been initialized. - * @param indicator The indicator actor to be added */ void SetFocusIndicatorActor(Actor indicator); /** * @brief Get the focus indicator actor. * - * @pre The KeyboardFocusManager has been initialized. + * @SINCE_1_0.0 * @return A handle to the focus indicator actor + * @pre The KeyboardFocusManager has been initialized. */ Actor GetFocusIndicatorActor(); @@ -220,8 +235,9 @@ public: // Signals * @code * Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ PreFocusChangeSignalType& PreFocusChangeSignal(); @@ -232,8 +248,9 @@ public: // Signals * @code * void YourCallbackName(Actor originalFocusedActor, Actor currentFocusedActor); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusChangedSignalType& FocusChangedSignal(); @@ -249,8 +266,9 @@ public: // Signals * @code * void YourCallbackName(Actor currentFocusedActor, bool forward); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusGroupChangedSignalType& FocusGroupChangedSignal(); @@ -261,8 +279,9 @@ public: // Signals * @code * void YourCallbackName(Actor enterPressedActor); * @endcode - * @pre The Object has been initialized. + * @SINCE_1_0.0 * @return The signal to connect to. + * @pre The Object has been initialized. */ FocusedActorEnterKeySignalType& FocusedActorEnterKeySignal(); @@ -271,6 +290,7 @@ public: // Signals /** * @brief Creates a new handle from the implementation. * + * @SINCE_1_0.0 * @param[in] impl A pointer to the object. */ explicit DALI_INTERNAL KeyboardFocusManager(Internal::KeyboardFocusManager *impl); diff --git a/dali-toolkit/public-api/text/rendering-backend.h b/dali-toolkit/public-api/text/rendering-backend.h index 1ffa35e..5640a83 100644 --- a/dali-toolkit/public-api/text/rendering-backend.h +++ b/dali-toolkit/public-api/text/rendering-backend.h @@ -30,7 +30,7 @@ namespace Text // The type of text renderer required enum RenderingType { - RENDERING_SHARED_ATLAS ///< A bitmap-based solution where renderers can share a texture atlas + RENDERING_SHARED_ATLAS ///< A bitmap-based solution where renderers can share a texture atlas @SINCE_1_0.0 }; const unsigned int DEFAULT_RENDERING_BACKEND = RENDERING_SHARED_ATLAS; diff --git a/docs/content/images/image-scaling/concept-rectangles.jpg b/docs/content/images/image-scaling/concept-rectangles.jpg deleted file mode 100644 index edd6eca..0000000 Binary files a/docs/content/images/image-scaling/concept-rectangles.jpg and /dev/null differ diff --git a/docs/content/images/image-scaling/demo-fitting-sampling.jpg b/docs/content/images/image-scaling/demo-fitting-sampling.jpg deleted file mode 100644 index 5d07fcd..0000000 Binary files a/docs/content/images/image-scaling/demo-fitting-sampling.jpg and /dev/null differ diff --git a/docs/content/images/image-scaling/demo-fitting-sampling.png b/docs/content/images/image-scaling/demo-fitting-sampling.png new file mode 100644 index 0000000..2626c03 Binary files /dev/null and b/docs/content/images/image-scaling/demo-fitting-sampling.png differ diff --git a/docs/content/images/image-scaling/example-scale-to-fill-problem.jpg b/docs/content/images/image-scaling/example-scale-to-fill-problem.jpg index 33ed74f..7c54656 100644 Binary files a/docs/content/images/image-scaling/example-scale-to-fill-problem.jpg and b/docs/content/images/image-scaling/example-scale-to-fill-problem.jpg differ diff --git a/docs/content/images/image-scaling/example-scale-to-fill-sequence.jpg b/docs/content/images/image-scaling/example-scale-to-fill-sequence.jpg index e432e76..5c2520c 100644 Binary files a/docs/content/images/image-scaling/example-scale-to-fill-sequence.jpg and b/docs/content/images/image-scaling/example-scale-to-fill-sequence.jpg differ diff --git a/docs/content/images/image-scaling/fitting-mode-options.jpg b/docs/content/images/image-scaling/fitting-mode-options.jpg deleted file mode 100644 index 3d085b8..0000000 Binary files a/docs/content/images/image-scaling/fitting-mode-options.jpg and /dev/null differ diff --git a/docs/content/images/image-scaling/fitting-mode-options.png b/docs/content/images/image-scaling/fitting-mode-options.png new file mode 100644 index 0000000..bfc9b22 Binary files /dev/null and b/docs/content/images/image-scaling/fitting-mode-options.png differ diff --git a/docs/content/images/image-scaling/scaling-fitting-target-dimensions.png b/docs/content/images/image-scaling/scaling-fitting-target-dimensions.png new file mode 100644 index 0000000..f0d8ca7 Binary files /dev/null and b/docs/content/images/image-scaling/scaling-fitting-target-dimensions.png differ diff --git a/docs/content/images/image-scaling/workflow-1.png b/docs/content/images/image-scaling/workflow-1.png new file mode 100644 index 0000000..757cc67 Binary files /dev/null and b/docs/content/images/image-scaling/workflow-1.png differ diff --git a/docs/content/images/image-scaling/workflow-2.png b/docs/content/images/image-scaling/workflow-2.png new file mode 100644 index 0000000..8c9c28a Binary files /dev/null and b/docs/content/images/image-scaling/workflow-2.png differ diff --git a/docs/content/images/image-scaling/workflow-3.png b/docs/content/images/image-scaling/workflow-3.png new file mode 100644 index 0000000..c69789d Binary files /dev/null and b/docs/content/images/image-scaling/workflow-3.png differ diff --git a/docs/content/images/image-scaling/workflow-4.png b/docs/content/images/image-scaling/workflow-4.png new file mode 100644 index 0000000..8f5ef37 Binary files /dev/null and b/docs/content/images/image-scaling/workflow-4.png differ diff --git a/docs/content/images/image-scaling/workflow-main.png b/docs/content/images/image-scaling/workflow-main.png new file mode 100644 index 0000000..2a8630a Binary files /dev/null and b/docs/content/images/image-scaling/workflow-main.png differ diff --git a/docs/content/images/scroll-view/scroll-view.png b/docs/content/images/scroll-view/scroll-view.png new file mode 100755 index 0000000..fe2d409 Binary files /dev/null and b/docs/content/images/scroll-view/scroll-view.png differ diff --git a/docs/content/shared-javascript-and-cpp-documentation/resource-image-scaling.md b/docs/content/shared-javascript-and-cpp-documentation/resource-image-scaling.md index 887f082..66dbe3e 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/resource-image-scaling.md +++ b/docs/content/shared-javascript-and-cpp-documentation/resource-image-scaling.md @@ -4,29 +4,47 @@ [TOC] # Resource Image Scaling {#resourceimagescaling} - -## Introduction - -While common uses of images in DALi applications involve fixed sized images -under the developer's control, e.g. for button backgrounds, in other cases such as galleries and wallpapers an application must display a variety of images and adapt to different screen sizes and densities. -For these situations, DALi provides a facility to scale a `ResourceImage` while it is being loaded. - -Look at the following example. + +## Introduction {#resourceimagescaling-introduction} + +Resource Image Scaling provides automatic image resizing (without changing aspect) based on settings provided by the developer. +This operation is performed at load time. + +### Developer options: +* A target size of the image - this could be the full screen size for example. +* A Fitting mMde - This determines how the image is fitted to the target dimensions. If necessary the image will be cropped, or have borders added automatically. +* A Sampling Mode - This determines the quality of the scaling (by specifying the type of filtering to use). + +### Benefits of Resource Image Scaling: +* Scaled image will typically be 1-to-1 size ratio with on screen pixels, giving quality benefits. +* Scaling performed at load time, so run time speed is improved. +* Ease of use allows applications handling lots of images of different sizes to be created quickly and easily. + +## Use-Case Example {#resourceimagescaling-basicexample} +While common uses of images in DALi applications involve fixed sized images under the developer's control, e.g. for button backgrounds, in other cases such as galleries and wallpapers an application must display a variety of images and adapt to different screen sizes and densities. + +There are more code examples later in this document under [API usage](#resourceimagescaling-apidetails). For now we will just give one full code example to show how this feature is used.. + Let's say we are writing a home-screen application for a smartphone. Here we have a large, square image that we want to set as the wallpaper on a tall and narrow phone screen. We want to fill the screen without distorting the image or having black borders, and wasting as few pixels from the source image as possible. - + ![ ](../assets/img/image-scaling/example-scale-to-fill-problem.jpg) ![ ](example-scale-to-fill-problem.jpg) - -DALi provides the concept of a `FittingMode` to specify how a source image is mapped into a target rectangle, and the one we need here is `FittingMode::SCALE_TO_FILL` as it will cover all of the pixels of the target. + +DALi provides the concept of a `FittingMode` to specify how a source image is mapped into a target rectangle, and the one we need here is `FittingMode::SCALE_TO_FILL` as it guarrentees to cover all of the pixels of the target dimensions specified. A second concept of a `SamplingMode` controls how source image pixels are combined during the scaling and allows the developer to trade speed for quality. -Since our image is to be loaded once and reused, we should use `SamplingMode::BOX_THEN_LINEAR` which is the highest quality option. -We can pass the stage dimensions to the `ResourceImage` creator function as the desired rectangle and ask it to map the image to the screen as follows: - +Since our image is to be loaded once and reused, we use `SamplingMode::BOX_THEN_LINEAR` which is the highest quality option. + +In this case, `SCALE_TO_FILL` will perform this sequence of operations: + +![ ](../assets/img/image-scaling/example-scale-to-fill-sequence.jpg) ![ ](example-scale-to-fill-sequence.jpg) + +We can pass the stage dimensions to the `ResourceImage` creator function as the desired rectangle and ask it to map the image to the screen as shown here: + ~~~{.cpp} -// C++ -ResourceImage image = ResourceImage::New( + // C++ + ResourceImage image = ResourceImage::New( "gallery-large-12.jpg", Dali::ImageDimensions( stage.GetSize().x, stage.GetSize().y ), Dali::FittingMode::SCALE_TO_FILL, @@ -43,45 +61,130 @@ var image = new dali.ResourceImage( { samplingMode: "BOX_THEN_LINEAR" }); ~~~ - -In this case, `SCALE_TO_FILL` will perform this sequence of operations: - -| SCALE_TO_FILL Example | -| ------------ | -| ![ ](../assets/img/image-scaling/example-scale-to-fill-sequence.jpg) ![ ](example-scale-to-fill-sequence.jpg) | -| **1.** *The source image.* **2.** *The source scaled-down to match the screen size.* **3.** *The borders of the image are trimmed to match the shape of the screen.* **4.** *The image fits exactly on the phone screen with no scaling required while rendering.* | - - -## API Details {#resourceimagescalingapidetails} - -The new function of `ResourceImage` has the following scaling-related parameters: -* **path**: Identifier for the image (allows raw image width and height to be retrieved). -* **requested dimensions**: These are either `(0,0)`, a width, a height, or a (width, height) pair and either directly, or after reading the image raw dimensions and doing some math, define a target rectangle to fit the image to. -* **fitting mode**: one of four strategies for mapping images onto the target rectangle. -* **sampling mode** Different quality options for the scaling. - -### Target dimensions for fitting {#resourceimagescalingtargetdimensions} - + + +## Workflow {#resourceimagescaling-workflow} + +![ ](../assets/img/image-scaling/workflow-main.png) ![ ](workflow-main.png) + +The workflow for achieving the final scaled image is (in order): + +- Target Size: Determine target size (from source image size and any user specified target dimensions). +- Target Image Dimensions: Determine the size the image should be scaled to (taking Fitting Mode into account) +- Scaling: Perform a scale to target image dimensions using the specified Sampling mode. +- Crop or Add Borders: Automatically perfomed as necessary to maintain final target aspect (actual stored data size could be smaller). + + + +### Determine Target Dimensions {#resourceimagescaling-targetdimensions} + +![ ](../assets/img/image-scaling/workflow-1.png) ![ ](workflow-1.png) + An application has several options for specifying the target rectangle for the image to be fitted to. The application may request dimensions through `ResourceImage::New()`: + + - `Not specifying either dimension`: IE. Width and Height set to 0 - The target dimensions become the same as the source. - 1. `(0, 0)`, which is equivalent to not specifying any dimensions - 2. `(x != 0, 0)` or `(0, y != 0)`, i.e. just one dimension specified - 3. `(x != 0, y != 0)`, i.e. both dimensions specified + - `Just one dimension specified, Width OR Height (the other dimension set to 0)`: + The unspecified dimension will be derived from the specified one whilst maintaining the aspect of the source image. The specified and calculated dimensions become the target dimensions. See more on this case [below](#resourceimagescalingzerodimensions). + + - `Width AND Height both specified` The requested dimensions pass straight through to become the target for fitting. + +![ ](../assets/img/image-scaling/scaling-fitting-target-dimensions.png) ![ ](scaling-fitting-target-dimensions.png) -In **case 1.** no scaling will be attempted. -The image will be loaded at its raw dimensions. -In **case 2.** the unspecified dimension will be derived from the specified one and the aspect ratio of the raw dimensions. -This specified dimension and calculated dimension pair pass on as the target dimension for fitting. -See more on this case [below](#resourceimagescalingzerodimensions). -In **case 3.** the requested dimensions pass straight through to become the target for fitting. +The result of this process is an `(x, y)` target size to fit the image in the next step. + -The result of this process is an `(x, y)` tuple defining a box to fit the image to in the next step. -#### Examples {#resourceimagescalingtargetdimensionsexamples} -If we have a `(320, 240)` image called "flower.jpg", we use these three options in code as below. +### Target Image Dimensions {#resourceimagescaling-targetimagedimensions} -**Case 1**: +![ ](../assets/img/image-scaling/workflow-2.png) ![ ](workflow-2.png) + +#### Fitting Mode + +DALi provides a number of strategies for mapping the pixels of an image onto the target box derived above. +It provides a `FittingMode` enumeration to the developer to select a mapping or fitting approach. +These are `SCALE_TO_FILL`, `SHRINK_TO_FIT`, `FIT_WIDTH`, and `FIT_HEIGHT` and their effect is best appreciated visually: + +The operation of each of these modes is as follows: + +| `FittingMode` | **Operation** | +| ------------- | ------------- | +| `SCALE_TO_FILL` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and extends outside the target in the other. Chooses the dimension to match that results in the fewest pixels outside the target. Trims away the parts of the image outside the target box so as to match it exactly. This guarentees all of the target area is filled. | +| `SHRINK_TO_FIT` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and fits inside it in the other. This guarentees that all of the source image area is visible. | +| `FIT_WIDTH` | Centers the image on the target box and uniformly scales it so that it matches the target width without regard for the target height. | +| `FIT_HEIGHT` | Centers the image on the target box and uniformly scales it so that it matches the target in height without regard for the target width. | + + +![ ](../assets/img/image-scaling/fitting-mode-options.png) ![ ](fitting-mode-options.png) + + **Fitting modes**: *The top row shows the effect of each mode when a tall target rectangle is applied to a square image. The middle row applies a wide target to a square raw image. The bottom row uses a target with the same aspect ratio as the raw image. This example shows that `SCALE_TO_FILL` is the only option for which the dimensions of the fitted image result fill all the area of the target. Others would be letterboxed with borders. `SHRINK_TO_FIT` is always equal to one of `FIT_WIDTH` or `FIT_HEIGHT`: in each case it is the minimum of them. As a special case, where the aspect ratio of raw image and target match, all fitting modes generate an exact match final image and are equivalent to each other.* + + +Note: The image is scaled to the same aspect and shrunk to fit depending on fitting mode. It is not upscaled. See: [Upscaling](#resourceimagescalingupscaling). + + + +### Scaling {#resourceimagescaling-scaling} + +![ ](../assets/img/image-scaling/workflow-3.png) ![ ](workflow-3.png) + +To perform the scaling stage, the source image is scaled to a (factor of) the target image size using the specified Sampling Mode/ + +The process of scaling an image can be expensive in CPU cycles and add latency to the loading of each resource. +To allow the developer to trade-off speed against quality for different use cases, DALi provides the `SamplingMode` enum, which can be passed to `ResourceImage::New()`. +Two of these modes produce bitmaps which differ from the dimensions calculated by the fitting algorithm and so have a memory trade-off as well. The full set of modes is explained below. + +| `SamplingMode` | **Operation** | +| ------------- | --------- | +| `NEAREST` | Use simple point sampling when scaling. For each pixel in output image, just one pixel is chosen from the input image. This is the fastest, crudest option but suffers the worst from aliasing artifacts so should only be used for fast previews, or where the source image is known to have very low-frequency features. | +| `LINEAR` | Uses a weighted bilinear filter with a `(2,2)` footprint when scaling. For each output pixel, four input pixels are averaged from the input image. This is a good quality option, equivalent to the GPU's filtering and works well at least down to a `0.5` scaling. | +| `BOX` | Uses an iterated `(2,2)` box filter to repeatedly halve the image in both dimensions, averaging adjacent pixels until the the result is approximately right for the fitting target rectangle. For each output pixel some number of pixels from the sequence `[4,16,64,256,1024,...]` are averaged from the input image, where the number averaged depends on the degree of scaling requested. This provides a very high quality result and is free from aliasing artifacts because of the iterated averaging. *The resulting bitmap will not exactly match the dimensions calculated by the fitting mode but it will be within a factor of two of it and have the same aspect ratio as it.* | +| `BOX_THEN_NEAREST` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `NEAREST` to reach the exact dimensions. | +| `BOX_THEN_LINEAR` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `LINEAR` to reach the exact dimensions. This is the slowest option and of equivalent quality to `BOX`. It is superior to `BOX` in that is uses an average of 62% of the memory and exactly matches the dimensions calculated by fitting. **This is the best mode for most use cases**. | +| `NO_FILTER` | Disables scaling altogether. In conjunction with `SCALE_TO_FILL` mode this can be useful as the edge trimming of that fitting mode is still applied. An example would be a gallery application, where a database of prescaled thumbnails of approximately the correct size need to be displayed in a regular grid of equal-sized cells, while being loaded at maximum speed. | + + +Here are all the modes applied to scaling-down a `(640,720)` line art and text JPEG image to a `(218, 227)` thumbnail: + +| | | | +| ---- | ---- | --- | +| ![ ](../assets/img/image-scaling/sampling_modes_no_filter.png) ![ ](sampling_modes_no_filter.png) | ![ ](../assets/img/image-scaling/sampling_modes_nearest.png) ![ ](sampling_modes_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_linear.png) ![ ](sampling_modes_linear.png) | +| **NO_FILTER** | **NEAREST** | **LINEAR** | +| ![ ](../assets/img/image-scaling/sampling_modes_box.png) ![ ](sampling_modes_box.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_nearest.png) ![ ](sampling_modes_box_then_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_linear.png) ![ ](sampling_modes_box_then_linear.png) | +| **BOX** | **BOX_THEN_NEAREST** | **BOX_THEN_LINEAR** | + +These are screenshots, showing how the images are rendered in a DALi demo. +There is an additional level of GPU bilinear filtering happening at render time. +The best way to get a feel for the best sampling mode for different image types is to play with the [examples](#resourceimagescaling-samplingmodesdemoexamples). + + + +### Crop or Add Borders {#resourceimagescaling-croporaddborders} + +![ ](../assets/img/image-scaling/workflow-4.png) ![ ](workflow-4.png) + +Lastly, the image data will be cropped, or have borders added automatically as necessary. +This is done to ensure the image correctly fits the aspect of the target window, whilst maintaining the aspect of the source image. + +Images that have an alpha channel will be given transparent borders. Otherwise black is used. + + + +## Using the API (With source code examples) {#resourceimagescaling-apidetails} + +This section contains more detail about using the API to setup the desired behaviour. + +`ResourceImage` :: New has the following parameters: +- **path**: Identifier for the image (allows raw image width and height to be retrieved). +- **requested dimensions**: These are either `(0,0)`, a width, a height, or a (width, height) pair and either directly, or after reading the image raw dimensions and doing some math, define a target rectangle to fit the image to. +- **fitting mode**: one of four strategies for mapping images onto the target rectangle. +- **sampling mode** Different quality options for the scaling. + +### Code Examples {#resourceimagescaling-targetdimensionsexamples} +If we have a `(320, 240)` image called "flower.jpg", we use these options in code as below. + +**Case 1**: In these two equivalent loads, the target dimensions are not specified, so will be `(320, 240)` so the image will be loaded at its raw dimensions without modification. ~~~{.cpp} // C++ ResourceImage image1 = ResourceImage::New( "flower.png" ); @@ -92,9 +195,9 @@ ResourceImage image2 = ResourceImage::New( "flower.png", ImageDimensions( 0, 0 ) var image1 = new dali.ResourceImage( { url:"flower.png" } ); var image2 = new dali.ResourceImage( { url:"flower.png", width:0, height:0 } ); ~~~ -In these two equivalent loads, the target dimensions will be `(320, 240)` so the image will be loaded at its raw dimensions without modification. + -**Case 2**: +**Case 2**: In these loads, the target dimensions will be `(160, 120)` as the zero dimension is derived from the aspect ratio of the raw image. ~~~{.cpp} // C++ ResourceImage image1 = ResourceImage::New( "flower.png", ImageDimensions( 160, 0 ) ); @@ -105,9 +208,9 @@ ResourceImage image2 = ResourceImage::New( "flower.png", ImageDimensions( 0, 120 var image1 = new dali.ResourceImage( { url:"flower.png", width:160, height:0 } ); var image2 = new dali.ResourceImage( { url:"flower.png", width:0, height:120 } ); ~~~ -In these loads, the target dimensions will be `(160, 120)` as the zero dimension is derived from the aspect ratio of the raw image. + -**Case 3**: +**Case 3**: In this load, the target dimensions will be `(111, 233)`. ~~~{.cpp} // C++ ResourceImage image = ResourceImage::New( "flower.png", ImageDimensions( 111, 233 ) ); @@ -116,60 +219,14 @@ ResourceImage image = ResourceImage::New( "flower.png", ImageDimensions( 111, 23 // JavaScript var image = new dali.ResourceImage( { url:"flower.png", width:111, height:233 } ); ~~~ -In this load, the target dimensions will be `(111, 233)`. - -### Image Pixel Dimensions {#resourceimagescalingsamplingmodesdimensionflow} - -DALi derives the pixel width and height of loaded resource images from a sequence of calculations with four inputs: - - 1. The dimensions requested via `ResourceImage` new function, either of which may be passed as zeros - 2. The dimensions of the raw image before loading - 3. The fitting mode requested - 4. The sampling mode requested - -The dimensions requested do not correspond 1:1 with the exact pixel width and height of the image once loaded: they are just one of the four inputs to the process which determines those dimensions. - -| Flow of image dimensions from API to loaded image | -| ------------ | -| ![ ](../assets/img/image-scaling/concept-rectangles.jpg) ![ ](concept-rectangles.jpg) | -| *Image dimensions requested through the API are either absent (**a.**), a height (**b.**), a width (**c.**) or a full (width, height) pair (**d.**). In case **d.** this is the target for fitting (**i.**). In cases **a.**, **b.**, and **c.**, the raw image dimensions (**e.**) are also needed to define the target (examples: **f.**, **g.**, **h.**). This target, the **FittingMode**, and the raw size (**e.**), are used to derive the fitted size (**j.**). This is the size that a perfect scaling would achieve. This fitted size, the **Sampling Mode**, and the raw size (**e.**) are used to derive the final pixel width and height (**k.** **l.** **m.**, depending on **Sampling Mode**).* | - -The diagram above shows the key `(x,y)` image dimensions used by DALi in its load-time scaling pipeline visualized as rectangles. -They are: - - 1. **Requested**: The dimensions passed by the app. - 2. **Raw**: The dimensions stored in the resource. - 3. **Target**: The box to fit the image into derived from 1. and 2. - 4. **Fitted**: The ideal scaled-down size of the image. - 5. **Scaled Pixels** The final pixel width and height resulting from the (possibly approximate) scaling. - -This should help to understand how the parameters given to DALi influence the final image loaded. The (x, y) passed define a *target* to the fit the image to rather than a new size for the image directly. -The fitting mode defines a strategy for fitting the raw image to the target. -The sampling mode has two options which cause the fitted dimensions to be exceeded, while the others cause it to be matched exactly. - -The pipeline from the values passed from the application to the *natural size* of the image is different. If no dimension is passed, the raw image size is read from the image resource. If only one dimension is passed, the explicitly set dimension will be used for the **natural size** and the unspecified dimension will match the actual loaded pixel dimension. When both are specified that becomes the 'natural size' even if it differs from the actual pixel dimensions loaded. This [requires some care in rendering to avoid distortion](#resourceimagescalingsamplingmodesrendernaturalsize). - -### Fitting an image's dimensions to the target box {#resourceimagescalingfittingmodes} - -DALi provides a number of strategies for mapping the pixels of an image onto the target box derived above. -It provides a `FittingMode` enumeration to the developer to select a mapping or fitting approach. -These are `SCALE_TO_FILL`, `SHRINK_TO_FIT`, `FIT_WIDTH`, and `FIT_HEIGHT` and their effect is best appreciated visually: - -| FittingMode Options | -| ------------------- | -| ![ ](../assets/img/image-scaling/fitting-mode-options.jpg) ![ ](fitting-mode-options.jpg) | -| **Fitting modes**: *The top row shows the effect of each mode when a tall target rectangle is applied to a square image. The middle row applies a wide target to a square raw image. The bottom row uses a target with the same aspect ratio as the raw image. These examples show that `SCALE_TO_FILL` is the only option for which the dimensions of the fitted image result exactly match the target. The others are larger or smaller, with a different aspect ratio. `SHRINK_TO_FIT` is always equal to one of `FIT_WIDTH` or `FIT_HEIGHT`: in each case it is the minimum of them. As a special case, where the aspect ratio of raw image and target match, all fitting modes generate an exact match final image and are equivalent to each other.* | - -The operation of each of these modes is as follows: - -| `FittingMode` | **Operation** | -| ------------- | --------- | -| `SCALE_TO_FILL` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and extends outside the target in the other. Chooses the dimension to match that results in the fewest pixels outside the target. Trims away the parts of the image outside the target box so as to match it exactly. | -| `SHRINK_TO_FIT` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and fits inside it in the other. | -| `FIT_WIDTH` | Centers the image on the target box and uniformly scales it so that it matches the target width without regard for the target height. | -| `FIT_HEIGHT` | Centers the image on the target box and uniformly scales it so that it matches the target in height and ignores the target width. | - -These modes differ only when the target box has a different aspect ratio to the raw image. Using this, if the application knows a priori what the image dimensions are, it can scale down the image by requesting dimensions that have the same aspect ratio as the raw dimensions: + + +### Fitting an image's dimensions to the target box {#resourceimagescaling-codeexamplesfittingmodes} + +The result of the fitting modes defined [here](#resourceimagescaling-targetimagedimensions) only differ when the target box has a different aspect ratio than the source image. +Images may still be scaled down, depending on the target dimensions, but the specified fitting mode will not have an effect. + +EG: ~~~{.cpp} // C++ // Image on 'disk' is 320x240. @@ -182,48 +239,65 @@ ResourceImage image = ResourceImage::New( "flower.png", ImageDimensions( 32, 24 var image = new dali.ResourceImage( { url:"flower.png", width:32, height:24}); // Image will be loaded at (32, 24), regardless of fitting mode. ~~~ + +### Passing a Zero Dimension {#resourceimagescalingzerodimensions} + +Passing in a single zero dimension is equivalent to specifying `FIT_WIDTH` or `FIT_HEIGHT` `FittingMode`s. When a non-zero width and zero height are specified, the fitting done will be identical to the result using `FittingMode` `FIT_WIDTH`. When passing a zero width and non-zero height, the effect of applying the chosen `FittingMode` to the calculated target dimensions is always identical to applying the `FIT_HEIGHT` mode. + +* `ResourceImage::New( ImageDimensions( x, 0 ), )` = + `ResourceImage::New( ImageDimensions( x, ), FittingMode::FIT_WIDTH )` +* `ResourceImage::New( ImageDimensions( 0, y ), )` = + `ResourceImage::New( ImageDimensions( , y), FittingMode::FIT_HEIGHT )` + +This falls out of the the fact that the fitting modes are strategies for the case when the aspect ratio of the raw image differs from the aspect ratio of the target dimensions, but the zero dimension behavior always ensures that the target dimensions have the same aspect ratio as the raw image's so the fitting modes are all equivalent. + +Therefore, if `(x!=0, y=0)`, fittingMode = `FIT_WIDTH`, +and if `(x=0, y=!0)`, fittingMode = `FIT_HEIGHT`, irrespective of fitting mode passed by the application (if any). +This shortcut is provided as a convenience to the developer and allows FIT_WIDTH or FIT_HEIGHT to be specified compactly: +~~~{.cpp} +// C++ +// FIT_WIDTH: +ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(x, 0)); +// FIT_HEIGHT: +ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(0, y)); +~~~ +~~~{.js} +// JavaScript +// FIT_WIDTH: +var image = new dali.ResourceImage( { + url: "flower.png", + width: x, + height: 0 +}); +// FIT_HEIGHT: +var image = new dali.ResourceImage( { + url: "flower.png", + width: 0, + height: y +}); +~~~ + +Note: +- If both values are specified as 0, both dimensions are taken from the source image. +- If both dimensions are not 0, this value becomes the 'natural size' even if it differs from the actual pixel dimensions loaded. [This requires some care in rendering to avoid distortion](#resourceimagescaling-samplingmodesrendernaturalsize). + -### Quality Versus Speed and Memory Options {#resourceimagescalingsamplingmodes} - -The process of scaling an image can be expensive in CPU cycles and add latency to the loading of each resource. -To allow the developer to trade-off speed against quality for different use cases, DALi provides the `SamplingMode` enum, which can be passed to `ResourceImage::New()`. -Two of these modes produce bitmaps which differ from the dimensions calculated by the fitting algorithm and so have a memory trade-off as well. The full set of modes is explained below. - -| `SamplingMode` | **Operation** | -| ------------- | --------- | -| `NEAREST` | Use simple point sampling when scaling. For each pixel in output image, just one pixel is chosen from the input image. This is the fastest, crudest option but suffers the worst from aliasing artifacts so should only be used for fast previews, or where the source image is known to have very low-frequency features. | -| `LINEAR` | Uses a weighted bilinear filter with a `(2,2)` footprint when scaling. For each output pixel, four input pixels are averaged from the input image. This is a good quality option, equivalent to the GPU's filtering and works well at least down to a `0.5` scaling. | -| `BOX` | Uses an iterated `(2,2)` box filter to repeatedly halve the image in both dimensions, averaging adjacent pixels until the the result is approximately right for the fitting target rectangle. For each output pixel some number of pixels from the sequence `[4,16,64,256,1024,...]` are averaged from the input image, where the number averaged depends on the degree of scaling requested. This provides a very high quality result and is free from aliasing artifacts because of the iterated averaging. *The resulting bitmap will not exactly match the dimensions calculated by the fitting mode but it will be within a factor of two of it and have the same aspect ratio as it.* | -| `BOX_THEN_NEAREST` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `NEAREST` to reach the exact dimensions. | -| `BOX_THEN_LINEAR` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `LINEAR` to reach the exact dimensions. This is the slowest option and of equivalent quality to `BOX`. It is superior to `BOX` in that is uses an average of 62% of the memory and exactly matches the dimensions calculated by fitting. **This is the best mode for most use cases**. | -| `NO_FILTER` | Disables scaling altogether. In conjunction with `SCALE_TO_FILL` mode this can be useful as the edge trimming of that fitting mode is still applied. An example would be a gallery application, where a database of prescaled thumbnails of approximately the correct size need to be displayed in a regular grid of equal-sized cells, while being loaded at maximum speed. | - -Here are all the modes applied to scaling-down a `(640,720)` line art and text JPEG image to a `(218, 227)` thumbnail: - -| | | | -| ---- | ---- | --- | -| ![ ](../assets/img/image-scaling/sampling_modes_no_filter.png) ![ ](sampling_modes_no_filter.png) | ![ ](../assets/img/image-scaling/sampling_modes_nearest.png) ![ ](sampling_modes_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_linear.png) ![ ](sampling_modes_linear.png) | -| **NO_FILTER** | **NEAREST** | **LINEAR** | -| ![ ](../assets/img/image-scaling/sampling_modes_box.png) ![ ](sampling_modes_box.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_nearest.png) ![ ](sampling_modes_box_then_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_linear.png) ![ ](sampling_modes_box_then_linear.png) | -| **BOX** | **BOX_THEN_NEAREST** | **BOX_THEN_LINEAR** | - -These are screenshots, showing how the images are rendered in a DALi demo. -There is an additional level of GPU bilinear filtering happening at render time. -The best way to get a feel for the best sampling mode for different image types is to play with the [examples](#resourceimagescalingsamplingmodesexamples). +### Code Examples for Sampling Modes {#resourceimagescaling-codeexamplessamplingmodes} + -In the following code example the same image is loaded to be a thumbnail but with differing quality, speed, and memory implications. +In the following code example an image is loaded to be a thumbnail but with differing quality, speed, and memory implications. ~~~{.cpp} // C++ ResourceImage image1 = ResourceImage::New( "flower.png", ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::NEAREST ); - + ResourceImage image2 = ResourceImage::New( "flower.png", ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER ); - + ResourceImage image3 = ResourceImage::New( "flower.png", ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::BOX ); - + ResourceImage image4 = ResourceImage::New( "flower.png", ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR ); ~~~ @@ -249,113 +323,97 @@ var image4 = new dali.ResourceImage( { fittingMode:"SCALE_TO_FILL", samplingMode:"BOX_THEN_LINEAR" } ); ~~~ + + + -If we imagine flower.jpg is a 560*512 photo with high frequency details, the results of this are: +### Notes on speed VS quality {#resourceimagescaling-speedvsquality} + +If we imagine flower.jpg is a 560*512 photo with high frequency details, the results of this are (image references are from above example): * `image1` loads fast, uses minimal space, has poor quality. * `image2` loads even faster, uses 4.6 * minimal space, has good quality. * `image3` loads moderately slow, uses 1.3 * minimal space, has good quality. * `image4` loads slowest, uses minimal space, has good quality. - + Note that `BOX`, `BOX_THEN_NEAREST` and `BOX_THEN_LINEAR` can work particularly well for JPEG images as they can use fast downscaling typically built-in to the JPEG codec on supported platforms on the fly while decoding. In this case the caveats about using them having a speed trade-off given above do not apply. + + -## Passing a Zero Dimension {#resourceimagescalingzerodimensions} -Passing in a single zero dimension is effectively a shortcut for specifying `FIT_WIDTH` or `FIT_HEIGHT` `FittingMode`s. When a non-zero width and zero height are specified, the fitting done will be identical to the result using `FittingMode` `FIT_WIDTH`. When passing a zero width and non-zero height, the effect of applying the chosen `FittingMode` to the calculated target dimensions is always identical to applying the `FIT_HEIGHT` mode. - -* `ResourceImage::New( ImageDimensions( x, 0 ), )` = - `ResourceImage::New( ImageDimensions( x, ), FittingMode::FIT_WIDTH )` -* `ResourceImage::New( ImageDimensions( 0, y ), )` = - `ResourceImage::New( ImageDimensions( , y), FittingMode::FIT_HEIGHT )` - -This falls out of the the fact that the fitting modes modes are strategies for the case when the aspect ratio of the raw image differs from the aspect ratio of the target dimensions, but the zero dimension behavior always ensures that the target dimensions have the same aspect ratio as the raw image's so the fitting modes are all equivalent. -Therefore, if `(x!=0, y=0)`, fittingMode = `FIT_WIDTH`, -and if `(x=0, y=!0)`, fittingMode = `FIT_HEIGHT`, irrespective of fitting mode passed by the application (if any). -This shortcut is provided as a convenience to the developer and allows FIT_WIDTH or FIT_HEIGHT to be specified compactly: -~~~{.cpp} -// C++ -// FIT_WIDTH: -ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(x, 0)); -// FIT_HEIGHT: -ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(0, y)); -~~~ -~~~{.js} -// JavaScript -// FIT_WIDTH: -var image = new dali.ResourceImage( { - url: "flower.png", - width: x, - height: 0 -}); -// FIT_HEIGHT: -var image = new dali.ResourceImage( { - url: "flower.png", - width: 0, - height: y -}); -~~~ - -## Upscaling +## Demo Examples {#resourceimagescaling-samplingmodesdemoexamples} + +Load time image scaling is spread throughout the DALi examples. +Search for `"ImageDimensions"` in the dali-demo project to see it used. +There is also a specific demo to show all of the fitting and scaling modes. +which lives in the demo project at `examples/image-scaling-and-filtering`. + +![ ](../assets/img/image-scaling/demo-fitting-sampling.png) ![ ](./demo-fitting-sampling.png) + +Touch the arrows in the top corners to changes image. +Drag the resize handle in the corner of the image to change the requested size and trigger an immediate image reload. +Use the buttons at the bottom of the screen to select any of the fitting and sampling modes from the popups which appear. +This demo does not take any of the special measures [described here](#resourceimagescaling-naturalsizecompensation) to correct for the natural size != pixel dimensions discrepancy so all fitting modes other than `SCALE_TO_FILL` show distortion. + +A second specific demo shows the effect of a filter mode on a single image loaded into various requested rectangles side by side. +It can be found under `examples/image-scaling-irregular-grid`. + +![ ](../assets/img/image-scaling/demo-sampling-modes.jpg) ![ ](./demo-sampling-modes.jpg) + +Touch the button at top-left to change image. +The button at top-right changes sampling mode. +You will see strong differences between sampling modes where the image contains high frequency details such as hair and in the large black and white image, but much less in some others such as the Statue of Liberty which is mostly covered by a smooth gradient. + + +## Further Notes {#resourceimagescaling-furthernotes} + +### Upscaling {#resourceimagescaling-upscaling} + DALi refuses to upscale images at load time in order to conserve memory. -If the application requests a size for an image that is larger than its raw dimensions, DALi will instead return an image with the same aspect ratio but limited to the largest dimensions that do not exceed the raw ones. +If the application requests an image size the specified fitting mode) would require scaling up, DALi will instead return an image with the same aspect ratio but limited to the largest dimensions that do not exceed the raw ones. +EG. The actual image could be a fraction of the size of the target image dimensions. Upscaling can still be effected at render time by setting the size of an actor to the desired size. + + -## Compressed Textures and Scaling - +### Compressed Textures and Scaling {#resourceimagescaling-compressedtextures} + Compressed textures cannot be scaled at load time as their formats are designed to be uploaded directly to GPU memory. To achieve scaling of compressed textures, set the desired size on the attached `ImageActor` for scaling at render time instead. + + -## Compensation for Natural Size != Pixel Width / Height {#resourceimagescalingsamplingmodesrendernaturalsize} - +### Compensation for Natural Size != Pixel Width / Height {#resourceimagescaling-naturalsizecompensation} + Because the *natural size* of an image is -[taken from the requested dimensions](#resourceimagescalingsamplingmodesdimensionflow) +[taken from the requested dimensions](#resourceimagescaling-samplingmodesdimensionflow) passed to `ResourceImage::New()` rather than passing through the same calculations that result in the eventual pixel width and height loaded, the *natural size* and pixel dimensions of an image will differ when loaded with scaling. It is inherent in the definition of fitting modes other than `SCALE_TO_FILL` not to match the requested dimensions, so in general, images loaded with them must have this mismatch between *natural size* and actual pixel width. - -It is not possible in general to draw a scaled resource image using its natural size as the `ImageActor`'s size without it appearing stretched in one dimension. + +It is not possible in general to draw a scaled resource image using its natural size as the `ImageView`'s size without it appearing stretched in one dimension. This is the case for example by default with size negotiation in effect or when an image is simply passed to an actor at creation time. - + There are circumstance, however, in which the the natural size of a resource image loaded will exactly match its post-load pixel dimensions: - -1. No scaling is requested. -1. The application chooses a combination of requested dimensions, fitting mode, and sampling mode which the scaling sub-system can match exactly. This is the case: + +- No scaling is requested. +- The application chooses a combination of requested dimensions, fitting mode, and sampling mode which the scaling sub-system can match exactly. This is the case: * For all downscaling using `SCALE_TO_FILL` fitting mode and not using `BOX` or `NO_FILTER` sampling modes. * The app uses `SHRINK_TO_FIT`, `FIT_WIDTH`, or `FIT_HEIGHT` and the requested dimensions passed-in are both smaller than the raw ones and have the same aspect ratio as them, and it is not using `BOX` or `NO_FILTER` sampling modes. - + In these cases the image may be used freely in layouts controlled by size negotiation. Additionally, if the requested size has the same aspect ratio as the eventual pixel array loaded, and the fitting mode is `SCALE_TO_FILL` or `BOX` and `NO_FILTER` sampling modes are avoided, even if they don't match in dimensions exactly, the eventual image will be drawn without aspect ratio distortion although it will be scaled at render time. - -The fitting and scaling modes [demo](#resourceimagescalingsamplingmodesexamples) allows this behavior to be be explored dynamically when the fitting mode is changed from `SCALE_TO_FILL`. - + +The fitting and scaling modes [demo](#resourceimagescalingsamplingmodesdemoexamples) allows this behavior to be be explored dynamically when the fitting mode is changed from `SCALE_TO_FILL`. + The application can of course only pass dimensions which are just right if it happens to know the raw dimensions or if it accesses the the image resource and reads the raw dimensions from its header. - + The application can get a scaled resource image rendered correctly to screen with one of three strategies: - + 1. Use one of the special cases above. 2. Read the image header from disk, recreate the dimension deriving, fitting, and sampling logic described in this document, and use that to generate a pair of requested dimensions which match the eventual image dimensions. 3. Use the requested dimensions it really wants to but then read the image header from disk, recreate the dimension deriving, fitting, and sampling logic described in this document, and set the size of an `ImageActor` to that size explicitly rather than relying on the *natural size* of the image. + -## Examples {#resourceimagescalingsamplingmodesexamples} -Load time image scaling is spread throughout the DALi examples. -Search for `"ImageDimensions"` in the dali-demo project to see it used. -There is also a specific demo to show all of the fitting and scaling modes. -which lives in the demo project at `examples/image-scaling-and-filtering`. - -![ ](../assets/img/image-scaling/demo-fitting-sampling.jpg) ![ ](./demo-fitting-sampling.jpg) - -Touch the arrows in the top corners to changes image. -Drag the green button in the corner of the image to change the requested size and trigger an immediate image reload. -Use the buttons at the bottom of the screen to select any of the fitting and sampling modes from the popups which appear. -This demo does not take any of the special measures [described above](#resourceimagescalingsamplingmodesrendernaturalsize) to correct for the natural size != pixel dimensions discrepancy so all fitting modes other than `SCALE_TO_FILL` show distortion. - -A second specific demo shows the effect of a filter mode on a single image loaded into various requested rectangles side by side. -It can be found under `examples/image-scaling-irregular-grid`. - -![ ](../assets/img/image-scaling/demo-sampling-modes.jpg) ![ ](./demo-sampling-modes.jpg) - -Touch the button at top-left to change image. -The button at top-right changes sampling mode. -You will see strong differences between sampling modes where the image contains high frequency details such as hair and in the large black and white image, but much less in some others such as the Statue of Liberty which is mostly covered by a smooth gradient. @class _Guide_Resource_Image_Scaling */ diff --git a/node-addon/binding.gyp b/node-addon/binding.gyp index 142cc74..ac3b428 100644 --- a/node-addon/binding.gyp +++ b/node-addon/binding.gyp @@ -21,6 +21,7 @@ '<(DALI_JS_DIR)/controls/control-wrapper.cpp', '<(DALI_JS_DIR)/controls/item-factory-wrapper.cpp', '<(DALI_JS_DIR)/controls/item-view-api.cpp', + '<(DALI_JS_DIR)/controls/scroll-view-api.cpp', '<(DALI_JS_DIR)/animation/animation-api.cpp', '<(DALI_JS_DIR)/animation/animation-wrapper.cpp', '<(DALI_JS_DIR)/animation/constrainer-api.cpp', diff --git a/node-addon/build/tizen/CMakeLists.txt b/node-addon/build/tizen/CMakeLists.txt index d418eca..d29846dd 100644 --- a/node-addon/build/tizen/CMakeLists.txt +++ b/node-addon/build/tizen/CMakeLists.txt @@ -59,6 +59,7 @@ add_library(dali_addon SHARED ${PLUGING_SRC_DIR}/controls/control-wrapper.cpp ${PLUGING_SRC_DIR}/controls/item-factory-wrapper.cpp ${PLUGING_SRC_DIR}/controls/item-view-api.cpp + ${PLUGING_SRC_DIR}/controls/scroll-view-api.cpp ${PLUGING_SRC_DIR}/constants/constants-wrapper.cpp ${PLUGING_SRC_DIR}/animation/animation-api.cpp ${PLUGING_SRC_DIR}/animation/animation-wrapper.cpp diff --git a/node-addon/examples/scroll-view.js b/node-addon/examples/scroll-view.js new file mode 100644 index 0000000..d0cf3e5 --- /dev/null +++ b/node-addon/examples/scroll-view.js @@ -0,0 +1,130 @@ + var window= { + x:0, + y:0, + width:1920, + height:1080, + transparent: false, + name:'scrollview-example' + }; + + var viewMode={ + 'stereoscopic-mode':'mono', // stereo-horizontal, stereo-vertical, stereo-interlaced, + 'stereoBase': 65 // Distance in millimeters between left/right cameras typically between (50-70mm) + }; + + var options= { + 'window': window, + 'viewMode': viewMode, + } + +//desktop +//var dali = require('../build/Release/dali')( options ); + +//target +var dali = require('dali')( options ); + +var stageSize; +var scrollView; +var scrollBar; + +var imageDir = "./images/"; + +var daliApp = {}; + +daliApp.createScrollView = function() { + + // Create a scroll view + scrollView = new dali.Control("ScrollView"); + stageSize = dali.stage.getSize(); + scrollView.size = [stageSize.x, stageSize.y, 0.0]; + scrollView.parentOrigin = dali.CENTER; + scrollView.anchorPoint = dali.CENTER; + + dali.stage.add( scrollView ); + + // Add actors to a scroll view with 4 pages + var pageRows = 1; + var pageColumns = 3; + for(var pageRow = 0; pageRow < pageRows; pageRow++) + { + for(var pageColumn = 0; pageColumn < pageColumns; pageColumn++) + { + var pageActor = new dali.Control(); + pageActor.widthResizePolicy = "FILL_TO_PARENT"; + pageActor.heightResizePolicy = "FILL_TO_PARENT"; + pageActor.parentOrigin = dali.CENTER; + pageActor.anchorPoint = dali.CENTER; + pageActor.position = [pageColumn * stageSize.x, pageRow * stageSize.y, 0.0]; + pageActor.name = "pageActor" + pageColumn; + + // Add images in a 5x4 grid layout for each page + var imageRows = 4; + var imageColumns = 5; + var margin = 10.0; + var imageSize = [(stageSize.x / imageColumns) - margin, (stageSize.y / imageRows) - margin, 0.0]; + + for(var row = 0; row < imageRows; row++) + { + for(var column = 0; column < imageColumns;column++) + { + var imageView = new dali.Control("ImageView"); + var imageId = (row * imageColumns + column) % 2 + 1; + imageView.image = imageDir + "image-" + imageId + ".jpg"; + imageView.parentOrigin = dali.CENTER; + imageView.anchorPoint = dali.CENTER; + imageView.size = imageSize; + imageView.position = [ margin * 0.5 + (imageSize[0] + margin) * column - stageSize.x * 0.5 + imageSize[0] * 0.5, + margin * 0.5 + (imageSize[1] + margin) * row - stageSize.y * 0.5 + imageSize[1] * 0.5, + 0.0 ]; + pageActor.add(imageView); + var position = imageView.position; + } + } + + scrollView.add( pageActor ); + } + } + + // Set scroll view to have 3 pages in X axis and allow page snapping, + // and also disable scrolling in Y axis. + var scrollMode = { + xAxisScrollEnabled : true, + xAxisSnapToInterval : stageSize.x, // Define the snap points + xAxisScrollBoundary : stageSize.x * pageColumns, // i.e. Define 3 pages + yAxisScrollEnabled : false + } + + scrollView.setScrollMode(scrollMode); + + // Create a horizontal scroll bar in the bottom of scroll view (optional) + scrollBar = new dali.Control("ScrollBar"); + scrollBar.parentOrigin = dali.BOTTOM_LEFT; + scrollBar.anchorPoint = dali.TOP_LEFT; + scrollBar.widthResizePolicy = "FIT_TO_CHILDREN"; + scrollBar.heightResizePolicy = "FILL_TO_PARENT"; + scrollBar.orientation = [0, 0, 270]; + scrollBar.scrollDirection = "Horizontal"; + scrollView.add(scrollBar); + + // Connect to the onRelayout signal + scrollView.on("onRelayout", daliApp.onScrollViewRelayout); +} + +daliApp.onScrollViewRelayout = function( button ) { + + // Set the correct scroll bar size after size negotiation of scroll view is done + scrollBar.size = [0.0, scrollView.getRelayoutSize(dali.DIMENSION_WIDTH), 0.0 ]; +} + +function startup() +{ + daliApp.init(); +} + +daliApp.init = function() +{ + daliApp.createScrollView(); +} + +startup(); + diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index d326e26..e96c57d 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -1,6 +1,6 @@ Name: dali-toolkit Summary: The OpenGLES Canvas Core Library Toolkit -Version: 1.1.18 +Version: 1.1.19 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-2-Clause and MIT diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js index 98b35a4..9b4b4ff 100644 --- a/plugins/dali-script-v8/docs/content/actor.js +++ b/plugins/dali-script-v8/docs/content/actor.js @@ -118,7 +118,7 @@ function OnPressed( actor, touchEvent ) var anim = new dali.Animation( 4 ); var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll - anim.animateBy( actor, "rotation", rotation ); + anim.animateBy( actor, "orientation", rotation ); anim.play(); return true; } @@ -195,8 +195,8 @@ See worldPositionX |FLOAT | ✘ | ✘ worldPositionY |FLOAT | ✘ | ✘ worldPositionZ |FLOAT | ✘ | ✘ - rotation |ROTATION | ✔ | ✔ - worldRotation |ROTATION | ✘ | ✘ + orientation |ROTATION | ✔ | ✔ + worldOrientation |ROTATION | ✘ | ✘ scale |VECTOR3 | ✔ | ✔ scaleX |FLOAT | ✔ | ✔ scaleY |FLOAT | ✔ | ✔ @@ -213,7 +213,7 @@ See name |STRING | ✔ | ✘ sensitive |BOOLEAN | ✔ | ✘ leaveRequired |BOOLEAN | ✔ | ✘ - inheritRotation |BOOLEAN | ✔ | ✘ + inheritOrientation |BOOLEAN | ✔ | ✘ inheritScale |BOOLEAN | ✔ | ✘ colorMode |NUMBER | ✔ | ✘ positionInheritance |NUMBER | ✔ | ✘ @@ -381,19 +381,19 @@ WORLD_POSITION_Z /** - * Actors rotation - * @property rotation + * Actors orientation + * @property orientation * @type dali Rotation object */ -ROTATION +ORIENTATION /** - * Actors world-rotation - * @property worldRotation + * Actors world-orientation + * @property worldOrientation * @type dali Rotation object ( read only) */ -WORLD_ROTATION +WORLD_ORIENTATION /** * Actors scale @@ -521,10 +521,10 @@ LEAVE_REQUIRED /** * Set whether a child actor inherits it's parent's orientation. * @type Boolean - * @property inheritRotation + * @property inheritOrientation * @default true */ -INHERIT_ROTATION, +INHERIT_ORIENTATION, /** diff --git a/plugins/dali-script-v8/docs/content/animation.js b/plugins/dali-script-v8/docs/content/animation.js index 54ba7c3..43d0f02 100644 --- a/plugins/dali-script-v8/docs/content/animation.js +++ b/plugins/dali-script-v8/docs/content/animation.js @@ -78,7 +78,7 @@ function createAnimation() { var anim = new dali.Animation(1); // default duration is increased if length of all animations is greater than it. var animOptions = { - alpha: "linear", + alpha: dali.ALPHA_FUNCTION_LINEAR, delay: 0.5, // used to delay the start of the animation duration: 3, // duration of the animation }; @@ -89,16 +89,16 @@ function createAnimation() { // rotate back to correct orientation var endRotation = new dali.Rotation(0,0,0); - animOptions.alpha = "easeInOutSine"; + animOptions.alpha = dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE; anim.animateTo(myActor1, "orientation", endRotation, animOptions); // Delay the myActor2 by a second animOptions.delay = 0.0; - animOptions.alpha = "linear"; + animOptions.alpha = dali.ALPHA_FUNCTION_LINEAR; anim.animateTo(myActor2, "positionZ", 0, animOptions); // rotate back to correct orientation - animOptions.alpha = "easeInOutSine"; + animOptions.alpha = dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE; anim.animateTo(myActor2, "orientation", endRotation, animOptions); return anim; @@ -171,7 +171,7 @@ createShaderAnimation = function( imageView, color, zoom, duration, delay ) var shaderAnim = new dali.Animation(duration+delay); var animOptions = { - alpha: "doubleEaseInOutSine60", + alpha: dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE, delay: delay, duration: duration, }; @@ -214,7 +214,7 @@ var shaderAnim = createShaderAnimation( imageView, color,zoom, duration, delay); // also rotate the imageView 90 degrees at the same time. var rotation = new dali.Rotation(90,0,0,1); -shaderAnim.animateTo(imageView, "orientation", rotation, { alpha:"linear", duration:duration, delay:delay }); +shaderAnim.animateTo(imageView, "orientation", rotation, { alpha:dali.ALPHA_FUNCTION_LINEAR, duration:duration, delay:delay }); shaderAnim.play(); @@ -224,36 +224,22 @@ shaderAnim.play(); ### Animation alpha functions -| Name | Description | -|--------------------|--------------| -|default |Linear | -|linear |Linear | -|square |Square (x^2) | -|reverse |Reverse linear | -|easeIn |Speeds up and comes to a sudden stop | -|easeOut |Sudden start and slows to a gradual stop| -|easeInOut |Speeds up and slows to a gradual stop| -|easeInSine |Speeds up and comes to a sudden stop| -|easeOutSine |Sudden start and slows to a gradual stop| -|easeInOutSine |Speeds up and slows to a gradual stop | -|easeInSine33 |Speeds up and comes to a sudden stop | -|easeOutSine33 |Sudden start and slows to a gradual stop | -|easeInOutSine33 |Speeds up and slows to a gradual stop | -|easeInOutSine50 |Speeds up and slows to a gradual stop | -|easeInOutSine60 |Speeds up and slows to a gradual stop | -|easeInOutSine70 |Speeds up and slows to a gradual stop | -|easeInOutSine80 |Speeds up and slows to a gradual stop | -|easeInOutSine90 |Speeds up and slows to a gradual stop | -|doubleEaseInOutSine6|Speeds up and slows to a gradual stop, then speeds up again and slows to a gradual stop | -|easeOutQuint50 |Sudden start and slows to a gradual stop | -|easeOutQuint80 |Sudden start and slows to a gradual stop | -|bounce |Sudden start, loses momentum and ** Returns to start position ** | -|bounceBack |Sudden start, loses momentum and returns to exceed start position ** Returns to start position ** | -|easeInBack |Slow start, exceed start position and quickly reach destination | -|easeOutBack |Sudden start, exceed end position and return to a gradual stop| -|easeInOutBack |Slow start, exceed start position, fast middle, exceed end position and return to a gradual stop| -|sin |full 360 revolution ** Returns to start position ** | -|sin2x |full 720 revolution ** Returns to start position ** | +| Name | Description | +|----------------------------------|----------------| +|ALPHA_FUNCTION_DEFAULT |Linear | +|ALPHA_FUNCTION_LINEAR |Linear | +|ALPHA_FUNCTION_REVERSE |Reverse linear | +|ALPHA_FUNCTION_EASE_IN_SQUARE |Speeds up and comes to a sudden stop (Square) | +|ALPHA_FUNCTION_EASE_OUT_SQUARE |Sudden start and slows to a gradual stop (Square) | +|ALPHA_FUNCTION_EASE_IN |Speeds up and comes to a sudden stop | +|ALPHA_FUNCTION_EASE_OUT |Sudden start and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_OUT |Speeds up and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_SINE |Speeds up and comes to a sudden stop| +|ALPHA_FUNCTION_EASE_OUT_SINE |Sudden start and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_OUT_SINE |Speeds up and slows to a gradual stop | +|ALPHA_FUNCTION_BOUNCE |Sudden start, loses momentum and ** Returns to start position ** | +|ALPHA_FUNCTION_SIN |full 360 revolution ** Returns to start position ** | +|ALPHA_FUNCTION_EASE_OUT_BACK |Sudden start, exceed end position and return to a gradual stop| diff --git a/plugins/dali-script-v8/docs/content/constants.js b/plugins/dali-script-v8/docs/content/constants.js index a09ed33..19359bd 100644 --- a/plugins/dali-script-v8/docs/content/constants.js +++ b/plugins/dali-script-v8/docs/content/constants.js @@ -169,28 +169,49 @@ Constants accessible under the dali global object. |GEOMETRY_TRIANGLE_STRIP | integer value | |**Property type ** | | -|PROPERTY_NONE | integer value | +|PROPERTY_NONE | none | |PROPERTY_BOOLEAN | integer value | -|PROPERTY_FLOAT | integer value | +|PROPERTY_FLOAT | float value | |PROPERTY_INTEGER | integer value | -|PROPERTY_VECTOR2 | integer value | -|PROPERTY_VECTOR3 | integer value | -|PROPERTY_VECTOR4 | integer value | -|PROPERTY_MATRIX3 | integer value | -|PROPERTY_MATRIX | integer value | -|PROPERTY_RECTANGLE | integer value | -|PROPERTY_ROTATION | integer value | -|PROPERTY_STRING | integer value | -|PROPERTY_ARRAY | integer value | -|PROPERTY_MAP | integer value | -|PROPERTY_INVALID_INDEX | integer value | -|PROPERTY_READ_ONLY | integer value | -|PROPERTY_READ_WRITE | integer value | -|PROPERTY_ANIMATABLE | integer value | +|PROPERTY_VECTOR2 | Array[ float, float ] | +|PROPERTY_VECTOR3 | Array[ float, float, float ] | +|PROPERTY_VECTOR4 | Array[ float, float, float, float ] | +|PROPERTY_MATRIX3 | Object | +|PROPERTY_MATRIX | Object | +|PROPERTY_RECTANGLE | Object | +|PROPERTY_ORIENTATION | Object | +|PROPERTY_STRING | String | +|PROPERTY_ARRAY | Object | +|PROPERTY_MAP | Object | + +|**Layout dimensions ** | | +|DIMENSION_WIDTH | integer value | +|DIMENSION_HEIGHT | integer value | |**Item layout type ** | | |ITEM_LAYOUT_LIST | integer value | |ITEM_LAYOUT_GRID | integer value | +|**Scroll direction bias ** | | +|DIRECTION_BIAS_NONE | integer value | +|DIRECTION_BIAS_LEFT | integer value | +|DIRECTION_BIAS_RIGHT | integer value | + +|**Animation alpha function ** | | +|ALPHA_FUNCTION_DEFAULT | integer value | +|ALPHA_FUNCTION_LINEAR | integer value | +|ALPHA_FUNCTION_REVERSE | integer value | +|ALPHA_FUNCTION_EASE_IN_SQUARE | integer value | +|ALPHA_FUNCTION_EASE_OUT_SQUARE | integer value | +|ALPHA_FUNCTION_EASE_IN | integer value | +|ALPHA_FUNCTION_EASE_OUT | integer value | +|ALPHA_FUNCTION_EASE_IN_OUT | integer value | +|ALPHA_FUNCTION_EASE_IN_SINE | integer value | +|ALPHA_FUNCTION_EASE_OUT_SINE | integer value | +|ALPHA_FUNCTION_EASE_IN_OUT_SINE | integer value | +|ALPHA_FUNCTION_BOUNCE | integer value | +|ALPHA_FUNCTION_SIN | integer value | +|ALPHA_FUNCTION_EASE_OUT_BACK | integer value | + * @class Constants */ diff --git a/plugins/dali-script-v8/docs/content/item-factory.js b/plugins/dali-script-v8/docs/content/item-factory.js index b7ae5ab..8f01154 100644 --- a/plugins/dali-script-v8/docs/content/item-factory.js +++ b/plugins/dali-script-v8/docs/content/item-factory.js @@ -169,7 +169,7 @@ JSON_TEMPLATE_FILE * "title_text" : "Item 1" } * ]; * - * itemFactory.data = itemViewData; // ItemFactory will look for the template from this JSON file + * itemFactory.data = itemViewData; // ItemFactory will create items from this data * * @type Array * @property data diff --git a/plugins/dali-script-v8/docs/content/path-animation.js b/plugins/dali-script-v8/docs/content/path-animation.js index 7847fc1..45b7fb6 100644 --- a/plugins/dali-script-v8/docs/content/path-animation.js +++ b/plugins/dali-script-v8/docs/content/path-animation.js @@ -30,7 +30,7 @@ function begin() dali.stage.add( imageView ); var animation = new dali.Animation(2.0); - var animOptions = { alpha:"easeInOutSine", delay:0.5, duration:1.5 }; + var animOptions = { alpha:dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE, delay:0.5, duration:1.5 }; var forward = new dali.Vector3(1,0,0); animation.animate( imageView, myPath, forward, animOptions ); diff --git a/plugins/dali-script-v8/docs/content/scroll-view.js b/plugins/dali-script-v8/docs/content/scroll-view.js new file mode 100644 index 0000000..bff2fc3 --- /dev/null +++ b/plugins/dali-script-v8/docs/content/scroll-view.js @@ -0,0 +1,89 @@ +/** + * +## ScrollView API + +ScrollView is a container where the actors inside it can be scrolled manually +(via touch or pan gesture) or automatically. + +By default, ScrollView can scroll to any position both horizontally and +vertically and no snapping is enabled. + +Scroll mode can be specified to define how ScrollView should handle scrolling +in X and Y axes respectively (i.e. whether scrolling is enabled horizontally +or vertically, how scrolling is snapped, and the boundary to prevent ScrollView +to scroll beyond a certain position in the axes). + +![ ](../assets/img/scroll-view/scroll-view.png) + +### Example of creating a ScrollView + +``` + // Create a scroll view + var scrollView = new dali.Control("ScrollView"); + var stageSize = dali.stage.getSize(); + scrollView.size = [stageSize.x, stageSize.y, 0.0]; + scrollView.parentOrigin = dali.CENTER; + scrollView.anchorPoint = dali.CENTER; + + dali.stage.add( scrollView ); + + // Add actors to a scroll view with 3 pages + var pageRows = 1; + var pageColumns = 3; + for(var pageRow = 0; pageRow < pageRows; pageRow++) + { + for(var pageColumn = 0; pageColumn < pageColumns; pageColumn++) + { + var pageActor = new dali.Control(); + pageActor.widthResizePolicy = "FILL_TO_PARENT"; + pageActor.heightResizePolicy = "FILL_TO_PARENT"; + pageActor.parentOrigin = dali.CENTER; + pageActor.anchorPoint = dali.CENTER; + pageActor.position = [pageColumn * stageSize.x, pageRow * stageSize.y, 0.0]; + pageActor.name = "pageActor" + pageColumn; + + // Add images in a 3x4 grid layout for each page + var imageRows = 4; + var imageColumns = 3; + var margin = 10.0; + var imageSize = [(stageSize.x / imageColumns) - margin, (stageSize.y / imageRows) - margin, 0.0]; + + for(var row = 0; row < imageRows; row++) + { + for(var column = 0; column < imageColumns;column++) + { + var imageView = new dali.Control("ImageView"); + var imageId = row * imageColumns + column; + imageView.image = "./image-" + imageId + ".jpg"; + imageView.parentOrigin = dali.CENTER; + imageView.anchorPoint = dali.CENTER; + imageView.size = imageSize; + imageView.position = [ margin * 0.5 + (imageSize[0] + margin) * column - stageSize.x * 0.5 + imageSize[0] * 0.5, + margin * 0.5 + (imageSize[1] + margin) * row - stageSize.y * 0.5 + imageSize[1] * 0.5, + 0.0 ]; + pageActor.add(imageView); + var position = imageView.position; + } + } + + scrollView.add( pageActor ); + } + } + + // Set scroll view to have 3 pages in X axis and allow page snapping, + // and also disable scrolling in Y axis. + var scrollMode = { + xAxisScrollEnabled : true, + xAxisSnapToInterval : stageSize.x, // Define the snap points + xAxisScrollBoundary : stageSize.x * pageColumns, // i.e. Define 3 pages + yAxisScrollEnabled : false + } + + scrollView.setScrollMode(scrollMode); + +``` + + @class ScrollView + @extends Actor + +*/ diff --git a/plugins/dali-script-v8/file.list b/plugins/dali-script-v8/file.list index 598d90e..d648d9b 100644 --- a/plugins/dali-script-v8/file.list +++ b/plugins/dali-script-v8/file.list @@ -16,6 +16,7 @@ script_v8_plugin_src_files = \ $(v8_plugin_dir)/controls/control-wrapper.cpp \ $(v8_plugin_dir)/controls/item-factory-wrapper.cpp \ $(v8_plugin_dir)/controls/item-view-api.cpp \ + $(v8_plugin_dir)/controls/scroll-view-api.cpp \ $(v8_plugin_dir)/constants/constants-wrapper.cpp \ $(v8_plugin_dir)/animation/animation-api.cpp \ $(v8_plugin_dir)/animation/animation-wrapper.cpp \ diff --git a/plugins/dali-script-v8/src/actors/actor-api.cpp b/plugins/dali-script-v8/src/actors/actor-api.cpp index 371639d..e47285b 100644 --- a/plugins/dali-script-v8/src/actors/actor-api.cpp +++ b/plugins/dali-script-v8/src/actors/actor-api.cpp @@ -518,6 +518,31 @@ void ActorApi::GetNaturalSize( const v8::FunctionCallbackInfo& args ) } /** + * Return the value of negotiated dimension for the given dimension + * + * @for Actor + * @method getRelayoutSize + * @param {Integer} dimension The dimension of layout to retrieve (either dali.DIMENSION_WIDTH or dali.DIMENSION_HEIGHT) + * @return {Number} The value of the negotiated dimension + */ +void ActorApi::GetRelayoutSize( const v8::FunctionCallbackInfo& args ) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + Actor actor = GetActor( isolate, args ); + + bool found; + int dimension = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "missing dimension parameter"); + return; + } + + args.GetReturnValue().Set( v8::Number::New( isolate, actor.GetRelayoutSize( static_cast(dimension) ) ) ); +} + +/** * Calculate the width of the actor given a height * * The natural size is used for default calculation. diff --git a/plugins/dali-script-v8/src/actors/actor-api.h b/plugins/dali-script-v8/src/actors/actor-api.h index bcd600e..2963400 100644 --- a/plugins/dali-script-v8/src/actors/actor-api.h +++ b/plugins/dali-script-v8/src/actors/actor-api.h @@ -57,6 +57,7 @@ namespace ActorApi void SetKeyboardFocusable( const v8::FunctionCallbackInfo< v8::Value >& args ); void IsKeyboardFocusable( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetNaturalSize( const v8::FunctionCallbackInfo< v8::Value >& args ); + void GetRelayoutSize( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetWidthForHeight( const v8::FunctionCallbackInfo& args ); void GetHeightForWidth( const v8::FunctionCallbackInfo& args ); void TranslateBy( const v8::FunctionCallbackInfo< v8::Value >& args ); diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp index a1c0f78..c9d3e1d 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp @@ -179,6 +179,7 @@ const ActorFunctions ActorFunctionTable[]= // ignore. SetSize() use Actor.size // ignore. GetCurrentSize() use Actor.size { "GetNaturalSize", ActorApi::GetNaturalSize, ACTOR_API }, + { "GetRelayoutSize", ActorApi::GetRelayoutSize, ACTOR_API }, { "GetWidthForHeight",ActorApi::GetWidthForHeight, ACTOR_API }, { "GetHeightForWidth",ActorApi::GetHeightForWidth, ACTOR_API }, // ignore. SetPosition(....) use Actor.position diff --git a/plugins/dali-script-v8/src/animation/animation-api.cpp b/plugins/dali-script-v8/src/animation/animation-api.cpp index 0db4482..e20e656 100644 --- a/plugins/dali-script-v8/src/animation/animation-api.cpp +++ b/plugins/dali-script-v8/src/animation/animation-api.cpp @@ -20,7 +20,6 @@ #include "path-wrapper.h" // EXTERNAL INCLUDES -#include // for strcmp #include @@ -38,85 +37,11 @@ namespace V8Plugin namespace // un named namespace { -// @todo think about alternative ways of passing around -struct AlphaFuncStruct -{ - const char* const name; - AlphaFunction alphaFunc; -}; -/** - * Contains a list of alpha functions that can be used. - */ -const AlphaFuncStruct AlphaFunctionTable[]= -{ - - {"default" , AlphaFunction::DEFAULT }, - {"linear" , AlphaFunction::LINEAR }, - {"reverse" , AlphaFunction::REVERSE }, - - {"easeInSquare" , AlphaFunction::EASE_IN_SQUARE }, - {"easeOutSquare" , AlphaFunction::EASE_OUT_SQUARE }, - - {"easeIn" , AlphaFunction::EASE_IN }, - {"easeOut" , AlphaFunction::EASE_OUT }, - {"easeInOut" , AlphaFunction::EASE_IN_OUT }, - - {"easeInSine" , AlphaFunction::EASE_IN_SINE }, - {"easeOutSine" , AlphaFunction::EASE_OUT_SINE }, - {"easeInOutSine" , AlphaFunction::EASE_IN_OUT_SINE }, - - {"bounce" , AlphaFunction::BOUNCE }, - {"sin" , AlphaFunction::SIN }, - {"easeOutBack" , AlphaFunction::EASE_OUT_BACK }, - -}; -const unsigned int AlphaFunctionTableCount = sizeof(AlphaFunctionTable)/sizeof(AlphaFunctionTable[0]); -const char* const DEFAULT_ALPHA_NAME = "default"; -static AlphaFunction DEFAULT_ALPHA_FUNCTION = AlphaFunction::DEFAULT; - - - -AlphaFunction GetAlphaFunction( const std::string& alphaFuncName ) -{ - // This will normally get called just a few times during the application, so no point in doing anything clever - for( unsigned int i = 0; i < AlphaFunctionTableCount; i++) - { - const AlphaFuncStruct& alphaStruct( AlphaFunctionTable[i] ); - - if( std::strcmp( alphaStruct.name , alphaFuncName.c_str() ) == 0 ) - { - return alphaStruct.alphaFunc; - } - } - - DALI_LOG_ERROR("Failed to find alpha func |%s| \n", alphaFuncName.c_str() ); - return DEFAULT_ALPHA_FUNCTION; -} - -const char* const GetAlphaFunctionName( AlphaFunction alphaFunc ) -{ - // This may get called 3 times during the application, so no point - // in doing anything clever - - for( unsigned int i = 0; i < AlphaFunctionTableCount; i++) - { - const AlphaFuncStruct& alphaStruct( AlphaFunctionTable[i] ); - - - if( alphaStruct.alphaFunc.GetBuiltinFunction() == alphaFunc.GetBuiltinFunction() ) - { - return alphaStruct.name; - } - } - return "default"; -} - - struct AnimationParameters { AnimationParameters( const Animation& anim) : propertyIndex( Property::INVALID_INDEX ), - alphaFunction( DEFAULT_ALPHA_FUNCTION), + alphaFunction( AlphaFunction::DEFAULT), delay( 0.f ), duration(anim.GetDuration()), optionsFound( false ) @@ -150,11 +75,10 @@ void GetAnimationOptions( v8::Isolate* isolate, { v8::Local obj = options->ToObject(); v8::Local alphaValue = obj->Get( v8::String::NewFromUtf8( isolate, "alpha" ) ); - if( alphaValue->IsString() ) + if( alphaValue->IsUint32() ) { animParams.optionsFound = true; - std::string alphaName = V8Utils::v8StringToStdString( alphaValue ); - animParams.alphaFunction = GetAlphaFunction( alphaName ); + animParams.alphaFunction = static_cast(alphaValue->ToUint32()->Value()); } v8::Local delayValue = obj->Get( v8::String::NewFromUtf8( isolate, "delay" ) ); @@ -225,10 +149,9 @@ KeyFrames GetKeyFrames( v8::Isolate* isolate, v8::Local keyFrameArra // get keyframe.alpha v8::Handle alphaValue = keyFrameObject->Get(v8::String::NewFromUtf8( isolate, "alpha")); - if( alphaValue->IsString() ) + if( alphaValue->IsUint32() ) { - std::string alphaName = V8Utils::v8StringToStdString( alphaValue ); - AlphaFunction alphaFunction = GetAlphaFunction( alphaName ); + AlphaFunction alphaFunction = static_cast(alphaValue->ToUint32()->Value()); keyframes.Add( progress->NumberValue(), value, alphaFunction ); } else @@ -529,7 +452,7 @@ void AnimationApi::GetDisconnectAction( const v8::FunctionCallbackInfo< v8::Valu * Set the default alpha function for an animation. * @method setDefaultAlphaFunction * @for Animation - * @param {string} alpha function + * @param {Integer} alpha function */ void AnimationApi::SetDefaultAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args ) { @@ -539,23 +462,22 @@ void AnimationApi::SetDefaultAlphaFunction( const v8::FunctionCallbackInfo< v8:: Animation anim = GetAnimation( isolate, args ); bool found( false ); - std::string alphaFunc = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args ); + int alphaFunc = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); if( !found ) { DALI_SCRIPT_EXCEPTION( isolate, "bad parameter" ); } else { - AlphaFunction func = GetAlphaFunction( alphaFunc ); + AlphaFunction func = static_cast(alphaFunc); anim.SetDefaultAlphaFunction( func ); } - } /** * Get the default alpha function for an animation. * @method getDefaultAlphaFunction * @for Animation - * @return {string} alpha function + * @return {Integer} alpha function */ void AnimationApi::GetDefaultAlphaFunction( const v8::FunctionCallbackInfo& args ) { @@ -564,10 +486,10 @@ void AnimationApi::GetDefaultAlphaFunction( const v8::FunctionCallbackInfo& args, Acto targetPropertyIndex = targetActor.GetPropertyIndex( propertyName ); if( targetPropertyIndex == Property::INVALID_INDEX ) { - targetPropertyIndex = targetActor.GetPropertyIndex( propertyName ); - - if( targetPropertyIndex == Property::INVALID_INDEX ) - { - DALI_SCRIPT_EXCEPTION( isolate, "Target property not found" ); - return false; - } + DALI_SCRIPT_EXCEPTION( isolate, "Target property not found" ); + return false; } } else @@ -139,14 +134,9 @@ bool GetApplyParameters( const v8::FunctionCallbackInfo< v8::Value >& args, Acto sourcePropertyIndex = targetActor.GetPropertyIndex( propertyName ); if( sourcePropertyIndex == Property::INVALID_INDEX ) { - sourcePropertyIndex = targetActor.GetPropertyIndex( propertyName ); - - if( sourcePropertyIndex == Property::INVALID_INDEX ) - { - DALI_SCRIPT_EXCEPTION( isolate, "Source property not found" ); - return false; + DALI_SCRIPT_EXCEPTION( isolate, "Source property not found" ); + return false; } - } } else { diff --git a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp index edbd62b..a3a3dd7 100644 --- a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp +++ b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp @@ -36,6 +36,7 @@ #include #include #include +#include namespace Dali { @@ -248,9 +249,31 @@ const IntegerPair EnumTable[] = { "PROPERTY_READ_WRITE", Property::READ_WRITE }, { "PROPERTY_ANIMATABLE", Property::ANIMATABLE }, + { "DIMENSION_WIDTH", Dimension::WIDTH }, + { "DIMENSION_HEIGHT", Dimension::HEIGHT }, + { "ITEM_LAYOUT_LIST", Toolkit::DefaultItemLayout::LIST }, { "ITEM_LAYOUT_GRID", Toolkit::DefaultItemLayout::GRID }, + { "DIRECTION_BIAS_NONE", Toolkit::DirectionBiasNone }, + { "DIRECTION_BIAS_LEFT", Toolkit::DirectionBiasLeft }, + { "DIRECTION_BIAS_RIGHT", Toolkit::DirectionBiasRight }, + + { "ALPHA_FUNCTION_DEFAULT", AlphaFunction::DEFAULT }, + { "ALPHA_FUNCTION_LINEAR", AlphaFunction::LINEAR }, + { "ALPHA_FUNCTION_REVERSE", AlphaFunction::REVERSE }, + { "ALPHA_FUNCTION_EASE_IN_SQUARE", AlphaFunction::EASE_IN_SQUARE }, + { "ALPHA_FUNCTION_EASE_OUT_SQUARE", AlphaFunction::EASE_OUT_SQUARE }, + { "ALPHA_FUNCTION_EASE_IN", AlphaFunction::EASE_IN }, + { "ALPHA_FUNCTION_EASE_OUT", AlphaFunction::EASE_OUT }, + { "ALPHA_FUNCTION_EASE_IN_OUT", AlphaFunction::EASE_IN_OUT }, + { "ALPHA_FUNCTION_EASE_IN_SINE", AlphaFunction::EASE_IN_SINE }, + { "ALPHA_FUNCTION_EASE_OUT_SINE", AlphaFunction::EASE_OUT_SINE }, + { "ALPHA_FUNCTION_EASE_IN_OUT_SINE", AlphaFunction::EASE_IN_OUT_SINE }, + { "ALPHA_FUNCTION_BOUNCE", AlphaFunction::BOUNCE }, + { "ALPHA_FUNCTION_SIN", AlphaFunction::SIN }, + { "ALPHA_FUNCTION_EASE_OUT_BACK", AlphaFunction::EASE_OUT_BACK }, + }; const unsigned int EnumTableCount = sizeof(EnumTable)/sizeof(EnumTable[0]); diff --git a/plugins/dali-script-v8/src/controls/control-wrapper.cpp b/plugins/dali-script-v8/src/controls/control-wrapper.cpp index 09093a2..b3cc3dc 100644 --- a/plugins/dali-script-v8/src/controls/control-wrapper.cpp +++ b/plugins/dali-script-v8/src/controls/control-wrapper.cpp @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include +#include #include #include @@ -35,6 +36,7 @@ namespace V8Plugin v8::Persistent ControlWrapper::mControlTemplate; v8::Persistent ControlWrapper::mItemViewTemplate; +v8::Persistent ControlWrapper::mScrollViewTemplate; Vector< void* > ControlWrapper::mControlGarbageContainer; @@ -56,7 +58,8 @@ struct ControlTemplate const ControlTemplate ControlTemplateLookup[]= { { &ControlWrapper::mControlTemplate }, // CONTROL - { &ControlWrapper::mItemViewTemplate } // ITEMVIEW + { &ControlWrapper::mItemViewTemplate }, // ITEMVIEW + { &ControlWrapper::mScrollViewTemplate } // SCROLLVIEW }; /** @@ -65,7 +68,8 @@ const ControlTemplate ControlTemplateLookup[]= enum ControlApiBitMask { CONTROL_API = 1 << 0, - ITEMVIEW_API = 1 << 1 + ITEMVIEW_API = 1 << 1, + SCROLLVIEW_API = 1 << 2 }; /** @@ -87,6 +91,7 @@ const ControlApiStruct ControlApiLookup[]= { {"Control", ControlWrapper::CONTROL, NULL, CONTROL_API }, {"ItemView", ControlWrapper::ITEMVIEW, ItemViewApi::New, CONTROL_API | ITEMVIEW_API }, + {"ScrollView", ControlWrapper::SCROLLVIEW, ScrollViewApi::New, CONTROL_API | SCROLLVIEW_API } }; const unsigned int ControlApiLookupCount = sizeof(ControlApiLookup)/sizeof(ControlApiLookup[0]); @@ -171,6 +176,19 @@ const ControlFunctions ControlFunctionTable[]= { "GetItemId", ItemViewApi::GetItemId, ITEMVIEW_API }, { "GetItemsRange", ItemViewApi::GetItemsRange, ITEMVIEW_API }, + /************************************** + * ScrollView API + **************************************/ + { "SetScrollMode", ScrollViewApi::SetScrollMode, SCROLLVIEW_API }, + { "GetCurrentPage", ScrollViewApi::GetCurrentPage, SCROLLVIEW_API }, + { "ScrollToPosition", ScrollViewApi::ScrollToPosition, SCROLLVIEW_API }, + { "ScrollToPage", ScrollViewApi::ScrollToPage, SCROLLVIEW_API }, + { "ScrollToActor", ScrollViewApi::ScrollToActor, SCROLLVIEW_API }, + { "ScrollToSnapInterval", ScrollViewApi::ScrollToSnapInterval, SCROLLVIEW_API }, + { "SetScrollFlickAlphaFunction", ScrollViewApi::SetScrollFlickAlphaFunction, SCROLLVIEW_API }, + { "SetScrollSnapAlphaFunction", ScrollViewApi::SetScrollSnapAlphaFunction, SCROLLVIEW_API }, + { "SetSnapOvershootAlphaFunction", ScrollViewApi::SetSnapOvershootAlphaFunction, SCROLLVIEW_API }, + }; const unsigned int ControlFunctionTableCount = sizeof(ControlFunctionTable)/sizeof(ControlFunctionTable[0]); diff --git a/plugins/dali-script-v8/src/controls/control-wrapper.h b/plugins/dali-script-v8/src/controls/control-wrapper.h index dc4b636..8147d56 100644 --- a/plugins/dali-script-v8/src/controls/control-wrapper.h +++ b/plugins/dali-script-v8/src/controls/control-wrapper.h @@ -50,7 +50,8 @@ public: { UNKNOWN_CONTROL = -1, CONTROL = 0, - ITEMVIEW = 1 + ITEMVIEW = 1, + SCROLLVIEW = 2 }; /** diff --git a/plugins/dali-script-v8/src/controls/scroll-view-api.cpp b/plugins/dali-script-v8/src/controls/scroll-view-api.cpp new file mode 100644 index 0000000..969fbf7 --- /dev/null +++ b/plugins/dali-script-v8/src/controls/scroll-view-api.cpp @@ -0,0 +1,477 @@ +/* + * Copyright (c) 2015 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 "scroll-view-api.h" + +// EXTERNAL INCLUDES + +// INTERNAL INCLUDES +#include +#include +#include + +namespace Dali +{ + +namespace V8Plugin +{ + +namespace // unanmed namespace +{ + +Toolkit::ScrollView GetScrollView( v8::Isolate* isolate, const v8::FunctionCallbackInfo& args ) +{ + HandleWrapper* handleWrapper = HandleWrapper::Unwrap( isolate, args.This() ); + return Toolkit::ScrollView::DownCast( handleWrapper->mHandle ); +} + +} //unanmed namespace + +/*************************************** + * SCROLLVIEW API FUNCTIONS + ***************************************/ + +/** + * Constructor + * + * @for ScrollView + * @constructor + * @method ScrollView + * @return {Object} scrollView + */ +Toolkit::Control ScrollViewApi::New( const v8::FunctionCallbackInfo< v8::Value >& args ) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = Toolkit::ScrollView::New(); + return scrollView; +} + +/** + * Set the scroll mode of ScrollView. + * + * This defines whether scrolling is enabled horizontally or vertically, how + * scrolling is snapped, and the boundary in which the scroll view can pan. + * + * When no specific scroll mode is set, scroll view can scroll to any position + * both horizontally and vertically and no snapping is enabled. + * + * Example of setting the scroll boundary of scroll view in the X axis to + * three pages (page size equals to the width of scroll view) and allowing + * snapping between pages, and disabling scrolling in the Y axis. + * + * ``` + * var scrollMode = { + * xAxisScrollEnabled : true, + * xAxisSnapToInterval : scrollView.sizeWidth, + * xAxisScrollBoundary : scrollView.sizeWidth * 3, + * yAxisScrollEnabled : false + * } + * + * scrollView.setScrollMode(scrollMode); + * ``` + * + * @for ScrollView + * @method setScrollMode + * @param {Object} scrollMode + * @param {Boolean} scrollMode.xAxisScrollEnabled True if the content can be scrolled in X axis or false if not. + * @param {Float} [scrollMode.xAxisSnapToInterval] 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) + * @param {Float} [scrollMode.xAxisScrollBoundary] When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary) + * @param {Boolean} scrollMode.yAxisScrollEnabled True if the content can be scrolled in Y axis or false if not. + * @param {Float} [scrollMode.yAxisSnapToInterval] 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) + * @param {Float} [scrollMode.yAxisScrollBoundary] When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary) + */ +void ScrollViewApi::SetScrollMode( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + v8::Local scrollMode( args[0] ); + if( !scrollMode->IsObject() ) + { + DALI_SCRIPT_EXCEPTION( isolate, "invalid scroll mode parameter" ); + return; + } + + v8::Local scrollModeObj = scrollMode->ToObject(); + + Toolkit::RulerPtr rulerX, rulerY; + + // Check the scroll mode in the X axis + bool xAxisScrollEnabled = true; + v8::Local xAxisScrollEnabledValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "xAxisScrollEnabled" ) ); + if( xAxisScrollEnabledValue->IsBoolean() ) + { + xAxisScrollEnabled = xAxisScrollEnabledValue->ToBoolean()->Value(); + } + else + { + DALI_SCRIPT_EXCEPTION( isolate, "Missing xAxisScrollEnabled"); + return; + } + + if(!xAxisScrollEnabled) + { + // Default ruler and disabled + rulerX = new Toolkit::DefaultRuler(); + rulerX->Disable(); + } + else + { + v8::Local xAxisSnapToIntervalValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "xAxisSnapToInterval" ) ); + if( xAxisSnapToIntervalValue->IsNumber() ) + { + // Fixed ruler and enabled + float xAxisSnapToInterval = xAxisSnapToIntervalValue->ToNumber()->Value(); + rulerX = new Toolkit::FixedRuler(xAxisSnapToInterval); + } + else + { + // Default ruler and enabled + rulerX = new Toolkit::DefaultRuler(); + } + + v8::Local xAxisScrollBoundaryValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "xAxisScrollBoundary" ) ); + if( xAxisScrollBoundaryValue->IsNumber() ) + { + // By default ruler domain is disabled unless set + float xAxisScrollBoundary = xAxisScrollBoundaryValue->ToNumber()->Value(); + rulerX->SetDomain( Toolkit::RulerDomain( 0, xAxisScrollBoundary, true ) ); + } + } + + // Check the scroll mode in the Y axis + bool yAxisScrollEnabled = true; + v8::Local yAxisScrollEnabledValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "yAxisScrollEnabled" ) ); + if( yAxisScrollEnabledValue->IsBoolean() ) + { + yAxisScrollEnabled = yAxisScrollEnabledValue->ToBoolean()->Value(); + } + else + { + DALI_SCRIPT_EXCEPTION( isolate, "Missing yAxisScrollEnabled"); + return; + } + + if(!yAxisScrollEnabled) + { + // Default ruler and disabled + rulerY = new Toolkit::DefaultRuler(); + rulerY->Disable(); + } + else + { + v8::Local yAxisSnapToIntervalValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "yAxisSnapToInterval" ) ); + if( yAxisSnapToIntervalValue->IsNumber() ) + { + // Fixed ruler and enabled + float yAxisSnapToInterval = yAxisSnapToIntervalValue->ToNumber()->Value(); + rulerY = new Toolkit::FixedRuler(yAxisSnapToInterval); + } + else + { + // Default ruler and enabled + rulerY = new Toolkit::DefaultRuler(); + } + + v8::Local yAxisScrollBoundaryValue= scrollModeObj->Get( v8::String::NewFromUtf8( isolate, "yAxisScrollBoundary" ) ); + if( yAxisScrollBoundaryValue->IsNumber() ) + { + // By default ruler domain is disabled unless set + float yAxisScrollBoundary = yAxisScrollBoundaryValue->ToNumber()->Value(); + rulerY->SetDomain( Toolkit::RulerDomain( 0, yAxisScrollBoundary, true ) ); + } + } + + scrollView.SetRulerX(rulerX); + scrollView.SetRulerY(rulerY); +} + +/** + * Retrieves current scroll page based on the defined snap interval being the + * size of one page, and all pages laid out in a grid fashion, increasing from + * left to right until the end of the scroll boundary. Pages start from 0 as the + * first page. + * + * If no snap interval is defined, this API will return undefined value. + * + * @for ScrollView + * @method getCurrentPage + * @return {Integer} The index of current page in scroll view + */ +void ScrollViewApi::GetCurrentPage( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + args.GetReturnValue().Set( v8::Integer::New( isolate, scrollView.GetCurrentPage() ) ); +} + +/** + * Scrolls the contents to the given position. + * + * Position 0,0 is the origin. Increasing X scrolls contents left, while + * increasing Y scrolls contents up. If Rulers have been applied to the axes, + * then the contents will scroll until reaching the scroll boundary. + * Contents will not snap. + * + * The biasing parameters are provided such that in scenarios with 2 or 2x2 pages + * in wrap mode, the application developer can decide whether to scroll left or + * right to get to the target page. + * + * @for ScrollView + * @method scrollToPosition + * @param {Array} position The position to scroll to. + * @param {Float} [durationSeconds] The duration of the scroll animation in seconds (default value is scrollView.scrollSnapDuration) + * @param {Integer} [alphaFunction] The alpha function to use. + * @param {Integer} [horizontalBias] Whether to bias scrolling to left or right (by default no bias). + * @param {Integer} [verticalBias] Whether to bias scrolling to top or bottom (by default no bias). + * @example + * // scroll direction bias is one of the following + * dali.DIRECTION_BIAS_NONE // Don't bias scroll snap + * dali.DIRECTION_BIAS_LEFT // Bias scroll snap to Left + * dali.DIRECTION_BIAS_RIGHT // Bias scroll snap to Right + * + * scrollView.scrollToPosition( [150.0, 100.0], 0.5, dali.ALPHA_FUNCTION_EASE_IN_OUT, dali.DIRECTION_BIAS_LEFT, dali.DIRECTION_BIAS_NONE ); + */ +void ScrollViewApi::ScrollToPosition( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + Vector2 position = V8Utils::GetVector2Parameter( PARAMETER_0, found, isolate, args ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "bad position parameter" ); + return; + } + + float durationSeconds = V8Utils::GetFloatParameter( PARAMETER_1, found, isolate, args, scrollView.GetScrollSnapDuration() ); + + AlphaFunction alphaFunction = scrollView.GetScrollSnapAlphaFunction(); + + found = false; + int alpha = V8Utils::GetIntegerParameter( PARAMETER_2, found, isolate, args, 0 ); + if(found) + { + alphaFunction = static_cast(alpha); + } + + Toolkit::DirectionBias horizontalBias = static_cast( V8Utils::GetIntegerParameter( PARAMETER_3, found, isolate, args, Toolkit::DirectionBiasNone ) ); + Toolkit::DirectionBias verticalBias = static_cast( V8Utils::GetIntegerParameter( PARAMETER_4, found, isolate, args, Toolkit::DirectionBiasNone ) ); + + scrollView.ScrollTo( position, durationSeconds, alphaFunction, horizontalBias, verticalBias ); +} + +/** + * Scrolls the contents to the page with the given index. + * + * This is based on assumption that the page index starts from 0 and the + * position of each page is: [pageIndex * snapToInterval, 0]. + * + * If no snap interval is defined, calling this API will cause unexpected + * behaviour. + * + * The biasing parameter is provided such that in scenarios with 2 pages + * in wrap mode, the application developer can decide whether to scroll + * left or right to get to the target page. + * + * @for ScrollView + * @method scrollToPage + * @param {Integer} pageIndex The index of the page to scroll to. + * @param {Float} [durationSeconds] The duration of the scroll animation in seconds (default value is scrollView.scrollSnapDuration) + * @param {Integer} [bias] Whether to bias scrolling to left or right (by default no bias). + * @example + * // scroll direction bias is one of the following + * dali.DIRECTION_BIAS_NONE // Don't bias scroll snap + * dali.DIRECTION_BIAS_LEFT // Bias scroll snap to Left + * dali.DIRECTION_BIAS_RIGHT // Bias scroll snap to Right + * + * scrollView.scrollToPage( 1, 0.5, dali.DIRECTION_BIAS_RIGHT ); + */ +void ScrollViewApi::ScrollToPage( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + int pageIndex = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "bad page index parameter" ); + return; + } + + float durationSeconds = V8Utils::GetFloatParameter( PARAMETER_1, found, isolate, args, scrollView.GetScrollSnapDuration() ); + Toolkit::DirectionBias bias = static_cast( V8Utils::GetIntegerParameter( PARAMETER_2, found, isolate, args, Toolkit::DirectionBiasNone ) ); + + scrollView.ScrollTo( pageIndex, durationSeconds, bias ); +} + +/** + * Scrolls the contents such that the given actor appears in the center of + * the scroll view. + * + * The actor must be a direct child of scroll view. + * + * @for ScrollView + * @method scrollToActor + * @param {Object} actor The actor to scroll to. + * @param {Float} [durationSeconds] The duration of the scroll animation in seconds (default value is scrollView.scrollSnapDuration) + * @example + * scrollView.scrollToActor( childActor, 0.5 ); + */ +void ScrollViewApi::ScrollToActor( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + Actor actor = V8Utils::GetActorParameter( 0, found, isolate, args ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "invalid actor parameter" ); + return; + } + + float durationSeconds = V8Utils::GetFloatParameter( PARAMETER_1, found, isolate, args, scrollView.GetScrollSnapDuration() ); + + scrollView.ScrollTo( actor, durationSeconds ); +} + +/** + * Scrolls the content to the nearest snap point as specified by the snap interval. + * If already at snap points, it will not scroll. + * + * @for ScrollView + * @method scrollToSnapInterval + * @return {Boolean} True if snapping is needed or false if already at snap points + * @example + * var success = scrollView.scrollToSnapInterval(); + */ +void ScrollViewApi::ScrollToSnapInterval( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + args.GetReturnValue().Set( v8::Boolean::New( isolate, scrollView.ScrollToSnapPoint() ) ); +} + +/** + * Set the alpha function of flick animation. + * + * @for ScrollView + * @method setScrollFlickAlphaFunction + * @param {Integer} alphaFunction The alpha function to use. + * @example + * scrollView.setScrollFlickAlphaFunction( dali.ALPHA_FUNCTION_EASE_IN_OUT ); + */ +void ScrollViewApi::SetScrollFlickAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + int alphaFunction = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "invalid alpha function parameter" ); + return; + } + else + { + scrollView.SetScrollFlickAlphaFunction( static_cast(alphaFunction) ); + } +} + +/** + * Set the alpha function of snap animation. + * + * @for ScrollView + * @method setScrollSnapAlphaFunction + * @param {String} alphaFunction The alpha function to use. + * @example + * scrollView.setScrollSnapAlphaFunction( dali.ALPHA_FUNCTION_EASE_IN_OUT ); + */ +void ScrollViewApi::SetScrollSnapAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + int alphaFunction = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "invalid alpha function parameter" ); + return; + } + else + { + scrollView.SetScrollSnapAlphaFunction( static_cast(alphaFunction) ); + } +} + +/** + * Set the alpha function of overshoot snap animation. + * + * @for ScrollView + * @method setSnapOvershootAlphaFunction + * @param {String} alphaFunction The alpha function to use. + * @example + * scrollView.setSnapOvershootAlphaFunction( dali.ALPHA_FUNCTION_EASE_IN_OUT ); + */ +void ScrollViewApi::SetSnapOvershootAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args) +{ + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope handleScope( isolate ); + + Toolkit::ScrollView scrollView = GetScrollView( isolate, args ); + + bool found( false ); + int alphaFunction = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); + if( !found ) + { + DALI_SCRIPT_EXCEPTION( isolate, "invalid alpha function parameter" ); + return; + } + else + { + scrollView.SetSnapOvershootAlphaFunction( static_cast(alphaFunction) ); + } +} + +} // namespace V8Plugin + +} // namespace Dali diff --git a/plugins/dali-script-v8/src/controls/scroll-view-api.h b/plugins/dali-script-v8/src/controls/scroll-view-api.h new file mode 100644 index 0000000..0ca74db --- /dev/null +++ b/plugins/dali-script-v8/src/controls/scroll-view-api.h @@ -0,0 +1,58 @@ +#ifndef __DALI_V8PLUGIN_SCROLL_VIEW_API_H__ +#define __DALI_V8PLUGIN_SCROLL_VIEW_API_H__ + +/* + * Copyright (c) 2015 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 +#include + +namespace Dali +{ + +namespace V8Plugin +{ + +namespace ScrollViewApi +{ + + /** + * constructor + */ + Toolkit::Control New( const v8::FunctionCallbackInfo< v8::Value >& args ); + + /** + * ScrollView API. See scroll-view.h for description of functions + */ + void SetScrollMode( const v8::FunctionCallbackInfo< v8::Value >& args); + void GetCurrentPage( const v8::FunctionCallbackInfo< v8::Value >& args ); + void ScrollToPosition( const v8::FunctionCallbackInfo< v8::Value >& args ); + void ScrollToPage( const v8::FunctionCallbackInfo< v8::Value >& args ); + void ScrollToActor( const v8::FunctionCallbackInfo< v8::Value >& args ); + void ScrollToSnapInterval( const v8::FunctionCallbackInfo< v8::Value >& args ); + void SetScrollFlickAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args ); + void SetScrollSnapAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args ); + void SetSnapOvershootAlphaFunction( const v8::FunctionCallbackInfo< v8::Value >& args ); + +}; // namespace ScrollViewApi + +} // namespace V8Plugin + +} // namespace Dali + +#endif // header __DALI_V8PLUGIN_SCROLL_VIEW_API_H__ diff --git a/plugins/dali-script-v8/src/shared/base-wrapped-object.h b/plugins/dali-script-v8/src/shared/base-wrapped-object.h index 0bd9840..0efc17e 100644 --- a/plugins/dali-script-v8/src/shared/base-wrapped-object.h +++ b/plugins/dali-script-v8/src/shared/base-wrapped-object.h @@ -82,6 +82,7 @@ public: ACTOR_PROPERTY, ITEMVIEW, ITEMFACTORY, + SCROLLVIEW, RENDER_TASK, RENDER_TASK_LIST, TIMER,