Merge "Remove unnecessarily exported signals and action names" into tizen
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 18 Feb 2015 17:39:28 +0000 (09:39 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 18 Feb 2015 17:39:29 +0000 (09:39 -0800)
58 files changed:
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/cluster/cluster-impl.cpp
dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h
dali-toolkit/internal/controls/scrollable/scroll-connector-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-popup-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-popup-impl.h
dali-toolkit/internal/controls/text-input/text-input-popup-new-impl.h
dali-toolkit/internal/controls/text-view/text-view-impl.cpp
dali-toolkit/internal/controls/view/view-impl.cpp
dali-toolkit/internal/focus-manager/focus-manager-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/cluster/cluster.cpp
dali-toolkit/public-api/controls/cluster/cluster.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control.cpp
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/navigation-frame/navigation-control.cpp
dali-toolkit/public-api/controls/navigation-frame/navigation-control.h
dali-toolkit/public-api/controls/popup/popup.cpp
dali-toolkit/public-api/controls/popup/popup.h
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h
dali-toolkit/public-api/controls/scrollable/scroll-connector.cpp
dali-toolkit/public-api/controls/scrollable/scroll-connector.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
dali-toolkit/public-api/controls/scrollable/scrollable.cpp
dali-toolkit/public-api/controls/scrollable/scrollable.h
dali-toolkit/public-api/controls/slider/slider.cpp
dali-toolkit/public-api/controls/slider/slider.h
dali-toolkit/public-api/controls/text-input/text-input.cpp
dali-toolkit/public-api/controls/text-input/text-input.h
dali-toolkit/public-api/controls/text-view/text-view.cpp
dali-toolkit/public-api/controls/text-view/text-view.h
dali-toolkit/public-api/controls/view/view.cpp
dali-toolkit/public-api/controls/view/view.h
dali-toolkit/public-api/focus-manager/focus-manager.cpp
dali-toolkit/public-api/focus-manager/focus-manager.h
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.cpp
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h
dali-toolkit/public-api/focus-manager/keyinput-focus-manager.cpp
dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h
dali-toolkit/public-api/transition-effects/cube-transition-effect.cpp
dali-toolkit/public-api/transition-effects/cube-transition-effect.h

index cdce7d1..f1edb7a 100644 (file)
@@ -518,19 +518,19 @@ int UtcDaliControlGestureSignals(void)
 
   // Each gesture detector gets created when connecting to the gesture signals
   DALI_TEST_CHECK( !control.GetTapGestureDetector() );
-  control.ConnectSignal( &connectionTracker, Control::SIGNAL_TAPPED, &TestVoidCallback );
+  control.ConnectSignal( &connectionTracker, "tapped", &TestVoidCallback );
   DALI_TEST_CHECK( control.GetTapGestureDetector() );
 
   DALI_TEST_CHECK( !control.GetPanGestureDetector() );
-  control.ConnectSignal( &connectionTracker, Control::SIGNAL_PANNED, &TestVoidCallback );
+  control.ConnectSignal( &connectionTracker, "panned", &TestVoidCallback );
   DALI_TEST_CHECK( control.GetPanGestureDetector() );
 
   DALI_TEST_CHECK( !control.GetPinchGestureDetector() );
-  control.ConnectSignal( &connectionTracker, Control::SIGNAL_PINCHED, &TestVoidCallback );
+  control.ConnectSignal( &connectionTracker, "pinched", &TestVoidCallback );
   DALI_TEST_CHECK( control.GetPinchGestureDetector() );
 
   DALI_TEST_CHECK( !control.GetLongPressGestureDetector() );
-  control.ConnectSignal( &connectionTracker, Control::SIGNAL_LONG_PRESSED, &TestVoidCallback );
+  control.ConnectSignal( &connectionTracker, "long-pressed", &TestVoidCallback );
   DALI_TEST_CHECK( control.GetLongPressGestureDetector() );
 
   END_TEST;
index eef0cd8..fb61723 100644 (file)
@@ -51,20 +51,31 @@ namespace
 const unsigned int INITIAL_AUTOREPEATING_DELAY( 0.15f );
 const unsigned int NEXT_AUTOREPEATING_DELAY( 0.05f );
 
+// Signals
+
+const char* const SIGNAL_PRESSED =       "pressed";
+const char* const SIGNAL_RELEASED =      "released";
+const char* const SIGNAL_CLICKED =       "clicked";
+const char* const SIGNAL_STATE_CHANGED = "state-changed";
+
+// Actions
+
+const char* const ACTION_BUTTON_CLICK =  "button-click";
+
 BaseHandle Create()
 {
   // empty handle as we cannot create button (but type registered for clicked signal)
   return BaseHandle();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::Button), typeid(Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::Button ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::Button::SIGNAL_PRESSED , &Button::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, Toolkit::Button::SIGNAL_RELEASED, &Button::DoConnectSignal );
-SignalConnectorType signalConnector3( typeRegistration, Toolkit::Button::SIGNAL_CLICKED, &Button::DoConnectSignal );
-SignalConnectorType signalConnector4( typeRegistration, Toolkit::Button::SIGNAL_STATE_CHANGED, &Button::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_PRESSED , &Button::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, SIGNAL_RELEASED, &Button::DoConnectSignal );
+SignalConnectorType signalConnector3( typeRegistration, SIGNAL_CLICKED, &Button::DoConnectSignal );
+SignalConnectorType signalConnector4( typeRegistration, SIGNAL_STATE_CHANGED, &Button::DoConnectSignal );
 
-TypeAction action1( typeRegistration, Toolkit::Button::ACTION_BUTTON_CLICK, &Button::DoAction );
+TypeAction action1( typeRegistration, ACTION_BUTTON_CLICK, &Button::DoAction );
 
 PropertyRegistration property1( typeRegistration, "disabled",                     Toolkit::Button::PROPERTY_DISABLED,                     Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
 PropertyRegistration property2( typeRegistration, "auto-repeating",               Toolkit::Button::PROPERTY_AUTO_REPEATING,               Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
@@ -396,7 +407,7 @@ bool Button::DoAction( BaseObject* object, const std::string& actionName, const
 
   DALI_ASSERT_ALWAYS( button );
 
-  if( Toolkit::Button::ACTION_BUTTON_CLICK == actionName )
+  if( 0 == strcmp( actionName.c_str(), ACTION_BUTTON_CLICK ) )
   {
     GetImplementation( button ).DoClickAction( attributes );
     ret = true;
@@ -547,21 +558,21 @@ bool Button::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tr
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  Toolkit::Button button = Toolkit::Button::DownCast(handle);
+  Toolkit::Button button = Toolkit::Button::DownCast( handle );
 
-  if( Toolkit::Button::SIGNAL_PRESSED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_PRESSED ) )
   {
     button.PressedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::Button::SIGNAL_RELEASED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_RELEASED ) )
   {
     button.ReleasedSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::Button::SIGNAL_CLICKED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_CLICKED ) )
   {
     button.ClickedSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::Button::SIGNAL_STATE_CHANGED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_STATE_CHANGED ) )
   {
     button.StateChangedSignal().Connect( tracker, functor );
   }
index d94a94b..25c5fdd 100644 (file)
@@ -49,17 +49,23 @@ namespace Internal
 namespace
 {
 
+// Actions
+
+const char* const ACTION_EXPAND =    "expand";
+const char* const ACTION_COLLAPSE =  "collapse";
+const char* const ACTION_TRANSFORM = "transform";
+
 BaseHandle Create()
 {
-  Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New(Toolkit::ClusterStyleStandard::ClusterStyle1);
+  Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New( Toolkit::ClusterStyleStandard::ClusterStyle1 );
   return Toolkit::Cluster::New( s );
 }
 
-TypeRegistration mType( typeid(Toolkit::Cluster), typeid(Toolkit::Control), Create );
+TypeRegistration mType( typeid( Toolkit::Cluster ), typeid( Toolkit::Control ), Create );
 
-TypeAction a1(mType, Toolkit::Cluster::ACTION_EXPAND   , &Cluster::DoAction);
-TypeAction a2(mType, Toolkit::Cluster::ACTION_COLLAPSE , &Cluster::DoAction);
-TypeAction a3(mType, Toolkit::Cluster::ACTION_TRANSFORM, &Cluster::DoAction);
+TypeAction a1( mType, ACTION_EXPAND,    &Cluster::DoAction );
+TypeAction a2( mType, ACTION_COLLAPSE,  &Cluster::DoAction );
+TypeAction a3( mType, ACTION_TRANSFORM, &Cluster::DoAction );
 
 }
 
@@ -552,25 +558,25 @@ bool Cluster::DoAction(BaseObject* object, const std::string& actionName, const
 {
   bool ret = false;
 
-  Dali::BaseHandle handle(object);
+  Dali::BaseHandle handle( object );
 
-  Toolkit::Cluster cluster = Toolkit::Cluster::DownCast(handle);
+  Toolkit::Cluster cluster = Toolkit::Cluster::DownCast( handle );
 
-  DALI_ASSERT_ALWAYS(cluster);
+  DALI_ASSERT_ALWAYS( cluster );
 
-  if(Toolkit::Cluster::ACTION_EXPAND == actionName)
+  if( 0 == strcmp( actionName.c_str(), ACTION_EXPAND ) )
   {
-    GetImpl(cluster).DoExpandAction(attributes);
+    GetImpl( cluster ).DoExpandAction( attributes );
     ret = true;
   }
-  else if(Toolkit::Cluster::ACTION_COLLAPSE == actionName)
+  else if( 0 == strcmp( actionName.c_str(), ACTION_COLLAPSE ) )
   {
-    GetImpl(cluster).DoCollapseAction(attributes);
+    GetImpl( cluster ).DoCollapseAction( attributes );
     ret = true;
   }
-  else if(Toolkit::Cluster::ACTION_TRANSFORM == actionName)
+  else if( 0 == strcmp( actionName.c_str(), ACTION_TRANSFORM ) )
   {
-    GetImpl(cluster).DoTransformAction(attributes);
+    GetImpl( cluster ).DoTransformAction( attributes );
     ret = true;
   }
 
index 8ef5ec6..3c7e78a 100644 (file)
@@ -40,15 +40,22 @@ namespace Internal
 
 namespace // to register type
 {
+
+// Actions
+
+const char* const ACTION_PUSH = "push";
+const char* const ACTION_POP =  "pop";
+
 BaseHandle Create()
 {
   return Toolkit::NavigationControl::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::NavigationControl), typeid(Toolkit::Control), Create );
+TypeRegistration mType( typeid( Toolkit::NavigationControl ), typeid( Toolkit::Control ), Create );
+
+TypeAction a1( mType, ACTION_PUSH, &NavigationControl::DoAction );
+TypeAction a2( mType, ACTION_POP, &NavigationControl::DoAction );
 
-TypeAction a1(mType, Toolkit::NavigationControl::ACTION_PUSH, &NavigationControl::DoAction);
-TypeAction a2(mType, Toolkit::NavigationControl::ACTION_POP, &NavigationControl::DoAction);
 }
 
 NavigationControl::NavigationControl()
@@ -413,38 +420,38 @@ Toolkit::NavigationControl::ItemPoppedSignalType& NavigationControl::ItemPoppedS
   return mItemPoppedSignal;
 }
 
-bool NavigationControl::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
+bool NavigationControl::DoAction( BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes )
 {
   bool ret = false;
 
-  Dali::BaseHandle handle(object);
-  Toolkit::NavigationControl control = Toolkit::NavigationControl::DownCast(handle);
-  DALI_ASSERT_ALWAYS(control);
+  Dali::BaseHandle handle( object );
+  Toolkit::NavigationControl control = Toolkit::NavigationControl::DownCast( handle );
+  DALI_ASSERT_ALWAYS( control );
 
-  if (Toolkit::NavigationControl::ACTION_PUSH == actionName)
+  if( 0 == strcmp( actionName.c_str(), ACTION_PUSH ) )
   {
-    for (PropertyValueConstIter iter = attributes.begin(); iter != attributes.end(); ++iter)
+    for( PropertyValueConstIter iter = attributes.begin(); iter != attributes.end(); ++iter )
     {
       const Property::Value& value = *iter;
 
-      DALI_ASSERT_ALWAYS(value.GetType() == Property::STRING);
-      std::string itemName = value.Get<std::string> ();
+      DALI_ASSERT_ALWAYS( value.GetType() == Property::STRING );
+      std::string itemName = value.Get<std::string>();
 
-      for (std::list<Toolkit::Page>::iterator itemsIter = GetImpl(control).mUnpushedItems.begin(); itemsIter != GetImpl(control).mUnpushedItems.end(); ++itemsIter)
+      for( std::list<Toolkit::Page>::iterator itemsIter = GetImpl( control ).mUnpushedItems.begin(); itemsIter != GetImpl( control ).mUnpushedItems.end(); ++itemsIter )
       {
         Toolkit::Page page = *itemsIter;
-        if (page.GetName() == itemName)
+        if( page.GetName() == itemName )
         {
-          GetImpl(control).PushItem(page);
+          GetImpl( control ).PushItem( page );
           ret = true;
           break;
         }
       }
     }
   }
-  else if(Toolkit::NavigationControl::ACTION_POP == actionName)
+  else if( 0 == strcmp( actionName.c_str(), ACTION_POP ) )
   {
-    GetImpl(control).PopItem();
+    GetImpl( control ).PopItem();
 
     ret = true;
   }
index fe28ec4..0cd53c9 100755 (executable)
@@ -53,8 +53,15 @@ const float POPUP_BUTTON_BG_HEIGHT = 96.f;                    ///< Height of But
 const Vector3 DEFAULT_DIALOG_SIZE = Vector3(POPUP_TITLE_WIDTH/POPUP_WIDTH, 0.5f, 0.0f);
 const Vector3 DEFAULT_BOTTOM_SIZE = Vector3(1.0f, 0.2f, 0.0f);
 
-const char* const PROPERTY_TITLE = "title";
-const char* const PROPERTY_STATE = "state";
+// Signals
+
+const char* const SIGNAL_TOUCHED_OUTSIDE = "touched-outside";
+const char* const SIGNAL_HIDDEN =          "hidden";
+
+// Properties
+
+const char* const PROPERTY_TITLE =         "title";
+const char* const PROPERTY_STATE =         "state";
 
 /**
  * The background size should be at least as big as the Dialog.
@@ -109,10 +116,10 @@ BaseHandle Create()
   return Toolkit::Popup::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::Popup), typeid(Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::Popup ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::Popup::SIGNAL_TOUCHED_OUTSIDE, &Popup::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, Toolkit::Popup::SIGNAL_HIDDEN, &Popup::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TOUCHED_OUTSIDE, &Popup::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, SIGNAL_HIDDEN, &Popup::DoConnectSignal );
 
 
 }
@@ -551,13 +558,13 @@ bool Popup::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  Toolkit::Popup popup = Toolkit::Popup::DownCast(handle);
+  Toolkit::Popup popup = Toolkit::Popup::DownCast( handle );
 
-  if( Dali::Toolkit::Popup::SIGNAL_TOUCHED_OUTSIDE == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_TOUCHED_OUTSIDE ) )
   {
     popup.OutsideTouchedSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::Popup::SIGNAL_HIDDEN == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_HIDDEN ) )
   {
     popup.HiddenSignal().Connect( tracker, functor );
   }
index a4d6819..8c8923a 100755 (executable)
@@ -121,7 +121,9 @@ BaseHandle Create()
   return Toolkit::ScrollBar::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::ScrollBar), typeid(Toolkit::ScrollComponent), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::ScrollBar ), typeid( Toolkit::ScrollComponent ), Create );
+
+const char* const SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
 
 PropertyRegistration property1( typeRegistration, "indicator-height-policy", Toolkit::ScrollBar::PROPERTY_INDICATOR_HEIGHT_POLICY, Property::STRING, &ScrollBar::SetProperty, &ScrollBar::GetProperty );
 PropertyRegistration property2( typeRegistration, "indicator-fixed-height",  Toolkit::ScrollBar::PROPERTY_INDICATOR_FIXED_HEIGHT,  Property::FLOAT,  &ScrollBar::SetProperty, &ScrollBar::GetProperty );
@@ -438,6 +440,26 @@ void ScrollBar::OnIndicatorHeightPolicyPropertySet( Property::Value propertyValu
   }
 }
 
+bool ScrollBar::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  Dali::BaseHandle handle( object );
+
+  bool connected( true );
+  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( handle );
+
+  if( 0 == strcmp( signalName.c_str(), SCROLL_POSITION_NOTIFIED_SIGNAL_NAME ) )
+  {
+    scrollBar.ScrollPositionNotifiedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
 void ScrollBar::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
 {
   Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( Dali::BaseHandle( object ) );
index 989ffa4..1d717c2 100755 (executable)
@@ -156,6 +156,17 @@ public:
    return mScrollPositionNotifiedSignal;
  }
 
+ /**
+  * Connects a callback function with the object's signals.
+  * @param[in] object The object providing the signal.
+  * @param[in] tracker Used to disconnect the signal.
+  * @param[in] signalName The signal to connect to.
+  * @param[in] functor A newly allocated FunctorDelegate.
+  * @return True if the signal was connected.
+  * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+  */
+ static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+
  // Properties
 
  /**
index 4f3d731..cf0d74e 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-index.h>
+#include <dali/public-api/object/type-registry.h>
 #include <dali/integration-api/debug.h>
 
 namespace Dali
@@ -31,6 +32,21 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+
+// Signals
+
+const char* const DOMAIN_CHANGED_SIGNAL_NAME =          "domain-changed";
+const char* const SCROLL_POSITION_CHANGED_SIGNAL_NAME = "scroll-position-changed";
+
+TypeRegistration typeRegistration( typeid( Toolkit::ScrollConnector ), typeid( Dali::BaseHandle ), NULL );
+
+SignalConnectorType signalConnector1( typeRegistration, DOMAIN_CHANGED_SIGNAL_NAME , &ScrollConnector::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, SCROLL_POSITION_CHANGED_SIGNAL_NAME , &ScrollConnector::DoConnectSignal );
+
+}
+
 const Property::Index ScrollConnector::SCROLL_POSITION = Dali::PROPERTY_CUSTOM_START_INDEX;
 const Property::Index ScrollConnector::OVERSHOOT       = Dali::PROPERTY_CUSTOM_START_INDEX + 1;
 
@@ -54,6 +70,30 @@ void ScrollConnector::SetScrollPosition( float position )
   mScrollPositionChangedSignal.Emit( position );
 }
 
+bool ScrollConnector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  Dali::BaseHandle handle( object );
+
+  bool connected( true );
+  Toolkit::ScrollConnector scrollConnector = Toolkit::ScrollConnector::DownCast( handle );
+
+  if( 0 == strcmp( signalName.c_str(), DOMAIN_CHANGED_SIGNAL_NAME ) )
+  {
+    scrollConnector.DomainChangedSignal().Connect( tracker, functor );
+  }
+  else if( 0 == strcmp( signalName.c_str(), SCROLL_POSITION_CHANGED_SIGNAL_NAME ) )
+  {
+    scrollConnector.ScrollPositionChangedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
 ScrollConnector::ScrollConnector()
 : mMinLimit( 0.0f ),
   mMaxLimit( 0.0f ),
index f9a201e..8cd176f 100644 (file)
@@ -120,6 +120,17 @@ public:
     return mScrollPositionObject;
   }
 
+  /**
+   * Connects a callback function with the object's signals.
+   * @param[in] object The object providing the signal.
+   * @param[in] tracker Used to disconnect the signal.
+   * @param[in] signalName The signal to connect to.
+   * @param[in] functor A newly allocated FunctorDelegate.
+   * @return True if the signal was connected.
+   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+   */
+  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+
 private:
 
   /**
index c6cc755..4f49d70 100644 (file)
@@ -52,6 +52,10 @@ using namespace Dali;
 namespace
 {
 
+// Signals
+
+const char* const SIGNAL_SNAP_STARTED = "snap-started";
+
 const int DEFAULT_REFRESH_INTERVAL_MILLISECONDS = 50;                                     ///< Refresh rate TODO: Animation should have an update signal (and see item-view-impl)
 const Vector2 DEFAULT_MIN_FLICK_DISTANCE(30.0f, 30.0f);                                   ///< minimum distance for pan before flick allowed
 const float DEFAULT_MIN_FLICK_SPEED_THRESHOLD(500.0f);                          ///< Minimum pan speed required for flick in pixels/s
@@ -522,9 +526,9 @@ BaseHandle Create()
   return Toolkit::ScrollView::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::ScrollView), typeid(Toolkit::Scrollable), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::ScrollView ), typeid( Toolkit::Scrollable ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::ScrollView::SIGNAL_SNAP_STARTED, &ScrollView::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_SNAP_STARTED, &ScrollView::DoConnectSignal );
 
 }
 
@@ -1843,7 +1847,7 @@ bool ScrollView::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface
   bool connected( true );
   Toolkit::ScrollView view = Toolkit::ScrollView::DownCast( handle );
 
-  if( Toolkit::ScrollView::SIGNAL_SNAP_STARTED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_SNAP_STARTED ) )
   {
     view.SnapStartedSignal().Connect( tracker, functor );
   }
index 36e713f..64fa2b9 100644 (file)
@@ -46,18 +46,25 @@ namespace
 const Vector4 DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.25f);
 const float DEFAULT_OVERSHOOT_ANIMATION_SPEED(120.0f); // 120 pixels per second
 
+// Signals
+
+const char* const SIGNAL_SCROLL_STARTED =   "scroll-started";
+const char* const SIGNAL_SCROLL_COMPLETED = "scroll-completed";
+const char* const SIGNAL_SCROLL_UPDATED =   "scroll-updated";
+const char* const SIGNAL_SCROLL_CLAMPED =   "scroll-clamped";
+
 BaseHandle Create()
 {
   // empty handle as we cannot create Scrollable (but type registered for scroll signal)
   return BaseHandle();
 }
 
-TypeRegistration mType( typeid(Toolkit::Scrollable), typeid(Toolkit::Control), Create );
+TypeRegistration mType( typeid( Toolkit::Scrollable ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType s1(mType, Toolkit::Scrollable::SIGNAL_SCROLL_STARTED,   &Scrollable::DoConnectSignal);
-SignalConnectorType s2(mType, Toolkit::Scrollable::SIGNAL_SCROLL_COMPLETED, &Scrollable::DoConnectSignal);
-SignalConnectorType s3(mType, Toolkit::Scrollable::SIGNAL_SCROLL_UPDATED,   &Scrollable::DoConnectSignal);
-SignalConnectorType s4(mType, Toolkit::Scrollable::SIGNAL_SCROLL_CLAMPED,   &Scrollable::DoConnectSignal);
+SignalConnectorType s1( mType, SIGNAL_SCROLL_STARTED,   &Scrollable::DoConnectSignal );
+SignalConnectorType s2( mType, SIGNAL_SCROLL_COMPLETED, &Scrollable::DoConnectSignal );
+SignalConnectorType s3( mType, SIGNAL_SCROLL_UPDATED,   &Scrollable::DoConnectSignal );
+SignalConnectorType s4( mType, SIGNAL_SCROLL_CLAMPED,   &Scrollable::DoConnectSignal );
 
 PropertyRegistration property1( mType,
                                 "overshoot-effect-color",
@@ -216,19 +223,19 @@ bool Scrollable::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface
   bool connected( true );
   Toolkit::Scrollable scrollable = Toolkit::Scrollable::DownCast( handle );
 
-  if( Toolkit::Scrollable::SIGNAL_SCROLL_STARTED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_SCROLL_STARTED ) )
   {
     scrollable.ScrollStartedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::Scrollable::SIGNAL_SCROLL_UPDATED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_SCROLL_UPDATED ) )
   {
     scrollable.ScrollUpdatedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::Scrollable::SIGNAL_SCROLL_COMPLETED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_SCROLL_COMPLETED ) )
   {
     scrollable.ScrollCompletedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::Scrollable::SIGNAL_SCROLL_CLAMPED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_SCROLL_CLAMPED ) )
   {
     scrollable.ScrollClampedSignal().Connect( tracker, functor );
   }
index a221492..c44c9af 100755 (executable)
@@ -116,15 +116,20 @@ const bool DEFAULT_SHOW_VALUE = true;
 const bool DEFAULT_ENABLED = true;
 const bool DEFAULT_SNAP_TO_MARKS = false;
 
+// Signals
+
+const char* const SIGNAL_VALUE_CHANGED = "value-changed";
+const char* const SIGNAL_MARK =          "mark";
+
 BaseHandle Create()
 {
   return Dali::Toolkit::Slider::New();
 }
 
-TypeRegistration typeRegistration( typeid(Dali::Toolkit::Slider), typeid(Dali::Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Dali::Toolkit::Slider ), typeid( Dali::Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::Slider::SIGNAL_VALUE_CHANGED, &Toolkit::Internal::Slider::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, Toolkit::Slider::SIGNAL_MARK, &Toolkit::Internal::Slider::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_VALUE_CHANGED, &Toolkit::Internal::Slider::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, SIGNAL_MARK, &Toolkit::Internal::Slider::DoConnectSignal );
 
 PropertyRegistration property1( typeRegistration, "lower-bound",  Toolkit::Slider::LOWER_BOUND_PROPERTY, Property::FLOAT, &Slider::SetProperty, &Slider::GetProperty );
 PropertyRegistration property2( typeRegistration, "upper-bound",  Toolkit::Slider::UPPER_BOUND_PROPERTY, Property::FLOAT, &Slider::SetProperty, &Slider::GetProperty );
@@ -1019,8 +1024,7 @@ float Slider::GetMarkTolerance() const
   return mMarkTolerance;
 }
 
-// static class method to support script connecting signals
-
+// Static class method to support script connecting signals
 bool Slider::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   Dali::BaseHandle handle( object );
@@ -1028,11 +1032,11 @@ bool Slider::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tr
   bool connected = true;
   Toolkit::Slider slider = Toolkit::Slider::DownCast( handle );
 
-  if( signalName == Dali::Toolkit::Slider::SIGNAL_VALUE_CHANGED )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_VALUE_CHANGED ) )
   {
     slider.ValueChangedSignal().Connect( tracker, functor );
   }
-  else if( signalName == Dali::Toolkit::Slider::SIGNAL_MARK )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_MARK ) )
   {
     slider.MarkSignal().Connect( tracker, functor );
   }
index c9d5b83..84f8fc2 100644 (file)
@@ -198,19 +198,28 @@ namespace Internal
 namespace
 {
 
+// Signals
+
+const char* const SIGNAL_START_INPUT =                  "start-input";
+const char* const SIGNAL_END_INPUT =                    "end-input";
+const char* const SIGNAL_STYLE_CHANGED =                "style-changed";
+const char* const SIGNAL_MAX_INPUT_CHARACTERS_REACHED = "max-input-characters-reached";
+const char* const SIGNAL_TOOLBAR_DISPLAYED =            "toolbar-displayed";
+const char* const SIGNAL_TEXT_EXCEED_BOUNDARIES =       "text-exceed-boundaries";
+
 BaseHandle Create()
 {
   return Toolkit::TextInput::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::TextInput), typeid(Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::TextInput ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::TextInput::SIGNAL_START_INPUT,                  &TextInput::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, Toolkit::TextInput::SIGNAL_END_INPUT,                    &TextInput::DoConnectSignal );
-SignalConnectorType signalConnector3( typeRegistration, Toolkit::TextInput::SIGNAL_STYLE_CHANGED,                &TextInput::DoConnectSignal );
-SignalConnectorType signalConnector4( typeRegistration, Toolkit::TextInput::SIGNAL_MAX_INPUT_CHARACTERS_REACHED, &TextInput::DoConnectSignal );
-SignalConnectorType signalConnector5( typeRegistration, Toolkit::TextInput::SIGNAL_TOOLBAR_DISPLAYED,            &TextInput::DoConnectSignal );
-SignalConnectorType signalConnector6( typeRegistration, Toolkit::TextInput::SIGNAL_TEXT_EXCEED_BOUNDARIES,       &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_START_INPUT,                  &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, SIGNAL_END_INPUT,                    &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector3( typeRegistration, SIGNAL_STYLE_CHANGED,                &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector4( typeRegistration, SIGNAL_MAX_INPUT_CHARACTERS_REACHED, &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector5( typeRegistration, SIGNAL_TOOLBAR_DISPLAYED,            &TextInput::DoConnectSignal );
+SignalConnectorType signalConnector6( typeRegistration, SIGNAL_TEXT_EXCEED_BOUNDARIES,       &TextInput::DoConnectSignal );
 
 }
 
@@ -579,25 +588,29 @@ bool TextInput::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface*
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  Toolkit::TextInput textInput = Toolkit::TextInput::DownCast(handle);
+  Toolkit::TextInput textInput = Toolkit::TextInput::DownCast( handle );
 
-  if( Toolkit::TextInput::SIGNAL_START_INPUT == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_START_INPUT ) )
   {
     textInput.InputStartedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::TextInput::SIGNAL_END_INPUT == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_END_INPUT ) )
   {
     textInput.InputFinishedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::TextInput::SIGNAL_STYLE_CHANGED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_STYLE_CHANGED ) )
   {
     textInput.StyleChangedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::TextInput::SIGNAL_MAX_INPUT_CHARACTERS_REACHED == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_MAX_INPUT_CHARACTERS_REACHED ) )
   {
     textInput.MaxInputCharactersReachedSignal().Connect( tracker, functor );
   }
-  else if( Toolkit::TextInput::SIGNAL_TEXT_EXCEED_BOUNDARIES == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_TOOLBAR_DISPLAYED ) )
+  {
+    textInput.CutAndPasteToolBarDisplayedSignal().Connect( tracker, functor );
+  }
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_TEXT_EXCEED_BOUNDARIES ) )
   {
     textInput.InputTextExceedBoundariesSignal().Connect( tracker, functor );
   }
index 3ad818f..25480d0 100644 (file)
@@ -18,8 +18,8 @@
 // EXTERNAL INCLUDES
 #include <libintl.h>
 #include <dali/public-api/animation/constraints.h>
-#include <dali/integration-api/debug.h>
 #include <dali/public-api/images/resource-image.h>
+#include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/text-input/text-input-popup-impl.h>
@@ -101,9 +101,16 @@ namespace Toolkit
 namespace Internal
 {
 
-const char* const TextInputPopup::SIGNAL_PRESSED = "pressed";
-const char* const TextInputPopup::SIGNAL_HIDE_FINISHED = "hide-finished";
-const char* const TextInputPopup::SIGNAL_SHOW_FINISHED = "show-finished";
+namespace
+{
+
+// Signals
+
+const char* const SIGNAL_PRESSED =       "pressed";
+const char* const SIGNAL_HIDE_FINISHED = "hide-finished";
+const char* const SIGNAL_SHOW_FINISHED = "show-finished";
+
+}
 
 const char* const TextInputPopup::OPTION_SELECT_WORD = "option-select_word";                       // "Select Word" popup option.
 const char* const TextInputPopup::OPTION_SELECT_ALL("option-select_all");                          // "Select All" popup option.
@@ -895,12 +902,12 @@ TextInputPopup::PressedSignalType& TextInputPopup::PressedSignal()
   return mPressedSignal;
 }
 
-TextInputPopup::HideFinishedSignalType& TextInputPopup::HideFinishedSignal()
+TextInputPopup::VisibilityChangeFinishedSignalType& TextInputPopup::HideFinishedSignal()
 {
   return mHideFinishedSignal;
 }
 
-TextInputPopup::ShowFinishedSignalType& TextInputPopup::ShowFinishedSignal()
+TextInputPopup::VisibilityChangeFinishedSignalType& TextInputPopup::ShowFinishedSignal()
 {
   return mShowFinishedSignal;
 }
index c7f0fc2..2f9a91d 100644 (file)
@@ -79,19 +79,11 @@ public:
   static const char* const OPTION_PASTE;
   static const char* const OPTION_CLIPBOARD;
 
-  // Signal names
-  static const char* const SIGNAL_PRESSED;
-  static const char* const SIGNAL_HIDE_FINISHED;
-  static const char* const SIGNAL_SHOW_FINISHED;
-
   // Popup Button Pressed
   typedef Signal< bool( Toolkit::Button ) > PressedSignalType;
 
-  // Popup Hide Finished
-  typedef Signal< void( TextInputPopup& ) > HideFinishedSignalType;
-
-  // Popup Show Finished
-  typedef Signal< void( TextInputPopup& ) > ShowFinishedSignalType;
+  // Popup Hide / Show Finished
+  typedef Signal< void( TextInputPopup& ) > VisibilityChangeFinishedSignalType;
 
   /**
    * Signal emitted when the button is touched.
@@ -102,13 +94,13 @@ public:
    * Signal emitted when popup is completely hidden
    * @note Only occurs after a Show() call with animation enabled.
    */
-  HideFinishedSignalType& HideFinishedSignal();
+  VisibilityChangeFinishedSignalType& HideFinishedSignal();
 
   /**
    * Signal emitted when popup is completely shown
    * @note Only occurs after a Hide() call with animation enabled.
    */
-  ShowFinishedSignalType& ShowFinishedSignal();
+  VisibilityChangeFinishedSignalType& ShowFinishedSignal();
 
 public:
 
@@ -463,8 +455,8 @@ private:
   std::size_t mClipboardOptionPriority;  // Position of Clipboard button
 
   PressedSignalType mPressedSignal;              ///< Signal emitted when a button within the popup is pressed.
-  HideFinishedSignalType mHideFinishedSignal;    ///< Signal emitted when popup is completely hidden
-  ShowFinishedSignalType mShowFinishedSignal;    ///< Signal emitted when popup is completely shown
+  VisibilityChangeFinishedSignalType mHideFinishedSignal; ///< Signal emitted when popup is completely hidden
+  VisibilityChangeFinishedSignalType mShowFinishedSignal; ///< Signal emitted when popup is completely shown
 
 };
 
index 29c79ea..92f6bad 100644 (file)
@@ -52,19 +52,11 @@ public:
     StateShown
   };
 
