X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=capi%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol-impl.h;h=3fbcba9527395608570b2cae8a0254a2066eef95;hb=f9adfdbd2c44b9648726bb0a1d8db863407f84bd;hp=0c5622023484c211e311adb6ea143de367eccc68;hpb=a881757839b7abb008873a68c67e17b3ba39669b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/capi/dali-toolkit/public-api/controls/control-impl.h b/capi/dali-toolkit/public-api/controls/control-impl.h index 0c56220..3fbcba9 100644 --- a/capi/dali-toolkit/public-api/controls/control-impl.h +++ b/capi/dali-toolkit/public-api/controls/control-impl.h @@ -1,22 +1,21 @@ #ifndef __DALI_TOOLKIT_CONTROL_IMPL_H__ #define __DALI_TOOLKIT_CONTROL_IMPL_H__ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ +// +// 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. +// /** * @addtogroup CAPI_DALI_TOOLKIT_CONTROLS_MODULE @@ -32,6 +31,8 @@ namespace Dali DALI_IMPORT_API namespace Toolkit { +class StyleManager; + namespace Internal DALI_INTERNAL { class StyleChangeProcessor; @@ -39,9 +40,12 @@ class RelayoutControllerImpl; class KeyInputFocusManager; } -typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size +typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size typedef std::vector< ActorSizePair > ActorSizeContainer; ///< Container of actors and their sizes +namespace Internal +{ + /** * @brief This is the internal base class for all controls. * @@ -49,7 +53,7 @@ typedef std::vector< ActorSizePair > ActorSizeContainer; ///< Container of actor * Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will * be disconnected automatically when the control is destroyed. */ -class ControlImpl : public CustomActorImpl, public ConnectionTrackerInterface +class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface { public: @@ -68,14 +72,14 @@ public: * If touch is required then the user can connect to this class' touch signal. * @return A handle to the ConntrolImpl instance. */ - static Control New(); + static Toolkit::Control New(); // Destruction /** * @brief Virtual destructor. */ - virtual ~ControlImpl(); + virtual ~Control(); // Actions @@ -95,6 +99,15 @@ public: virtual bool OnAccessibilityPan(PanGesture gesture); /** + * @brief This method should be overridden by deriving classes when they wish to respond the accessibility + * touch event. + * + * @param[in] touchEvent The touch event. + * @return true if the touch event has been consumed by this control + */ + virtual bool OnAccessibilityTouch(const TouchEvent& touchEvent); + + /** * @brief This method should be overridden by deriving classes when they wish to respond * the accessibility up and down action (i.e. value change of slider control). * @@ -145,7 +158,7 @@ public: * @param[in] loopEnabled Whether the focus movement should be looped within the control. * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused. */ - virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled); + virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled); /** * @brief Informs this control that its chosen focusable actor will be focused. @@ -512,58 +525,58 @@ private: protected: // Construction /** - * @brief Create a ControlImpl. + * @brief Create a Control. * * @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required. */ - ControlImpl(bool requiresTouchEvents); + Control(bool requiresTouchEvents); public: // Size negotiation /** - * @copydoc Control::SetSizePolicy() + * @copydoc Toolkit::Control::SetSizePolicy() */ - void SetSizePolicy( Control::SizePolicy widthPolicy, Control::SizePolicy heightPolicy ); + void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy ); /** - * @copydoc Control::GetSizePolicy() + * @copydoc Toolkit::Control::GetSizePolicy() */ - void GetSizePolicy( Control::SizePolicy& widthPolicy, Control::SizePolicy& heightPolicy ) const; + void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const; /** - * @copydoc Control::SetMinimumSize() + * @copydoc Toolkit::Control::SetMinimumSize() */ void SetMinimumSize( const Vector3& size ); /** - * @copydoc Control::GetMinimumSize() + * @copydoc Toolkit::Control::GetMinimumSize() */ const Vector3& GetMinimumSize() const; /** - * @copydoc Control::SetMaximumSize() + * @copydoc Toolkit::Control::SetMaximumSize() */ void SetMaximumSize( const Vector3& size ); /** - * @copydoc Control::GetMaximumSize() + * @copydoc Toolkit::Control::GetMaximumSize() */ const Vector3& GetMaximumSize() const; /** - * @copydoc Control::GetNaturalSize() + * @copydoc Toolkit::Control::GetNaturalSize() */ virtual Vector3 GetNaturalSize(); /** - * @copydoc Control::GetHeightForWidth() + * @copydoc Toolkit::Control::GetHeightForWidth() */ virtual float GetHeightForWidth( float width ); /** - * @copydoc Control::GetWidthForHeight() + * @copydoc Toolkit::Control::GetWidthForHeight() */ virtual float GetWidthForHeight( float height ); @@ -584,17 +597,17 @@ public: //KeyInput /** - * @copydoc Control::SetKeyInputFocus() + * @copydoc Toolkit::Control::SetKeyInputFocus() */ void SetKeyInputFocus(); /** - * @copydoc Control::HasKeyInputFocus() + * @copydoc Toolkit::Control::HasKeyInputFocus() */ bool HasKeyInputFocus(); /** - * @copydoc Control::ClearKeyInputFocus() + * @copydoc Toolkit::Control::ClearKeyInputFocus() */ void ClearKeyInputFocus(); @@ -687,8 +700,8 @@ private: private: // Undefined - ControlImpl(const ControlImpl&); - ControlImpl& operator=(const ControlImpl&); + Control(const Control&); + Control& operator=(const Control&); class Impl; Impl *mImpl; @@ -698,6 +711,10 @@ private: friend class Internal::KeyInputFocusManager; ///< KeyInputFocusManager needs to call which is private. }; +} // namespace Internal + +typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control + } // namespace Toolkit } // namespace Dali