Revert "[SRUK] (StyleManager) Create a style manager"
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 28 May 2014 17:38:58 +0000 (02:38 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 11 Jun 2014 07:49:08 +0000 (08:49 +0100)
Font change no longer delivered.

This reverts commit 9df291f3bec83cbbe26ae2d9b988e688d27a8b84.

Change-Id: I44fc0574eb11bac748437f8c78b1502d80effca8

72 files changed:
automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt
automated-tests/src/dali-toolkit-unmanaged/tct-dali-toolkit-unmanaged-core.h
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-StyleManager.cpp [deleted file]
base/dali-toolkit/internal/controls/alignment/alignment-impl.cpp
base/dali-toolkit/internal/controls/buttons/button-impl.cpp
base/dali-toolkit/internal/controls/popup/popup-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
base/dali-toolkit/internal/controls/table-view/table-view-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp
base/dali-toolkit/internal/controls/text-view/text-view-impl.cpp
base/dali-toolkit/internal/file.list
base/dali-toolkit/internal/styling/style-manager-impl.cpp [deleted file]
base/dali-toolkit/internal/styling/style-manager-impl.h [deleted file]
base/dali-toolkit/internal/styling/util.h [deleted file]
base/dali-toolkit/public-api/controls/control-impl.cpp
base/dali-toolkit/public-api/controls/scrollable/scroll-component-impl.cpp
base/dali-toolkit/public-api/file.list
base/dali-toolkit/public-api/styling/style-manager.cpp [deleted file]
base/dali-toolkit/public-api/styling/style-manager.h [deleted file]
base/dali-toolkit/styles/file.list [deleted file]
base/dali-toolkit/styles/tizen-dark-theme.json [deleted file]
base/dali-toolkit/styles/tizen-default-theme.json [deleted symlink]
build/slp/dali-toolkit-base/Makefile.am
build/slp/dali-toolkit/Makefile.am
capi/dali-toolkit/public-api/controls/control-impl.h
capi/dali-toolkit/public-api/dali-toolkit-capi-internal.h
capi/dali-toolkit/public-api/file.list
optional/dali-toolkit/dali-toolkit.h
optional/dali-toolkit/internal/builder/builder-actor.cpp [moved from base/dali-toolkit/internal/builder/builder-actor.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/builder-animations.cpp [moved from base/dali-toolkit/internal/builder/builder-animations.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/builder-declarations.h [moved from base/dali-toolkit/internal/builder/builder-declarations.h with 100% similarity]
optional/dali-toolkit/internal/builder/builder-filesystem.h [moved from base/dali-toolkit/internal/builder/builder-filesystem.h with 100% similarity]
optional/dali-toolkit/internal/builder/builder-get-is.inl.h [moved from base/dali-toolkit/internal/builder/builder-get-is.inl.h with 100% similarity]
optional/dali-toolkit/internal/builder/builder-impl.cpp [moved from base/dali-toolkit/internal/builder/builder-impl.cpp with 99% similarity]
optional/dali-toolkit/internal/builder/builder-impl.h [moved from base/dali-toolkit/internal/builder/builder-impl.h with 98% similarity]
optional/dali-toolkit/internal/builder/builder-set-property.cpp [moved from base/dali-toolkit/internal/builder/builder-set-property.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/builder-signals.cpp [moved from base/dali-toolkit/internal/builder/builder-signals.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/json-parser-impl.cpp [moved from base/dali-toolkit/internal/builder/json-parser-impl.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/json-parser-impl.h [moved from base/dali-toolkit/internal/builder/json-parser-impl.h with 100% similarity]
optional/dali-toolkit/internal/builder/json-parser-state.cpp [moved from base/dali-toolkit/internal/builder/json-parser-state.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/json-parser-state.h [moved from base/dali-toolkit/internal/builder/json-parser-state.h with 100% similarity]
optional/dali-toolkit/internal/builder/optional-value.h [moved from base/dali-toolkit/internal/builder/optional-value.h with 100% similarity]
optional/dali-toolkit/internal/builder/replacement.cpp [moved from base/dali-toolkit/internal/builder/replacement.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/replacement.h [moved from base/dali-toolkit/internal/builder/replacement.h with 100% similarity]
optional/dali-toolkit/internal/builder/tree-node-manipulator.cpp [moved from base/dali-toolkit/internal/builder/tree-node-manipulator.cpp with 100% similarity]
optional/dali-toolkit/internal/builder/tree-node-manipulator.h [moved from base/dali-toolkit/internal/builder/tree-node-manipulator.h with 100% similarity]
optional/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp
optional/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp
optional/dali-toolkit/internal/controls/cluster/cluster-impl.cpp
optional/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp
optional/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
optional/dali-toolkit/internal/controls/image-view/image-view-impl.cpp
optional/dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp
optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
optional/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp
optional/dali-toolkit/internal/controls/navigation-frame/page-impl.cpp
optional/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp
optional/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
optional/dali-toolkit/internal/controls/slider/slider-impl.cpp
optional/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp
optional/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
optional/dali-toolkit/internal/controls/view/view-impl.cpp
optional/dali-toolkit/internal/file.list
optional/dali-toolkit/public-api/builder/builder.cpp [moved from base/dali-toolkit/public-api/builder/builder.cpp with 97% similarity]
optional/dali-toolkit/public-api/builder/builder.h [moved from base/dali-toolkit/public-api/builder/builder.h with 95% similarity]
optional/dali-toolkit/public-api/builder/json-parser.cpp [moved from base/dali-toolkit/public-api/builder/json-parser.cpp with 100% similarity]
optional/dali-toolkit/public-api/builder/json-parser.h [moved from base/dali-toolkit/public-api/builder/json-parser.h with 100% similarity]
optional/dali-toolkit/public-api/builder/tree-node.cpp [moved from base/dali-toolkit/public-api/builder/tree-node.cpp with 100% similarity]
optional/dali-toolkit/public-api/builder/tree-node.h [moved from base/dali-toolkit/public-api/builder/tree-node.h with 100% similarity]
optional/dali-toolkit/public-api/file.list
packaging/dali-toolkit.spec

index a1e6c7f..46af2cd 100644 (file)
@@ -49,7 +49,6 @@ SET(TC_SOURCES
  utc-Dali-KeyboardFocusManager.cpp
  utc-Dali-ScrollViewEffect.cpp
  utc-Dali-TextInput.cpp
  utc-Dali-KeyboardFocusManager.cpp
  utc-Dali-ScrollViewEffect.cpp
  utc-Dali-TextInput.cpp
- utc-Dali-StyleManager.cpp
 )
 
 # Append list of test harness files (Won't get parsed for test cases)
 )
 
 # Append list of test harness files (Won't get parsed for test cases)
index 528e51e..f3a27c4 100644 (file)
@@ -81,8 +81,6 @@ extern void dali_keyboard_focus_manager_startup(void);
 extern void dali_keyboard_focus_manager_cleanup(void);
 extern void dali_scroll_view_effect_startup(void);
 extern void dali_scroll_view_effect_cleanup(void);
 extern void dali_keyboard_focus_manager_cleanup(void);
 extern void dali_scroll_view_effect_startup(void);
 extern void dali_scroll_view_effect_cleanup(void);
-extern void dali_style_manager_startup(void);
-extern void dali_style_manager_cleanup(void);
 
 extern int UtcDaliAlbumLayoutNew(void);
 extern int UtcDaliAlbumSetAndGetItemSizeFunction(void);
 
 extern int UtcDaliAlbumLayoutNew(void);
 extern int UtcDaliAlbumSetAndGetItemSizeFunction(void);
@@ -396,10 +394,6 @@ extern int UtcDaliTextInputGetStyleAtCursor(void);
 extern int UtcDaliTextInputSetAndGetTextAlignment(void);
 extern int UtcDaliTextInputSetAndGetMultilinePolicy(void);
 extern int UtcDaliTextInputSetAndGetExceedEnabled(void);
 extern int UtcDaliTextInputSetAndGetTextAlignment(void);
 extern int UtcDaliTextInputSetAndGetMultilinePolicy(void);
 extern int UtcDaliTextInputSetAndGetExceedEnabled(void);
-extern int UtcDaliStyleManagerGet(void);
-extern int UtcDaliStyleManagerSetOrientationValue(void);
-extern int UtcDaliStyleManagerSetOrientation(void);
-extern int UtcDaliStyleManagerSetStyleConstant(void);
 
 testcase tc_array[] = {
     {"UtcDaliAlbumLayoutNew", UtcDaliAlbumLayoutNew, album_layout_startup, album_layout_cleanup},
 
 testcase tc_array[] = {
     {"UtcDaliAlbumLayoutNew", UtcDaliAlbumLayoutNew, album_layout_startup, album_layout_cleanup},
@@ -714,10 +708,6 @@ testcase tc_array[] = {
     {"UtcDaliTextInputSetAndGetTextAlignment", UtcDaliTextInputSetAndGetTextAlignment, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
     {"UtcDaliTextInputSetAndGetMultilinePolicy", UtcDaliTextInputSetAndGetMultilinePolicy, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
     {"UtcDaliTextInputSetAndGetExceedEnabled", UtcDaliTextInputSetAndGetExceedEnabled, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
     {"UtcDaliTextInputSetAndGetTextAlignment", UtcDaliTextInputSetAndGetTextAlignment, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
     {"UtcDaliTextInputSetAndGetMultilinePolicy", UtcDaliTextInputSetAndGetMultilinePolicy, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
     {"UtcDaliTextInputSetAndGetExceedEnabled", UtcDaliTextInputSetAndGetExceedEnabled, dali_scroll_view_effect_startup, dali_scroll_view_effect_cleanup},
-    {"UtcDaliStyleManagerGet", UtcDaliStyleManagerGet, dali_style_manager_startup, dali_style_manager_cleanup},
-    {"UtcDaliStyleManagerSetOrientationValue", UtcDaliStyleManagerSetOrientationValue, dali_style_manager_startup, dali_style_manager_cleanup},
-    {"UtcDaliStyleManagerSetOrientation", UtcDaliStyleManagerSetOrientation, dali_style_manager_startup, dali_style_manager_cleanup},
-    {"UtcDaliStyleManagerSetStyleConstant", UtcDaliStyleManagerSetStyleConstant, dali_style_manager_startup, dali_style_manager_cleanup},
     {NULL, NULL}
 };
 
     {NULL, NULL}
 };
 
diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-StyleManager.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-StyleManager.cpp
deleted file mode 100644 (file)
index c49762f..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
-
-#include <iostream>
-#include <stdlib.h>
-#include <dali-toolkit-test-suite-utils.h>
-#include <dali-toolkit/dali-toolkit.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali-toolkit/public-api/styling/style-manager.h>
-
-
-using namespace Dali;
-using namespace Dali::Toolkit;
-
-void dali_style_manager_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void dali_style_manager_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-int UtcDaliStyleManagerGet(void)
-{
-  ToolkitTestApplication application;
-
-  tet_infoline(" UtcDaliStyleManagerGet");
-
-  // Register Type
-  TypeInfo type;
-  type = TypeRegistry::Get().GetTypeInfo( "StyleManager" );
-  DALI_TEST_CHECK( type );
-  BaseHandle handle = type.CreateInstance();
-  DALI_TEST_CHECK( handle );
-
-  StyleManager manager;
-
-  manager = StyleManager::Get();
-  DALI_TEST_CHECK(manager);
-
-  StyleManager newManager = StyleManager::Get();
-  DALI_TEST_CHECK(newManager);
-
-  // Check that focus manager is a singleton
-  DALI_TEST_CHECK(manager == newManager);
-  END_TEST;
-}
-
-int UtcDaliStyleManagerSetOrientationValue(void)
-{
-  ToolkitTestApplication application;
-
-  tet_infoline( " UtcDaliStyleManagerSetOrientationValue" );
-
-  StyleManager manager = StyleManager::Get();
-
-  int orientation1 = 0;
-  manager.SetOrientationValue( orientation1 );
-  DALI_TEST_CHECK( manager.GetOrientationValue() == orientation1 );
-
-  int orientation2 = 180;
-  manager.SetOrientationValue( orientation2 );
-  DALI_TEST_CHECK( manager.GetOrientationValue() == orientation2 );
-
-  END_TEST;
-}
-
-int UtcDaliStyleManagerSetOrientation(void)
-{
-  ToolkitTestApplication application;
-
-  tet_infoline( " UtcDaliStyleManagerSetOrientation" );
-
-  StyleManager manager = StyleManager::Get();
-
-  Orientation orientation;
-
-  manager.SetOrientation( orientation );
-
-  DALI_TEST_CHECK( manager.GetOrientation() == orientation );
-
-  END_TEST;
-}
-
-int UtcDaliStyleManagerSetStyleConstant(void)
-{
-  ToolkitTestApplication application;
-
-  tet_infoline( " UtcDaliStyleManagerSetStyleConstant" );
-
-  StyleManager manager = StyleManager::Get();
-
-  std::string key( "key" );
-  Property::Value value( 100 );
-
-  manager.SetStyleConstant( key, value );
-
-  Property::Value returnedValue;
-  manager.GetStyleConstant( key, returnedValue );
-
-  DALI_TEST_CHECK( value.Get<int>() == returnedValue.Get<int>() );
-
-  std::string key2( "key2" );
-  Property::Value returnedValue2;
-  DALI_TEST_CHECK( !manager.GetStyleConstant( key2, returnedValue2 ) );
-
-  END_TEST;
-}
index 1514358..e661a87 100644 (file)
@@ -623,7 +623,7 @@ void Alignment::OnRelaidOut( Vector2 size, ActorSizeContainer& container )
 }
 
 Alignment::Alignment( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical )
 }
 
 Alignment::Alignment( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),  // doesn't require touch events
   mHorizontal( horizontal ),
   mVertical( vertical ),
   mScaling( Toolkit::Alignment::ScaleNone ),
   mHorizontal( horizontal ),
   mVertical( vertical ),
   mScaling( Toolkit::Alignment::ScaleNone ),
index 941ebcc..8536b0b 100644 (file)
@@ -52,7 +52,7 @@ PropertyRegistration property1( typeRegistration, "dimmed", Toolkit::Button::PRO
 } // unnamed namespace
 
 Button::Button()
 } // unnamed namespace
 
 Button::Button()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control( true ),
   mState( ButtonUp ),
   mDimmed( false ),
   mPainter( NULL )
   mState( ButtonUp ),
   mDimmed( false ),
   mPainter( NULL )
index 7f3b7c0..47995d4 100755 (executable)
@@ -169,7 +169,7 @@ Dali::Toolkit::Popup Popup::New()
 }
 
 Popup::Popup(PopupStyle& style)
 }
 
 Popup::Popup(PopupStyle& style)
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control(true),
   mShowing(false),
   mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
   mAlterAddedChild(false),
   mShowing(false),
   mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
   mAlterAddedChild(false),
index 6c4da93..451895c 100644 (file)
@@ -61,7 +61,7 @@ const Vector4     Scrollable::DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.6f)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 Scrollable::Scrollable()
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 Scrollable::Scrollable()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control(true/*requires touch*/),
   mPropertyRelativePosition(Property::INVALID_INDEX),
   mPropertyPositionMin(Property::INVALID_INDEX),
   mPropertyPositionMax(Property::INVALID_INDEX),
   mPropertyRelativePosition(Property::INVALID_INDEX),
   mPropertyPositionMin(Property::INVALID_INDEX),
   mPropertyPositionMax(Property::INVALID_INDEX),
index fff8bc4..e2970cc 100644 (file)
@@ -794,7 +794,7 @@ void TableView::OnControlChildRemove( Actor& child )
 }
 
 TableView::TableView( unsigned int initialRows, unsigned int initialColumns )
 }
 
 TableView::TableView( unsigned int initialRows, unsigned int initialColumns )
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control( true ),  // requires touch
   mCellData( initialRows, initialColumns ),
   mLayoutingChild( false ),
   mConstraintDuration( DEFAULT_CONSTRAINT_DURATION )
   mCellData( initialRows, initialColumns ),
   mLayoutingChild( false ),
   mConstraintDuration( DEFAULT_CONSTRAINT_DURATION )
index 3d79aad..557e2fd 100644 (file)
@@ -269,7 +269,7 @@ Dali::Toolkit::TextInput TextInput::New()
 }
 
 TextInput::TextInput()
 }
 
 TextInput::TextInput()
-:Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+:Control( true ),
  mState( StateEdit ),
  mStyledText(),
  mInputStyle(),
  mState( StateEdit ),
  mStyledText(),
  mInputStyle(),
index 78c4980..16a8305 100644 (file)
@@ -1009,7 +1009,7 @@ TextView::RelayoutData& TextView::RelayoutData::operator=( const TextView::Relay
 }
 
 TextView::TextView()
 }
 
 TextView::TextView()
-: Control( REQUIRES_THEME_CHANGE_SIGNALS ),
+: Control( false ),  // doesn't require touch events
   mCurrentStyledText(),
   mTextViewProcessorOperations(),
   mLayoutParameters( Toolkit::TextView::SplitByNewLineChar,
   mCurrentStyledText(),
   mTextViewProcessorOperations(),
   mLayoutParameters( Toolkit::TextView::SplitByNewLineChar,
index e09586d..1fa0e57 100644 (file)
@@ -4,6 +4,7 @@ toolkit_base_src_files = \
    $(toolkit_base_src_dir)/controls/relayout-controller.cpp \
    $(toolkit_base_src_dir)/controls/relayout-controller-impl.cpp \
    $(toolkit_base_src_dir)/controls/relayout-helper.cpp \
    $(toolkit_base_src_dir)/controls/relayout-controller.cpp \
    $(toolkit_base_src_dir)/controls/relayout-controller-impl.cpp \
    $(toolkit_base_src_dir)/controls/relayout-helper.cpp \
+   $(toolkit_base_src_dir)/controls/style-change-processor.cpp \
    $(toolkit_base_src_dir)/controls/alignment/alignment-impl.cpp \
    $(toolkit_base_src_dir)/controls/buttons/button-impl.cpp \
    $(toolkit_base_src_dir)/controls/buttons/check-box-button-default-painter-impl.cpp \
    $(toolkit_base_src_dir)/controls/alignment/alignment-impl.cpp \
    $(toolkit_base_src_dir)/controls/buttons/button-impl.cpp \
    $(toolkit_base_src_dir)/controls/buttons/check-box-button-default-painter-impl.cpp \
@@ -55,14 +56,4 @@ toolkit_base_src_files = \
    $(toolkit_base_src_dir)/factory/localized-control-factory-impl.cpp \
    $(toolkit_base_src_dir)/focus-manager/focus-manager-impl.cpp \
    $(toolkit_base_src_dir)/focus-manager/keyboard-focus-manager-impl.cpp \
    $(toolkit_base_src_dir)/factory/localized-control-factory-impl.cpp \
    $(toolkit_base_src_dir)/focus-manager/focus-manager-impl.cpp \
    $(toolkit_base_src_dir)/focus-manager/keyboard-focus-manager-impl.cpp \
-   $(toolkit_base_src_dir)/focus-manager/keyinput-focus-manager-impl.cpp \
-   $(toolkit_base_src_dir)/styling/style-manager-impl.cpp \
-   $(toolkit_base_src_dir)/builder/builder-impl.cpp \
-   $(toolkit_base_src_dir)/builder/builder-animations.cpp \
-   $(toolkit_base_src_dir)/builder/builder-set-property.cpp \
-   $(toolkit_base_src_dir)/builder/builder-signals.cpp \
-   $(toolkit_base_src_dir)/builder/builder-actor.cpp \
-   $(toolkit_base_src_dir)/builder/json-parser-state.cpp \
-   $(toolkit_base_src_dir)/builder/json-parser-impl.cpp \
-   $(toolkit_base_src_dir)/builder/tree-node-manipulator.cpp \
-   $(toolkit_base_src_dir)/builder/replacement.cpp
+   $(toolkit_base_src_dir)/focus-manager/keyinput-focus-manager-impl.cpp
diff --git a/base/dali-toolkit/internal/styling/style-manager-impl.cpp b/base/dali-toolkit/internal/styling/style-manager-impl.cpp
deleted file mode 100644 (file)
index 56b97f8..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 "style-manager-impl.h"
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/internal/styling/util.h>
-#include <dali/integration-api/debug.h>
-
-// EXTERNAL INCLUDES
-#include <fstream>
-#include <iostream>
-#include <sstream>
-
-
-namespace
-{
-
-const char* LANDSCAPE_QUALIFIER = "landscape";
-const char* PORTRAIT_QUALIFIER  = "portrait";
-
-const char* DEFAULT_THEME = DALI_STYLE_DIR "tizen-default-theme.json";
-
-const char* PACKAGE_PATH_KEY = "PACKAGE_PATH";
-const char* DEFAULT_PACKAGE_PATH = DALI_DATA_READ_ONLY_DIR "/toolkit/";
-
-} // namespace
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace
-{
-
-BaseHandle Create()
-{
-  BaseHandle handle = StyleManager::Get();
-
-  if ( !handle && Adaptor::IsAvailable() )
-  {
-    Toolkit::StyleManager manager = Toolkit::StyleManager( new Internal::StyleManager() );
-    Adaptor::Get().RegisterSingleton( typeid( manager ), manager );
-    handle = manager;
-  }
-
-  return handle;
-}
-TypeRegistration STYLE_MANAGER_TYPE( typeid(Dali::Toolkit::StyleManager), typeid(Dali::BaseHandle), Create, true /* Create instance at startup */ );
-
-/**
- * Merge two maps into one
- */
-void MergeMaps( const PropertyValueMap& a, const PropertyValueMap& b, PropertyValueMap& out )
-{
-  out = a;
-  for( PropertyValueMap::const_iterator it = b.begin(), itEnd = b.end(); it != itEnd; ++it )
-  {
-    out[ it->first ] = it->second;
-  }
-}
-
-} // namespace
-
-Toolkit::StyleManager StyleManager::Get()
-{
-  Toolkit::StyleManager manager;
-
-  if ( Adaptor::IsAvailable() )
-  {
-    // Check whether the style manager is already created
-    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Toolkit::StyleManager ) );
-    if( handle )
-    {
-      // If so, downcast the handle of singleton
-      manager = Toolkit::StyleManager( dynamic_cast< StyleManager* >( handle.GetObjectPtr() ) );
-    }
-  }
-
-  return manager;
-}
-
-StyleManager::StyleManager()
-  : mOrientationDegrees( 0 ),  // Portrait
-    mSetThemeConnection( false )
-{
-  // Add theme builder constants
-  mThemeBuilderConstants[ PACKAGE_PATH_KEY ] = DEFAULT_PACKAGE_PATH;
-
-  RequestDefaultTheme();
-}
-
-StyleManager::~StyleManager()
-{
-  // Disconnect from signal
-  SetOrientation( Orientation() );
-}
-
-void StyleManager::SetOrientationValue( int orientation )
-{
-  mOrientationDegrees = orientation;
-
-  Util::ConnectEventProcessingFinishedSignal();
-  mSetThemeConnection = true;
-}
-
-int StyleManager::GetOrientationValue()
-{
-  return mOrientationDegrees;
-}
-
-void StyleManager::SetOrientation( Orientation orientation )
-{
-  if( mOrientation )
-  {
-    mOrientation.ChangedSignal().Disconnect( this, &StyleManager::OnOrientationChanged );
-  }
-
-  OnOrientationChanged( orientation );
-
-  if( mOrientation )
-  {
-    mOrientation.ChangedSignal().Connect( this, &StyleManager::OnOrientationChanged );
-  }
-}
-
-Orientation StyleManager::GetOrientation()
-{
-  return mOrientation;
-}
-
-void StyleManager::SetStyleConstant( const std::string& key, const Property::Value& value )
-{
-  mStyleBuilderConstants[ key ] = value;
-}
-
-bool StyleManager::GetStyleConstant( const std::string& key, Property::Value& valueOut )
-{
-  Toolkit::PropertyValueMap::iterator valueIt = mStyleBuilderConstants.find( key );
-  if( valueIt != mStyleBuilderConstants.end() )
-  {
-    valueOut = valueIt->second;
-    return true;
-  }
-
-  return false;
-}
-
-void StyleManager::OnOrientationChanged( Orientation orientation )
-{
-  mOrientation = orientation;
-
-  if( mOrientation )
-  {
-    Util::ConnectEventProcessingFinishedSignal();
-    mSetThemeConnection = true;
-  }
-}
-
-Toolkit::Builder StyleManager::CreateBuilder( const PropertyValueMap& constants )
-{
-  Toolkit::Builder builder = Toolkit::Builder::New();
-  builder.AddConstants( constants );
-
-  return builder;
-}
-
-bool StyleManager::LoadJSON( Toolkit::Builder builder, const std::string& jsonFilePath )
-{
-  std::string fileString;
-  if( LoadFile( jsonFilePath, fileString ) )
-  {
-    builder.LoadFromString( fileString );
-    return true;
-  }
-  else
-  {
-    DALI_LOG_WARNING("Error loading file '%s'\n", jsonFilePath.c_str());
-    return false;
-  }
-}
-
-void StyleManager::CollectQualifiers( StringList& qualifiersOut )
-{
-  // Append the relevant qualifier for orientation
-  int orientation = mOrientationDegrees;
-
-  if( mOrientation )
-  {
-    orientation = mOrientation.GetDegrees();
-  }
-
-  switch( orientation )
-  {
-    case 90:
-    case 270:
-    {
-      qualifiersOut.push_back( std::string( LANDSCAPE_QUALIFIER ) );
-      break;
-    }
-    case 180:
-    case 0: // fall through
-    default:
-    {
-      qualifiersOut.push_back( std::string( PORTRAIT_QUALIFIER ) );
-      break;
-    }
-  }
-}
-
-void StyleManager::BuildQualifiedStyleName( const std::string& styleName, const StringList& qualifiers, std::string& qualifiedStyleOut )
-{
-  qualifiedStyleOut.append( styleName );
-
-  for( StringList::const_iterator it = qualifiers.begin(), itEnd = qualifiers.end(); it != itEnd; ++it )
-  {
-    const std::string& str = *it;
-
-    qualifiedStyleOut.append( "-" );
-    qualifiedStyleOut.append( str );
-  }
-}
-
-void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control control )
-{
-  // Convert control name to lower case
-  std::string styleName = control.GetTypeName();
-  std::transform( styleName.begin(), styleName.end(), styleName.begin(), ::tolower );
-
-  // Apply the style after choosing the correct actual style (e.g. landscape or portrait)
-  StringList qualifiers;
-  CollectQualifiers( qualifiers );
-
-  while( true )
-  {
-    std::string qualifiedStyleName;
-    BuildQualifiedStyleName( styleName, qualifiers, qualifiedStyleName );
-
-    // Break if style found or we have tried the root style name (qualifiers is empty)
-    if( builder.ApplyStyle( qualifiedStyleName, control ) || qualifiers.size() == 0 )
-    {
-      break;
-    }
-
-    // Remove the last qualifier in an attempt to find a style that is valid
-    qualifiers.pop_back();
-  }
-}
-
-void StyleManager::ApplyThemeStyle( Toolkit::Control control )
-{
-  if( mThemeBuilder )
-  {
-    ApplyStyle( mThemeBuilder, control );
-  }
-}
-
-void StyleManager::ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName )
-{
-  bool builderReady = false;
-
-  // First look in the cache
-  Toolkit::Builder builder = FindCachedBuilder( jsonFileName );
-  if( builder )
-  {
-    builderReady = true;
-  }
-  else
-  {
-    // Merge theme and style constants
-    PropertyValueMap constants;
-    MergeMaps( mThemeBuilderConstants, mStyleBuilderConstants, constants );
-
-    // Create it
-    builder = CreateBuilder( constants );
-
-    if( LoadJSON( builder, jsonFileName ) )
-    {
-      CacheBuilder( builder, jsonFileName );
-      builderReady = true;
-    }
-  }
-
-  // Apply the style to the control
-  if( builderReady )
-  {
-    builder.ApplyStyle( styleName, control );
-  }
-}
-
-bool StyleManager::LoadFile( const std::string& filename, std::string& stringOut )
-{
-  DALI_ASSERT_DEBUG( 0 != filename.length());
-
-  std::ifstream in( filename.c_str(), std::ios::in );
-  if( in )
-  {
-    std::stringstream buffer;
-    buffer << in.rdbuf();
-
-    stringOut = buffer.str();
-
-    in.close();
-
-    return true;
-  }
-
-  return false;
-}
-
-Toolkit::StyleManager::ThemeChangeSignalType& StyleManager::ThemeChangeSignal()
-{
-  return mThemeChangeSignal;
-}
-
-void StyleManager::EmitThemeChangeSignal()
-{
-  if( !mThemeChangeSignal.Empty() )
-  {
-    mThemeChangeSignal.Emit( Toolkit::StyleManager::Get() );
-  }
-}
-
-void StyleManager::RequestThemeChange( const std::string& themeFile )
-{
-  mThemeFile = themeFile;
-
-  Util::ConnectEventProcessingFinishedSignal();
-  mSetThemeConnection = true;
-}
-
-void StyleManager::RequestDefaultTheme()
-{
-  RequestThemeChange( DEFAULT_THEME );
-}
-
-bool StyleManager::IsThemeRequestPending()
-{
-  return mSetThemeConnection;
-}
-
-void StyleManager::SetTheme()
-{
-  mThemeBuilder = CreateBuilder( mThemeBuilderConstants );
-  LoadJSON( mThemeBuilder, mThemeFile );
-
-  mSetThemeConnection = false;
-
-  EmitThemeChangeSignal();
-}
-
-Toolkit::Builder StyleManager::FindCachedBuilder( const std::string& key )
-{
-  BuilderMap::iterator builderIt = mBuilderCache.find( key );
-  if( builderIt != mBuilderCache.end() )
-  {
-    return builderIt->second;
-  }
-
-  return Toolkit::Builder();
-}
-
-void StyleManager::CacheBuilder( Toolkit::Builder builder, const std::string& key )
-{
-  mBuilderCache[ key ] = builder;
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/base/dali-toolkit/internal/styling/style-manager-impl.h b/base/dali-toolkit/internal/styling/style-manager-impl.h
deleted file mode 100644 (file)
index 2c15f89..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-#define __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 <string>
-#include <list>
-
-// INTERNAL INCLUDES
-
-#include <dali/dali.h>
-#include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/public-api/builder/builder.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-/**
- * @copydoc Toolkit::StyleManager
- */
-class StyleManager : public Dali::BaseObject, public ConnectionTracker
-{
-public:
-
-  /**
-   * Singleton access
-   *
-   * @return The StyleManager object
-   */
-  static Toolkit::StyleManager Get();
-
-  /**
-   * Construct a new StyleManager.
-   */
-  StyleManager();
-
-  /**
-   * @copydoc Toolkit::StyleManager::SetOrientationValue
-   */
-  void SetOrientationValue( int orientation );
-
-  /**
-   * @copydoc Toolkit::StyleManager::GetOrientationValue
-   */
-  int GetOrientationValue();
-
-  /**
-   * @copydoc Toolkit::StyleManager::SetOrientation( Orientation orientation )
-   */
-  void SetOrientation( Orientation orientation );
-
-  /**
-   * @copydoc Toolkit::StyleManager::GetOrientation
-   */
-  Orientation GetOrientation();
-
-  /**
-   * @copydoc Toolkit::StyleManager::SetStyleConstant
-   */
-  void SetStyleConstant( const std::string& key, const Property::Value& value );
-
-  /**
-   * @copydoc Toolkit::StyleManager::GetStyleConstant
-   */
-  bool GetStyleConstant( const std::string& key, Property::Value& valueOut );
-
-  /**
-   * @copydoc Toolkit::StyleManager::RequestThemeChange
-   */
-  void RequestThemeChange( const std::string& themeFile );
-
-  /**
-   * @copydoc Toolkit::StyleManager::RequestDefaultTheme
-   */
-  void RequestDefaultTheme();
-
-  /**
-   * Determine if a theme change has been requested
-   * @return Whether a theme request is pending
-   */
-  bool IsThemeRequestPending();
-
-  /**
-   * @brief Apply the theme style to a control.
-   *
-   * @param[in] control The control to apply style.
-   */
-  void ApplyThemeStyle( Toolkit::Control control );
-
-  /**
-   * @copydoc Toolkit::StyleManager::ApplyStyle
-   */
-  void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
-
-public:
-  // SIGNALS
-
-  /**
-   * @copydoc Toolkit::StyleManager::ThemeChangeSignal
-   */
-  Toolkit::StyleManager::ThemeChangeSignalType& ThemeChangeSignal();
-
-protected:
-
-  /**
-   * @brief Destructor
-   */
-  virtual ~StyleManager();
-
-
-public:
-
-  /**
-   * @brief Set the current theme. Called only once per event processing cycle.
-   */
-  void SetTheme();
-
-private:
-
-  typedef std::list<std::string> StringList;
-
-  /**
-   * @brief Internal helper method to read a file from file system.
-   * @param filename The name of the file to read.
-   * @param[out] stringOut The string to return the file in
-   *
-   * @param Return true if file was found
-   */
-  bool LoadFile(const std::string& filename, std::string& stringOut);
-
-  /**
-   * @brief Create a new builder.
-   *
-   * @param[in] constants A map of constants to be used by the builder
-   *
-   * @return Return the newly created builder
-   */
-  Toolkit::Builder CreateBuilder( const PropertyValueMap& constants );
-
-  /**
-   * @brief Load a JSON file into given builder
-   *
-   * @param[in] builder The builder object to load the theme file
-   * @param[in] jsonFileName The name of the JSON file to load
-   * @return Return true if file was loaded
-   */
-  bool LoadJSON( Toolkit::Builder builder, const std::string& jsonFileName );
-
-  /**
-   * @brief Collect qualifiers (e.g. Landscape, portrait etc) for a given style
-   *
-   * @param[in,out] qualifiersOut The list to populate with qualifiers
-   */
-  void CollectQualifiers( StringList& qualifiersOut );
-
-  /**
-   * @brief Construct a qualified style name out of qualifiers
-   *
-   * A qualifed style name will be in the format: style-qualifier0-qualifier1-qualifierN
-   *
-   * @param[in] styleName The root name of the style
-   * @param[in] qualifiers List of qualifier names
-   * @param[out] qualifiedStyleOut The qualified style name
-   */
-  void BuildQualifiedStyleName( const std::string& styleName, const StringList& qualifiers, std::string& qualifiedStyleOut );
-
-  /**
-   * @brief Apply a style to the control using the given builder
-   *
-   * @param[in] builder The builder to apply the style from
-   * @param[in] control The control to apply the style to
-   */
-  void ApplyStyle( Toolkit::Builder builder, Toolkit::Control control );
-
-  /**
-   * @brief Emit theme changed signal
-   */
-  void EmitThemeChangeSignal();
-
-  /**
-   * @brief Callback for orientation changes
-   *
-   * @param[in] orientation The orientation object
-   */
-  void OnOrientationChanged( Orientation orientation );
-
-  /**
-   * Search for a builder in the cache
-   *
-   * @param[in] key The key the builder was cached under
-   * @return Return the cached builder if found or an empty builder object if not found
-   */
-  Toolkit::Builder FindCachedBuilder( const std::string& key );
-
-  /**
-   * Store a given builder in the cache keyed to the given key
-   *
-   * @param[in] builder The builder object to store
-   * @param[in] key The key to store the builder under
-   */
-  void CacheBuilder( Toolkit::Builder builder, const std::string& key );
-
-  // Undefined
-  StyleManager(const StyleManager&);
-
-  StyleManager& operator=(const StyleManager& rhs);
-
-private:
-
-  // Map to store builders keyed by JSON file name
-  typedef std::map< std::string, Toolkit::Builder > BuilderMap;
-
-  Toolkit::Builder mThemeBuilder;     ///< Builder for all default theme properties
-
-  Orientation mOrientation;           ///< Handle to application orientation object
-  int mOrientationDegrees;            ///< Directly set value of orientation
-
-  std::string mThemeFile;             ///< The full path of the current theme file
-
-  Toolkit::PropertyValueMap mThemeBuilderConstants;   ///< Contants to give the theme builder
-  Toolkit::PropertyValueMap mStyleBuilderConstants;   ///< Constants specific to building styles
-
-  BuilderMap mBuilderCache;           ///< Cache of builders keyed by JSON file name
-
-  bool mSetThemeConnection;           ///< Has the callback to set the theme been set
-
-  // Signals
-  Toolkit::StyleManager::ThemeChangeSignalType       mThemeChangeSignal;         ///< Emitted when the theme changes
-};
-
-} // namespace Internal
-
-inline Internal::StyleManager& GetImpl( Dali::Toolkit::StyleManager& obj )
-{
-  DALI_ASSERT_ALWAYS( obj );
-
-  Dali::BaseObject& handle = obj.GetBaseObject();
-
-  return static_cast< Internal::StyleManager& >( handle );
-}
-
-inline const Internal::StyleManager& GetImpl( const Dali::Toolkit::StyleManager& obj )
-{
-  DALI_ASSERT_ALWAYS( obj );
-
-  const Dali::BaseObject& handle = obj.GetBaseObject();
-
-  return static_cast< const Internal::StyleManager& >( handle );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-
diff --git a/base/dali-toolkit/internal/styling/util.h b/base/dali-toolkit/internal/styling/util.h
deleted file mode 100644 (file)
index 61901fe..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_UTIL_H__
-#define __DALI_TOOLKIT_INTERNAL_UTIL_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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
-
-// INTERNAL INCLUDES
-
-#include <dali/dali.h>
-#include <dali-toolkit/internal/styling/style-manager-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace Util
-{
-
-/**
- * @brief Callback that the EventProcessingFinishedSignal signal calls
- *
- * Priorities calls to managers
- */
-inline void EventProcessingFinishedSignalPrioritizer()
-{
-  // Priority 0: Set all styles
-  Toolkit::StyleManager styleManager = Toolkit::StyleManager::Get();
-  if( GetImpl(styleManager).IsThemeRequestPending() )
-  {
-    GetImpl(styleManager).SetTheme();
-  }
-
-  // Todo: Priority 1: Do relayout after styles have been set
-}
-
-/**
- * @brief Connect to the EventProcessingFinishedSignal
- *
- * Needs to be called only once, but will still operate successfully if called multiple times.
- * Makes the assumption that this is the only thing connecting to the EventProcessingFinishedSignal.
- */
-inline void ConnectEventProcessingFinishedSignal()
-{
-  Stage stage = Stage::GetCurrent();
-
-  // This is only intended for one purpose!
-  if( stage.EventProcessingFinishedSignal().GetConnectionCount() == 0 )
-  {
-    stage.EventProcessingFinishedSignal().Connect( &EventProcessingFinishedSignalPrioritizer );
-  }
-}
-
-} // namespace Util
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-
index 018e4f0..9347f6a 100644 (file)
 
 #include <dali/integration-api/debug.h>
 
 
 #include <dali/integration-api/debug.h>
 
+#include "dali-toolkit/internal/controls/style-change-processor.h"
 #include "dali-toolkit/internal/controls/relayout-controller.h"
 #include "dali-toolkit/internal/controls/relayout-helper.h"
 #include "dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h"
 #include "dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h"
 #include <dali-toolkit/public-api/controls/control.h>
 
 #include "dali-toolkit/internal/controls/relayout-controller.h"
 #include "dali-toolkit/internal/controls/relayout-helper.h"
 #include "dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h"
 #include "dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h"
 #include <dali-toolkit/public-api/controls/control.h>
 
-#include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/internal/styling/style-manager-impl.h>
-
 namespace Dali
 {
 
 namespace Dali
 {
 
@@ -255,8 +253,7 @@ public:
     mIsKeyboardNavigationSupported(false),
     mIsKeyboardFocusGroup(false),
     mKeyEventSignalV2(),
     mIsKeyboardNavigationSupported(false),
     mIsKeyboardFocusGroup(false),
     mKeyEventSignalV2(),
-    mBackground( NULL ),
-    mFlags( Control::CONTROL_BEHAVIOUR_NONE )
+    mBackground( NULL )
   {
   }
 
   {
   }
 
@@ -531,8 +528,6 @@ public:
   // Background
   Background* mBackground;           ///< Only create the background if we use it
 
   // Background
   Background* mBackground;           ///< Only create the background if we use it
 
-  ControlBehaviour mFlags;           ///< Flags passed in from constructor
-
   // Properties - these need to be members of Internal::Control::Impl as they need to functions within this class.
   static PropertyRegistration PROPERTY_1;
   static PropertyRegistration PROPERTY_2;
   // Properties - these need to be members of Internal::Control::Impl as they need to functions within this class.
   static PropertyRegistration PROPERTY_1;
   static PropertyRegistration PROPERTY_2;
@@ -554,7 +549,7 @@ PropertyRegistration Control::Impl::PROPERTY_7( CONTROL_TYPE, "key-input-focus",
 Toolkit::Control Control::New()
 {
   // Create the implementation, temporarily owned on stack
 Toolkit::Control Control::New()
 {
   // Create the implementation, temporarily owned on stack
-  IntrusivePtr<Control> controlImpl = new Control( CONTROL_BEHAVIOUR_NONE );
+  IntrusivePtr<Control> controlImpl = new Control( false );
 
   // Pass ownership to handle
   Toolkit::Control handle( *controlImpl );
 
   // Pass ownership to handle
   Toolkit::Control handle( *controlImpl );
@@ -568,26 +563,22 @@ Toolkit::Control Control::New()
 
 Control::~Control()
 {
 
 Control::~Control()
 {
+  if( mImpl->mInitialized )
+  {
+    // Unregister only if control has been initialized.
+    Internal::StyleChangeProcessor::Unregister( this );
+  }
   delete mImpl;
 }
 
 void Control::Initialize()
 {
   delete mImpl;
 }
 
 void Control::Initialize()
 {
+  // Register with the style change processor so we are informed when the default style changes
+  Internal::StyleChangeProcessor::Register( this );
 
   // Calling deriving classes
   OnInitialize();
 
 
   // Calling deriving classes
   OnInitialize();
 
-  if( mImpl->mFlags & REQUIRES_THEME_CHANGE_SIGNALS )
-  {
-    Toolkit::StyleManager styleManager = Toolkit::StyleManager::Get();
-
-    // Register for font/theme changes
-    styleManager.ThemeChangeSignal().Connect( this, &ControlImpl::OnThemeChange );
-
-    // Set theme
-    GetImpl( styleManager ).ApplyThemeStyle( GetOwner() );
-  }
-
   mImpl->mInitialized = true;
 }
 
   mImpl->mInitialized = true;
 }
 
@@ -1184,11 +1175,6 @@ void Control::NegotiateSize( Vector2 allocatedSize, ActorSizeContainer& containe
   Relayout( size, container );
 }
 
   Relayout( size, container );
 }
 
-void Control::OnThemeChange( Toolkit::StyleManager styleManager )
-{
-  GetImpl( styleManager ).ApplyThemeStyle( GetOwner() );
-}
-
 bool Control::EmitKeyEventSignal( const KeyEvent& event )
 {
   // Guard against destruction during signal emission
 bool Control::EmitKeyEventSignal( const KeyEvent& event )
 {
   // Guard against destruction during signal emission
@@ -1232,13 +1218,6 @@ Control::Control( bool requiresTouchEvents )
 {
 }
 
 {
 }
 
-Control::Control( ControlBehaviour behaviourFlags )
-: CustomActorImpl( behaviourFlags & REQUIRES_TOUCH_EVENTS ),
-  mImpl(new Impl(*this))
-{
-  mImpl->mFlags = behaviourFlags;
-}
-
 } // namespace Internal
 
 } // namespace Toolkit
 } // namespace Internal
 
 } // namespace Toolkit
index 2b089f7..3cd35d4 100644 (file)
@@ -54,7 +54,7 @@ Toolkit::ScrollConnector ScrollComponentImpl::GetScrollConnector() const
 }
 
 ScrollComponentImpl::ScrollComponentImpl()
 }
 
 ScrollComponentImpl::ScrollComponentImpl()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) )
