1 #ifndef DALI_DEMO_SIMPLE_VISUALS_APPLICATION_H
2 #define DALI_DEMO_SIMPLE_VISUALS_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>
26 #include "my-control.h"
29 using namespace Dali::Toolkit;
34 * @brief An application that uses the my-control to display 2 icons, if focus is allowed ( by using a keyboard or remote ) then the icons will change
35 * depending on which one is focused.
37 * Inherits from connection tracker to manage connection and disconnection of signals, In this case PreFocusChangeSignal
39 class SimpleVisualsApplication : public ConnectionTracker
45 * @param[in] application A reference to the Application class.
47 SimpleVisualsApplication(Application& application);
51 * @brief Listen to Focus change signal
52 * @param[in] current Current focused Actor
53 * @param[in] proposed New actor that is requesting to be focused
54 * @param[in] direction The direction of the focus event from current actor
56 Dali::Actor OnKeyboardPreFocusChange(Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction);
59 * @brief Derived from control, enables capture of key presses
61 * @param[in] event In incoming key event
63 void OnKeyEvent(const KeyEvent& event);
66 * @brief Called to initialise the application content
68 * @param[in] application A reference to the Application class.
70 void Create(Application& application);
73 Application& mApplication; // Handle to the application that is created and passed in.
75 MyControl mMyControl; // Handle to first instance of MyControl
76 MyControl mMyControl2; // Handle to second instance of MyControl
81 #endif // DALI_DEMO_SIMPLE_VISUALS_APPLICATION_H