1 #ifndef DALI_DEMO_SIMPLE_VISUALS_APPLICATION_H
2 #define DALI_DEMO_SIMPLE_VISUALS_APPLICATION_H
5 * Copyright (c) 2017 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;
35 * @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
36 * depending on which one is focused.
38 * Inherits from connection tracker to manage connection and disconnection of signals, In this case PreFocusChangeSignal
40 class SimpleVisualsApplication : public ConnectionTracker
48 * @param[in] application A reference to the Application class.
50 SimpleVisualsApplication( Application& application );
55 * @brief Listen to Focus change signal
56 * @param[in] current Current focused Actor
57 * @param[in] proposed New actor that is requesting to be focused
58 * @param[in] direction The direction of the focus event from current actor
60 Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction );
63 * @brief Derived from control, enables capture of key presses
65 * @param[in] event In incoming key event
67 void OnKeyEvent( const KeyEvent& event );
70 * @brief Called to initialise the application content
72 * @param[in] application A reference to the Application class.
74 void Create( Application& application );
79 Application& mApplication; // Handle to the application that is created and passed in.
81 MyControl mMyControl; // Handle to first instance of MyControl
82 MyControl mMyControl2; // Handle to second instance of MyControl
89 #endif // DALI_DEMO_SIMPLE_VISUALS_APPLICATION_H