Merge "Unchecked GetCharacter func when index is over string length" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiFocusManager.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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 /**
19  * @file        FUiFocusManager.h
20  * @brief       This is the header file for the %FocusManager class.
21  *
22  * This header file contains the declarations of the %FocusManager class.
23  */
24
25 #ifndef _FUI_FOCUS_MANAGER_H_
26 #define _FUI_FOCUS_MANAGER_H_
27
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Ui
31 {
32
33 class Control;
34 class Window;
35
36
37 /**
38  * @class       FocusManager
39  * @brief       This class manages the current focus of the application owned by the UI control and its ancestor %Window.
40  *
41  * @since       2.0
42  *
43  * The %FocusManager class is used to query the application's current focus owner.
44  */
45 class _OSP_EXPORT_ FocusManager
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * Gets the pointer to the current focus manager.
51          *
52          * @since        2.0
53          *
54          * @return The current focus manager instance
55          */
56         static FocusManager* GetInstance(void);
57
58         /**
59          * Gets the current focus owner.
60          *
61          * @since               2.0
62          *
63          * @return  The current focus owner
64          * @remarks The method returns the current focus owner of this application.
65          */
66         Control* GetCurrentFocusOwner(void) const;
67
68         /**
69          * Gets the current focused Window.
70          *
71          * @since       2.0
72          *
73          * @return  The current focused Window
74          * @remarks This method returns the application's current focus owner's ancestor Window or the %Window that is currently focused.
75          */
76         Window* GetCurrentFocusedWindow(void) const;
77
78 private:
79         //
80         // This default constructor is intentionally declared as private so that only the platform can create an instance.
81         //
82         FocusManager(void);
83
84         //
85         // This destructor is intentionally declared as private so that only the platform can delete an instance.
86         //
87         virtual ~FocusManager(void);
88
89         //
90         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
91         //
92         FocusManager(const FocusManager& rhs);
93
94         //
95         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
96         //
97         FocusManager& operator=(const FocusManager& rhs);
98 }; // FocusManager
99
100 }} // Tizen::Ui
101
102 #endif // _FUI_FOCUS_MANAGER_H_