+: Control(true/*requires touch*/)
 {
 }
 
 {
 }
 
index 089896c..dbca37b 100755 (executable)
@@ -48,11 +48,7 @@ public_api_base_src_files = \
   $(public_api_base_src_dir)/focus-manager/keyinput-focus-manager.cpp \
   $(public_api_base_src_dir)/markup-processor/markup-processor.cpp \
   $(public_api_base_src_dir)/shader-effects/image-region-effect.cpp \
   $(public_api_base_src_dir)/focus-manager/keyinput-focus-manager.cpp \
   $(public_api_base_src_dir)/markup-processor/markup-processor.cpp \
   $(public_api_base_src_dir)/shader-effects/image-region-effect.cpp \
-  $(public_api_base_src_dir)/shader-effects/bouncing-effect.cpp \
-  $(public_api_base_src_dir)/styling/style-manager.cpp \
-  $(public_api_base_src_dir)/builder/builder.cpp \
-  $(public_api_base_src_dir)/builder/json-parser.cpp \
-  $(public_api_base_src_dir)/builder/tree-node.cpp
+  $(public_api_base_src_dir)/shader-effects/bouncing-effect.cpp
 
 # Add public header files here
 
 
 # Add public header files here
 
@@ -105,12 +101,3 @@ public_api_base_markup_processor_header_files =
 public_api_base_shader_effects_header_files = \
   $(public_api_base_src_dir)/shader-effects/bouncing-effect.h
 
 public_api_base_shader_effects_header_files = \
   $(public_api_base_src_dir)/shader-effects/bouncing-effect.h
 
