1 #ifndef __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__
2 #define __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__
5 * Copyright (c) 2014 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.
22 #include <dali/public-api/signals/dali-signal-v2.h>
23 #include <dali/public-api/text/text-style.h>
26 #include <dali-toolkit/internal/controls/text-input/textview-character-positions-impl.h>
37 class TextInputTextStyle;
39 typedef IntrusivePtr<TextInputTextStyle> TextInputTextStylePtr;
42 * Stores the Input Text Style and provides functions to retrieve and manipulate it.
45 class TextInputTextStyle : ConnectionTracker
53 TextInputTextStyle(){};
58 ~TextInputTextStyle(){};
61 * @brief Returns the current Input Style, this is the style that newly inputed text will inherit.
62 * @return TextStyle object representing new style.
64 TextStyle GetInputStyle() const{return mInputStyle;};
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.
71 bool SetInputStyle( const TextStyle newStyle, const TextStyle::Mask mask = TextStyle::ALL ){return false;};
74 * @brief Gets the Current Font used for newly inputed text
75 * @return the Font currently set for new text
77 Dali::Font GetInputFont() const{return Dali::Font();};
83 /* Input style changed signal.*/
84 typedef SignalV2< void( const TextStyle& style ) > StyleChangedSignalType;
87 * @brief Signal emitted when style changes.
88 * @return The signal to connect to
90 StyleChangedSignalType& StyleChangedSignal();
95 * @brief Copy Constructor
96 * @param[in] textStyle
99 TextInputTextStyle(const TextInputTextStyle& textStyle );
102 * @Assignment Constructor
106 TextInputTextStyle& operator=(const TextInputTextStyle& rhs);
110 TextStyle mInputStyle; // Stores the current input style.
111 StyleChangedSignalType mStyleChangedSignal; // Signal emitted when style changes.
114 } // namespace Internal
116 } // namespace Toolkit
120 #endif // __DALI_TOOLKIT_INTERNAL_TEXT_INPUT_TEXT_STYLE_H__