2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include "shared/view.h"
23 #include <dali/dali.h>
24 #include <dali-toolkit/dali-toolkit.h>
27 using namespace Dali::Toolkit;
31 const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-default.png" );
32 const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" );
33 const char * const APPLICATION_TITLE( "ScrollView" );
34 const char * const EFFECT_DEPTH_IMAGE( DALI_IMAGE_DIR "icon-scroll-view-depth.png" );
35 const char * const EFFECT_INNER_CUBE_IMAGE( DALI_IMAGE_DIR "icon-scroll-view-inner-cube.png" );
36 const char * const EFFECT_CAROUSEL_IMAGE( DALI_IMAGE_DIR "icon-scroll-view-carousel.png" );
38 const Vector3 ICON_SIZE(100.0f, 100.0f, 0.0f);
40 const char* EFFECT_MODE_NAME[] = {
48 const char * const IMAGE_PATHS[] = {
49 DALI_IMAGE_DIR "gallery-medium-1.jpg",
50 DALI_IMAGE_DIR "gallery-medium-2.jpg",
51 DALI_IMAGE_DIR "gallery-medium-3.jpg",
52 DALI_IMAGE_DIR "gallery-medium-4.jpg",
53 DALI_IMAGE_DIR "gallery-medium-5.jpg",
54 DALI_IMAGE_DIR "gallery-medium-6.jpg",
55 DALI_IMAGE_DIR "gallery-medium-7.jpg",
56 DALI_IMAGE_DIR "gallery-medium-8.jpg",
57 DALI_IMAGE_DIR "gallery-medium-9.jpg",
58 DALI_IMAGE_DIR "gallery-medium-10.jpg",
59 DALI_IMAGE_DIR "gallery-medium-11.jpg",
60 DALI_IMAGE_DIR "gallery-medium-12.jpg",
61 DALI_IMAGE_DIR "gallery-medium-13.jpg",
62 DALI_IMAGE_DIR "gallery-medium-14.jpg",
63 DALI_IMAGE_DIR "gallery-medium-15.jpg",
64 DALI_IMAGE_DIR "gallery-medium-16.jpg",
65 DALI_IMAGE_DIR "gallery-medium-17.jpg",
66 DALI_IMAGE_DIR "gallery-medium-18.jpg",
67 DALI_IMAGE_DIR "gallery-medium-19.jpg",
68 DALI_IMAGE_DIR "gallery-medium-20.jpg",
69 DALI_IMAGE_DIR "gallery-medium-21.jpg",
70 DALI_IMAGE_DIR "gallery-medium-22.jpg",
71 DALI_IMAGE_DIR "gallery-medium-23.jpg",
72 DALI_IMAGE_DIR "gallery-medium-24.jpg",
73 DALI_IMAGE_DIR "gallery-medium-25.jpg",
74 DALI_IMAGE_DIR "gallery-medium-26.jpg",
75 DALI_IMAGE_DIR "gallery-medium-27.jpg",
76 DALI_IMAGE_DIR "gallery-medium-28.jpg",
77 DALI_IMAGE_DIR "gallery-medium-29.jpg",
78 DALI_IMAGE_DIR "gallery-medium-30.jpg",
79 DALI_IMAGE_DIR "gallery-medium-31.jpg",
80 DALI_IMAGE_DIR "gallery-medium-32.jpg",
81 DALI_IMAGE_DIR "gallery-medium-33.jpg",
82 DALI_IMAGE_DIR "gallery-medium-34.jpg",
83 DALI_IMAGE_DIR "gallery-medium-35.jpg",
84 DALI_IMAGE_DIR "gallery-medium-36.jpg",
85 DALI_IMAGE_DIR "gallery-medium-37.jpg",
86 DALI_IMAGE_DIR "gallery-medium-38.jpg",
87 DALI_IMAGE_DIR "gallery-medium-39.jpg",
88 DALI_IMAGE_DIR "gallery-medium-40.jpg",
89 DALI_IMAGE_DIR "gallery-medium-41.jpg",
90 DALI_IMAGE_DIR "gallery-medium-42.jpg",
91 DALI_IMAGE_DIR "gallery-medium-43.jpg",
92 DALI_IMAGE_DIR "gallery-medium-44.jpg",
93 DALI_IMAGE_DIR "gallery-medium-45.jpg",
94 DALI_IMAGE_DIR "gallery-medium-46.jpg",
95 DALI_IMAGE_DIR "gallery-medium-47.jpg",
96 DALI_IMAGE_DIR "gallery-medium-48.jpg",
97 DALI_IMAGE_DIR "gallery-medium-49.jpg",
98 DALI_IMAGE_DIR "gallery-medium-50.jpg",
99 DALI_IMAGE_DIR "gallery-medium-51.jpg",
100 DALI_IMAGE_DIR "gallery-medium-52.jpg",
101 DALI_IMAGE_DIR "gallery-medium-53.jpg",
106 const char * const GetNextImagePath()
108 static const char * const * imagePtr = &IMAGE_PATHS[0];
110 if ( *(++imagePtr) == NULL )
112 imagePtr = &IMAGE_PATHS[0];
118 const int PAGE_COLUMNS = 10; ///< Number of Pages going across (columns)
119 const int PAGE_ROWS = 1; ///< Number of Pages going down (rows)
120 const int IMAGE_ROWS = 5; ///< Number of Images going down (rows) with a Page
122 // 3D Effect constants
123 const Vector3 ANGLE_CUBE_PAGE_ROTATE(Math::PI * 0.2f, Math::PI * 0.2f, 0.0f); ///< Cube page rotates as if it has ten sides with the camera positioned inside
124 const Vector2 ANGLE_CUSTOM_CUBE_SWING(-Math::PI * 0.45f, -Math::PI * 0.45f); ///< outer cube pages swing 90 degrees as they pan offscreen
125 const Vector2 ANGLE_SPIRAL_SWING_IN(Math::PI * 0.45f, Math::PI * 0.45f);
126 const Vector2 ANGLE_SPIRAL_SWING_OUT(Math::PI * 0.3f, Math::PI * 0.3f);
128 // Depth Effect constants
129 const Vector2 POSITION_EXTENT_DEPTH_EFFECT(0.5f, 2.5f); ///< Extent of X & Y position to alter function exponent.
130 const Vector2 OFFSET_EXTENT_DEPTH_EFFECT(1.0f, 1.0f); ///< Function exponent offset constant.
131 const float POSITION_SCALE_DEPTH_EFFECT(1.5f); ///< Position scaling.
132 const float SCALE_EXTENT_DEPTH_EFFECT(0.5f); ///< Maximum scale factor when Actors scrolled one page away (50% size)
134 // 3D Effect constants
135 const Vector2 ANGLE_SWING_3DEFFECT(Math::PI_2 * 0.75, Math::PI_2 * 0.75f); ///< Angle Swing in radians
136 const Vector2 POSITION_SWING_3DEFFECT(0.25f, 0.25f); ///< Position Swing relative to stage size.
137 const Vector3 ANCHOR_3DEFFECT_STYLE0(-105.0f, 30.0f, -240.0f); ///< Rotation Anchor position for 3D Effect (Style 0)
138 const Vector3 ANCHOR_3DEFFECT_STYLE1(65.0f, -70.0f, -300.0f); ///< Rotation Anchor position for 3D Effect (Style 1)
141 const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels
142 const unsigned int IMAGE_THUMBNAIL_HEIGHT = 256; ///< Height of Thumbnail Image in texels
144 const float SPIN_DURATION = 1.0f; ///< Times to spin an Image by upon touching, each spin taking a second.
146 const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects
147 const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects
149 } // unnamed namespace
152 * This example shows how to do custom Scroll Effects
154 class ExampleController : public ConnectionTracker
160 * @param application class, stored as reference
162 ExampleController( Application& application )
163 : mApplication( application ),
166 mEffectMode(CubeEffect)
168 // Connect to the Application's Init and orientation changed signal
169 mApplication.InitSignal().Connect(this, &ExampleController::OnInit);
174 // Nothing to do here; everything gets deleted automatically
178 * This method gets called once the main loop of application is up and running
180 void OnInit(Application& app)
182 DemoHelper::RequestThemeChange();
184 Stage stage = Dali::Stage::GetCurrent();
185 stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
187 // Hide the indicator bar
188 mApplication.GetWindow().ShowIndicator(Dali::Window::INVISIBLE);
190 // Creates a default view with a default tool bar.
191 // The view is added to the stage.
192 mContentLayer = DemoHelper::CreateView( app,
199 mEffectIcon[ DepthEffect ] = ResourceImage::New( EFFECT_DEPTH_IMAGE );
200 mEffectIcon[ CubeEffect ] = ResourceImage::New( EFFECT_INNER_CUBE_IMAGE );
201 mEffectIcon[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
202 mEffectIcon[ PageCubeEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
203 mEffectIcon[ PageSpiralEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
205 // Create a effect change button. (right of toolbar)
206 mEffectChangeButton = Toolkit::PushButton::New();
207 mEffectChangeButton.ClickedSignal().Connect( this, &ExampleController::OnEffectTouched );
208 mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
210 // Create the content layer.
213 // Hack to force screen refresh.
214 Animation animation = Animation::New(1.0f);
215 animation.AnimateTo(Property(mContentLayer, Actor::Property::POSITION), Vector3::ZERO );
222 * Adds content to the ContentLayer. This is everything we see
223 * excluding the toolbar at the top.
225 void AddContentLayer()
227 Stage stage = Stage::GetCurrent();
228 Vector2 stageSize = stage.GetSize();
230 mScrollView = ScrollView::New();
231 mScrollView.SetRelayoutEnabled( false );
232 mScrollView.SetAnchorPoint(AnchorPoint::CENTER);
233 mScrollView.SetParentOrigin(ParentOrigin::CENTER);
234 mContentLayer.Add( mScrollView );
235 mScrollView.SetSize( stageSize );
236 mScrollView.SetAxisAutoLock( true );
237 mScrollView.SetAxisAutoLockGradient( 1.0f );
239 mScrollView.ScrollStartedSignal().Connect( this, &ExampleController::OnScrollStarted );
240 mScrollView.ScrollCompletedSignal().Connect( this, &ExampleController::OnScrollCompleted );
242 for(int row = 0;row<PAGE_ROWS;row++)
244 for(int column = 0;column<PAGE_COLUMNS;column++)
246 Actor page = CreatePage();
248 page.SetPosition( column * stageSize.x, row * stageSize.y );
249 mScrollView.Add( page );
251 mPages.push_back(page);
259 * Updates the ScrollView and it's children based
260 * on the current effect.
264 std::stringstream ss(APPLICATION_TITLE);
265 ss << APPLICATION_TITLE << ": " << EFFECT_MODE_NAME[mEffectMode];
268 mEffectChangeButton.SetBackgroundImage( mEffectIcon[ mEffectMode ] );
270 // remove old Effect if exists.
271 if(mScrollViewEffect)
273 mScrollView.RemoveEffect(mScrollViewEffect);
276 // apply new Effect to ScrollView
277 ApplyEffectToScrollView();
279 for(ActorIter pageIter = mPages.begin(); pageIter != mPages.end(); ++pageIter)
281 Actor page = *pageIter;
282 ApplyEffectToPage( page );
284 unsigned int numChildren = (*pageIter).GetChildCount();
285 for(unsigned int i=0; i<numChildren; ++i)
287 Actor image = (*pageIter).GetChildAt(i);
289 // Remove old effect's manual constraints.
290 image.RemoveConstraints();
292 // Apply new effect's manual constraints.
293 ApplyEffectToActor( image, page );
299 * Creates a page using a source of images.
303 Actor page = Actor::New();
304 page.SetRelayoutEnabled( true );
305 page.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
306 page.SetParentOrigin( ParentOrigin::CENTER );
307 page.SetAnchorPoint( AnchorPoint::CENTER );
309 Stage stage = Stage::GetCurrent();
310 Vector2 stageSize = stage.GetSize();
312 const float margin = 10.0f;
314 // Calculate the number of images going across (columns) within a page, according to the screen resolution and dpi.
315 int imageColumns = round(IMAGE_ROWS * (stageSize.x / stage.GetDpi().x) / (stageSize.y / stage.GetDpi().y));
316 const Vector3 imageSize((stageSize.x / imageColumns) - margin, (stageSize.y / IMAGE_ROWS) - margin, 0.0f);
318 for(int row = 0;row<IMAGE_ROWS;row++)
320 for(int column = 0;column<imageColumns;column++)
322 ImageActor image = CreateImage( GetNextImagePath(), imageSize.x, imageSize.y );
324 image.SetParentOrigin( ParentOrigin::CENTER );
325 image.SetAnchorPoint( AnchorPoint::CENTER );
327 Vector3 position( margin * 0.5f + (imageSize.x + margin) * column - stageSize.width * 0.5f,
328 margin * 0.5f + (imageSize.y + margin) * row - stageSize.height * 0.5f,
330 image.SetPosition( position + imageSize * 0.5f );
331 image.SetSize( imageSize );
341 * Applies effect to scrollView
343 void ApplyEffectToScrollView()
348 Stage stage = Stage::GetCurrent();
349 Vector2 stageSize = stage.GetSize();
351 switch( mEffectMode )
355 mScrollViewEffect = ScrollViewDepthEffect::New();
356 mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
357 mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
358 mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
359 mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
360 mScrollView.RemoveConstraintsFromChildren();
366 mScrollViewEffect = ScrollViewCubeEffect::New();
367 mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
368 mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
369 mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOutBack);
370 mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOutBack);
371 mScrollView.RemoveConstraintsFromChildren();
375 case PageCarouselEffect:
377 mScrollViewEffect = ScrollViewPageCarouselEffect::New();
378 mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
379 mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
380 mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
381 mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
382 mScrollView.RemoveConstraintsFromChildren();
388 mScrollViewEffect = ScrollViewPageCubeEffect::New();
389 mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
390 mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
391 mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
392 mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
393 mScrollView.RemoveConstraintsFromChildren();
397 case PageSpiralEffect:
399 mScrollViewEffect = ScrollViewPageSpiralEffect::New();
400 mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
401 mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
402 mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
403 mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
404 mScrollView.RemoveConstraintsFromChildren();
414 if( mScrollViewEffect )
416 mScrollView.ApplyEffect(mScrollViewEffect);
419 mScrollView.SetWrapMode(wrap);
421 RulerPtr rulerX = CreateRuler(snap ? stageSize.width : 0.0f);
422 RulerPtr rulerY = new DefaultRuler;
423 rulerX->SetDomain(RulerDomain(0.0f, stageSize.x * PAGE_COLUMNS, !wrap));
426 mScrollView.SetRulerX( rulerX );
427 mScrollView.SetRulerY( rulerY );
431 * Creates a Ruler that snaps to a specified grid size.
432 * If that grid size is 0.0 then this ruler does not
435 * @param[in] gridSize (optional) The grid size for the ruler,
436 * (Default = 0.0 i.e. no snapping)
437 * @return The ruler is returned.
439 RulerPtr CreateRuler(float gridSize = 0.0f)
441 if(gridSize <= Math::MACHINE_EPSILON_0)
443 return new DefaultRuler();
445 return new FixedRuler(gridSize);
450 * Applies effect to the pages within scroll view.
452 * @param[in] page The page Actor to apply effect to.
454 void ApplyEffectToPage(Actor page)
456 page.RemoveConstraints();
457 page.SetRelayoutEnabled( true );
458 page.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
460 switch( mEffectMode )
462 case PageCarouselEffect:
464 ScrollViewPageCarouselEffect effect = ScrollViewPageCarouselEffect::DownCast( mScrollViewEffect );
465 effect.ApplyToPage( page );
471 ScrollViewPageCubeEffect effect = ScrollViewPageCubeEffect::DownCast( mScrollViewEffect );
472 effect.ApplyToPage( page, ANGLE_SWING_3DEFFECT );
476 case PageSpiralEffect:
478 ScrollViewPageSpiralEffect effect = ScrollViewPageSpiralEffect::DownCast( mScrollViewEffect );
479 effect.ApplyToPage( page, ANGLE_SWING_3DEFFECT );
492 * Applies effect to child which resides in page (which in turn resides in scrollview)
494 * @note Page is typically the Parent of child, although in
495 * some scenarios Page is simply a container which has a child as
498 * @param[in] child The child actor to apply effect to
499 * @param[in] page The page which this child is inside
501 void ApplyEffectToActor( Actor child, Actor page )
503 switch( mEffectMode )
507 ApplyDepthEffectToActor( child );
513 ApplyCubeEffectToActor( child );
525 * Applies depth effect to the child which resides in page (which in turn resides in scrollview)
527 * @param[in] child The child actor to apply depth effect to
529 void ApplyDepthEffectToActor( Actor child )
531 ScrollViewDepthEffect depthEffect = ScrollViewDepthEffect::DownCast(mScrollViewEffect);
532 depthEffect.ApplyToActor( child,
533 POSITION_EXTENT_DEPTH_EFFECT,
534 OFFSET_EXTENT_DEPTH_EFFECT,
535 POSITION_SCALE_DEPTH_EFFECT,
536 SCALE_EXTENT_DEPTH_EFFECT );
539 void ApplyCubeEffectToActor( Actor child )
544 anchor = ANCHOR_3DEFFECT_STYLE0;
548 anchor = ANCHOR_3DEFFECT_STYLE1;
551 ScrollViewCubeEffect cubeEffect = ScrollViewCubeEffect::DownCast(mScrollViewEffect);
552 cubeEffect.ApplyToActor( child,
554 ANGLE_SWING_3DEFFECT,
555 POSITION_SWING_3DEFFECT * Vector2(Stage::GetCurrent().GetSize()));
559 * Creates an Image (Helper)
561 * @param[in] filename the path of the image.
562 * @param[in] width the width of the image in texels
563 * @param[in] height the height of the image in texels.
565 ImageActor CreateImage( const std::string& filename, unsigned int width = IMAGE_THUMBNAIL_WIDTH, unsigned int height = IMAGE_THUMBNAIL_HEIGHT )
567 ImageAttributes attributes;
569 attributes.SetSize(width, height);
570 attributes.SetScalingMode(ImageAttributes::ScaleToFill);
571 attributes.SetFilterMode( ImageAttributes::BoxThenLinear );
572 Image img = ResourceImage::New(filename, attributes);
573 ImageActor actor = ImageActor::New(img);
574 actor.SetRelayoutEnabled( false );
575 actor.SetName( filename );
576 actor.SetParentOrigin(ParentOrigin::CENTER);
577 actor.SetAnchorPoint(AnchorPoint::CENTER);
579 actor.TouchedSignal().Connect( this, &ExampleController::OnTouchImage );
584 * When scroll starts (i.e. user starts to drag scrollview),
585 * note this state (mScrolling = true)
586 * @param[in] position Current Scroll Position
588 void OnScrollStarted( const Vector3& position )
594 * When scroll starts (i.e. user stops dragging scrollview, and scrollview has snapped to destination),
595 * note this state (mScrolling = false)
596 * @param[in] position Current Scroll Position
598 void OnScrollCompleted( const Vector3& position )
604 * Upon Touching an image (Release), make it spin
605 * (provided we're not scrolling).
606 * @param[in] actor The actor touched
607 * @param[in] event The TouchEvent.
609 bool OnTouchImage( Actor actor, const TouchEvent& event )
611 if( (event.points.size() > 0) && (!mScrolling) )
613 TouchPoint point = event.points[0];
614 if(point.state == TouchPoint::Up)
616 // Spin the Image a few times.
617 Animation animation = Animation::New(SPIN_DURATION);
618 animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
626 * Signal handler, called when the 'Effect' button has been touched.
628 * @param[in] button The button that was pressed.
630 bool OnEffectTouched(Button button)
632 mEffectMode = static_cast<EffectMode>((static_cast<int>(mEffectMode) + 1) % static_cast<int>(Total));
638 * Sets/Updates the title of the View
639 * @param[in] title The new title for the view.
641 void SetTitle(const std::string& title)
645 mTitleActor = DemoHelper::CreateToolBarLabel( "" );
646 // Add title to the tool bar.
647 mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
650 mTitleActor.SetProperty( Toolkit::TextLabel::Property::TEXT, title );
654 * Main key event handler
656 void OnKeyEvent(const KeyEvent& event)
658 if(event.state == KeyEvent::Down)
660 if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
669 Application& mApplication; ///< Application instance
670 Toolkit::View mView; ///< The View instance.
671 Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
672 TextLabel mTitleActor; ///< The Toolbar's Title.
673 Layer mContentLayer; ///< The content layer (contains game actors)
674 ScrollView mScrollView; ///< ScrollView UI Component
675 bool mScrolling; ///< ScrollView scrolling state (true = scrolling, false = stationary)
676 ScrollViewEffect mScrollViewEffect; ///< ScrollView Effect instance.
677 ActorContainer mPages; ///< Keeps track of all the pages for applying effects.
680 * Enumeration of different effects this scrollview can operate under.
684 DepthEffect, ///< Depth Effect
685 CubeEffect, ///< Cube effect
686 PageCarouselEffect, ///< Page carousel effect
687 PageCubeEffect, ///< Page cube effect
688 PageSpiralEffect, ///< Page spiral effect
693 EffectMode mEffectMode; ///< Current Effect mode
695 Image mEffectIcon[Total]; ///< Icons for the effect button
696 Toolkit::PushButton mEffectChangeButton; ///< Effect Change Button
699 int main(int argc, char **argv)
701 Application app = Application::New(&argc, &argv);
702 ExampleController test(app);