-public_api_base_styling_header_files = \
-  $(public_api_base_src_dir)/styling/style-manager.h
-
-public_api_base_builder_header_files = \
-  $(public_api_base_src_dir)/builder/builder.h \
-  $(public_api_base_src_dir)/builder/json-parser.h \
-  $(public_api_base_src_dir)/builder/tree-node.h
-
-
diff --git a/base/dali-toolkit/public-api/styling/style-manager.cpp b/base/dali-toolkit/public-api/styling/style-manager.cpp
deleted file mode 100644 (file)
index bdef3d1..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// CLASS HEADER
-
-#include <dali-toolkit/public-api/styling/style-manager.h>
-
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-
-#include <dali-toolkit/internal/styling/style-manager-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-StyleManager::StyleManager()
-{
-}
-
-StyleManager::~StyleManager()
-{
-}
-
-StyleManager StyleManager::Get()
-{
-  return Internal::StyleManager::Get();
-}
-
-void StyleManager::SetOrientationValue( int orientation )
-{
-  GetImpl(*this).SetOrientationValue( orientation );
-}
-
-int StyleManager::GetOrientationValue()
-{
-  return GetImpl(*this).GetOrientationValue();
-}
-
-void StyleManager::SetOrientation( Orientation orientation )
-{
-  GetImpl(*this).SetOrientation( orientation );
-}
-
-Orientation StyleManager::GetOrientation()
-{
-  return GetImpl(*this).GetOrientation();
-}
-
-void StyleManager::SetStyleConstant( const std::string& key, const Property::Value& value )
-{
-  GetImpl(*this).SetStyleConstant( key, value );
-}
-
-bool StyleManager::GetStyleConstant( const std::string& key, Property::Value& valueOut )
-{
-  return GetImpl(*this).GetStyleConstant( key, valueOut );
-}
-
-void StyleManager::ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName )
-{
-  GetImpl(*this).ApplyStyle( control, jsonFileName, styleName );
-}
-
-StyleManager::StyleManager( Internal::StyleManager *impl )
-  : BaseHandle( impl )
-{
-}
-
-StyleManager::ThemeChangeSignalType& StyleManager::ThemeChangeSignal()
-{
-  return GetImpl( *this ).ThemeChangeSignal();
-}
-
-void StyleManager::RequestThemeChange( const std::string& themeFile )
-{
-  GetImpl(*this).RequestThemeChange( themeFile );
-}
-
-void StyleManager::RequestDefaultTheme()
-{
-  GetImpl(*this).RequestDefaultTheme();
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
diff --git a/base/dali-toolkit/public-api/styling/style-manager.h b/base/dali-toolkit/public-api/styling/style-manager.h
deleted file mode 100644 (file)
index 6b42f8d..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-#ifndef __DALI_TOOLKIT_STYLE_MANAGER_H__
-#define __DALI_TOOLKIT_STYLE_MANAGER_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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
-
-// INTERNAL INCLUDES
-#include <dali/dali.h>
-#include <dali-toolkit/public-api/controls/control.h>
-
-namespace Dali DALI_IMPORT_API
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-class StyleManager;
-}
-
-/**
- * @brief StyleManager provides the following functionalities:
- *
- * Applies various styles to Controls using the properties system.
- * On theme change a signal is raised that controls can be configured to listen to.
- *
- * The default theme is automatically loaded and applied.
- *
- * If the application wants to customize the theme, RequestThemeChange needs to be called.
- * Also, the default orientation is Portrait, if the application wants to adapt to the orientation change, call SetOrientation or SetOrienationValue.
- * @code
- *   const char* CUSTOM_THEME = DALI_SCRIPT_DIR "tizen-dark-theme.json";
- *
- *   void OnInit(Application& app)
- *   {
- *      Toolkit::StyleManager::Get().RequestThemeChange( CUSTOM_THEME );
- *      Toolkit::StyleManager::Get().SetOrientation( app.GetOrientation() );
- *      ...
- *   }
- * @endcode
- *
- * Internal::Control can be configured to register for the signals that are required from StyleManager,
- * such as theme change.
- */
-class StyleManager : public BaseHandle
-{
-public:
-
-  // Signals
-  typedef SignalV2< void ( StyleManager ) > ThemeChangeSignalType;
-
-  /**
-   * @brief Create a StyleManager handle; this can be initialised with StyleManager::Get()
-   * Calling member functions with an uninitialised handle is not allowed.
-   */
-  StyleManager();
-
-  /**
-   * @brief Virtual destructor.
-   */
-  virtual ~StyleManager();
-
-  /**
-   * @brief Get the singleton of StyleManager object.
-   *
-   * @return A handle to the StyleManager control.
-   */
-  static StyleManager Get();
-
-  /**
-   * @brief Specify the orientation value directly for the style manager
-   *
-   * @param[in] orientation The orientation in degrees
-   */
-  void SetOrientationValue( int orientation );
-
-  /**
-   * @brief Return the orientation value
-   *
-   * @return The orientation value
-   */
-  int GetOrientationValue();
-
-  /**
-   * @brief Set the orientation object. This will take precedence over setting the orientation value.
-   *
-   * @param[in] orientation Device orientation
-   */
-  void SetOrientation( Orientation orientation );
-
-  /**
-   * @brief Return the orientation object
-   *
-   * @return The orientation.
-   */
-  Orientation GetOrientation();
-
-  /**
-   * @brief Make a request to set the theme JSON file to one that exists in the Toolkit package.
-   *
-   * Multiple requests per event processing cycle can be made, but only the final one will be acted
-   * on in the event processing finished callback.
-   *
-   * @param[in] themeFile This is just the JSON theme file name and not the full path.
-   */
-  void RequestThemeChange( const std::string& themeFile );
-
-  /**
-   * @brief Request a change to the default theme
-   */
-  void RequestDefaultTheme();
-
-  /**
-   * @brief Set a constant for use when building styles
-   *
-   * A constant is used in JSON files e.g. "my-image":"{ROOT_PATH}/mypath/image.jpg"
-   * where the string "{ROOT_PATH}" is substituted with the value.
-   *
-   * @param[in] key The key of the constant
-   * @param[in] value The value of the constant
-   */
-  void SetStyleConstant( const std::string& key, const Property::Value& value );
-
-  /**
-   * @brief Return the style constant set for a specific key
-   *
-   * @param[in] key The key of the constant
-   * @param[out] valueOut The value of the constant if it exists
-   *
-   * @return If the constant for key exists then return the constant in valueOut and return true
-   */
-  bool GetStyleConstant( const std::string& key, Property::Value& valueOut );
-
-  /**
-   * @brief Apply the specified style to the control.
-   *
-   * The JSON file will be cached and subsequent calls using the same JSON file name will
-   * use the already loaded cached values instead.
-   *
-   * @param[in] control The control to apply style.
-   * @param[in] jsonFileName The name of the JSON style file to apply.
-   * @param[in] styleName The name of the style within the JSON file to apply.
-   */
-  void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
-
-public: // Signals
-
-  /**
-   * @brief This signal is emitted whenever the theme is changed on device
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallbackName( StyleManager styleManager );
-   * @endcode
-   * @return The signal to connect to.
-   */
-  ThemeChangeSignalType& ThemeChangeSignal();
-
-public:
-
-  /**
-   * @brief Creates a new handle from the implementation.
-   *
-   * @param[in] impl A pointer to the object.
-   */
-  explicit DALI_INTERNAL StyleManager( Internal::StyleManager *impl );
-
-}; // class StyleManager
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-
-#endif /* __DALI_TOOLKIT_STYLE_MANAGER_H__ */
diff --git a/base/dali-toolkit/styles/file.list b/base/dali-toolkit/styles/file.list
deleted file mode 100644 (file)
index 83a6e26..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Files to install here
-
-dali_toolkit_style_files =\
-    $(toolkit_base_styles_dir)/*.json
diff --git a/base/dali-toolkit/styles/tizen-dark-theme.json b/base/dali-toolkit/styles/tizen-dark-theme.json
deleted file mode 100644 (file)
index 4f1e5d7..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright (c) 2000-2014 Samsung Electronics Co., Ltd All Rights Reserved
-
-This file is part of Dali Toolkit
-
-PROPRIETARY/CONFIDENTIAL
-
-This software is the confidential and proprietary information of
-SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
-disclose such Confidential Information and shall use it only in
-accordance with the terms of the license agreement you entered
-into with SAMSUNG ELECTRONICS.
-
-SAMSUNG make no representations or warranties about the suitability
-of the software, either express or implied, including but not limited
-to the implied warranties of merchantability, fitness for a particular
-purpose, or non-infringement. SAMSUNG shall not be liable for any
-damages suffered by licensee as a result of using, modifying or
-distributing this software or its derivatives.
-*/
-
-
-
-//******************************************************************************
-//
-// Default style theme for Tizen dark theme, The values should come from
-// UX design document.
-//
-//******************************************************************************
-
-{
-  "styles":
-  {
-  }
-}
\ No newline at end of file
diff --git a/base/dali-toolkit/styles/tizen-default-theme.json b/base/dali-toolkit/styles/tizen-default-theme.json
deleted file mode 120000 (symlink)
index c09c1a1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tizen-dark-theme.json
\ No newline at end of file
index 111aea3..50eaa34 100644 (file)
 # Base files
 toolkit_base_images_dir = ../../../base/dali-toolkit/images
 toolkit_base_sounds_dir = ../../../base/dali-toolkit/sounds
 # Base files
 toolkit_base_images_dir = ../../../base/dali-toolkit/images
 toolkit_base_sounds_dir = ../../../base/dali-toolkit/sounds
