X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol-impl.h;h=35e679fbb7a06dab48d886b3ec06a5757931643b;hb=46516d3e1711bd272cc00002876cf207465fa8ce;hp=2583450204a05ea522c558d945d4a82e64a94c35;hpb=834ddf7832598a57fc18c282371554a1ed8f0a78;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index 2583450..35e679f 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_CONTROL_IMPL_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -170,6 +170,16 @@ public: // Background /** + * @copydoc Dali::Toolkit::Control::SetStyleName + */ + void SetStyleName( const std::string& styleName ); + + /** + * @copydoc Dali::Toolkit::Control::GetStyleName + */ + const std::string& GetStyleName() const; + + /** * @copydoc Dali::Toolkit::Control::SetBackgroundColor */ void SetBackgroundColor( const Vector4& color ); @@ -199,7 +209,7 @@ public: /** * @brief Sets whether this control supports two dimensional * keyboard navigation (i.e. whether it knows how to handle the - * keyboardn focus movement between its child actors). + * keyboard focus movement between its child actors). * * The control doesn't support it by default. * @param[in] isSupported Whether this control supports two dimensional keyboard navigation. @@ -286,6 +296,15 @@ public: */ virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor); + /** + * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal + * + * Should be called last by the control after it acts on the Input Focus change. + * + * @param[in] focusGained True if gained, False if lost + */ + void EmitKeyInputFocusSignal( bool focusGained ); + // Actions & Signals /** @@ -315,6 +334,16 @@ public: Toolkit::Control::KeyEventSignalType& KeyEventSignal(); /** + * @copydoc Dali::Toolkit::Control::KeyInputFocusGainedSignal() + */ + Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusGainedSignal(); + + /** + * @copydoc Dali::Toolkit::Control::KeyInputFocusLostSignal() + */ + Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusLostSignal(); + + /** * @brief Called by the KeyInputFocusManager to emit key event signals. * * @param[in] event The key event. @@ -329,14 +358,14 @@ protected: // Flags for the constructor enum ControlBehaviour { - CONTROL_BEHAVIOUR_NONE = 0, - REQUIRES_TOUCH_EVENTS = 1<<1, ///< True if the OnTouchEvent() callback is required. - REQUIRES_STYLE_CHANGE_SIGNALS = 1<<2, ///< True if needs to monitor style change signals such as theme/font change - NO_SIZE_NEGOTIATION = 1<<3, ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm - REQUIRES_HOVER_EVENTS = 1<<4, ///< True if the OnHoverEvent() callback is required. - REQUIRES_MOUSE_WHEEL_EVENTS = 1<<5 ///< True if the OnMouseWheelEvent() callback is required. + REQUIRES_STYLE_CHANGE_SIGNALS = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 0 ), ///< True if needs to monitor style change signals such as theme/font change + REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << ( CustomActorImpl::ACTOR_FLAG_COUNT + 1 ), ///< True if needs to support keyboard navigation + + LAST_CONTROL_BEHAVIOUR_FLAG }; + static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log< LAST_CONTROL_BEHAVIOUR_FLAG - 1 >::value + 1; ///< Total count of flags + /** * @brief Create a Control. * @@ -374,7 +403,7 @@ protected: /** * @copydoc Dali::CustomActorImpl::RelayoutDependentOnChildren() */ - virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS ); + virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ); private: @@ -395,21 +424,12 @@ private: virtual void OnActivated(); /** - * @brief This method should be overridden by deriving classes when - * they wish to be notified when the style manager changes the theme. + * @brief This method should be overridden by deriving classes requiring notifications when the style changes. * * @param[in] styleManager The StyleManager object. + * @param[in] change Information denoting what has changed. */ - virtual void OnThemeChange( Toolkit::StyleManager styleManager ); - - /** - * @brief This method should be overridden by deriving classes when - * they wish to be notified when the style changes the default font. - * - * @param[in] defaultFontChange Information denoting whether the default font has changed. - * @param[in] defaultFontSizeChange Information denoting whether the default font size has changed. - */ - virtual void OnFontChange( bool defaultFontChange, bool defaultFontSizeChange ); + virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change ); /** * @brief Called whenever a pinch gesture is detected on this control. @@ -549,12 +569,12 @@ private: /** * @copydoc Dali::CustomActorImpl::OnCalculateRelayoutSize() */ - virtual void OnCalculateRelayoutSize( Dimension dimension ); + virtual void OnCalculateRelayoutSize( Dimension::Type dimension ); /** * @copydoc Dali::CustomActorImpl::OnLayoutNegotiated() */ - virtual void OnLayoutNegotiated( float size, Dimension dimension ); + virtual void OnLayoutNegotiated( float size, Dimension::Type dimension ); /** * @copydoc Dali::CustomActorImpl::OnRelayout() @@ -564,12 +584,12 @@ private: /** * @copydoc Dali::CustomActorImpl::OnSetResizePolicy() */ - virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension ); + virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ); /** * @copydoc Dali::CustomActorImpl::CalculateChildSize() */ - virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension ); + virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension ); // From CustomActorImpl, derived classes should NOT override these. @@ -646,16 +666,6 @@ private: */ virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback ); - // Style - - /** - * @brief This method is the callback for the StyleChangeSignal from StyleManager - * - * @param[in] styleManager The StyleManager Object - * @param[in] change Information denoting what has changed. - */ - DALI_INTERNAL void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change ); - private: // Undefined