Merge "(Visual Transitions) Ensure all parameters are initialized in the constructor...
[platform/core/uifw/dali-demo.git] / demo / dali-table-view.h
index f7785d5..c91f2fc 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_DEMO_H__
-#define __DALI_DEMO_H__
+#ifndef DALI_DEMO_H
+#define DALI_DEMO_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * 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.
@@ -32,7 +32,6 @@ typedef std::vector<Dali::Animation> AnimationList;
 typedef AnimationList::iterator AnimationListIter;
 typedef AnimationList::const_iterator AnimationListConstIter;
 
-
 /**
  * Example information
  *
@@ -97,6 +96,8 @@ public:
 
 private: // Application callbacks & implementation
 
+  static const unsigned int FOCUS_ANIMATION_ACTOR_NUMBER = 2; ///< The number of elements used to form the custom focus effect
+
   /**
    * Shape enum for create function
    */
@@ -320,6 +321,11 @@ private: // Application callbacks & implementation
   void PlayAnimation();
 
   /**
+   * @brief Creates and sets up the custom effect used for the keyboard (and mouse) focus.
+   */
+  void CreateFocusEffect();
+
+  /**
    * Callback when the keyboard focus is going to be changed.
    *
    * @param[in] current The current focused actor
@@ -357,6 +363,12 @@ private: // Application callbacks & implementation
  void OnButtonsPageRelayout( const Dali::Actor& actor );
 
  /**
+  * @brief The is connected to the keyboard focus highlight actor, and called when it is placed on stage.
+  * @param[in] actor The actor that has been placed on stage.
+  */
+ void OnStageConnect( Dali::Actor actor );
+
+ /**
   * @brief Callback called to set up background actors
   *
   * @param[in] actor The actor raising the callback
@@ -378,6 +390,16 @@ private:
   Dali::TapGestureDetector        mLogoTapDetector;          ///< To detect taps on the logo
   Dali::Toolkit::Popup            mVersionPopup;             ///< Displays DALi library version information
 
+  /**
+   * This struct encapsulates all data relevant to each of the elements used within the custom keyboard focus effect.
+   */
+  struct FocusEffect
+  {
+    Dali::Toolkit::ImageView        actor;                   ///< The parent keyboard focus highlight actor
+    Dali::Animation                 animation;               ///< The animation for the parent keyboard focus highlight actor
+  };
+  FocusEffect mFocusEffect[FOCUS_ANIMATION_ACTOR_NUMBER];    ///< The elements used to create the custom focus effect
+
   std::vector< Dali::Actor >      mPages;                    ///< List of pages.
   AnimationList                   mBackgroundAnimations;     ///< List of background bubble animations
   ExampleList                     mExampleList;              ///< List of examples.
@@ -391,4 +413,4 @@ private:
 
 };
 
-#endif // __DALI_DEMO_H__
+#endif // DALI_DEMO_H