Example of usage of ModelView class
[platform/core/uifw/dali-demo.git] / demo / dali-table-view.h
index fbaa2ea..8b1353d 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/popup/popup.h>
 
 class Example;
 
@@ -165,7 +166,7 @@ private: // Application callbacks & implementation
    *
    * @return The Actor for the created tile.
    */
-  Dali::Actor CreateTile( const std::string& name, const std::string& title, const Dali::Size& parentSize, bool addBackground );
+  Dali::Actor CreateTile( const std::string& name, const std::string& title, const Dali::Vector3& sizeMultiplier, bool addBackground );
 
   /**
    * Create a stencil image
@@ -217,14 +218,14 @@ private: // Application callbacks & implementation
    *
    * @param[in] position The current position of the scroll contents.
    */
-  void OnScrollStart(const Dali::Vector3& position);
+  void OnScrollStart(const Dali::Vector2& position);
 
   /**
    * Signal emitted when scrolling has completed.
    *
    * @param[in] position The current position of the scroll contents.
    */
-  void OnScrollComplete(const Dali::Vector3& position);
+  void OnScrollComplete(const Dali::Vector2& position);
 
   /**
    * Signal emitted when any Sensitive Actor has been touched
@@ -245,7 +246,7 @@ private: // Application callbacks & implementation
   /**
    * Apply the cube effect to all the page actors
    */
-  void ApplyCubeEffectToActors();
+  void ApplyCubeEffectToPages();
 
   /**
    * Setup the inner cube effect
@@ -253,11 +254,6 @@ private: // Application callbacks & implementation
   void SetupInnerPageCubeEffect();
 
   /**
-   * Apply the cube effect to an actor
-   */
-  void ApplyCubeEffectToActor( Dali::Actor actor );
-
-  /**
    * Apply a shader effect to a table tile
    */
   void ApplyEffectToTile(Dali::Actor tile);
@@ -276,9 +272,8 @@ private: // Application callbacks & implementation
    * Create a depth field background
    *
    * @param[in] bubbleLayer Add the graphics to this layer
-   * @param[in] backgroundLayer Add the background to this layer
    */
-  void SetupBackground(  Dali::Actor bubbleLayer, Dali::Actor backgroundLayer, const Dali::Vector2& size );
+  void SetupBackground( Dali::Actor bubbleLayer );
 
   /**
    * Create background actors for the given layer
@@ -286,9 +281,8 @@ private: // Application callbacks & implementation
    * @param[in] layer The layer to add the actors to
    * @param[in] count The number of actors to generate
    * @param[in] distanceField The distance field bitmap to use
-   * @param[in] size The size of the actor
    */
-  void AddBackgroundActors( Dali::Actor layer, int count, Dali::BufferImage distanceField, const Dali::Vector2& size );
+  void AddBackgroundActors( Dali::Actor layer, int count, Dali::BufferImage distanceField );
 
   /**
    * Create a bitmap with the specified shape and also output a distance field
@@ -324,7 +318,7 @@ private: // Application callbacks & implementation
    *
    * @return The created image actor
    */
-  Dali::ImageActor CreateLogo( std::string imagePath );
+  Dali::Toolkit::ImageView CreateLogo( std::string imagePath );
 
   /**
    * Timer handler for ending background animation
@@ -351,7 +345,7 @@ private: // Application callbacks & implementation
    * @param[in] direction The direction to move the focus
    * @return The actor to move the keyboard focus to.
    */
-  Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction );
+  Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction );
 
   /**
    * Callback when the keyboard focused actor is activated.
@@ -373,10 +367,19 @@ private: // Application callbacks & implementation
    */
   void HideVersionPopup();
 
-  /**
-   * Called when the popup is completely hidden
-   */
-  void PopupHidden();
+ /*
+  * @brief Callback called when the buttons page actor is relaid out
+  *
+  * @param[in] actor The page actor
+  */
+ void OnButtonsPageRelayout( const Dali::Actor& actor );
+
+ /**
+  * @brief Callback called to set up background actors
+  *
+  * @param[in] actor The actor raising the callback
+  */
+ void InitialiseBackgroundActors( Dali::Actor actor );
 
 private:
 
@@ -384,8 +387,6 @@ private:
   Dali::Layer                     mBackgroundLayer;          ///< Background resides on a separate layer.
   Dali::Toolkit::TableView        mRootActor;                ///< All content (excluding background is anchored to this Actor)
   Dali::Animation                 mRotateAnimation;          ///< Animation to rotate and resize mRootActor.
-  Dali::ImageActor                mBackground;               ///< Background's static image.
-  Dali::ImageActor                mLogo;                     ///< Logo's static image.
   Dali::Animation                 mPressedAnimation;         ///< Button press scaling animation.
   Dali::Layer                     mScrollViewLayer;          ///< ScrollView resides on a separate layer.
   Dali::Toolkit::ScrollView       mScrollView;               ///< ScrollView container (for all Examples)
@@ -399,9 +400,9 @@ private:
   Dali::Toolkit::Popup            mVersionPopup;             ///< Displays DALi library version information
   Dali::Vector3                   mButtonsPageRelativeSize;  ///< Size of a buttons page relative to the stage size
 
-  Dali::ActorContainer            mPages;                    ///< List of pages.
-  Dali::ActorContainer            mTableViewImages;          ///< Offscreen render of tableview
-  Dali::ActorContainer            mBackgroundActors;         ///< List of background actors used in the effect
+  std::vector< Dali::Actor >      mPages;                    ///< List of pages.
+  std::vector< Dali::Actor >      mTableViewImages;          ///< Offscreen render of tableview
+  std::vector< Dali::Actor >      mBackgroundActors;         ///< List of background actors used in the effect
   AnimationList                   mBackgroundAnimations;     ///< List of background bubble animations
   ExampleList                     mExampleList;              ///< List of examples.
   ExampleMap                      mExampleMap;               ///< Map LUT for examples.
@@ -412,7 +413,7 @@ private:
   bool                            mScrolling:1;              ///< Flag indicating whether view is currently being scrolled
   bool                            mSortAlphabetically:1;     ///< Sort examples alphabetically.
   bool                            mBackgroundAnimsPlaying:1; ///< Are background animations playing
-  bool                            mVersionPopupShown:1;      ///< Whehter the version popup is shown or not
+
 };
 
 #endif // __DALI_DEMO_H__