/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
#include <dali-toolkit-test-suite-utils.h>
#include <dali/integration-api/events/pan-gesture-event.h>
#include <dali/public-api/images/buffer-image.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+
using namespace Dali;
using namespace Dali::Toolkit;
develapieffectsviewdir = $(develapicontrolsdir)/effects-view
develapigaussianblurviewdir = $(develapicontrolsdir)/gaussian-blur-view
develapimagnifierdir = $(develapicontrolsdir)/magnifier
-develapipageturnviewdir = $(develapicontrolsdir)/page-turn-view
develapipopupdir = $(develapicontrolsdir)/popup
develapishadowviewdir = $(develapicontrolsdir)/shadow-view
develapisuperblurviewdir = $(develapicontrolsdir)/super-blur-view
develapigaussianblurview_HEADERS = $(devel_api_gaussian_blur_view_header_files)
develapiimageatlas_HEADERS = $(devel_api_image_atlas_header_files)
develapimagnifier_HEADERS = $(devel_api_magnifier_header_files)
-develapipageturnview_HEADERS = $(devel_api_page_turn_view_header_files)
develapipopup_HEADERS = $(devel_api_popup_header_files)
develapivisualfactory_HEADERS = $(devel_api_visual_factory_header_files)
develapiscripting_HEADERS = $(devel_api_scripting_header_files)
publicapiimageviewdir = $(publicapicontrolsdir)/image-view
publicapivideoviewdir = $(publicapicontrolsdir)/video-view
publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view
+publicapipageturnviewdir = $(publicapicontrolsdir)/page-turn-view
publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar
publicapiscrollabledir = $(publicapicontrolsdir)/scrollable
publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view
publicapivideoview_HEADERS = $(public_api_video_view_header_files)
publicapiitemview_HEADERS = $(public_api_item_view_header_files)
publicapimodel3dview_HEADERS = $(public_api_model3d_view_header_files)
+publicapipageturnview_HEADERS = $(public_api_page_turn_view_header_files)
publicapiscrollbar_HEADERS = $(public_api_scroll_bar_header_files)
publicapiscrollable_HEADERS = $(public_api_scrollable_header_files)
publicapiscrollview_HEADERS = $(public_api_scroll_view_header_files)
#include <dali-toolkit/public-api/controls/flex-container/flex-container.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
+++ /dev/null
-#ifndef __DALI_TOOLKIT_PAGE_FACTORY_H__
-#define __DALI_TOOLKIT_PAGE_FACTORY_H__
-
-/*
- * Copyright (c) 2016 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 <dali/public-api/actors/actor.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-/**
- * @brief PageFactory is an abstract interface for providing images to PageTurnView
- * Each page is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageFactory
-{
-public:
-
- class Extension; ///< Forward declare future extension interface
-
- /**
- * @brief Virtual destructor
- * @SINCE_1_1.4
- */
- virtual ~PageFactory(){};
-
- /**
- * @brief Query the number of pages available from the factory.
- *
- * The maximum available page has an ID of GetNumberOfPages()-1.
- * @SINCE_1_1.4
- * @return The page count.
- */
- virtual unsigned int GetNumberOfPages() = 0;
-
- /**
- * @brief Create an actor to represent the page content.
- * @SINCE_1_1.30
- *
- * If no valid image provided, a broken image is displayed.
- * For double-sided page( PageTurnLandscapeView ), the left half of image is used as page front side, and the right half as page back side.
- *
- * @param[in] pageId The ID of the page to create.
- * @return An actor, or an uninitialized pointer if the ID is out of range.
- */
- virtual Image NewPage( unsigned int pageId ) = 0;
-
- /**
- * @brief Retrieve the extension for this factory
- * @SINCE_1_1.30
- *
- * @return The extension if available, NULL otherwise.
- */
- virtual Extension* GetExtension()
- {
- return NULL;
- }
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-#endif /* __DALI_TOOLKIT_PAGE_FACTORY_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnLandscapeView::PageTurnLandscapeView()
-: PageTurnView()
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView )
-: PageTurnView( pageTurnLandscapeView )
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation )
-: PageTurnView( implementation )
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( Dali::Internal::CustomActor* internal )
-: PageTurnView( internal )
-{
- VerifyCustomActorPointer<Internal::PageTurnLandscapeView>( internal );
-}
-
-PageTurnLandscapeView& PageTurnLandscapeView::operator=( const PageTurnLandscapeView& pageTurnLandscapeView )
-{
- if( &pageTurnLandscapeView != this)
- {
- PageTurnView::operator=( pageTurnLandscapeView );
- }
- return *this;
-}
-
-PageTurnLandscapeView::~PageTurnLandscapeView()
-{
-}
-
-PageTurnLandscapeView PageTurnLandscapeView::New( PageFactory& pageFactory, const Vector2& pageSize )
-{
- return Internal::PageTurnLandscapeView::New(pageFactory, pageSize);
-}
-
-PageTurnLandscapeView PageTurnLandscapeView::DownCast( BaseHandle handle )
-{
- return Control::DownCast<PageTurnLandscapeView, Internal::PageTurnLandscapeView>( handle );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-// Forward declarations
-class PageTurnLandscapeView;
-}
-
-/**
- * @brief PageTurnLandscapeView provides a page turn view in landscape mode
- * @SINCE_1_0.0
- */
-class DALI_IMPORT_API PageTurnLandscapeView : public PageTurnView
-{
-public:
- /**
- * @brief Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New()
- * Calling member functions with an uninitialized Dali::Object is not allowed.
- * @SINCE_1_0.0
- */
- PageTurnLandscapeView();
-
- /**
- * @brief Copy constructor.
- * @SINCE_1_0.0
- */
- PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView );
-
- /**
- * @brief Assignment operator.
- * @SINCE_1_0.0
- */
- PageTurnLandscapeView& operator=( const PageTurnLandscapeView& pageTurnLandscapeView );
-
- /**
- * @brief Destructor
- *
- * This is non-virtual since derived Handle types must not contain data or virtual methods.
- * @SINCE_1_0.0
- */
- ~PageTurnLandscapeView();
-
- /**
- * @brief Create an initialized PageTurnLandscapeView control
- * @SINCE_1_0.0
- * @param[in] pageFactory The factory which provides PageTurnView with pages.
- * @param[in] pageSize The size of the page
- * @return A handle to the PageTurnLandscapeView control.
- */
- static PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& pageSize );
-
- /**
- * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the
- * downcast produces valid handle. If not the returned handle is left uninitialized.
- * @SINCE_1_0.0
- * @param[in] handle Handle to an object
- * @return handle to a PageTurnLandscapeView or an uninitialized handle
- */
- static PageTurnLandscapeView DownCast( BaseHandle handle );
-
-public: // Not intended for application developers
-
- /**
- * @internal
- * @brief Creates a handle using the Toolkit::Internal implementation.
- * @SINCE_1_0.0
- * @param[in] implementation The Control implementation.
- */
- DALI_INTERNAL PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation );
-
- /**
- * @internal
- * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
- * @SINCE_1_0.0
- * @param[in] internal A pointer to the internal CustomActor.
- */
- explicit DALI_INTERNAL PageTurnLandscapeView( Dali::Internal::CustomActor* internal );
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnPortraitView::PageTurnPortraitView()
-: PageTurnView()
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView )
-: PageTurnView( pageTurnPortraitView )
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( Internal::PageTurnPortraitView& implementation )
-: PageTurnView( implementation )
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( Dali::Internal::CustomActor* internal )
-: PageTurnView( internal )
-{
- VerifyCustomActorPointer<Internal::PageTurnPortraitView>( internal );
-}
-
-PageTurnPortraitView& PageTurnPortraitView::operator=( const PageTurnPortraitView& pageTurnPortraitView )
-{
- if( &pageTurnPortraitView != this)
- {
- PageTurnView::operator=( pageTurnPortraitView );
- }
- return *this;
-}
-
-PageTurnPortraitView::~PageTurnPortraitView()
-{
-}
-
-PageTurnPortraitView PageTurnPortraitView::New( PageFactory& pageFactory, const Vector2& pageSize)
-{
- return Internal::PageTurnPortraitView::New(pageFactory, pageSize);
-}
-
-PageTurnPortraitView PageTurnPortraitView::DownCast( BaseHandle handle )
-{
- return Control::DownCast<PageTurnPortraitView, Internal::PageTurnPortraitView>( handle );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-// Forward declarations
-class PageTurnPortraitView;
-}
-
-/**
- * @brief PageTurnPortraitView provides a page turn view in portrait mode
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageTurnPortraitView : public PageTurnView
-{
-public:
- /**
- * @brief Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New()
- * Calling member functions with an uninitialized Dali::Object is not allowed.
- * @SINCE_1_1.4
- */
- PageTurnPortraitView();
-
- /**
- * @brief Copy constructor.
- * @SINCE_1_1.4
- */
- PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView );
-
- /**
- * @brief Assignment operator.
- * @SINCE_1_1.4
- */
- PageTurnPortraitView& operator=( const PageTurnPortraitView& pageTurnPortraitView );
-
- /**
- * @brief Destructor
- *
- * This is non-virtual since derived Handle types must not contain data or virtual methods.
- * @SINCE_1_1.4
- */
- ~PageTurnPortraitView();
-
- /**
- * @brief Create an initialized PageTurnPortraitView control
- * @SINCE_1_1.4
- * @param[in] pageFactory The factory which provides PageTurnView with pages.
- * @param[in] pageSize The size of the page
- * @return A handle to the PageTurnPortraitView control.
- */
- static PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& pageSize );
-
- /**
- * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the
- * downcast produces valid handle. If not the returned handle is left uninitialized.
- * @SINCE_1_1.4
- * @param[in] handle Handle to an object
- * @return handle to a PageTurnPortraitView or an uninitialized handle
- */
- static PageTurnPortraitView DownCast( BaseHandle handle );
-
-public: // Not intended for application developers
-
- /**
- * @internal
- * @brief Creates a handle using the Toolkit::Internal implementation.
- * @SINCE_1_1.4
- * @param[in] implementation The Control implementation.
- */
- DALI_INTERNAL PageTurnPortraitView( Internal::PageTurnPortraitView& implementation );
-
- /**
- * @internal
- * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
- * @SINCE_1_1.4
- * @param[in] internal A pointer to the internal CustomActor.
- */
- explicit DALI_INTERNAL PageTurnPortraitView( Dali::Internal::CustomActor* internal );
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
-
-using namespace Dali;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnView::PageTurnView()
-{
-}
-
-PageTurnView::PageTurnView( const PageTurnView& handle )
-: Control( handle )
-{
-}
-
-PageTurnView& PageTurnView::operator=( const PageTurnView& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
-
-PageTurnView::~PageTurnView()
-{
-}
-
-PageTurnView PageTurnView::DownCast( BaseHandle handle )
-{
- return Control::DownCast<PageTurnView, Internal::PageTurnView>(handle);
-}
-
-PageTurnView::PageTurnView( Internal::PageTurnView& implementation )
-: Control( implementation )
-{
-}
-
-PageTurnView::PageTurnView( Dali::Internal::CustomActor* internal )
-: Control( internal )
-{
- VerifyCustomActorPointer<Internal::PageTurnView>(internal);
-}
-
-PageTurnView::PageTurnSignal& PageTurnView::PageTurnStartedSignal()
-{
- return Toolkit::GetImplementation( *this ).PageTurnStartedSignal();
-}
-
-PageTurnView::PageTurnSignal& PageTurnView::PageTurnFinishedSignal()
-{
- return Toolkit::GetImplementation( *this ).PageTurnFinishedSignal();
-}
-
-PageTurnView::PagePanSignal& PageTurnView::PagePanStartedSignal()
-{
- return Toolkit::GetImplementation( *this ).PagePanStartedSignal();
-}
-
-PageTurnView::PagePanSignal& PageTurnView::PagePanFinishedSignal()
-{
- return Toolkit::GetImplementation( *this ).PagePanFinishedSignal();
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-// Forward declarations
-class PageFactory;
-
-namespace Internal DALI_INTERNAL
-{
-class PageTurnView;
-}
-
-/**
- * @brief PageTurnView is a base class of different mode of pageTurnViews ( portrait or landscape )
- *
- * Page actors are provided from an external PageFactory
- * PanGesture is used to activate the page bending, streching and tuning forward/backward
- *
- * Signal usage: There are four signals. Two matching pairs for panning and page turning:
- * PagePanStarted/PagePanFinished and PageTurnStarted/PageTurnFinished. Panning relates to user interaction with
- * the screen while page turning refers to animation of the page. There are three scenarios for these
- * events: normal page turn (forwards or backwards), aborted page turn (forwards or backwards)
- * and pan with no animation. The order of events is as follows:
- * 1) Normal page turn: PagePanStarted -> PageTurnStarted direction -> PagePanFinished -> PageTurnFinished direction
- * 2) Aborted page turn: PagePanStarted -> PageTurnStarted direction -> PageTurnStarted opposite direction
- * -> PagePanFinished -> PageTurnFinished opposite direction
- * 3) Pan with no animation: PagePanStarted -> PagePanFinished
- * Pan with no animation will occur when the user touches the page in an area that does not start the
- * page turning.
- *
- * Signals
- * | %Signal Name | Method |
- * |------------------|-------------------------------|
- * | pageTurnStarted | @ref PageTurnStartedSignal() |
- * | pageTurnFinished | @ref PageTurnFinishedSignal() |
- * | pagePanStarted | @ref PagePanStartedSignal() |
- * | pagePanFinished | @ref PagePanFinishedSignal() |
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageTurnView : public Control
-{
-public:
-
- /**
- * @brief The start and end property ranges for this control.
- * @SINCE_1_1.4
- */
- enum PropertyRange
- {
- PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4
- PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_1.4
- };
-
- struct Property
- {
- enum
- {
- PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize", type Vector2 @SINCE_1_1.4
- CURRENT_PAGE_ID, ///< name "currentPageId", type Integer @SINCE_1_1.4
-
- /**
- * The two values are the major&minor radius (in pixels) to form an ellipse shape.
- * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow.
- */
- SPINE_SHADOW, ///< name "spineShadow", type Vector2 @SINCE_1_1.4
- };
- };
-
- /**
- * @brief Creates an empty PageTurnView handle. Only derived versions can be instantiated.
- * Calling member function with an uninitialized handle is not allowed.
- * @SINCE_1_1.4
- */
- PageTurnView();
-
- /**
- * @brief Copy constructor. Creates another handle that points to the same real object
- * @SINCE_1_1.4
- * @param[in] handle Handle to copy from
- */
- PageTurnView( const PageTurnView& handle );
-
- /**
- * @brief Assignment operator. Changes this handle to point to another real object
- * @SINCE_1_1.4
- */
- PageTurnView& operator=( const PageTurnView& handle );
-
- /**
- * @brief Destructor
- *
- * This is non-virtual since derived Handle types must not contain data or virtual methods.
- * @SINCE_1_1.4
- */
- ~PageTurnView();
-
- /**
- * @brief Downcast an Object handle to PageTurnView.
- * If handle points to an PageTurnView the downcast produces valid handle.
- * If not the returned handle is left uninitialized.
- * @SINCE_1_1.4
- * @param[in] handle Handle to an object
- * @return handle to a PageTurnView or an uninitialized handle
- */
- static PageTurnView DownCast( BaseHandle handle );
-
-public: //Signal
-
- // Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)
- typedef Signal< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
- typedef Signal< void ( PageTurnView ) > PagePanSignal;
-
- /**
- * @brief Signal emitted when a page has started to turn over.
- * A callback of the following type may be connected:
- * @code
- * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
- * @endcode
- * @SINCE_1_1.4
- * @return The signal to connect to
- */
- PageTurnSignal& PageTurnStartedSignal();
-
- /**
- * @brief Signal emitted when a page has finished turning over.
- * A callback of the following type may be connected:
- * @code
- * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
- * @endcode
- * @SINCE_1_1.4
- * @return The signal to connect to
- */
- PageTurnSignal& PageTurnFinishedSignal();
-
- /**
- * @brief Signal emitted when a page pan has commenced
- * A callback of the following type may be connected:
- * @code
- * void YourCallBackName( PageTurnView pageTurnView );
- * @endcode
- * @SINCE_1_1.4
- * @return The signal to connect to
- */
- PagePanSignal& PagePanStartedSignal();
-
- /**
- * @brief Signal emitted when a page pan has finished
- * A callback of the following type may be connected:
- * @code
- * void YourCallBackName( PageTurnView pageTurnView );
- * @endcode
- * @SINCE_1_1.4
- * @return The signal to connect to
- */
- PagePanSignal& PagePanFinishedSignal();
-
-public: // Not intended for application developers
-
- /**
- * @internal
- * @brief Creates a handle using the Toolkit::Internal implementation.
- * @SINCE_1_1.4
- * @param[in] implementation The Control implementation.
- */
- DALI_INTERNAL PageTurnView(Internal::PageTurnView& implementation);
-
- /**
- * @internal
- * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
- * @SINCE_1_1.4
- * @param[in] internal A pointer to the internal CustomActor.
- */
- explicit DALI_INTERNAL PageTurnView(Dali::Internal::CustomActor* internal);
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_VIEW_H__ */
$(devel_api_src_dir)/controls/bubble-effect/bubble-emitter.cpp \
$(devel_api_src_dir)/controls/effects-view/effects-view.cpp \
$(devel_api_src_dir)/controls/magnifier/magnifier.cpp \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.cpp \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
$(devel_api_src_dir)/controls/popup/confirmation-popup.cpp \
$(devel_api_src_dir)/controls/popup/popup.cpp \
$(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \
devel_api_magnifier_header_files = \
$(devel_api_src_dir)/controls/magnifier/magnifier.h
-devel_api_page_turn_view_header_files = \
- $(devel_api_src_dir)/controls/page-turn-view/page-factory.h \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.h \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.h \
- $(devel_api_src_dir)/controls/page-turn-view/page-turn-view.h
-
devel_api_popup_header_files = \
$(devel_api_src_dir)/controls/popup/confirmation-popup.h \
$(devel_api_src_dir)/controls/popup/popup.h
#define __DALI_TOOLKIT_INTERNAL_PAGE_TURN_LANDSCAPE_VIEW_IMPL_H__
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
*/
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
namespace Dali
#define __DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H__
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
*/
// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
namespace Dali
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
#include <dali-toolkit/devel-api/controls/shadow-view/shadow-view.h>
namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_PAGE_FACTORY_H__
+#define __DALI_TOOLKIT_PAGE_FACTORY_H__
+
+/*
+ * 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.
+ * 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 <dali/public-api/actors/actor.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @brief PageFactory is an abstract interface for providing images to PageTurnView
+ * Each page is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageFactory
+{
+public:
+
+ class Extension; ///< Forward declare future extension interface
+
+ /**
+ * @brief Virtual destructor
+ * @SINCE_1_1.4
+ */
+ virtual ~PageFactory(){};
+
+ /**
+ * @brief Query the number of pages available from the factory.
+ *
+ * The maximum available page has an ID of GetNumberOfPages()-1.
+ * @SINCE_1_1.4
+ * @return The page count.
+ */
+ virtual unsigned int GetNumberOfPages() = 0;
+
+ /**
+ * @brief Create an actor to represent the page content.
+ * @SINCE_1_1.30
+ *
+ * If no valid image provided, a broken image is displayed.
+ * For double-sided page( PageTurnLandscapeView ), the left half of image is used as page front side, and the right half as page back side.
+ *
+ * @param[in] pageId The ID of the page to create.
+ * @return An actor, or an uninitialized pointer if the ID is out of range.
+ */
+ virtual Image NewPage( unsigned int pageId ) = 0;
+
+ /**
+ * @brief Retrieve the extension for this factory
+ * @SINCE_1_1.30
+ *
+ * @return The extension if available, NULL otherwise.
+ */
+ virtual Extension* GetExtension()
+ {
+ return NULL;
+ }
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+#endif /* __DALI_TOOLKIT_PAGE_FACTORY_H__ */
--- /dev/null
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnLandscapeView::PageTurnLandscapeView()
+: PageTurnView()
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView )
+: PageTurnView( pageTurnLandscapeView )
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation )
+: PageTurnView( implementation )
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( Dali::Internal::CustomActor* internal )
+: PageTurnView( internal )
+{
+ VerifyCustomActorPointer<Internal::PageTurnLandscapeView>( internal );
+}
+
+PageTurnLandscapeView& PageTurnLandscapeView::operator=( const PageTurnLandscapeView& pageTurnLandscapeView )
+{
+ if( &pageTurnLandscapeView != this)
+ {
+ PageTurnView::operator=( pageTurnLandscapeView );
+ }
+ return *this;
+}
+
+PageTurnLandscapeView::~PageTurnLandscapeView()
+{
+}
+
+PageTurnLandscapeView PageTurnLandscapeView::New( PageFactory& pageFactory, const Vector2& pageSize )
+{
+ return Internal::PageTurnLandscapeView::New(pageFactory, pageSize);
+}
+
+PageTurnLandscapeView PageTurnLandscapeView::DownCast( BaseHandle handle )
+{
+ return Control::DownCast<PageTurnLandscapeView, Internal::PageTurnLandscapeView>( handle );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal DALI_INTERNAL
+{
+// Forward declarations
+class PageTurnLandscapeView;
+}
+
+/**
+ * @brief PageTurnLandscapeView provides a page turn view in landscape mode
+ * @SINCE_1_0.0
+ */
+class DALI_IMPORT_API PageTurnLandscapeView : public PageTurnView
+{
+public:
+ /**
+ * @brief Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New()
+ * Calling member functions with an uninitialized Dali::Object is not allowed.
+ * @SINCE_1_0.0
+ */
+ PageTurnLandscapeView();
+
+ /**
+ * @brief Copy constructor.
+ * @SINCE_1_0.0
+ */
+ PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView );
+
+ /**
+ * @brief Assignment operator.
+ * @SINCE_1_0.0
+ */
+ PageTurnLandscapeView& operator=( const PageTurnLandscapeView& pageTurnLandscapeView );
+
+ /**
+ * @brief Destructor
+ *
+ * This is non-virtual since derived Handle types must not contain data or virtual methods.
+ * @SINCE_1_0.0
+ */
+ ~PageTurnLandscapeView();
+
+ /**
+ * @brief Create an initialized PageTurnLandscapeView control
+ * @SINCE_1_0.0
+ * @param[in] pageFactory The factory which provides PageTurnView with pages.
+ * @param[in] pageSize The size of the page
+ * @return A handle to the PageTurnLandscapeView control.
+ */
+ static PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& pageSize );
+
+ /**
+ * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the
+ * downcast produces valid handle. If not the returned handle is left uninitialized.
+ * @SINCE_1_0.0
+ * @param[in] handle Handle to an object
+ * @return handle to a PageTurnLandscapeView or an uninitialized handle
+ */
+ static PageTurnLandscapeView DownCast( BaseHandle handle );
+
+public: // Not intended for application developers
+
+ /**
+ * @internal
+ * @brief Creates a handle using the Toolkit::Internal implementation.
+ * @SINCE_1_0.0
+ * @param[in] implementation The Control implementation.
+ */
+ DALI_INTERNAL PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation );
+
+ /**
+ * @internal
+ * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+ * @SINCE_1_0.0
+ * @param[in] internal A pointer to the internal CustomActor.
+ */
+ explicit DALI_INTERNAL PageTurnLandscapeView( Dali::Internal::CustomActor* internal );
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__ */
--- /dev/null
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnPortraitView::PageTurnPortraitView()
+: PageTurnView()
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView )
+: PageTurnView( pageTurnPortraitView )
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( Internal::PageTurnPortraitView& implementation )
+: PageTurnView( implementation )
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( Dali::Internal::CustomActor* internal )
+: PageTurnView( internal )
+{
+ VerifyCustomActorPointer<Internal::PageTurnPortraitView>( internal );
+}
+
+PageTurnPortraitView& PageTurnPortraitView::operator=( const PageTurnPortraitView& pageTurnPortraitView )
+{
+ if( &pageTurnPortraitView != this)
+ {
+ PageTurnView::operator=( pageTurnPortraitView );
+ }
+ return *this;
+}
+
+PageTurnPortraitView::~PageTurnPortraitView()
+{
+}
+
+PageTurnPortraitView PageTurnPortraitView::New( PageFactory& pageFactory, const Vector2& pageSize)
+{
+ return Internal::PageTurnPortraitView::New(pageFactory, pageSize);
+}
+
+PageTurnPortraitView PageTurnPortraitView::DownCast( BaseHandle handle )
+{
+ return Control::DownCast<PageTurnPortraitView, Internal::PageTurnPortraitView>( handle );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal DALI_INTERNAL
+{
+// Forward declarations
+class PageTurnPortraitView;
+}
+
+/**
+ * @brief PageTurnPortraitView provides a page turn view in portrait mode
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageTurnPortraitView : public PageTurnView
+{
+public:
+ /**
+ * @brief Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New()
+ * Calling member functions with an uninitialized Dali::Object is not allowed.
+ * @SINCE_1_1.4
+ */
+ PageTurnPortraitView();
+
+ /**
+ * @brief Copy constructor.
+ * @SINCE_1_1.4
+ */
+ PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView );
+
+ /**
+ * @brief Assignment operator.
+ * @SINCE_1_1.4
+ */
+ PageTurnPortraitView& operator=( const PageTurnPortraitView& pageTurnPortraitView );
+
+ /**
+ * @brief Destructor
+ *
+ * This is non-virtual since derived Handle types must not contain data or virtual methods.
+ * @SINCE_1_1.4
+ */
+ ~PageTurnPortraitView();
+
+ /**
+ * @brief Create an initialized PageTurnPortraitView control
+ * @SINCE_1_1.4
+ * @param[in] pageFactory The factory which provides PageTurnView with pages.
+ * @param[in] pageSize The size of the page
+ * @return A handle to the PageTurnPortraitView control.
+ */
+ static PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& pageSize );
+
+ /**
+ * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the
+ * downcast produces valid handle. If not the returned handle is left uninitialized.
+ * @SINCE_1_1.4
+ * @param[in] handle Handle to an object
+ * @return handle to a PageTurnPortraitView or an uninitialized handle
+ */
+ static PageTurnPortraitView DownCast( BaseHandle handle );
+
+public: // Not intended for application developers
+
+ /**
+ * @internal
+ * @brief Creates a handle using the Toolkit::Internal implementation.
+ * @SINCE_1_1.4
+ * @param[in] implementation The Control implementation.
+ */
+ DALI_INTERNAL PageTurnPortraitView( Internal::PageTurnPortraitView& implementation );
+
+ /**
+ * @internal
+ * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+ * @SINCE_1_1.4
+ * @param[in] internal A pointer to the internal CustomActor.
+ */
+ explicit DALI_INTERNAL PageTurnPortraitView( Dali::Internal::CustomActor* internal );
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__ */
--- /dev/null
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
+
+using namespace Dali;
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnView::PageTurnView()
+{
+}
+
+PageTurnView::PageTurnView( const PageTurnView& handle )
+: Control( handle )
+{
+}
+
+PageTurnView& PageTurnView::operator=( const PageTurnView& handle )
+{
+ if( &handle != this )
+ {
+ Control::operator=( handle );
+ }
+ return *this;
+}
+
+PageTurnView::~PageTurnView()
+{
+}
+
+PageTurnView PageTurnView::DownCast( BaseHandle handle )
+{
+ return Control::DownCast<PageTurnView, Internal::PageTurnView>(handle);
+}
+
+PageTurnView::PageTurnView( Internal::PageTurnView& implementation )
+: Control( implementation )
+{
+}
+
+PageTurnView::PageTurnView( Dali::Internal::CustomActor* internal )
+: Control( internal )
+{
+ VerifyCustomActorPointer<Internal::PageTurnView>(internal);
+}
+
+PageTurnView::PageTurnSignal& PageTurnView::PageTurnStartedSignal()
+{
+ return Toolkit::GetImplementation( *this ).PageTurnStartedSignal();
+}
+
+PageTurnView::PageTurnSignal& PageTurnView::PageTurnFinishedSignal()
+{
+ return Toolkit::GetImplementation( *this ).PageTurnFinishedSignal();
+}
+
+PageTurnView::PagePanSignal& PageTurnView::PagePanStartedSignal()
+{
+ return Toolkit::GetImplementation( *this ).PagePanStartedSignal();
+}
+
+PageTurnView::PagePanSignal& PageTurnView::PagePanFinishedSignal()
+{
+ return Toolkit::GetImplementation( *this ).PagePanFinishedSignal();
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/control.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+// Forward declarations
+class PageFactory;
+
+namespace Internal DALI_INTERNAL
+{
+class PageTurnView;
+}
+
+/**
+ * @brief PageTurnView is a base class of different mode of pageTurnViews ( portrait or landscape )
+ *
+ * Page actors are provided from an external PageFactory
+ * PanGesture is used to activate the page bending, streching and tuning forward/backward
+ *
+ * Signal usage: There are four signals. Two matching pairs for panning and page turning:
+ * PagePanStarted/PagePanFinished and PageTurnStarted/PageTurnFinished. Panning relates to user interaction with
+ * the screen while page turning refers to animation of the page. There are three scenarios for these
+ * events: normal page turn (forwards or backwards), aborted page turn (forwards or backwards)
+ * and pan with no animation. The order of events is as follows:
+ * 1) Normal page turn: PagePanStarted -> PageTurnStarted direction -> PagePanFinished -> PageTurnFinished direction
+ * 2) Aborted page turn: PagePanStarted -> PageTurnStarted direction -> PageTurnStarted opposite direction
+ * -> PagePanFinished -> PageTurnFinished opposite direction
+ * 3) Pan with no animation: PagePanStarted -> PagePanFinished
+ * Pan with no animation will occur when the user touches the page in an area that does not start the
+ * page turning.
+ *
+ * Signals
+ * | %Signal Name | Method |
+ * |------------------|-------------------------------|
+ * | pageTurnStarted | @ref PageTurnStartedSignal() |
+ * | pageTurnFinished | @ref PageTurnFinishedSignal() |
+ * | pagePanStarted | @ref PagePanStartedSignal() |
+ * | pagePanFinished | @ref PagePanFinishedSignal() |
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageTurnView : public Control
+{
+public:
+
+ /**
+ * @brief The start and end property ranges for this control.
+ * @SINCE_1_1.4
+ */
+ enum PropertyRange
+ {
+ PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_1.4
+ };
+
+ struct Property
+ {
+ enum
+ {
+ PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize", type Vector2 @SINCE_1_1.4
+ CURRENT_PAGE_ID, ///< name "currentPageId", type Integer @SINCE_1_1.4
+
+ /**
+ * The two values are the major&minor radius (in pixels) to form an ellipse shape.
+ * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow.
+ */
+ SPINE_SHADOW, ///< name "spineShadow", type Vector2 @SINCE_1_1.4
+ };
+ };
+
+ /**
+ * @brief Creates an empty PageTurnView handle. Only derived versions can be instantiated.
+ * Calling member function with an uninitialized handle is not allowed.
+ * @SINCE_1_1.4
+ */
+ PageTurnView();
+
+ /**
+ * @brief Copy constructor. Creates another handle that points to the same real object
+ * @SINCE_1_1.4
+ * @param[in] handle Handle to copy from
+ */
+ PageTurnView( const PageTurnView& handle );
+
+ /**
+ * @brief Assignment operator. Changes this handle to point to another real object
+ * @SINCE_1_1.4
+ */
+ PageTurnView& operator=( const PageTurnView& handle );
+
+ /**
+ * @brief Destructor
+ *
+ * This is non-virtual since derived Handle types must not contain data or virtual methods.
+ * @SINCE_1_1.4
+ */
+ ~PageTurnView();
+
+ /**
+ * @brief Downcast an Object handle to PageTurnView.
+ * If handle points to an PageTurnView the downcast produces valid handle.
+ * If not the returned handle is left uninitialized.
+ * @SINCE_1_1.4
+ * @param[in] handle Handle to an object
+ * @return handle to a PageTurnView or an uninitialized handle
+ */
+ static PageTurnView DownCast( BaseHandle handle );
+
+public: //Signal
+
+ // Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)
+ typedef Signal< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
+ typedef Signal< void ( PageTurnView ) > PagePanSignal;
+
+ /**
+ * @brief Signal emitted when a page has started to turn over.
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
+ * @endcode
+ * @SINCE_1_1.4
+ * @return The signal to connect to
+ */
+ PageTurnSignal& PageTurnStartedSignal();
+
+ /**
+ * @brief Signal emitted when a page has finished turning over.
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
+ * @endcode
+ * @SINCE_1_1.4
+ * @return The signal to connect to
+ */
+ PageTurnSignal& PageTurnFinishedSignal();
+
+ /**
+ * @brief Signal emitted when a page pan has commenced
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallBackName( PageTurnView pageTurnView );
+ * @endcode
+ * @SINCE_1_1.4
+ * @return The signal to connect to
+ */
+ PagePanSignal& PagePanStartedSignal();
+
+ /**
+ * @brief Signal emitted when a page pan has finished
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallBackName( PageTurnView pageTurnView );
+ * @endcode
+ * @SINCE_1_1.4
+ * @return The signal to connect to
+ */
+ PagePanSignal& PagePanFinishedSignal();
+
+public: // Not intended for application developers
+
+ /**
+ * @internal
+ * @brief Creates a handle using the Toolkit::Internal implementation.
+ * @SINCE_1_1.4
+ * @param[in] implementation The Control implementation.
+ */
+ DALI_INTERNAL PageTurnView(Internal::PageTurnView& implementation);
+
+ /**
+ * @internal
+ * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+ * @SINCE_1_1.4
+ * @param[in] internal A pointer to the internal CustomActor.
+ */
+ explicit DALI_INTERNAL PageTurnView(Dali::Internal::CustomActor* internal);
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_VIEW_H__ */
$(public_api_src_dir)/controls/flex-container/flex-container.cpp \
$(public_api_src_dir)/controls/image-view/image-view.cpp \
$(public_api_src_dir)/controls/model3d-view/model3d-view.cpp \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.cpp \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
$(public_api_src_dir)/controls/scroll-bar/scroll-bar.cpp \
$(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.cpp \
$(public_api_src_dir)/controls/scrollable/item-view/item-layout.cpp \
public_api_image_view_header_files = \
$(public_api_src_dir)/controls/image-view/image-view.h
+public_api_page_turn_view_header_files = \
+ $(public_api_src_dir)/controls/page-turn-view/page-factory.h \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.h \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.h \
+ $(public_api_src_dir)/controls/page-turn-view/page-turn-view.h
+
public_api_item_view_header_files = \
$(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \
$(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \