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