X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftool-bar%2Ftool-bar-impl.h;h=1039ea03e845d50bda23dfe0eb86251a236c9683;hp=27f09ebb4460ee7737cf7eb159e423f4f1b309a4;hb=HEAD;hpb=e4a430b81add6d09b02011b4eb010039563ca4f6 diff --git a/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h b/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h index 27f09eb..1039ea0 100644 --- a/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h +++ b/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_TOOL_BAR_H__ -#define __DALI_TOOLKIT_INTERNAL_TOOL_BAR_H__ +#ifndef DALI_TOOLKIT_INTERNAL_TOOL_BAR_H +#define DALI_TOOLKIT_INTERNAL_TOOL_BAR_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -22,21 +22,18 @@ #include // INTERNAL INCLUDES -#include -#include +#include #include +#include namespace Dali { - namespace Toolkit { - class ToolBar; namespace Internal { - /** * ToolBar is a control to create a tool bar. * @see Dali::Toolkit::ToolBar for more details. @@ -44,7 +41,6 @@ namespace Internal class ToolBar : public Control { public: - /** * Create an initialized ToolBar. * @return A handle to a newly allocated Dali resource. @@ -52,40 +48,28 @@ public: static Toolkit::ToolBar New(); /** - * @copydoc Dali::Toolkit::ToolBar::SetBackground() - */ - void SetBackground( Actor background ); - - /** * @copydoc Dali::Toolkit::ToolBar::AddControl() */ - void AddControl( Dali::Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding ); + void AddControl(Dali::Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding); /** * @copydoc Dali::Toolkit::ToolBar::RemoveControl() */ - void RemoveControl( Dali::Actor control ); + void RemoveControl(Dali::Actor control); private: // From Control - /** * @copydoc Toolkit::Control::OnInitialize() */ - virtual void OnInitialize(); + void OnInitialize() override; /** * Adds a control using some default values (the control uses 10% of the tool bar space and is placed on the left group). * @param child The control to be added. * - * @see Control::OnControlChildAdd() - */ - virtual void OnControlChildAdd(Actor& child); - - /** - * - * @copydoc Toolkit::Control::OnControlSizeSet( const Vector3& targetSize ) + * @see Control::OnChildAdd() */ - virtual void OnControlSizeSet( const Vector3& targetSize ); + void OnChildAdd(Actor& child) override; private: /** @@ -96,8 +80,8 @@ private: /** * Constructor, sets the lock boolean */ - Lock( bool& lock ) - : mLock( lock ) + Lock(bool& lock) + : mLock(lock) { mLock = true; } @@ -109,6 +93,7 @@ private: { mLock = false; } + private: bool& mLock; }; @@ -135,37 +120,34 @@ private: float mRightRelativeSpace; ///< Relative space between center and right groups of controls. float mAccumulatedRelativeSpace; ///< Stores the total percentage space used by controls. bool mInitializing; ///< Allows the use of Actor's API to add controls. - Vector3 mToolBarSize; ///< The size of tool bar - Actor mBackground; ///< The background of the tool bar - std::map mControls; ///< Stores a relationship between controls and their alignments used to place them inside the table view. + std::map mControls; ///< Stores a relationship between controls and their alignments used to place them inside the table view. }; } // namespace Internal - // Helpers for public-api forwarding methods -inline Toolkit::Internal::ToolBar& GetImpl( Toolkit::ToolBar& toolBar ) +inline Toolkit::Internal::ToolBar& GetImpl(Toolkit::ToolBar& toolBar) { - DALI_ASSERT_ALWAYS( toolBar ); + DALI_ASSERT_ALWAYS(toolBar); Dali::RefObject& handle = toolBar.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } -inline const Toolkit::Internal::ToolBar& GetImpl( const Toolkit::ToolBar& toolBar ) +inline const Toolkit::Internal::ToolBar& GetImpl(const Toolkit::ToolBar& toolBar) { - DALI_ASSERT_ALWAYS( toolBar ); + DALI_ASSERT_ALWAYS(toolBar); const Dali::RefObject& handle = toolBar.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_TOOL_BAR_H__ +#endif // DALI_TOOLKIT_INTERNAL_TOOL_BAR_H