-  // Signal names
-  static const char* const SIGNAL_PRESSED;
-  static const char* const SIGNAL_HIDE_FINISHED;
-  static const char* const SIGNAL_SHOW_FINISHED;
-
   // Popup Button Pressed
   typedef Signal< bool( Toolkit::Button ) > PopUpPressedSignal;
 
   // Popup Hide Finished
-  typedef Signal< void( TextInputPopupNew& ) > PopUpHideFinishedSignal;
-
-  // Popup Show Finished
-  typedef Signal< void( TextInputPopupNew& ) > PopUpShowFinishedSignal;
+  typedef Signal< void( TextInputPopupNew& ) > PopUpVisibilityChangeFinishedSignal;
 
   /**
    * Signal emitted when the button is touched.
@@ -75,13 +67,13 @@ public:
    * Signal emitted when popup is completely hidden
    * @note Only occurs after a Show() call with animation enabled.
    */
-  PopUpHideFinishedSignal& HideFinishedSignal() {return mHideFinishedSignal;}
+  PopUpVisibilityChangeFinishedSignal& HideFinishedSignal() { return mHideFinishedSignal; }
 
   /**
    * Signal emitted when popup is completely shown
    * @note Only occurs after a Hide() call with animation enabled.
    */
-  PopUpShowFinishedSignal& ShowFinishedSignal() {return mShowFinishedSignal;}
+  PopUpVisibilityChangeFinishedSignal& ShowFinishedSignal() { return mShowFinishedSignal; }
 
 public:
 
