Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_UiFocusEvent.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                FUi_UiFocusEvent.h
19  * @brief               This is the header file for the _UiFocusEvent class.
20  *
21  * This header file contains the declarations of the %_UiFocusEvent class. @n
22  */
23
24 #ifndef _FUI_INTERNAL_UI_FOCUS_EVENT_H_
25 #define _FUI_INTERNAL_UI_FOCUS_EVENT_H_
26
27 #include <FUiIFocusEventListener.h>
28 #include "FUi_UiEvent.h"
29
30 namespace Tizen {namespace Ui
31 {
32
33 class _IFocusEventListener;
34
35 //
36 //This is internal. If used in an application, the application can get rejected during the certification process.
37 //@class        _UiFocusEvent
38 //@brief        This class impliments _UiFocusEvent and
39 //fire the Window Event object of a Ui Control.
40 //
41
42 class _UiFocusEvent
43         : public _UiEvent
44 {
45 // Lifecycle
46 public:
47         /**
48         * This is the default class constructor.
49         *
50         */
51         _UiFocusEvent(const _UiObjectHandle& destination, FocusStatus focusState, _UiEventRouteType routeType = _UI_EVENT_ROUTE_DIRECT, const _UiObjectHandle& source = _UiObjectHandle());
52         _UiFocusEvent(const _UiFocusEvent& rhs);
53
54         /**
55          * This is the default class destructor.
56          *
57          */
58         virtual ~_UiFocusEvent(void);
59
60 public:
61         _UiFocusEvent& operator =(const _UiFocusEvent& rhs);
62
63 public:
64         FocusStatus GetFocusState(void) const;
65
66 private:
67         virtual _UiFocusEvent* CloneN(void) const;
68         virtual _UiEventType GetEventType(void) const;
69         virtual result OnPreviewEventProcessing(const _Control& control, bool& isFiltered);
70         virtual result OnEventProcessing(const _Control& control, bool& isFiltered);
71         virtual result OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered);
72
73 private:
74         result FireListener(const _IFocusEventListener* pListener, bool& isFiltered);
75
76 private:
77         FocusStatus __focusState;
78 };
79
80 }} // Tizen::Ui
81
82 #endif //_FUI_INTERNAL_UI_FOCUS_EVENT_H_