X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fpage-turn-view%2Fpage-turn-view.h;h=9898791b15a72f6f4b5dd0f8c8fd55f0cb472640;hp=fa068ecb8e521f70183bcac9fabb225dde6bb2b9;hb=615572d21ca43c37388d9de980a8d1265e8c21fd;hpb=57869973578f6a0b0f836d396c7232ddb8302c6b diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h index fa068ec..9898791 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_PAGE_TURN_VIEW_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * 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. @@ -36,7 +36,8 @@ class PageTurnView; } /** - * PageTurnView is a base class of different mode of pageTurnViews ( portrait or landscape ) + * @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 * @@ -51,12 +52,46 @@ class PageTurnView; * 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 | + * |--------------------|-------------------------------| + * | page-turn-started | @ref PageTurnStartedSignal() | + * | page-turn-finished | @ref PageTurnFinishedSignal() | + * | page-pan-started | @ref PagePanStartedSignal() | + * | page-pan-finished | @ref PagePanFinishedSignal() | + * + * @since DALi 1.1.4 */ class DALI_IMPORT_API PageTurnView : public Control { public: /** + * @brief The start and end property ranges for this control. + */ + enum PropertyRange + { + PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + }; + + struct Property + { + enum + { + PAGE_SIZE = PROPERTY_START_INDEX, ///< name "page-size", type Vector2 + CURRENT_PAGE_ID, ///< name "current-page-id", type Integer + + /** + * 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 "spine-shadow", type Vector2 + }; + }; + + /** * Creates an empty PageTurnView handle. Only derived versions can be instantiated. * Calling member function with an uninitialized handle is not allowed. */ @@ -89,67 +124,6 @@ public: */ static PageTurnView DownCast( BaseHandle handle ); - /** - * Set the spine shadow parameter to the shader effects - * The two parameters 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 - * @param [in] spineShadowParameter The major&minor ellipse radius for the simulated spine shadow - */ - void SetSpineShadowParameter( const Vector2& spineShadowParameter ); - - /** - * Retrieve the spine shadow parameter of the shader effects - * @return The major&minor ellipse radius for the simulated spine shadow - */ - Vector2 GetSpineShadowParameter(); - - /* - * Go to a specific page - * @param[in] pageId The new current page index - */ - void GoToPage( unsigned int pageId ); - - /** - * Retrieve the index of the current Page - * @return The index of the current page - */ - unsigned int GetCurrentPage(); - - /** - * Enter edit mode - * Case 1, the page factory passes image actor into the view as page content, do nothing. - * Case 2, the page factory passes an actor tree into the view as page content, - * the actor tree will receive the touch event in edit mode, and set the refresh rate of the off screen render task to always - * @return an empty actor in case 1; the actor tree root of the current page - */ - Actor EnterEditMode(); - - /** - * Leave edit mode - * Case 1, the page factory passes image actor into the view as page content, do nothing. - * Case 2, the page factory passes an actor tree into the view as page content, - * the page actor will receive all the touch event, and set the refresh rage of the off screen render task to once. - */ - void LeaveEditMode(); - - /** - * Return the actor get hit in the actor tree of the current page by given the touch position on the PageTurnView - * @param[in] screenCoordinates The hit position of the PageTurnView - * @param[out] actorCoordinates The local hit position of the hitted actor - * @return the hitted actor - */ - Actor GetHitActor( Vector2& screenCoordinates, Vector2& actorCoordinates ); - - /** - * Refresh all the cached pages by calling the render task to refresh. - */ - void RefreshAll(); - - /** - * Refresh current page by calling the render task to refresh - */ - void RefreshCurrentPage(); - public: //Signal // Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)