@@ -261,9 +253,9 @@ private:
   ActorContainer mDividerContainer;                   // List of dividers added to popup.
   Animation mAnimation;                               // Popup Hide/Show animation.
 
-  PopUpPressedSignal mPressedSignal;                     // Signal emitted when a button within the popup is pressed.
-  PopUpHideFinishedSignal mHideFinishedSignal;           // Signal emitted when popup is completely hidden
-  PopUpShowFinishedSignal mShowFinishedSignal;           // Signal emitted when popup is completely shown
+  PopUpPressedSignal mPressedSignal;                  // Signal emitted when a button within the popup is pressed.
+  PopUpVisibilityChangeFinishedSignal mHideFinishedSignal; // Signal emitted when popup is completely hidden
+  PopUpVisibilityChangeFinishedSignal mShowFinishedSignal; // Signal emitted when popup is completely shown
 
 };
 
index 01566d6..76d4539 100644 (file)
@@ -55,6 +55,10 @@ namespace Internal
 namespace
 {
 
+// Signals
+
+const char* const SIGNAL_TEXT_SCROLLED = "scrolled";
+
 const char* MULTILINE_POLICY_NAME[] = {"SplitByNewLineChar", "SplitByWord", "SplitByChar"};
 const char* EXCEED_POLICY_NAME[] = {"Original", "Truncate", "Fade", "Split","ShrinkToFit","EllipsizeEnd"};
 const char* LINE_JUSTIFICATION_NAME[] = {"Left","Center","Right","Justified"};
@@ -68,9 +72,9 @@ BaseHandle Create()
   return Toolkit::TextView::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::TextView), typeid(Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::TextView ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::TextView::SIGNAL_TEXT_SCROLLED , &TextView::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TEXT_SCROLLED , &TextView::DoConnectSignal );
 
 PropertyRegistration property1( typeRegistration,  "markup-enabled",       Toolkit::TextView::PROPERTY_MARKUP_ENABLED,       Property::BOOLEAN, &TextView::SetProperty, &TextView::GetProperty );
 PropertyRegistration property2( typeRegistration,  "text",                 Toolkit::TextView::PROPERTY_TEXT,                 Property::STRING,  &TextView::SetProperty, &TextView::GetProperty );
@@ -910,9 +914,9 @@ bool TextView::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface*
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  Toolkit::TextView textView = Toolkit::TextView::DownCast(handle);
+  Toolkit::TextView textView = Toolkit::TextView::DownCast( handle );
 
-  if( Dali::Toolkit::TextView::SIGNAL_TEXT_SCROLLED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_TEXT_SCROLLED ) )
   {
     textView.ScrolledSignal().Connect( tracker, functor );
   }
index 6c374c0..9e4eb86 100644 (file)
@@ -37,14 +37,18 @@ namespace Internal
 namespace // to register type
 {
 
+// Signals
+
+const char* const SIGNAL_ORIENTATION_ANIMATION_START = "orientation-animation-start";
+
 BaseHandle Create()
 {
   return Toolkit::View::New();
 }
 
-TypeRegistration typeRegistration( typeid(Toolkit::View), typeid(Toolkit::Control), Create );
+TypeRegistration typeRegistration( typeid( Toolkit::View ), typeid( Toolkit::Control ), Create );
 
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::View::SIGNAL_ORIENTATION_ANIMATION_START , &View::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_ORIENTATION_ANIMATION_START , &View::DoConnectSignal );
 
 }
 
@@ -251,7 +255,7 @@ bool View::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* trac
   bool connected( true );
   Toolkit::View view = Toolkit::View::DownCast(handle);
 
-  if( Toolkit::View::SIGNAL_ORIENTATION_ANIMATION_START == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_ORIENTATION_ANIMATION_START ) )
   {
     view.OrientationAnimationStartedSignal().Connect( tracker, functor );
   }
