#define __DALI_DEMO_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.
*
*/
-#include <map>
-
#include <dali/dali.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/controls/popup/popup.h>
class Example;
typedef std::vector<Example> ExampleList;
-typedef std::map<std::string,Example> ExampleMap;
typedef ExampleList::iterator ExampleListIter;
typedef ExampleList::const_iterator ExampleListConstIter;
-typedef ExampleMap::iterator ExampleMapIter;
-typedef ExampleMap::const_iterator ExampleMapConstIter;
-
-typedef std::vector<Dali::Toolkit::TableView> TableViewList;
-typedef TableViewList::iterator TableViewListIter;
-typedef TableViewList::const_iterator TableViewListConstIter;
-
-typedef std::vector<Dali::ImageActor> ImageActorList;
-typedef ImageActorList::iterator ImageActorListIter;
-typedef ImageActorList::const_iterator ImageActorListConstIter;
typedef std::vector<Dali::Animation> AnimationList;
typedef AnimationList::iterator AnimationListIter;
void AddExample(Example example);
/**
- * Sets the background image PATH.
- *
- * @param[in] imagePath The file path to the image to use as the background.
- *
- * @note Should be called before the Application MainLoop is started.
- */
- void SetBackgroundPath( std::string imagePath );
-
- /**
* Sorts the example list alphabetically by Title if parameter is true.
*
* @param[in] sortAlphabetically If true, example list is sorted alphabetically.
*
* @return The stencil image
*/
- Dali::ImageActor NewStencilImage();
+ Dali::Toolkit::ImageView NewStencilImage();
// Signal handlers
* Signal emitted when any tile has been pressed
*
* @param[in] actor The Actor representing this tile.
- * @param[in] event The TouchEvent
+ * @param[in] event The Touch information.
*
* @return Consume flag
*/
- bool OnTilePressed( Dali::Actor actor, const Dali::TouchEvent& event );
+ bool OnTilePressed( Dali::Actor actor, const Dali::TouchData& event );
+
+ /**
+ * Called by OnTilePressed & Accessibility to do the appropriate action.
+ *
+ * @param[in] actor The Actor representing this tile.
+ * @param[in] state The Touch state
+ *
+ * @return Consume flag
+ */
+ bool DoTilePress( Dali::Actor actor, Dali::PointState::Type state );
/**
* Signal emitted when any tile has been hovered
* (other than those touches consumed by OnTilePressed)
*
* @param[in] actor The Actor touched.
- * @param[in] event The TouchEvent
+ * @param[in] event The Touch information.
*
* @return Consume flag
*/
- bool OnScrollTouched( Dali::Actor actor, const Dali::TouchEvent& event );
+ bool OnScrollTouched( Dali::Actor actor, const Dali::TouchData& event );
/**
* Setup the effect on the scroll view
*
* @return The created image actor
*/
- Dali::ImageActor CreateLogo( std::string imagePath );
+ Dali::Toolkit::ImageView CreateLogo( std::string imagePath );
/**
* Timer handler for ending background animation
* @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.
*/
void HideVersionPopup();
- /**
- * Called when the popup is completely hidden
- */
- void PopupHidden();
-
/*
* @brief Callback called when the buttons page actor is relaid out
*
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::Animation mPressedAnimation; ///< Button press scaling animation.
Dali::Layer mScrollViewLayer; ///< ScrollView resides on a separate layer.
Dali::Toolkit::ScrollView mScrollView; ///< ScrollView container (for all Examples)
Dali::Toolkit::ScrollViewEffect mScrollViewEffect; ///< Effect to be applied to the scroll view
Dali::Toolkit::RulerPtr mScrollRulerX; ///< ScrollView X (horizontal) ruler
Dali::Toolkit::RulerPtr mScrollRulerY; ///< ScrollView Y (vertical) ruler
- Dali::Toolkit::TableView mButtons; ///< Navigation buttons
Dali::Actor mPressedActor; ///< The currently pressed actor.
Dali::Timer mAnimationTimer; ///< Timer used to turn off animation after a specific time period
Dali::TapGestureDetector mLogoTapDetector; ///< To detect taps on the logo
Dali::Toolkit::Popup mVersionPopup; ///< Displays DALi library version information
- Dali::Vector3 mButtonsPageRelativeSize; ///< Size of a buttons page relative to the stage size
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.
- std::string mBackgroundImagePath; ///< The path to the background image.
int mTotalPages; ///< Total pages within scrollview.
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
};