-toolkit_base_styles_dir = ../../../base/dali-toolkit/styles
 toolkit_base_src_dir    = ../../../base/dali-toolkit/internal
 public_api_base_src_dir = ../../../base/dali-toolkit/public-api
 
 include ../../../base/dali-toolkit/images/file.list
 include ../../../base/dali-toolkit/sounds/file.list
 toolkit_base_src_dir    = ../../../base/dali-toolkit/internal
 public_api_base_src_dir = ../../../base/dali-toolkit/public-api
 
 include ../../../base/dali-toolkit/images/file.list
 include ../../../base/dali-toolkit/sounds/file.list
-include ../../../base/dali-toolkit/styles/file.list
 include ../../../base/dali-toolkit/internal/file.list
 include ../../../base/dali-toolkit/public-api/file.list
 
 include ../../../base/dali-toolkit/internal/file.list
 include ../../../base/dali-toolkit/public-api/file.list
 
@@ -35,9 +33,6 @@ include ../../../base/dali-toolkit/public-api/file.list
 #dalisounddir = ${dataReadOnlyDir}/toolkit/sounds/
 #dalisound_DATA = ${dali_toolkit_base_sound_files}
 
 #dalisounddir = ${dataReadOnlyDir}/toolkit/sounds/
 #dalisound_DATA = ${dali_toolkit_base_sound_files}
 
