X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fpage-turn-view%2Fpage-factory.h;h=2b7cd65aa4c96aab5566328fdf2a7b8190ce90ac;hb=42492df08f8a079da70931292aebb56e1252641d;hp=dbf9fc9267303957e163f2ff8e55d866bc3f4a56;hpb=306d2f61a1b64179e801fa8a0bb2bd7b4e9dd682;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-factory.h b/dali-toolkit/public-api/controls/page-turn-view/page-factory.h index dbf9fc9..2b7cd65 100644 --- a/dali-toolkit/public-api/controls/page-turn-view/page-factory.h +++ b/dali-toolkit/public-api/controls/page-turn-view/page-factory.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_PAGE_FACTORY_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. @@ -28,93 +28,54 @@ namespace Toolkit { /** - * PageFactory is an abstract interface for providing image actors to PageTurnView - * Each image actor is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1 + * @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: - // Property Names - static const std::string ACTOR_HITTABLE; ///< name "actor-hittable", type bool - -public: - - /** - * Constructor - * By default, the off screen rendering is disabled - * Is off screen rendering is required to create the page image, - * call EnableOffscreenRendering() before pass it as parameter to the PageTurnView - */ - PageFactory(); - - /** - * Virtual destructor - */ - virtual ~PageFactory(); - /** - * Enable the off screen rendering to create the page image from actor tree - */ - void EnableOffscreenRendering( ); + class Extension; ///< Forward declare future extension interface /** - * Query whether offscreen rendering is needed to create the page image - * @return + * @brief Virtual destructor + * @SINCE_1_1.4 */ - bool IsOffscreenRenderingNeeded(); + virtual ~PageFactory(){}; /** - * Query the number of pages available from the factory. + * @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; /** - * Create an actor to represent the page content. + * @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 Actor NewPage( unsigned int pageId ) = 0; - -public: //Signal - /** - * Signal type for notification - */ - typedef Signal< void ( int ) > RefreshSignal; + virtual Image NewPage( unsigned int pageId ) = 0; /** - * Signal emitted when the Actor tree is ready for rendering into the page image. - * The signal is connected to the page refresh function inside PageTurnView. + * @brief Retrieve the extension for this factory + * @SINCE_1_1.30 + * + * @return The extension if available, NULL otherwise. */ - RefreshSignal& PageRefreshSignal(); - - /** - * Emit the page ready singal. The PageTurn view will be notified to refresh the given page accordingly. - * @param[in] pageId the index of the page which is ready for refreshing. - */ - void EmitPageRefreshSignal( int pageId ); - -protected: - - /** - * Sets whether an actor should be hittable for the PageTurnView::GetHitActor(). - * It is useful when a sub-tree should be hit instead of the 'leaf' actor in the actor tree. - * By default, actors are not hittable for PageTurnView::GetHitActor() - * @param[in] actor The actor to be set with the hittablity - * @param[in] hittable True to be hittable, false otherwise. - */ - void SetActorHittability( Actor actor, bool hittable ); - - /** - * Query whether an actor is hittable for the PageTurnView::GetHitActor(). - */ - bool GetActorHittability( Actor actor ); - -private: - - bool mNeedOffscreenRendering; - - RefreshSignal mPageRefreshSignal; + virtual Extension* GetExtension() + { + return NULL; + } }; } // namespace Toolkit