1 #ifndef DALI_DEMO_TRANSITION_APPLICATION_H
2 #define DALI_DEMO_TRANSITION_APPLICATION_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali-toolkit/dali-toolkit.h>
22 //#include <dali-toolkit/devel-api/controls/slider/slider.h>
23 #include <dali-toolkit/devel-api/controls/popup/popup.h>
24 #include "beat-control.h"
31 using namespace Dali::Toolkit;
36 class TransitionApplication : public ConnectionTracker
39 static const int NUMBER_OF_ACTION_BUTTONS=4;
40 static const int NUMBER_OF_VISUAL_BUTTONS=10;
44 TransitionApplication( Application& application );
47 ~TransitionApplication();
49 // Init signal handler
50 void Create( Application& application );
52 // Create the GUI components
53 Toolkit::TextLabel CreateTitle( std::string title );
54 Actor CreateContentPane();
57 void OnKeyEvent( const KeyEvent& event );
59 bool OnActionButtonClicked( Button button );
60 bool OnVisualButtonClicked( Actor actor, const TouchData& touchData );
62 static const char* DEMO_THEME_ONE_PATH;
66 /** Create a visual map
68 * @param[in] index The index of the visual to create
69 * @param[out] map The map to generate
71 void CreateVisualMap( int index, Property::Map& map );
73 Application& mApplication;
75 BeatControl mBeatControl;
76 PushButton mActionButtons[NUMBER_OF_ACTION_BUTTONS];
77 BeatControl mVisualButtons[NUMBER_OF_VISUAL_BUTTONS];
78 Property::Index mVisualIndex;
79 Property::Index mActionIndex;
85 #endif // DALI_DEMO_TRANSITION_APPLICATION_H