-#dalistyledir = ${dataReadOnlyDir}/toolkit/styles/
-#dalistyle_DATA = ${dali_toolkit_style_files}
-
 # The Base library
 lib_LTLIBRARIES = libdali-toolkit-base.la
 
 # The Base library
 lib_LTLIBRARIES = libdali-toolkit-base.la
 
@@ -48,11 +43,8 @@ libdali_toolkit_base_la_SOURCES = \
 libdali_toolkit_base_la_DEPENDENCIES =
 
 libdali_toolkit_base_la_CXXFLAGS = -DDALI_COMPILATION \
 libdali_toolkit_base_la_DEPENDENCIES =
 
 libdali_toolkit_base_la_CXXFLAGS = -DDALI_COMPILATION \
-                      -DDALI_TOOLKIT_BASE \
                       -DDALI_IMAGE_DIR="\"${daliimagedir}\"" \
                       -DDALI_SOUND_DIR="\"${dalisounddir}\"" \
                       -DDALI_IMAGE_DIR="\"${daliimagedir}\"" \
                       -DDALI_SOUND_DIR="\"${dalisounddir}\"" \
-                      -DDALI_STYLE_DIR="\"${dalistyledir}\"" \
-                      -DDALI_DATA_READ_ONLY_DIR="\"${dataReadOnlyDir}\"" \
                       -Werror -Wall \
                       -I../../../base \
                       -I../../../capi \
                       -Werror -Wall \
                       -I../../../base \
                       -I../../../capi \
index 3d8c4cc..79f3c62 100644 (file)
 # Base files
 toolkit_base_images_dir = ../../../base/dali-toolkit/images
 toolkit_base_sounds_dir = ../../../base/dali-toolkit/sounds
 # Base files
 toolkit_base_images_dir = ../../../base/dali-toolkit/images
 toolkit_base_sounds_dir = ../../../base/dali-toolkit/sounds
-toolkit_base_styles_dir = ../../../base/dali-toolkit/styles
 toolkit_base_src_dir    = ../../../base/dali-toolkit/internal
 public_api_base_src_dir = ../../../base/dali-toolkit/public-api
 
 include ../../../base/dali-toolkit/images/file.list
 include ../../../base/dali-toolkit/sounds/file.list
 toolkit_base_src_dir    = ../../../base/dali-toolkit/internal
 public_api_base_src_dir = ../../../base/dali-toolkit/public-api
 
 include ../../../base/dali-toolkit/images/file.list
 include ../../../base/dali-toolkit/sounds/file.list
-include ../../../base/dali-toolkit/styles/file.list
 include ../../../base/dali-toolkit/internal/file.list
 include ../../../base/dali-toolkit/public-api/file.list
 
 include ../../../base/dali-toolkit/internal/file.list
 include ../../../base/dali-toolkit/public-api/file.list
 
@@ -60,16 +58,11 @@ libdali_toolkit_la_SOURCES = \
                      $(toolkit_optional_src_files) \
                      $(public_api_optional_src_files)
 
                      $(toolkit_optional_src_files) \
                      $(public_api_optional_src_files)
 
-dalistyledir = ${dataReadOnlyDir}/toolkit/styles/
-dalistyle_DATA = ${dali_toolkit_style_files}
-
 libdali_toolkit_la_DEPENDENCIES =
 
 libdali_toolkit_la_CXXFLAGS = -DDALI_COMPILATION \
                       -DDALI_IMAGE_DIR="\"${daliimagedir}\"" \
                       -DDALI_SOUND_DIR="\"${dalisounddir}\"" \
 libdali_toolkit_la_DEPENDENCIES =
 
 libdali_toolkit_la_CXXFLAGS = -DDALI_COMPILATION \
                       -DDALI_IMAGE_DIR="\"${daliimagedir}\"" \
                       -DDALI_SOUND_DIR="\"${dalisounddir}\"" \
-                      -DDALI_STYLE_DIR="\"${dalistyledir}\"" \
-                      -DDALI_DATA_READ_ONLY_DIR="\"${dataReadOnlyDir}\"" \
                       -Werror -Wall \
                       -I../../../base \
                       -I../../../optional \
                       -Werror -Wall \
                       -I../../../base \
                       -I../../../optional \
@@ -110,8 +103,6 @@ publicapibasefactorydir = $(publicapibasedir)/factory
 publicapibasefocusmanagerdir = $(publicapibasedir)/focus-manager
 publicapibasemarkupprocessordir = $(publicapibasedir)/markup-processor
 publicapibaseshadereffectsdir = $(publicapibasedir)/shader-effects
 publicapibasefocusmanagerdir = $(publicapibasedir)/focus-manager
 publicapibasemarkupprocessordir = $(publicapibasedir)/markup-processor
 publicapibaseshadereffectsdir = $(publicapibasedir)/shader-effects
-publicapibasestylingdir = $(publicapibasedir)/styling
-publicapibasebuilderdir = $(publicapibasedir)/builder
 
 publicapibase_HEADERS = $(public_api_base_header_files)
 publicapibasecontrols_HEADERS = $(public_api_base_controls_header_files)
 
 publicapibase_HEADERS = $(public_api_base_header_files)
 publicapibasecontrols_HEADERS = $(public_api_base_controls_header_files)
@@ -131,8 +122,6 @@ publicapibasefactory_HEADERS = $(public_api_base_factory_header_files)
 publicapibasefocusmanager_HEADERS = $(public_api_base_focus_manager_header_files)
 publicapibasemarkupprocessor_HEADERS = $(public_api_base_markup_processor_header_files)
 publicapibaseshadereffects_HEADERS = $(public_api_base_shader_effects_header_files)
 publicapibasefocusmanager_HEADERS = $(public_api_base_focus_manager_header_files)
 publicapibasemarkupprocessor_HEADERS = $(public_api_base_markup_processor_header_files)
 publicapibaseshadereffects_HEADERS = $(public_api_base_shader_effects_header_files)
-publicapibasestyling_HEADERS = $(public_api_base_styling_header_files)
-publicapibasebuilder_HEADERS = $(public_api_base_builder_header_files)
 
 # Install Optional headers
 
 
 # Install Optional headers
 
@@ -158,6 +147,7 @@ publicapioptionalviewdir = $(publicapioptionaldir)/controls/view
 publicapioptionalnavigationframedir = $(publicapioptionaldir)/controls/navigation-frame
 publicapioptionalshadereffectsdir = $(publicapioptionaldir)/shader-effects
 publicapioptionalbubbleeffectdir = $(publicapioptionaldir)/shader-effects/bubble-effect
 publicapioptionalnavigationframedir = $(publicapioptionaldir)/controls/navigation-frame
 publicapioptionalshadereffectsdir = $(publicapioptionaldir)/shader-effects
 publicapioptionalbubbleeffectdir = $(publicapioptionaldir)/shader-effects/bubble-effect
+publicapioptionalbuilderdir = $(publicapioptionaldir)/builder
 publicapioptionaltransitioneffectsdir = $(publicapioptionaldir)/transition-effects
 
 publicapioptional_HEADERS = $(public_api_optional_header_files)
 publicapioptionaltransitioneffectsdir = $(publicapioptionaldir)/transition-effects
 
 publicapioptional_HEADERS = $(public_api_optional_header_files)
@@ -179,6 +169,7 @@ publicapioptionalview_HEADERS = $(public_api_optional_view_header_files)
 publicapioptionalnavigationframe_HEADERS = $(public_api_optional_navigation_frame_header_files)
 publicapioptionalshadereffects_HEADERS = $(public_api_optional_shader_effects_header_files)
 publicapioptionalbubbleeffect_HEADERS = $(public_api_optional_bubble_effect_header_files)
 publicapioptionalnavigationframe_HEADERS = $(public_api_optional_navigation_frame_header_files)
 publicapioptionalshadereffects_HEADERS = $(public_api_optional_shader_effects_header_files)
 publicapioptionalbubbleeffect_HEADERS = $(public_api_optional_bubble_effect_header_files)
+publicapioptionalbuilder_HEADERS = $(public_api_optional_builder_header_files)
 publicapioptionaltransitioneffects_HEADERS = $(public_api_optional_transition_effects_header_files)
 
 # Install CAPI headers
 publicapioptionaltransitioneffects_HEADERS = $(public_api_optional_transition_effects_header_files)
 
 # Install CAPI headers
@@ -221,7 +212,6 @@ capidevelstyledtextutilitiesdir = $(capideveldir)/styled-text-utilities
 capidevelbuilderdir = $(capideveldir)/builder
 capidevelutilitiesdir = $(capideveldir)/utilities
 capideveltransitioneffectsdir = $(capideveldir)/transition-effects
 capidevelbuilderdir = $(capideveldir)/builder
 capidevelutilitiesdir = $(capideveldir)/utilities
 capideveltransitioneffectsdir = $(capideveldir)/transition-effects
-capidevelstylingdir = $(capideveldir)/styling
 
 capidevel_HEADERS = $(capi_devel_header_files)
 capidevelcontrols_HEADERS = $(capi_devel_controls_header_files)
 
 capidevel_HEADERS = $(capi_devel_header_files)
 capidevelcontrols_HEADERS = $(capi_devel_controls_header_files)
@@ -261,5 +251,3 @@ capidevelstyledtextutilities_HEADERS = $(capi_devel_styled_text_utilities_header
 capidevelbuilder_HEADERS = $(capi_devel_builder_header_files)
 capidevelutilities_HEADERS = $(capi_devel_utilities_header_files)
 capideveltransitioneffects_HEADERS = $(capi_devel_transition_effects_header_files)
 capidevelbuilder_HEADERS = $(capi_devel_builder_header_files)
 capidevelutilities_HEADERS = $(capi_devel_utilities_header_files)
 capideveltransitioneffects_HEADERS = $(capi_devel_transition_effects_header_files)
-capidevelstyling_HEADERS = $(capi_devel_styling_header_files)
-
index b2b687f..b024d9a 100644 (file)
@@ -35,6 +35,7 @@ class StyleManager;
 
 namespace Internal DALI_INTERNAL
 {
 
 namespace Internal DALI_INTERNAL
 {
+class StyleChangeProcessor;
 class RelayoutControllerImpl;
 class KeyInputFocusManager;
 }
 class RelayoutControllerImpl;
 class KeyInputFocusManager;
 }
@@ -290,9 +291,12 @@ private: // For derived classes to override
   virtual void OnInitialize() { }
 
   /**
   virtual void OnInitialize() { }
 
   /**
-   * @brief Callback for when the theme changes.
+   * @brief This method should be overridden by deriving classes when
+   * they wish to be notified when the style changes.
+   *
+   * @param[in] change  Information denoting what has changed.
    */
    */
-  virtual void OnThemeChange( Toolkit::StyleManager styleManager );
+  virtual void OnStyleChange(StyleChange change) { }
 
   /**
    * @brief Called whenever a pinch gesture is detected on this control.
 
   /**
    * @brief Called whenever a pinch gesture is detected on this control.
@@ -511,29 +515,13 @@ private:
 
 protected: // Construction
 
 
 protected: // Construction
 
-  // Flags for the constructor
-  enum ControlBehaviour
-  {
-    CONTROL_BEHAVIOUR_NONE        = 0x0,
-    REQUIRES_TOUCH_EVENTS         = 0x1,     ///< True if the OnTouchEvent() callback is required.
-    REQUIRES_THEME_CHANGE_SIGNALS = 0x2      ///< True if this control should listen to theme change signals
-  };
-
   /**
   /**
-   * @deprecated Use the constructor taking flags instead
    * @brief Create a Control.
    *
    * @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required.
    */
   Control(bool requiresTouchEvents);
 
    * @brief Create a Control.
    *
    * @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required.
    */
   Control(bool requiresTouchEvents);
 
-  /**
-   * @brief Create a Control.
-   *
-   * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum
-   */
-  Control(ControlBehaviour behaviourFlags);
-
 public:
 
   // Size negotiation
 public:
 
   // Size negotiation
@@ -709,6 +697,7 @@ private:
   class Impl;
   Impl *mImpl;
 
   class Impl;
   Impl *mImpl;
 
+  friend class Internal::StyleChangeProcessor;
   friend class Internal::RelayoutControllerImpl;   ///< Relayout controller needs to call Relayout() which is private.
   friend class Internal::KeyInputFocusManager;     ///< KeyInputFocusManager needs to call which is private.
 };
   friend class Internal::RelayoutControllerImpl;   ///< Relayout controller needs to call Relayout() which is private.
   friend class Internal::KeyInputFocusManager;     ///< KeyInputFocusManager needs to call which is private.
 };