index 1fcc519..4173e59 100644 (file)
@@ -44,12 +44,18 @@ namespace Internal
 namespace // unnamed namespace
 {
 
+// Signals
+
+const char* const SIGNAL_FOCUS_CHANGED =           "focus-changed";
+const char* const SIGNAL_FOCUS_OVERSHOT =          "focus-overshot";
+const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED = "focused-actor-activated";
+
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FOCUS_MANAGER");
 #endif
 
-const char * const ACTOR_FOCUSABLE("focusable");
-const char * const IS_FOCUS_GROUP("is-focus-group");
+const char* const ACTOR_FOCUSABLE("focusable");
+const char* const IS_FOCUS_GROUP("is-focus-group");
 
 const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "B16-8_TTS_focus.png";
 const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
@@ -969,17 +975,17 @@ bool FocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterfa
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  FocusManager* manager = dynamic_cast<FocusManager*>(object);
+  FocusManager* manager = dynamic_cast<FocusManager*>( object );
 
-  if( Dali::Toolkit::FocusManager::SIGNAL_FOCUS_CHANGED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
   {
     manager->FocusChangedSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::FocusManager::SIGNAL_FOCUS_OVERSHOT == signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_OVERSHOT ) )
   {
     manager->FocusOvershotSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::FocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED== signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ACTIVATED ) )
   {
     manager->FocusedActorActivatedSignal().Connect( tracker, functor );
   }
index c9a3d98..05208e3 100644 (file)
@@ -47,6 +47,13 @@ namespace Internal
 namespace // unnamed namespace
 {
 
+// Signals
+
+const char* const SIGNAL_PRE_FOCUS_CHANGE =        "keyboard-pre-focus-change";
+const char* const SIGNAL_FOCUS_CHANGED =           "keyboard-focus-changed";
+const char* const SIGNAL_FOCUS_GROUP_CHANGED =     "keyboard-focus-group-changed";
+const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED = "keyboard-focused-actor-activated";
+
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_KEYBOARD_FOCUS_MANAGER");
 #endif
@@ -73,8 +80,14 @@ BaseHandle Create()
 
   return handle;
 }
+
 TypeRegistration KEYBOARD_FOCUS_MANAGER_TYPE( typeid(Dali::Toolkit::KeyboardFocusManager), typeid(Dali::BaseHandle), Create, true /* Create instance at startup */ );
 
+SignalConnectorType signalConnector1( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_PRE_FOCUS_CHANGE , &KeyboardFocusManager::DoConnectSignal );
+SignalConnectorType signalConnector2( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUS_CHANGED , &KeyboardFocusManager::DoConnectSignal );
+SignalConnectorType signalConnector3( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUS_GROUP_CHANGED , &KeyboardFocusManager::DoConnectSignal );
+SignalConnectorType signalConnector4( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUSED_ACTOR_ACTIVATED , &KeyboardFocusManager::DoConnectSignal );
+
 } // unnamed namespace
 
 Toolkit::KeyboardFocusManager KeyboardFocusManager::Get()
@@ -718,21 +731,21 @@ bool KeyboardFocusManager::DoConnectSignal( BaseObject* object, ConnectionTracke
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  KeyboardFocusManager* manager = dynamic_cast<KeyboardFocusManager*>(object);
+  KeyboardFocusManager* manager = dynamic_cast<KeyboardFocusManager*>( object );
 
-  if( Dali::Toolkit::KeyboardFocusManager::SIGNAL_PRE_FOCUS_CHANGE == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_PRE_FOCUS_CHANGE ) )
   {
     manager->PreFocusChangeSignal().Connect( tracker, functor );
   }
-  if( Dali::Toolkit::KeyboardFocusManager::SIGNAL_FOCUS_CHANGED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
   {
     manager->FocusChangedSignal().Connect( tracker, functor );
   }
-  if( Dali::Toolkit::KeyboardFocusManager::SIGNAL_FOCUS_GROUP_CHANGED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_GROUP_CHANGED ) )
   {
     manager->FocusGroupChangedSignal().Connect( tracker, functor );
   }
-  else if( Dali::Toolkit::KeyboardFocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED== signalName )
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ACTIVATED ) )
   {
     manager->FocusedActorActivatedSignal().Connect( tracker, functor );
   }
index dc8cefa..5d7d4be 100644 (file)
@@ -35,6 +35,16 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+
+// Signals
+
+const char* const SIGNAL_KEY_INPUT_FOCUS_CHANGED = "key-input-focus-changed";
+const char* const SIGNAL_UNHANDLED_KEY_EVENT =     "unhandled-key-event";
+
+}
+
 KeyInputFocusManager::KeyInputFocusManager()
 : mSlotDelegate( this )
 {
@@ -220,12 +230,16 @@ bool KeyInputFocusManager::DoConnectSignal( BaseObject* object, ConnectionTracke
   Dali::BaseHandle handle( object );
 
   bool connected( true );
-  KeyInputFocusManager* manager = dynamic_cast<KeyInputFocusManager*>(object);
+  KeyInputFocusManager* manager = dynamic_cast<KeyInputFocusManager*>( object );
 
-  if( Dali::Toolkit::KeyInputFocusManager::SIGNAL_KEY_INPUT_FOCUS_CHANGED == signalName )
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_INPUT_FOCUS_CHANGED ) )
   {
     manager->KeyInputFocusChangedSignal().Connect( tracker, functor );
   }
+  else if( 0 == strcmp( signalName.c_str(), SIGNAL_UNHANDLED_KEY_EVENT ) )
+  {
+    manager->UnhandledKeyEventSignal().Connect( tracker, functor );
+  }
   else
   {
     // signalName does not match any signal
index 91fcfa7..1d35050 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/image-attributes.h>
+#include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
 namespace Dali
@@ -32,6 +33,19 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+
+// Signals
+
+const char* const SIGNAL_TRANSITION_COMPLETED = "transition-completed";
+
+TypeRegistration typeRegistration( typeid( Toolkit::CubeTransitionEffect ), typeid( Dali::BaseHandle ), NULL );
+
+SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TRANSITION_COMPLETED , &CubeTransitionEffect::DoConnectSignal );
+
+}
+
 const Vector4 CubeTransitionEffect::FULL_BRIGHTNESS( 1.0f, 1.0f, 1.0f, 1.0f );
 const Vector4 CubeTransitionEffect::HALF_BRIGHTNESS( 0.5f, 0.5f, 0.5f, 1.0f );
 
@@ -356,6 +370,26 @@ Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& CubeTransitionEffe
   return mTransitionCompletedSignal;
 }
 
