X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fpopup%2Fpopup-impl.h;h=099e5e6f47adf648ef671290dd1733b6f941d772;hb=a505bf603895074e638b374097e6d5c649e2292e;hp=747df4cfd923a2bc89d9d099062f5ad5f838d715;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/popup/popup-impl.h b/dali-toolkit/internal/controls/popup/popup-impl.h index 747df4c..099e5e6 100755 --- a/dali-toolkit/internal/controls/popup/popup-impl.h +++ b/dali-toolkit/internal/controls/popup/popup-impl.h @@ -1,26 +1,33 @@ #ifndef __DALI_TOOLKIT_INTERNAL_POPUP_H__ #define __DALI_TOOLKIT_INTERNAL_POPUP_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * 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. + * + */ + +// EXTERNAL INCLUDES +#include +#include +#include // INTERNAL INCLUDES -#include #include -#include +#include +#include +#include #include namespace Dali @@ -43,7 +50,7 @@ typedef IntrusivePtr PopupStylePtr; /** * @copydoc Toolkit::Popup */ -class Popup : public ControlImpl +class Popup : public Control { public: @@ -78,14 +85,9 @@ public: void SetTitle( const std::string& text ); /** - * @copydoc Toolkit::Popup::SetTitle( TextView titleActor ) - */ - void SetTitle( Toolkit::TextView titleActor ); - - /** * @copydoc Toolkit::Popup::GetTitle */ - Toolkit::TextView GetTitle() const; + std::string GetTitle() const; /** * @copydoc Toolkit::Popup::AddButton @@ -117,7 +119,6 @@ public: */ void HideTail(); - /** * Sets the style of the popup * @param[in] style The style of the popup @@ -179,12 +180,12 @@ public: // Signals /** * @copydoc Dali::Toolkit::Popup::OutsideTouchedSignal() */ - Toolkit::Popup::TouchedOutsideSignalV2& OutsideTouchedSignal(); + Toolkit::Popup::TouchedOutsideSignalType& OutsideTouchedSignal(); /** * @copydoc Dali::Toolkit::Popup::HiddenSignal() */ - Toolkit::Popup::HiddenSignalV2& HiddenSignal(); + Toolkit::Popup::HiddenSignalType& HiddenSignal(); /** * Connects a callback function with the object's signals. @@ -214,12 +215,12 @@ private: bool OnBackingTouched(Actor actor, const TouchEvent& event); /** - * Signal occurs when the mouse wheel event is occured on dimmed backing for the Popup. - * @param[in] actor The Actor got mouse wheel - * @param[in] event The Mouse Wheel Event. + * Signal occurs when the wheel event is occured on dimmed backing for the Popup. + * @param[in] actor The Actor got wheel + * @param[in] event The Wheel Event. * @return Whether to consume event or not. */ - bool OnBackingMouseWheelEvent(Actor actor, const MouseWheelEvent& event); + bool OnBackingWheelEvent(Actor actor, const WheelEvent& event); /** * Signal occurs when the dialog has been touched. @@ -240,18 +241,23 @@ private: virtual void OnPropertySet( Property::Index index, Property::Value propertyValue ); /** - * From ControlImpl; called after a child has been added to the owning actor. + * From Control; called after a child has been added to the owning actor. * @param[in] child The child which has been added. */ virtual void OnControlChildAdd( Actor& child ); /** - * @copydoc Toolkit::ControlImpl::OnRelaidOut() + * @copydoc Control::OnRelayOut() */ - virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container ); + virtual void OnRelayout( const Vector2& size, RelayoutContainer& container ); /** - * @copydoc Toolkit::ControlImpl::OnKeyEvent() + * @copydoc Control::OnSetResizePolicy() + */ + virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ); + + /** + * @copydoc Control::OnKeyEvent() */ virtual bool OnKeyEvent(const KeyEvent& event); @@ -273,7 +279,12 @@ private: /** * @copydoc Control::GetNextKeyboardFocusableActor() */ - Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled); + Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled); + + /** + * Create the root actor for the footer + */ + void CreateFooter(); private: @@ -298,19 +309,19 @@ private: bool mShowing; ///< Popup is showing or not Layer mLayer; ///< Popup Layer (i.e. Dim backing and PopupBg reside in this) - Actor mPopupBg; ///< Popup Background (i.e. dialog reside in this) + Toolkit::TableView mPopupLayout; ///< Popup layout (i.e. dialog reside in this) ImageActor mBacking; ///< Backing actor (dim effect) Actor mPreviousFocusedActor; ///< Store the previous focused actor to restore the focus when popup hide Actor mBackgroundImage; ///< Stores the background image. Actor mButtonAreaImage; ///< Stores the button background image. - Toolkit::TextView mTitle; ///< Stores the text title. + Toolkit::TextLabel mTitle; ///< Stores the text title. Actor mContent; ///< Stores popup's content. Actor mBottomBg; ///< bottom button bar background. ImageActor is replaced with Actor due to hidden image. Actor mTailImage; ///< Stores the tail image - ActorContainer mButtons; ///< Keeps track of the buttons added to this popup. + std::vector< Actor > mButtons; ///< Keeps track of the buttons added to this popup. Toolkit::Popup::PopupState mState; ///< Popup current state. Animation mAnimation; ///< The animation instance managing state changing. bool mAlterAddedChild; ///< Flag used to control whether children are reparented or not. @@ -318,8 +329,8 @@ private: LayoutInfo mLayoutInfo; ///< Stores sizes of all popup components. - Toolkit::Popup::TouchedOutsideSignalV2 mTouchedOutsideSignalV2; - Toolkit::Popup::HiddenSignalV2 mHiddenSignalV2; + Toolkit::Popup::TouchedOutsideSignalType mTouchedOutsideSignal; + Toolkit::Popup::HiddenSignalType mHiddenSignal; Property::Index mPropertyTitle; ///< Property index for Title. Property::Index mPropertyState; ///< Property index for popup state.