index 1c13d50..6f89000 100644 (file)
@@ -60,4 +60,5 @@
 #include <dali-toolkit/public-api/shader-effects/ripple2d-effect.h>
 #include <dali-toolkit/public-api/shader-effects/swirl-effect.h>
 
 #include <dali-toolkit/public-api/shader-effects/ripple2d-effect.h>
 #include <dali-toolkit/public-api/shader-effects/swirl-effect.h>
 
+
 #endif // __DALI_TOOLKIT_CAPI_INTERNAL_H__
 #endif // __DALI_TOOLKIT_CAPI_INTERNAL_H__
index a878f04..caf2cb3 100644 (file)
@@ -85,4 +85,3 @@ capi_devel_shader_effects_header_files =               \
   $(capi_devel_src_dir)/shader-effects/ripple-effect.h \
   $(capi_devel_src_dir)/shader-effects/ripple2d-effect.h \
   $(capi_devel_src_dir)/shader-effects/swirl-effect.h
   $(capi_devel_src_dir)/shader-effects/ripple-effect.h \
   $(capi_devel_src_dir)/shader-effects/ripple2d-effect.h \
   $(capi_devel_src_dir)/shader-effects/swirl-effect.h
-
index 3d88968..ed080fe 100644 (file)
@@ -20,6 +20,8 @@
 #include <dali-toolkit/public-api/dali-toolkit-capi-internal.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-capi-internal.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/public-api/builder/builder.h>
+#include <dali-toolkit/public-api/builder/tree-node.h>
 
 #include <dali-toolkit/public-api/controls/bloom-view/bloom-view.h>
 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
 
 #include <dali-toolkit/public-api/controls/bloom-view/bloom-view.h>
 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
@@ -87,5 +89,4 @@
 #include <dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h>
 #include <dali-toolkit/public-api/transition-effects/cube-transition-fold-effect.h>
 
 #include <dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h>
 #include <dali-toolkit/public-api/transition-effects/cube-transition-fold-effect.h>
 
-
 #endif // __DALI_TOOLKIT_EXT_H__
 #endif // __DALI_TOOLKIT_EXT_H__
@@ -994,13 +994,13 @@ void Builder::LoadConstants( const TreeNode& root, PropertyValueMap& intoMap )
 
 }
 
 
 }
 
-bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
+void Builder::ApplyStyle( const std::string& styleName, Handle& handle )
 {
   Replacement replacer( mReplacementMap );
 {
   Replacement replacer( mReplacementMap );
-  return ApplyStyle( styleName, handle, replacer );
+  ApplyStyle( styleName, handle, replacer );
 }
 
 }
 
-bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement )
+void Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement )
 {
   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
 {
   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
@@ -1010,13 +1010,12 @@ bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Re
   if( styles && style )
   {
     ApplyAllStyleProperties( *mParser.GetRoot(), *style, handle, replacement );
   if( styles && style )
   {
     ApplyAllStyleProperties( *mParser.GetRoot(), *style, handle, replacement );
-    return true;
   }
   else
   {
     DALI_SCRIPT_WARNING("No styles section to create style '%s'\n", styleName.c_str());
   }
   else
   {
     DALI_SCRIPT_WARNING("No styles section to create style '%s'\n", styleName.c_str());
-    return false;
   }
   }
+
 }
 
 BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
 }
 
 BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
@@ -151,7 +151,7 @@ public:
   /**
    * @copydoc Toolkit::Builder::ApplyStyle
    */
   /**
    * @copydoc Toolkit::Builder::ApplyStyle
    */
-  bool ApplyStyle( const std::string& styleName, Handle& handle );
+  void ApplyStyle( const std::string& styleName, Handle& handle );
 
   void AnimateTo( const std::string& styleName, Handle& handle );
 
 
   void AnimateTo( const std::string& styleName, Handle& handle );
 
@@ -232,7 +232,7 @@ private:
 
   void LoadIncludes( const std::string& data );
 
 
   void LoadIncludes( const std::string& data );
 
-  bool ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement);
+  void ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement);
 
   Animation CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor );
 
 
   Animation CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor );
 
index 4872d4a..dde4f19 100644 (file)
@@ -119,7 +119,7 @@ const char* const COMPOSITE_FRAGMENT_SOURCE =
 
 
 BloomView::BloomView()
 
 
 BloomView::BloomView()
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( false )  // doesn't require touch events
   , mBlurNumSamples(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
   , mBlurBellCurveWidth(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_BELL_CURVE_WIDTH)
   , mPixelFormat(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
   , mBlurNumSamples(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
   , mBlurBellCurveWidth(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_BELL_CURVE_WIDTH)
   , mPixelFormat(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
@@ -141,7 +141,7 @@ BloomView::BloomView()
 
 BloomView::BloomView( const unsigned int blurNumSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale)
 
 BloomView::BloomView( const unsigned int blurNumSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale)
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( false )  // doesn't require touch events
   , mBlurNumSamples(blurNumSamples)
   , mBlurBellCurveWidth(blurBellCurveWidth)
   , mPixelFormat(renderTargetPixelFormat)
   , mBlurNumSamples(blurNumSamples)
   , mBlurBellCurveWidth(blurBellCurveWidth)
   , mPixelFormat(renderTargetPixelFormat)
index ee36706..8083191 100644 (file)
@@ -36,7 +36,7 @@ BubbleEmitter::BubbleEmitter( const Vector2& movementArea,
                               Image shapeImage,
                               unsigned int maximumNumberOfBubble,
                               const Vector2& bubbleSizeRange )
                               Image shapeImage,
                               unsigned int maximumNumberOfBubble,
                               const Vector2& bubbleSizeRange )
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( true ),
   mMovementArea( movementArea ),
   mShapeImage( shapeImage ),
   mTotalNumOfBubble( maximumNumberOfBubble ),
   mMovementArea( movementArea ),
   mShapeImage( shapeImage ),
   mTotalNumOfBubble( maximumNumberOfBubble ),
index 4a5e45e..5659788 100644 (file)
@@ -80,7 +80,7 @@ Dali::Toolkit::Cluster Cluster::New(Toolkit::ClusterStyle& style)
 }
 
 Cluster::Cluster(Toolkit::ClusterStyle& style)
 }
 
 Cluster::Cluster(Toolkit::ClusterStyle& style)
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control(true/*requires touch*/),
   mClusterStyle(style),
   mExpandedCount(0)
 {
   mClusterStyle(style),
   mExpandedCount(0)
 {
index c8cb42b..ef36347 100644 (file)
@@ -100,7 +100,7 @@ Toolkit::EffectsView EffectsView::New()
 }
 
 EffectsView::EffectsView()
 }
 
 EffectsView::EffectsView()
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),
   mEffectType( Toolkit::EffectsView::INVALID_TYPE ),
   mPixelFormat( EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT ),
   mSpread(0.0f),
   mEffectType( Toolkit::EffectsView::INVALID_TYPE ),
   mPixelFormat( EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT ),
   mSpread(0.0f),
index 126ada3..b77a121 100644 (file)
@@ -111,8 +111,9 @@ const char* const GAUSSIAN_BLUR_FRAGMENT_SOURCE =
 
 
 GaussianBlurView::GaussianBlurView()
 
 
 GaussianBlurView::GaussianBlurView()
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( false )  // doesn't require touch events
   , mNumSamples(GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
   , mNumSamples(GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
+
   , mPixelFormat(GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
   , mDownsampleWidthScale(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE)
   , mDownsampleHeightScale(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE)
   , mPixelFormat(GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
   , mDownsampleWidthScale(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE)
   , mDownsampleHeightScale(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE)
@@ -131,7 +132,7 @@ GaussianBlurView::GaussianBlurView()
 GaussianBlurView::GaussianBlurView( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale,
                                     bool blurUserImage)
 GaussianBlurView::GaussianBlurView( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale,
                                     bool blurUserImage)
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( false )  // doesn't require touch events
   , mNumSamples(numSamples)
   , mPixelFormat(renderTargetPixelFormat)
   , mDownsampleWidthScale(downsampleWidthScale)
   , mNumSamples(numSamples)
   , mPixelFormat(renderTargetPixelFormat)
   , mDownsampleWidthScale(downsampleWidthScale)
index edd6f4a..68782e9 100644 (file)
@@ -86,7 +86,7 @@ Dali::Toolkit::ImageView ImageView::New()
 }
 
 ImageView::ImageView()
 }
 
 ImageView::ImageView()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) )
+: Control(true)
 {
 }
 
 {
 }
 
index 38a05a4..0422021 100644 (file)
@@ -474,7 +474,7 @@ Dali::Toolkit::MaskedImageView::MaskedImageViewSignal& MaskedImageView::MaskFini
 }
 
 MaskedImageView::MaskedImageView()
 }
 
 MaskedImageView::MaskedImageView()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control(true),
   mEditMode( Dali::Toolkit::MaskedImageView::EDIT_DISABLED ),
   mSelfPropertySetting( false ),
   mSourceRotation( Dali::Toolkit::MaskedImageView::ROTATE_0 ),
   mEditMode( Dali::Toolkit::MaskedImageView::EDIT_DISABLED ),
   mSelfPropertySetting( false ),
   mSourceRotation( Dali::Toolkit::MaskedImageView::ROTATE_0 ),
index 9c42637..cbe156b 100644 (file)
@@ -161,7 +161,7 @@ Dali::Toolkit::Magnifier Magnifier::New()
 }
 
 Magnifier::Magnifier()
 }
 
 Magnifier::Magnifier()
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control(true),
   mPropertySourcePosition(Property::INVALID_INDEX),
   mActorSize(Vector3::ZERO),
   mMagnificationFactor(1.0f)
   mPropertySourcePosition(Property::INVALID_INDEX),
   mActorSize(Vector3::ZERO),
   mMagnificationFactor(1.0f)
index 71b5441..8731515 100644 (file)
@@ -46,7 +46,7 @@ TypeAction a2(mType, Toolkit::NavigationControl::ACTION_POP, &NavigationControl:
 }
 
 NavigationControl::NavigationControl()
 }
 
 NavigationControl::NavigationControl()
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( true ),
   mToolBar(NULL),
   mTitleBar(NULL),
   mOrientationAngle( 0 ),
   mToolBar(NULL),
   mTitleBar(NULL),
   mOrientationAngle( 0 ),
index d681218..4e5c50e 100644 (file)
@@ -44,7 +44,7 @@ TypeRegistration mType( typeid(Toolkit::Page), typeid(CustomActor), Create );
 } // unnamed namespace
 
 Page::Page()
 } // unnamed namespace
 
 Page::Page()
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control(false),
   mTitle(""),
   mSubTitle("")
 {
   mTitle(""),
   mSubTitle("")
 {
index 4a2c079..f508b54 100644 (file)
@@ -250,7 +250,7 @@ const int PageTurnView::NUMBER_OF_CACHED_PAGES = NUMBER_OF_CACHED_PAGES_EACH_SID
 const float PageTurnView::STATIC_PAGE_INTERVAL_DISTANCE = 1.0f;
 
 PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& pageSize )
 const float PageTurnView::STATIC_PAGE_INTERVAL_DISTANCE = 1.0f;
 
 PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& pageSize )
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( true ),
   mPageFactory( pageFactory ),
   mPageSize( pageSize ),
   mIsEditMode( false ),
   mPageFactory( pageFactory ),
   mPageSize( pageSize ),
   mIsEditMode( false ),
