[dali_2.0.26] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / page-turn-view / page-turn-portrait-view-impl.h
1 #ifndef DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H
2 #define DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
23 #include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
24
25 namespace Dali
26 {
27 namespace Toolkit
28 {
29 namespace Internal
30 {
31 /**
32  * Implementation class of the PageTurnView in portrait mode
33  */
34 class PageTurnPortraitView : public PageTurnView
35 {
36 public:
37   /**
38    * @copydoc Toolkit::PageTurnPortraitView::New( PageFactory&, const Vector2& )
39    */
40   static Toolkit::PageTurnPortraitView New(PageFactory& pageFactory, const Vector2& viewPageSize);
41
42 protected:
43   /**
44    * Constructor.
45    * It initializes the PageTurnPortraitView members
46    * @param[in] pageFactory The factory which provides image to PageTurnView as the page content.
47    * @param[in] viewPageSize The size of the page
48    */
49   PageTurnPortraitView(PageFactory& pageFactory, const Vector2& viewPageSize);
50
51   /**
52    * A reference counted object may only be deleted by calling Unreference()
53    */
54   virtual ~PageTurnPortraitView();
55
56 protected: // From PageTurnView
57   /**
58    * @copydoc PageTurnView::OnPageTurnViewInitialize
59    */
60   void OnPageTurnViewInitialize() override;
61
62   /**
63    * @copydoc PageTurnView::SetPanPosition
64    */
65   Vector2 SetPanPosition(const Vector2& gesturePosition) override;
66
67   /**
68    * @copydoc PageTurnView::SetPanActor
69    */
70   void SetPanActor(const Vector2& panPosition) override;
71
72   /**
73    * @copydoc PageTurnView::OnPossibleOutwardsFlick
74    */
75   void OnPossibleOutwardsFlick(const Vector2& panPosition, float gestureSpeed) override;
76
77   /**
78    * @copydoc PageTurnView::OnTurnedOver
79    */
80   void OnTurnedOver(Actor actor, bool isLeftSide) override;
81
82 private:
83   /**
84    * @copydoc PageTurnView::TurnedOver
85    */
86   void TurnedOverBackwards(Animation& animation);
87
88 private:
89   //Undefined
90   PageTurnPortraitView(const PageTurnPortraitView&);
91
92   //undefined
93   PageTurnPortraitView& operator=(const PageTurnPortraitView& rhs);
94 };
95
96 } // namespace Internal
97
98 } // namespace Toolkit
99
100 } // namespace Dali
101
102 #endif // DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H