Remove redundant orientation settings as default camera already looks at stage
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-input / text-input-text-style-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__
2 #define __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/signals/dali-signal.h>
23 #include <dali/public-api/text/text-style.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/internal/controls/text-input/textview-character-positions-impl.h>
27
28 namespace Dali
29 {
30
31 namespace Toolkit
32 {
33
34 namespace Internal
35 {
36
37 class TextInputTextStyle;
38
39 typedef IntrusivePtr<TextInputTextStyle> TextInputTextStylePtr;
40
41 /**
42  *  Stores the Input Text Style and provides functions to retrieve and manipulate it.
43  */
44
45 class TextInputTextStyle : ConnectionTracker
46 {
47
48 public:
49
50   /**
51    * @brief Constructor
52    */
53   TextInputTextStyle(){};
54
55   /**
56    * @brief Destructor
57    */
58    ~TextInputTextStyle(){};
59
60   /**
61    * @brief Returns the current Input Style, this is the style that newly inputed text will inherit.
62    * @return TextStyle object representing new style.
63    */
64   TextStyle GetInputStyle() const{return mInputStyle;};
65
66   /**
67    * @brief Sets the Input style so newly inputed text will inherit this.
68    * @param[in] newStyle the style to now use for Input
69    * @return returns true if style changed.  False if new style is the same as current setting.
70    */
71   bool SetInputStyle( const TextStyle newStyle, const TextStyle::Mask mask = TextStyle::ALL ){return false;};
72
73   /**
74    * @brief Gets the Current Font used for newly inputed text
75    * @return the Font currently set for new text
76    */
77   Dali::Font GetInputFont() const{return Dali::Font();};
78
79   /**
80    * Signals
81    */
82
83   /* Input style changed signal.*/
84   typedef Signal< void( const TextStyle& style ) > StyleChangedSignalType;
85
86   /**
87    * @brief Signal emitted when style changes.
88    * @return The signal to connect to
89    */
90   StyleChangedSignalType& StyleChangedSignal();
91
92 private:
93
94   /**
95    * @brief Copy Constructor
96    * @param[in] textStyle
97    * Undefined/Hidden.
98    */
99   TextInputTextStyle(const TextInputTextStyle& textStyle );
100
101   /**
102    * @Assignment Constructor
103    * @param[in] rhs
104    * Undefined/Hidden.
105    */
106   TextInputTextStyle& operator=(const TextInputTextStyle& rhs);
107
108 private:
109
110   TextStyle mInputStyle;                               // Stores the current input style.
111   StyleChangedSignalType mStyleChangedSignal;          // Signal emitted when style changes.
112 };
113
114 } // namespace Internal
115
116 } // namespace Toolkit
117
118 } // namespace Dali
119
120 #endif // __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__
121
122