index 9f36b9d..dabae5e 100644 (file)
@@ -101,7 +101,7 @@ void RotatingSelector::OnInitialize()
 }
 
 RotatingSelector::RotatingSelector()
 }
 
 RotatingSelector::RotatingSelector()
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control(true/*requires touch*/),
   mSelected(false),
   mSelectable(true),
   mIsAnimating(false)
   mSelected(false),
   mSelectable(true),
   mIsAnimating(false)
index b3bb8a5..ec3197a 100644 (file)
@@ -116,7 +116,7 @@ struct EqualToConstraintMatrix
 } // namespace
 
 ShadowView::ShadowView( float downsampleWidthScale, float downsampleHeightScale )
 } // namespace
 
 ShadowView::ShadowView( float downsampleWidthScale, float downsampleHeightScale )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),  // doesn't require touch events
   mChildrenRoot(Actor::New()),
   mCachedShadowColor(DEFAULT_SHADOW_COLOR),
   mCachedBackgroundColor(DEFAULT_SHADOW_COLOR.r, DEFAULT_SHADOW_COLOR.g, DEFAULT_SHADOW_COLOR.b, 0.0f),
   mChildrenRoot(Actor::New()),
   mCachedShadowColor(DEFAULT_SHADOW_COLOR),
   mCachedBackgroundColor(DEFAULT_SHADOW_COLOR.r, DEFAULT_SHADOW_COLOR.g, DEFAULT_SHADOW_COLOR.b, 0.0f),
index 8a3bbb2..7ec9d7b 100755 (executable)
@@ -168,7 +168,7 @@ Dali::Toolkit::Slider Slider::New()
 }
 
 Slider::Slider()
 }
 
 Slider::Slider()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_THEME_CHANGE_SIGNALS ) ),
+: Control( true ),
   mState( NORMAL ),
   mDisableColor( 0.0f, 0.0f, 0.0f, 0.0f ),
   mPopupTextColor( 0.0f, 0.0f, 0.0f, 0.0f ),
   mState( NORMAL ),
   mDisableColor( 0.0f, 0.0f, 0.0f, 0.0f ),
   mPopupTextColor( 0.0f, 0.0f, 0.0f, 0.0f ),
index 7ad168f..fdbcd34 100644 (file)
@@ -97,7 +97,7 @@ PropertyRegistration property1( typeRegistration, "image", Toolkit::SuperBlurVie
 } // unnamed namespace
 
 SuperBlurView::SuperBlurView( unsigned int blurLevels )
 } // unnamed namespace
 
 SuperBlurView::SuperBlurView( unsigned int blurLevels )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),
   mBlurLevels( blurLevels ),
   mBlurStrengthPropertyIndex(Property::INVALID_INDEX),
   mResourcesCleared( true ),
   mBlurLevels( blurLevels ),
   mBlurStrengthPropertyIndex(Property::INVALID_INDEX),
   mResourcesCleared( true ),
index 0a52092..703cf87 100644 (file)
@@ -287,7 +287,7 @@ void ToolBar::RemoveControl( Actor control )
 }
 
 ToolBar::ToolBar()
 }
 
 ToolBar::ToolBar()
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),  // doesn't require touch events
   mLayout(),
   mLeftOffset( 0 ),
   mCenterBase( 1 ),
   mLayout(),
   mLeftOffset( 0 ),
   mCenterBase( 1 ),
index 6877c2d..b27d509 100644 (file)
@@ -269,7 +269,7 @@ bool View::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* trac
 }
 
 View::View(bool fullscreen)
 }
 
 View::View(bool fullscreen)
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( false ),  // doesn't require touch events
   mOrientation( -1 ),
   mFullScreen(fullscreen),
   mContentLayers(),
   mOrientation( -1 ),
   mFullScreen(fullscreen),
   mContentLayers(),
index 797c08b..5e214a4 100644 (file)
@@ -1,6 +1,15 @@
 # Add local source files here
 
 toolkit_optional_src_files = \
 # Add local source files here
 
 toolkit_optional_src_files = \
+   $(toolkit_optional_src_dir)/builder/builder-impl.cpp \
+   $(toolkit_optional_src_dir)/builder/builder-animations.cpp \
+   $(toolkit_optional_src_dir)/builder/builder-set-property.cpp \
+   $(toolkit_optional_src_dir)/builder/builder-signals.cpp \
+   $(toolkit_optional_src_dir)/builder/builder-actor.cpp \
+   $(toolkit_optional_src_dir)/builder/json-parser-state.cpp \
+   $(toolkit_optional_src_dir)/builder/json-parser-impl.cpp \
+   $(toolkit_optional_src_dir)/builder/tree-node-manipulator.cpp \
+   $(toolkit_optional_src_dir)/builder/replacement.cpp \
    $(toolkit_optional_src_dir)/controls/bloom-view/bloom-view-impl.cpp \
    $(toolkit_optional_src_dir)/controls/cluster/cluster-impl.cpp \
    $(toolkit_optional_src_dir)/controls/cluster/cluster-style-impl.cpp \
    $(toolkit_optional_src_dir)/controls/bloom-view/bloom-view-impl.cpp \
    $(toolkit_optional_src_dir)/controls/cluster/cluster-impl.cpp \
    $(toolkit_optional_src_dir)/controls/cluster/cluster-style-impl.cpp \
@@ -113,9 +113,9 @@ BaseHandle Builder::Create( const std::string& templateName, const PropertyValue
   return GetImpl(*this).Create( templateName, map );
 }
 
   return GetImpl(*this).Create( templateName, map );
 }
 
-bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
+void Builder::ApplyStyle( const std::string& styleName, Handle& handle )
 {
 {
-  return GetImpl(*this).ApplyStyle( styleName, handle );
+  GetImpl(*this).ApplyStyle( styleName, handle );
 }
 
 void Builder::AddActors( Actor toActor )
 }
 
 void Builder::AddActors( Actor toActor )
@@ -140,9 +140,7 @@ typedef std::map<std::string, Property::Value> PropertyValueMap;
    * @brief Adds or modifies a user defined constant to all future style template or animation expansions
    *
    * e.g.
    * @brief Adds or modifies a user defined constant to all future style template or animation expansions
    *
    * e.g.
-   * @code
-   * builder.AddConstant( "IMAGE_DIRECTORY", "/usr/share/images" );
-   * @endcode
+   *  builder.AddConstant( "IMAGE_DIRECTORY", "/usr/share/images" );
    *
    * @pre The Builder has been initialized.
    * @param key The constant name to add or update
    *
    * @pre The Builder has been initialized.
    * @param key The constant name to add or update
@@ -154,11 +152,9 @@ typedef std::map<std::string, Property::Value> PropertyValueMap;
    * @brief Gets all currently defined constants.
    *
    * e.g.
    * @brief Gets all currently defined constants.
    *
    * e.g.
-   * @code
-   * PropertyValueMap map = builder.GetConstants(); // get copy of current constants
-   * map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
-   * builder.AddConstants( map );                   // write back changes
-   * @endcode
+   *  PropertyValueMap map = builder.GetConstants(); // get copy of current constants
+   *  map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
+   *  builder.AddConstants( map );                   // write back changes
    *
    * @pre The Builder has been initialized.
    * @return A reference to the currently defined constants.
    *
    * @pre The Builder has been initialized.
    * @return A reference to the currently defined constants.
@@ -169,11 +165,9 @@ typedef std::map<std::string, Property::Value> PropertyValueMap;
    * @brief Gets a currently defined constant, or returns Property::INVALID
    *
    * e.g.
    * @brief Gets a currently defined constant, or returns Property::INVALID
    *
    * e.g.
-   * @code
-   * PropertyValueMap map = builder.GetConstants(); // get copy of current constants
-   * map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
-   * builder.AddConstants( map );                   // write back changes
-   * @endcode
+   *  PropertyValueMap map = builder.GetConstants(); // get copy of current constants
+   *  map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
+   *  builder.AddConstants( map );                   // write back changes
    *
    * @pre The Builder has been initialized.
    * @param key The constant name to search for.
    *
    * @pre The Builder has been initialized.
    * @param key The constant name to search for.
@@ -298,10 +292,8 @@ typedef std::map<std::string, Property::Value> PropertyValueMap;
    * @pre Preconditions have been met for creating dali objects ie Images, Actors etc
    * @param styleName The name of the set of style properties to set on the handle object.
    * @param handle Then handle of the object on which to set the properties.
    * @pre Preconditions have been met for creating dali objects ie Images, Actors etc
    * @param styleName The name of the set of style properties to set on the handle object.
    * @param handle Then handle of the object on which to set the properties.
-   *
-   * @return Return true if the style was found
    */
    */
-  bool ApplyStyle( const std::string& styleName, Handle& handle );
+  void ApplyStyle( const std::string& styleName, Handle& handle );
 
   /**
    * Add the actor tree in the "stage" section to the actor toActor.
 
   /**
    * Add the actor tree in the "stage" section to the actor toActor.
index ba93b35..a97558c 100755 (executable)
@@ -49,11 +49,14 @@ public_api_optional_src_files = \
   $(public_api_optional_src_dir)/shader-effects/water-effect.cpp \
   $(public_api_optional_src_dir)/shader-effects/bubble-effect/bubble-effect.cpp \
   $(public_api_optional_src_dir)/shader-effects/bubble-effect/color-adjuster.cpp \
   $(public_api_optional_src_dir)/shader-effects/water-effect.cpp \
   $(public_api_optional_src_dir)/shader-effects/bubble-effect/bubble-effect.cpp \
   $(public_api_optional_src_dir)/shader-effects/bubble-effect/color-adjuster.cpp \
+  $(public_api_optional_src_dir)/builder/builder.cpp \
+  $(public_api_optional_src_dir)/builder/json-parser.cpp \
+  $(public_api_optional_src_dir)/builder/tree-node.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-wave-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-cross-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-fold-effect.cpp
   $(public_api_optional_src_dir)/transition-effects/cube-transition-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-wave-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-cross-effect.cpp \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-fold-effect.cpp
-  
+
 # Add public header files here
 
 public_api_optional_header_files =
 # Add public header files here
 
 public_api_optional_header_files =
@@ -132,9 +135,13 @@ public_api_optional_bubble_effect_header_files =  \
 
 public_api_optional_bubble_emitter_header_files =
 
 
 public_api_optional_bubble_emitter_header_files =
 
+public_api_optional_builder_header_files = \
+  $(public_api_optional_src_dir)/builder/builder.h \
+  $(public_api_optional_src_dir)/builder/json-parser.h \
+  $(public_api_optional_src_dir)/builder/tree-node.h
+
 public_api_optional_transition_effects_header_files = \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-wave-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-cross-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-fold-effect.h
 public_api_optional_transition_effects_header_files = \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-wave-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-cross-effect.h \
   $(public_api_optional_src_dir)/transition-effects/cube-transition-fold-effect.h
-
index 54a27e4..99b0856 100644 (file)
@@ -56,7 +56,6 @@ all the controls provided by the main package.
 %define dali_data_ro_dir            /usr/share/dali/
 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
 %define dali_data_ro_dir            /usr/share/dali/
 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
-%define dali_toolkit_style_files    %{dali_data_ro_dir}/toolkit/styles/
 %define dev_include_path %{_includedir}
 
 ##############################
 %define dev_include_path %{_includedir}
 
 ##############################
@@ -124,7 +123,6 @@ exit 0
 %{_libdir}/lib%{name}.so*
 %{dali_toolkit_image_files}/*
 %{dali_toolkit_sound_files}/*
 %{_libdir}/lib%{name}.so*
 %{dali_toolkit_image_files}/*
 %{dali_toolkit_sound_files}/*
-%{dali_toolkit_style_files}/*
 %{_datadir}/license/%{name}
 
 %files devel
 %{_datadir}/license/%{name}
 
 %files devel