1 #ifndef DALI_DEMO_STYLING_APPLICATION_H
2 #define DALI_DEMO_STYLING_APPLICATION_H
5 * Copyright (c) 2020 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>
26 #include "image-channel-control.h"
31 using namespace Dali::Toolkit;
35 class StylingApplication : public ConnectionTracker
39 StylingApplication(Application& application);
42 ~StylingApplication();
44 // Init signal handler
45 void Create(Application& application);
47 // Create the GUI components
48 Actor CreateContentPane();
49 Actor CreateResizableContentPane();
50 Toolkit::Popup CreateResetPopup();
51 Toolkit::TextLabel CreateTitle(std::string title);
54 void OnKeyEvent(const KeyEvent& event);
56 // Button event handlers
57 bool OnButtonStateChange(Toolkit::Button button);
58 bool OnCheckButtonChange(Toolkit::Button button);
59 bool OnResetClicked(Toolkit::Button button);
60 bool OnThemeButtonClicked(Toolkit::Button button);
62 // Slider event handler
63 bool OnSliderChanged(Toolkit::Slider slider, float value);
65 // Popup event handlers
68 bool OnReset(Button button);
69 bool OnResetCancelled(Button button);
71 // Grab handle handler
72 void OnPan(Actor actor, const PanGesture& gesture);
74 static const char* DEMO_THEME_ONE_PATH;
75 static const char* DEMO_THEME_TWO_PATH;
76 static const char* DEMO_THEME_THREE_PATH;
79 Application& mApplication;
83 RadioButton mRadioButtons[3]; // 3 demo images
84 CheckBoxButton mCheckButtons[3]; // rgb buttons
85 Slider mChannelSliders[3]; // rgb sliders
86 PushButton mThemeButtons[3];
87 PushButton mResetButton;
88 ImageChannelControl mImageChannelControl;
89 ImageChannelControl mIcc1;
90 ImageChannelControl mIcc2;
91 ImageChannelControl mIcc3;
92 Actor mImagePlacement;
94 PanGestureDetector mPanGestureDetector;
99 #endif // DALI_DEMO_STYLING_APPLICATION_H