+bool CubeTransitionEffect::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  Dali::BaseHandle handle( object );
+
+  bool connected( true );
+  Toolkit::CubeTransitionEffect cubeTransitionEffect = Toolkit::CubeTransitionEffect::DownCast( handle );
+
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_TRANSITION_COMPLETED ) )
+  {
+    cubeTransitionEffect.TransitionCompletedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
index ec21191..57fd205 100644 (file)
@@ -210,6 +210,17 @@ public: //Signal
    */
   Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& TransitionCompletedSignal();
 
+  /**
+   * Connects a callback function with the object's signals.
+   * @param[in] object The object providing the signal.
+   * @param[in] tracker Used to disconnect the signal.
+   * @param[in] signalName The signal to connect to.
+   * @param[in] functor A newly allocated FunctorDelegate.
+   * @return True if the signal was connected.
+   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+   */
+  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+
 protected:
 
   /**
index 3b251da..ab953bf 100644 (file)
@@ -29,13 +29,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const Button::SIGNAL_PRESSED = "pressed";
-const char* const Button::SIGNAL_RELEASED = "released";
-const char* const Button::SIGNAL_CLICKED = "clicked";
-const char* const Button::SIGNAL_STATE_CHANGED = "state-changed";
-
-const char* const Button::ACTION_BUTTON_CLICK = "button-click";
-
 Button::Button()
 {}
 
index 2078413..0a2780a 100644 (file)
@@ -41,20 +41,24 @@ class Button;
  * point doesn't leave the boundary of the button.
  *
  * When the \e disabled property is set to \e true, no signal is emitted.
+ *
+ * Signals
+ * | %Signal Name      | Method                      |
+ * |-------------------|-----------------------------|
+ * | pressed           | @ref PressedSignal()        |
+ * | released          | @ref ReleasedSignal()       |
+ * | clicked           | @ref ClickedSignal()        |
+ * | state-changed     | @ref StateChangedSignal()   |
+ *
+ * Actions
+ * | %Action Name      | %Button method called       |
+ * |-------------------|-----------------------------|
+ * | button-click      | %DoClickAction()            |
  */
 class DALI_IMPORT_API Button : public Control
 {
 public:
 
-  // Signal Names
-  static const char* const SIGNAL_PRESSED;       ///< name "pressed"
-  static const char* const SIGNAL_RELEASED;      ///< name "released"
-  static const char* const SIGNAL_CLICKED;       ///< name "clicked"
-  static const char* const SIGNAL_STATE_CHANGED; ///< name "state-changed"
-
-  //Action Names
-  static const char* const ACTION_BUTTON_CLICK; ///< name "button-click"
-
   // Properties
   static const Property::Index PROPERTY_DISABLED;                     ///< name "disabled",                     @see SetDisabled(),                  type BOOLEAN
   static const Property::Index PROPERTY_AUTO_REPEATING;               ///< name "auto-repeating",               @see SetAutoRepeating(),             type BOOLEAN
index 742ad51..aab2765 100644 (file)
@@ -35,10 +35,6 @@ namespace Toolkit
 
 const std::string Cluster::CLUSTER_ACTOR_DEPTH( "cluster-actor-depth" );
 
-const char* const Cluster::ACTION_EXPAND = "expand";
-const char* const Cluster::ACTION_COLLAPSE = "collapse";
-const char* const Cluster::ACTION_TRANSFORM = "transform";
-
 Cluster::Cluster()
 {
 }
index 6e7033c..f8c845a 100644 (file)
@@ -35,7 +35,14 @@ class Cluster;
 class ClusterStyle;
 
 /**
- * Cluster is a container of grouped actors positioned in different cluster styles.
+ * @brief Cluster is a container of grouped actors positioned in different cluster styles.
+ *
+ * Actions
+ * | %Action Name              | Method                    |
+ * |---------------------------|---------------------------|
+ * | expand                    | DoExpandAction()          |
+ * | collapse                  | DoCollapseAction()        |
+ * | transform                 | DoTransformAction()       |
  */
 class DALI_IMPORT_API Cluster : public Control
 {
@@ -45,11 +52,6 @@ public:
 
   static const std::string CLUSTER_ACTOR_DEPTH;                           ///< Property, name "cluster-actor-depth",      type FLOAT
 
-  //Action Names
-  static const char* const ACTION_EXPAND;
-  static const char* const ACTION_COLLAPSE;
-  static const char* const ACTION_TRANSFORM;
-
 public:
 
   /**
index d02a771..f686766 100644 (file)
@@ -53,6 +53,18 @@ const Property::Index Control::PROPERTY_KEY_INPUT_FOCUS       = Internal::Contro
 namespace
 {
 
+// Signals
+
+const char* const SIGNAL_KEY_EVENT =    "key-event";
+const char* const SIGNAL_TAPPED =       "tapped";
+const char* const SIGNAL_PANNED =       "panned";
+const char* const SIGNAL_PINCHED =      "pinched";
+const char* const SIGNAL_LONG_PRESSED = "long-pressed";
+
+// Actions
+
+const char* const ACTION_CONTROL_ACTIVATED = "control-activated";
+
 const Scripting::StringEnum< Control::SizePolicy > SIZE_POLICY_STRING_TABLE[] =
 {
   { "FIXED",      Control::Fixed      },
@@ -80,13 +92,13 @@ TypeRegistration CONTROL_TYPE( typeid(Control), typeid(CustomActor), Create );
 
 // Property Registration after Internal::Control::Impl definition below
 
-TypeAction ACTION_TYPE_1( CONTROL_TYPE, Toolkit::Control::ACTION_CONTROL_ACTIVATED, &Internal::Control::DoAction );
+TypeAction ACTION_TYPE_1( CONTROL_TYPE, ACTION_CONTROL_ACTIVATED, &Internal::Control::DoAction );
 
-SignalConnectorType SIGNAL_CONNECTOR_1( CONTROL_TYPE, Toolkit::Control::SIGNAL_KEY_EVENT,     &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_2( CONTROL_TYPE, Toolkit::Control::SIGNAL_TAPPED,        &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_3( CONTROL_TYPE, Toolkit::Control::SIGNAL_PANNED,        &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_4( CONTROL_TYPE, Toolkit::Control::SIGNAL_PINCHED,       &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_5( CONTROL_TYPE, Toolkit::Control::SIGNAL_LONG_PRESSED,  &Internal::Control::DoConnectSignal );
+SignalConnectorType SIGNAL_CONNECTOR_1( CONTROL_TYPE, SIGNAL_KEY_EVENT,     &Internal::Control::DoConnectSignal );
+SignalConnectorType SIGNAL_CONNECTOR_2( CONTROL_TYPE, SIGNAL_TAPPED,        &Internal::Control::DoConnectSignal );
+SignalConnectorType SIGNAL_CONNECTOR_3( CONTROL_TYPE, SIGNAL_PANNED,        &Internal::Control::DoConnectSignal );
+SignalConnectorType SIGNAL_CONNECTOR_4( CONTROL_TYPE, SIGNAL_PINCHED,       &Internal::Control::DoConnectSignal );
+SignalConnectorType SIGNAL_CONNECTOR_5( CONTROL_TYPE, SIGNAL_LONG_PRESSED,  &Internal::Control::DoConnectSignal );
 
 /**
  * Structure which holds information about the background of a control
@@ -1001,7 +1013,7 @@ bool Control::DoAction(BaseObject* object, const std::string& actionName, const
 {
   bool ret = false;
 
-  if( object && (actionName == Toolkit::Control::ACTION_CONTROL_ACTIVATED) )
+  if( object && ( 0 == strcmp( actionName.c_str(), ACTION_CONTROL_ACTIVATED ) ) )
   {
     Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
     if( control )
@@ -1019,32 +1031,32 @@ bool Control::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* t
   Dali::BaseHandle handle( object );
 
   bool connected( false );
-  Toolkit::Control control = Toolkit::Control::DownCast(handle);
+  Toolkit::Control control = Toolkit::Control::DownCast( handle );
   if ( control )
   {
     Control& controlImpl( control.GetImplementation() );
     connected = true;
 
-    if ( Toolkit::Control::SIGNAL_KEY_EVENT == signalName )
+    if ( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_EVENT ) )
     {
       controlImpl.KeyEventSignal().Connect( tracker, functor );
     }
-    else if( Toolkit::Control::SIGNAL_TAPPED == signalName )
+    else if( 0 == strcmp( signalName.c_str(), SIGNAL_TAPPED ) )
     {
       controlImpl.EnableGestureDetection( Gesture::Tap );
       controlImpl.GetTapGestureDetector().DetectedSignal().Connect( tracker, functor );
     }
-    else if( Toolkit::Control::SIGNAL_PANNED == signalName )
+    else if( 0 == strcmp( signalName.c_str(), SIGNAL_PANNED ) )
     {
       controlImpl.EnableGestureDetection( Gesture::Pan );
       controlImpl.GetPanGestureDetector().DetectedSignal().Connect( tracker, functor );
     }
-    else if( Toolkit::Control::SIGNAL_PINCHED == signalName )
+    else if( 0 == strcmp( signalName.c_str(), SIGNAL_PINCHED ) )
     {
       controlImpl.EnableGestureDetection( Gesture::Pinch );
       controlImpl.GetPinchGestureDetector().DetectedSignal().Connect( tracker, functor );
     }
-    else if( Toolkit::Control::SIGNAL_LONG_PRESSED == signalName )
+    else if( 0 == strcmp( signalName.c_str(), SIGNAL_LONG_PRESSED ) )
     {
       controlImpl.EnableGestureDetection( Gesture::LongPress );
       controlImpl.GetLongPressGestureDetector().DetectedSignal().Connect( tracker, functor );
index 77cb876..6f75dfc 100644 (file)
@@ -24,14 +24,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const Control::ACTION_CONTROL_ACTIVATED = "control-activated";
-
-const char* const Control::SIGNAL_KEY_EVENT = "key-event";
-const char* const Control::SIGNAL_TAPPED = "tapped";
-const char* const Control::SIGNAL_PANNED = "panned";
-const char* const Control::SIGNAL_PINCHED = "pinched";
-const char* const Control::SIGNAL_LONG_PRESSED = "long-pressed";
-
 Control Control::New()
 {
   return Internal::Control::New();
index 1911030..01c1c75 100644 (file)
@@ -46,6 +46,20 @@ class Control;
  *
  * The implementation of the control must be supplied; see Internal::Control for more details.
  * @see Internal::Control
+ *
+ * Signals
+ * | %Signal Name      | Method                                              |
+ * |-------------------|-----------------------------------------------------|
+ * | key-event         | @ref KeyEventSignal()                               |
+ * | tapped            | @ref GetTapGestureDetector().DetectedSignal()       |
+ * | panned            | @ref GetPanGestureDetector().DetectedSignal()       |
+ * | pinched           | @ref GetPinchGestureDetector().DetectedSignal()     |
+ * | long-pressed      | @ref GetLongPressGestureDetector().DetectedSignal() |
+ *
+ * Actions
+ * | %Action Name      | %Control method called                              |
+ * |-------------------|-----------------------------------------------------|
+ * | control-activated | %OnActivated()                                      |
  */
 class DALI_IMPORT_API Control : public CustomActor
 {
@@ -62,20 +76,6 @@ public:
   static const Property::Index PROPERTY_KEY_INPUT_FOCUS;     ///< name "key-input-focus",         @see SetKeyInputFocus,          type BOOLEAN
   /** @} */
 
-  /// @name Signals
-  /** @{ */
-  static const char* const SIGNAL_KEY_EVENT;                 ///< name "key-event"
-  static const char* const SIGNAL_TAPPED;                    ///< name "tapped"
-  static const char* const SIGNAL_PANNED;                    ///< name "panned"
-  static const char* const SIGNAL_PINCHED;                   ///< name "pinched"
-  static const char* const SIGNAL_LONG_PRESSED;              ///< name "long-pressed"
-  /** @} */
-
-  /// @name Actions
-  /** @{ */
-  static const char* const ACTION_CONTROL_ACTIVATED;         ///< name "control-activated"
-  /** @} */
-
   /**
    * @brief Describes how a control could be resized.
    */
index 821737d..a1d8513 100644 (file)
@@ -29,9 +29,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const NavigationControl::ACTION_PUSH = "push";
-const char* const NavigationControl::ACTION_POP = "pop";
-
 NavigationControl::NavigationControl()
 {
 }
index 7ebaf8d..ffc7a44 100644 (file)
@@ -73,17 +73,17 @@ class NavigationControl;
  *                 | +-+        +-----+  +-----+        +-+ |
  *                 | +-+        +-----+  +-----+        +-+ |  tool bar
  *                 +----------------------------------------+
+ *
+ * Actions
+ * | %Action Name      | %NavigationControl method called |
+ * |-------------------|----------------------------------|
+ * | push              | %PushItem()                      |
+ * | pop               | %PopItem()                       |
  */
-
 class DALI_IMPORT_API NavigationControl : public Control
 {
 
 public:
-  //Action Names
-  static const char* const ACTION_PUSH;
-  static const char* const ACTION_POP;
-
-public:
 
   /**
    * Create a NavigationControl handle; this can be initialize with NavigationControl::New().
index d3a8187..1e37523 100644 (file)
@@ -31,9 +31,6 @@ namespace Toolkit
 // Popup
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-const char* const Popup::SIGNAL_TOUCHED_OUTSIDE = "touched-outside";
-const char* const Popup::SIGNAL_HIDDEN = "hidden";
-
 Popup::Popup()
 {
 }
index 0c876a2..040cb08 100644 (file)
@@ -62,16 +62,18 @@ class Button;
  *
  * A popup can use various custom transition effects, e.g.
  * Alpha fade, Scaling transition, position/rotation, shader effects.
+ *
+ * Signals
+ * | %Signal Name      | Method                       |
+ * |-------------------|------------------------------|
+ * | touched-outside   | @ref OutsideTouchedSignal()  |
+ * | hidden            | @ref HiddenSignal()          |
  */
 class DALI_IMPORT_API Popup : public Control
 {
 
 public:
 
-  //Signal Names
-  static const char* const SIGNAL_TOUCHED_OUTSIDE; ///< name "touched-outside"
-  static const char* const SIGNAL_HIDDEN;          ///< name "hidden"
-
   /**
    * @brief Current popup state.
    */
index 367e7e4..8683c02 100755 (executable)
@@ -24,8 +24,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
-
 ScrollBar::ScrollBar()
 {
 }
index 734bd7c..f246c93 100755 (executable)
@@ -43,13 +43,17 @@ class ScrollBar;
 /**
  * ScrollBar is a UI component that can be added to the scrollable controls
  * indicating the current scroll position of the scrollable content.
+ *
+ * Signals
+ * | %Signal Name             | Method                              |
+ * |--------------------------|-------------------------------------|
+ * | scroll-position-notified | @ref ScrollPositionNotifiedSignal() |
  */
 class DALI_IMPORT_API ScrollBar : public ScrollComponent
 {
 public:
 
   // Signals
-  static const char* const SCROLL_POSITION_NOTIFIED_SIGNAL_NAME;        ///< "scroll-position-notified" signal name
   typedef Signal< void ( float ) > ScrollPositionNotifiedSignalType;
 
   // Properties
index c89dfab..8650774 100644 (file)
@@ -32,9 +32,6 @@ const char* const ScrollConnector::OVERSHOOT_PROPERTY_NAME       = "overshoot";
 const Property::Index ScrollConnector::SCROLL_POSITION = Internal::ScrollConnector::SCROLL_POSITION;
 const Property::Index ScrollConnector::OVERSHOOT       = Internal::ScrollConnector::OVERSHOOT;
 
-const char* const ScrollConnector::DOMAIN_CHANGED_SIGNAL_NAME    = "domain-changed";
-const char* const ScrollConnector::SCROLL_POSITION_CHANGED_SIGNAL_NAME    = "scroll-position-changed";
-
 ScrollConnector ScrollConnector::New()
 {
   return ScrollConnector( Internal::ScrollConnector::New() );
index 578756c..8cd78b7 100644 (file)
@@ -50,6 +50,12 @@ class ScrollConnector;
  * The overshoot property is intended for implementing 'end of list' style indicators. This property is expected to be in the range
  * -1 to 1, where -1 shows an attempt the scroll beyond the minimum limit, and 1 shows an attempt the scroll beyond the maximum limit.
  * Zero indicates normal scrolling i.e. when overshoot indicators should be hidden.
+ *
+ * Signals
+ * | %Signal Name            | Method                             |
+ * |-------------------------|------------------------------------|
+ * | domain-changed          | @ref DomainChangedSignal()         |
+ * | scroll-position-changed | @ref ScrollPositionChangedSignal() |
  */
 class DALI_IMPORT_API ScrollConnector : public BaseHandle
 {
@@ -62,10 +68,7 @@ public:
   static const Property::Index OVERSHOOT;                 ///< The index of the "overshoot" property
 
   // Signals
-  static const char* const DOMAIN_CHANGED_SIGNAL_NAME;    ///< "domain-changed" signal name
   typedef Signal< void ( float min, float max, float size ) > DomainChangedSignalType;
-
-  static const char* const SCROLL_POSITION_CHANGED_SIGNAL_NAME;    ///< "scroll-position-changed" signal name
   typedef Signal< void ( float position ) > ScrollPositionChangedSignalType;
 
   /**
index 4bf5e2a..e474d3b 100644 (file)
@@ -307,8 +307,6 @@ const float ScrollView::DEFAULT_FRICTION_COEFFICIENT(1.0f);
 const float ScrollView::DEFAULT_FLICK_SPEED_COEFFICIENT(1.0f);
 const float ScrollView::DEFAULT_MAX_FLICK_SPEED(3.0f);
 
-const char* const ScrollView::SIGNAL_SNAP_STARTED = "snap-started";
-
 ScrollView::ScrollView()
 {
 }
index b357900..1dcfb85 100644 (file)
@@ -376,6 +376,11 @@ class ScrollView;
 /**
  * @brief ScrollView contains actors that can be scrolled manually (via touch)
  * or automatically.
+ *
+ * Signals
+ * | %Signal Name      | Method                     |
+ * |-------------------|----------------------------|
+ * | snap-started      | @ref SnapStartedSignal()   |
  */
 class DALI_IMPORT_API ScrollView : public Scrollable
 {
@@ -409,9 +414,6 @@ public:
   static const float DEFAULT_FLICK_SPEED_COEFFICIENT;                   ///< Default Flick speed coefficient (multiples input touch velocity)
   static const float DEFAULT_MAX_FLICK_SPEED;                           ///< Default Maximum flick speed. (in stage diagonals per second)
 
-  //Signal Names
-  static const char* const SIGNAL_SNAP_STARTED; ///< Name "snap-started"
-
   /// Direction of transitions
   enum EDirectionFlag
   {
index 0c7ec06..21f9615 100644 (file)
@@ -31,11 +31,6 @@ const std::string Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME( "scroll-positio
 const std::string Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME( "scroll-position-max" );
 const std::string Scrollable::SCROLL_DIRECTION_PROPERTY_NAME( "scroll-direction" );
 
-const char* const Scrollable::SIGNAL_SCROLL_STARTED = "scroll-started";
-const char* const Scrollable::SIGNAL_SCROLL_COMPLETED = "scroll-completed";
-const char* const Scrollable::SIGNAL_SCROLL_UPDATED = "scroll-updated";
-const char* const Scrollable::SIGNAL_SCROLL_CLAMPED = "scroll-clamped";
-
 Scrollable::Scrollable()
 {
 }
index 907f7a1..0e34526 100644 (file)
@@ -66,6 +66,14 @@ struct ClampState3
  * (via touch) or automatically.
  *
  * Scrollables such as ScrollView and ItemView can be derived from this class.
+ *
+ * Signals
+ * | %Signal Name      | Method                       |
+ * |-------------------|------------------------------|
+ * | scroll-started    | @ref ScrollStartedSignal()   |
+ * | scroll-completed  | @ref ScrollUpdatedSignal()   |
+ * | scroll-updated    | @ref ScrollCompletedSignal() |
+ * | scroll-clamped    | @ref ScrollClampedSignal()   |
  */
 class DALI_IMPORT_API Scrollable : public Control
 {
@@ -104,14 +112,6 @@ public:
   static const Property::Index PROPERTY_OVERSHOOT_ANIMATION_SPEED;      ///< Property, name "overshoot-animation-speed",  @see SetOvershootAnimationSpeed(),  type FLOAT
   /** @} */
 
-  /// @name Signals
-  /** @{ */
-  static const char* const SIGNAL_SCROLL_STARTED;   ///< "scroll-started";
-  static const char* const SIGNAL_SCROLL_COMPLETED; ///< "scroll-completed";
-  static const char* const SIGNAL_SCROLL_UPDATED;   ///< "scroll-updated";
-  static const char* const SIGNAL_SCROLL_CLAMPED;   ///< "scroll-clamped";
-  /** @} */
-
 public:
 
   typedef Signal< void ( const Vector3& ) > ScrollStartedSignalType;   ///< ScrollStarted signal type
index 4e12873..f26a05e 100644 (file)
@@ -30,10 +30,6 @@ namespace Toolkit
 // Slider
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-// Signals
-const char* const Slider::SIGNAL_VALUE_CHANGED = "value-changed";
-const char* const Slider::SIGNAL_MARK = "mark";
-
 Slider::Slider()
 {
 }
index 1a382bd..df0ac20 100644 (file)
@@ -34,15 +34,17 @@ class Slider;
 
 /**
  * @brief Slider is a control to enable sliding an indicator between two values
+ *
+ * Signals
+ * | %Signal Name      | Method                      |
+ * |-------------------|-----------------------------|
+ * | value-changed     | @ref ValueChangedSignal()   |
+ * | mark              | @ref MarkSignal()           |
  */
 class DALI_IMPORT_API Slider : public Control
 {
 public:
 
-  //Signal Names
-  static const char* const SIGNAL_VALUE_CHANGED;
-  static const char* const SIGNAL_MARK;
-
   // Properties
   static const Property::Index LOWER_BOUND_PROPERTY;            ///< Property, name "lower-bound",       type FLOAT
   static const Property::Index UPPER_BOUND_PROPERTY;            ///< Property, name "upper-bound",       type FLOAT
index d888a2b..f0a43e3 100644 (file)
@@ -35,13 +35,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const TextInput::SIGNAL_START_INPUT( "start-input" );
-const char* const TextInput::SIGNAL_END_INPUT( "end-input" );
-const char* const TextInput::SIGNAL_STYLE_CHANGED( "style-changed" );
-const char* const TextInput::SIGNAL_MAX_INPUT_CHARACTERS_REACHED( "max-input-characters-reached" );
-const char* const TextInput::SIGNAL_TOOLBAR_DISPLAYED = "toolbar-displayed";
-const char* const TextInput::SIGNAL_TEXT_EXCEED_BOUNDARIES = "text-exceed-boundaries";
-
 TextInput::TextInput()
 {
 }
index f8202db..b20467f 100644 (file)
@@ -60,17 +60,6 @@ public:
   static const Property::Index CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY;  // Property, name "clipboard-button-position-priority", type unsigned int
   static const Property::Index POP_UP_OFFSET_FROM_TEXT_PROPERTY;             // Property, name "popup-offset-from-text", type VECTOR4
   static const Property::Index CURSOR_COLOR_PROPERTY;                        // Property, name "cursor-color", type VECTOR4
-
-  /** @} */
-
-  /// @name Signals
-  /** @{ */
-  static const char* const SIGNAL_START_INPUT; ///< name "start-input"
-  static const char* const SIGNAL_END_INPUT; ///< name "end-input"
-  static const char* const SIGNAL_STYLE_CHANGED; ///< name "style-changed"
-  static const char* const SIGNAL_MAX_INPUT_CHARACTERS_REACHED; ///< name "max-input-characters-reached"
-  static const char* const SIGNAL_TOOLBAR_DISPLAYED; ///< name "toolbar-displayed"
-  static const char* const SIGNAL_TEXT_EXCEED_BOUNDARIES; ///< name "text-exceed-boundaries"
   /** @} */
 
 public:
index 36d7ec3..85620de 100644 (file)
@@ -27,9 +27,6 @@ namespace Dali
 namespace Toolkit
 {
 
-
-const char* const TextView::SIGNAL_TEXT_SCROLLED = "scrolled";
-
 TextView::CharacterLayoutInfo::CharacterLayoutInfo()
 : mSize(),
   mPosition(),
index 34dbe35..46c1118 100644 (file)
@@ -42,14 +42,16 @@ class TextView;
  * It provides support for multi-line wrapping, multi-language font detection, text alignment, scrolling and styling.
  *
  * See the \link text-view Text View \endlink page of the Programming Guide for more details and examples.
+ *
+ * Signals
+ * | %Signal Name      | Method                    |
+ * |-------------------|---------------------------|
+ * | scrolled          | @ref ScrolledSignal()     |
  */
 class DALI_IMPORT_API TextView : public Control
 {
 public:
 
-  // Signal Names
-  static const char* const SIGNAL_TEXT_SCROLLED; ///< Signal emitted when the scroll position changes. @see ScrolledSignal()
-
   // Properties
   static const Property::Index PROPERTY_MARKUP_ENABLED;         ///< name "markup-enabled",       @see SetMarkupProcessingEnabled(), type BOOLEAN
   static const Property::Index PROPERTY_TEXT;                   ///< name "text",                 @see SetText(),                    type STRING
index 4f3ce8b..277e975 100644 (file)
@@ -31,8 +31,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const View::SIGNAL_ORIENTATION_ANIMATION_START = "orientation-animation-start";
-
 View::View()
 {
 }
index bb31adc..5138266 100644 (file)
@@ -72,12 +72,15 @@ class View;
  * contentLayer.ApplyConstraint( ParentConstraint::Size::New( ParentSize() ) );
  * view.AddContentLayer( contentLayer );
  * \endcode
+ *
+ * Signals
+ * | %Signal Name                | Method                                   |
+ * |-----------------------------|------------------------------------------|
+ * | orientation-animation-start | @ref OrientationAnimationStartedSignal() |
+
  */
 class DALI_IMPORT_API View : public Control
 {
-public:
-  //Signal Names
-  static const char* const SIGNAL_ORIENTATION_ANIMATION_START;
 
 public:
 
index 1bd721a..a480129 100644 (file)
@@ -30,10 +30,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const FocusManager::SIGNAL_FOCUS_CHANGED = "focus-changed";
-const char* const FocusManager::SIGNAL_FOCUS_OVERSHOT = "focus-overshot";
-const char* const FocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED = "focused-actor-activated";
-
 FocusManager::FocusManager()
 {
 }
index 3d15023..67a359c 100644 (file)
@@ -43,15 +43,17 @@ class FocusManager;
  * It provides functionality of setting the
  * focus and moving the focus forward and backward. It also draws a highlight for the
  * focused actor and emits a signal when the focus is changed.
+ *
+ * Signals
+ * | %Signal Name            | Method                             |
+ * |-------------------------|------------------------------------|
+ * | focus-changed           | @ref FocusChangedSignal()          |
+ * | focus-overshot          | @ref FocusOvershotSignal()         |
+ * | focused-actor-activated | @ref FocusedActorActivatedSignal() |
  */
-
 class DALI_IMPORT_API FocusManager : public BaseHandle
 {
 public:
-  // Signal Names
-  static const char* const SIGNAL_FOCUS_CHANGED; ///< name "focus-changed"
-  static const char* const SIGNAL_FOCUS_OVERSHOT; ///< name "focus-overshot"
-  static const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED; ///< name "focused-actor-activated"
 
   /**
    * @brief Accessibility needs four information which will be read by screen-reader.
index b47228d..45d0fbf 100644 (file)
@@ -31,11 +31,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const KeyboardFocusManager::SIGNAL_PRE_FOCUS_CHANGE = "keyboard-pre-focus-change";
-const char* const KeyboardFocusManager::SIGNAL_FOCUS_CHANGED = "keyboard-focus-changed";
-const char* const KeyboardFocusManager::SIGNAL_FOCUS_GROUP_CHANGED = "keyboard-focus-group-changed";
-const char* const KeyboardFocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED = "keyboard-focused-actor-activated";
-
 KeyboardFocusManager::KeyboardFocusManager()
 {
 }
index 3822fc6..a1e51f5 100644 (file)
@@ -40,15 +40,17 @@ class KeyboardFocusManager;
  * in four directions (i.e. Left, Right, Up and Down). It also draws a
  * highlight for the focused actor and emits a signal when the focus
  * is changed.
+ *
+ * Signals
+ * | %Signal Name                     | Method                             |
+ * |----------------------------------|------------------------------------|
+ * | keyboard-pre-focus-change        | @ref PreFocusChangeSignal()        |
+ * | keyboard-focus-changed           | @ref FocusChangedSignal()          |
+ * | keyboard-focus-group-changed     | @ref FocusGroupChangedSignal()     |
+ * | keyboard-focused-actor-activated | @ref FocusedActorActivatedSignal() |
  */
 class DALI_IMPORT_API KeyboardFocusManager : public BaseHandle
 {
-public:
-  //Signal Names
-  static const char* const SIGNAL_PRE_FOCUS_CHANGE; ///< name "keyboard-pre-focus-change"
-  static const char* const SIGNAL_FOCUS_CHANGED; ///< name "keyboard-focus-changed"
-  static const char* const SIGNAL_FOCUS_GROUP_CHANGED; ///< name "keyboard-focus-group-changed"
-  static const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED; ///< name "keyboard-focused-actor-activated"
 
 public:
 
index 91b79e8..ca6a3d0 100644 (file)
@@ -30,9 +30,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const KeyInputFocusManager::SIGNAL_KEY_INPUT_FOCUS_CHANGED = "key-input-focus-changed";
-const char* const KeyInputFocusManager::SIGNAL_UNHANDLED_KEY_EVENT = "unhandled-key-event";
-
 KeyInputFocusManager::KeyInputFocusManager()
 {
 }
index 85fa87c..07c8aa4 100644 (file)
@@ -39,13 +39,16 @@ class KeyInputFocusManager;
  * all the keyboard events first. And if the conrol doesn't consume the event it is passed to
  * the next control in the stack. If none of the controls in the stack consume the key event then
  * UnhandledKeyEventSignal() is emitted.
+ *
+ * Signals
+ * | %Signal Name            | Method                            |
+ * |-------------------------|-----------------------------------|
+ * | key-input-focus-changed | @ref KeyInputFocusChangedSignal() |
+ * | unhandled-key-event     | @ref UnhandledKeyEventSignal()    |
  */
 class DALI_IMPORT_API KeyInputFocusManager : public BaseHandle
 {
 public:
-  // Signal Names
-  static const char* const SIGNAL_KEY_INPUT_FOCUS_CHANGED;
-  static const char* const SIGNAL_UNHANDLED_KEY_EVENT;
 
   // KeyInputFocusChanged
   typedef Signal< void (Control, Control) > KeyInputFocusChangedSignalType;
index 363cf58..aec216f 100644 (file)
@@ -27,8 +27,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const CubeTransitionEffect::SIGNAL_TRANSITION_COMPLETED = "transition-completed";
-
 CubeTransitionEffect::CubeTransitionEffect()
 {
 }
@@ -42,6 +40,11 @@ CubeTransitionEffect::CubeTransitionEffect(Internal::CubeTransitionEffect* impl)
 {
 }
 
+CubeTransitionEffect CubeTransitionEffect::DownCast( BaseHandle handle )
+{
+  return CubeTransitionEffect( dynamic_cast< Dali::Toolkit::Internal::CubeTransitionEffect* >( handle.GetObjectPtr() ) );
+}
+
 void CubeTransitionEffect::SetTransitionDuration( float duration )
 {
   GetImpl(*this).SetTransitionDuration( duration );
index e57f4bd..e640296 100644 (file)
@@ -73,6 +73,11 @@ class CubeTransitionEffect;
  * cubeEffect.StartTransition( );
  *
  * @endcode
+ *
+ * Signals
+ * | %Signal Name         | Method                           |
+ * |----------------------|----------------------------------|
+ * | transition-completed | @ref TransitionCompletedSignal() |
  */
 class DALI_IMPORT_API CubeTransitionEffect : public BaseHandle
 {
@@ -90,6 +95,17 @@ public:
   ~CubeTransitionEffect();
 
   /**
+   * @brief Downcast an Object handle to a CubeTransitionEffect handle.
+   *
+   * If handle points to a CubeTransitionEffect object the downcast produces
+   * a valid handle. If not the returned handle is left uninitialized.
+   *
+   * @param[in] handle A handle to an object
+   * @return A handle to a CubeTransitionEffect object or an uninitialized handle
+   */
+  static CubeTransitionEffect DownCast( BaseHandle handle );
+
+  /**
    * Set the duration of transition animation
    * @param[in] duration The duration of transition animation
    */
@@ -174,9 +190,6 @@ public:
 
 public: //Signal
 
-  //signal name
-  static const char* const SIGNAL_TRANSITION_COMPLETED;
-
   //Transition animation completed signal
   typedef Signal< void ( CubeTransitionEffect, ImageActor ) > TransitionCompletedSignalType;