1 #ifndef DALI_DEMO_STYLING_APPLICATION_H
2 #define DALI_DEMO_STYLING_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 "image-channel-control.h"
31 using namespace Dali::Toolkit;
36 class StylingApplication : public ConnectionTracker
40 StylingApplication( Application& application );
43 ~StylingApplication();
45 // Init signal handler
46 void Create( Application& application );
48 // Create the GUI components
49 Actor CreateContentPane();
50 Actor CreateResizableContentPane();
51 Toolkit::Popup CreateResetPopup();
52 Toolkit::TextLabel CreateTitle( std::string title );
55 void OnKeyEvent( const KeyEvent& event );
57 // Button event handlers
58 bool OnButtonStateChange( Toolkit::Button button );
59 bool OnCheckButtonChange( Toolkit::Button button );
60 bool OnResetClicked( Toolkit::Button button );
61 bool OnThemeButtonClicked( Toolkit::Button button );
63 // Slider event handler
64 bool OnSliderChanged( Toolkit::Slider slider, float value );
66 // Popup event handlers
69 bool OnReset(Button button);
70 bool OnResetCancelled(Button button);
72 // Grab handle handler
73 void OnPan( Actor actor, const PanGesture& gesture );
75 static const char* DEMO_THEME_ONE_PATH;
76 static const char* DEMO_THEME_TWO_PATH;
77 static const char* DEMO_THEME_THREE_PATH;
80 Application& mApplication;
84 RadioButton mRadioButtons[3]; // 3 demo images
85 CheckBoxButton mCheckButtons[3]; // rgb buttons
86 Slider mChannelSliders[3]; // rgb sliders
87 PushButton mThemeButtons[3];
88 PushButton mResetButton;
89 ImageChannelControl mImageChannelControl;
90 ImageChannelControl mIcc1;
91 ImageChannelControl mIcc2;
92 ImageChannelControl mIcc3;
93 Actor mImagePlacement;
95 PanGestureDetector mPanGestureDetector;
101 #endif // DALI_DEMO_STYLING_APPLICATION_H