2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
19 * @file FGrp_TextTextCutLink.h
20 * @brief This is the header file for the TextCutLink class.
22 * This header file contains the declarations of the %TextCutLink class.
25 #ifndef _FGRP_INTERNAL_TEXT_CUTLINK_H_
26 #define _FGRP_INTERNAL_TEXT_CUTLINK_H_
29 #include "FGrp_TextCommon.h"
30 #include "FGrp_TextTextSimple.h"
32 namespace Tizen { namespace Graphics
44 class _OSP_EXPORT_ TextCutLink
48 TextCutLink(bool isEditable, Tizen::Base::Utility::LinkType cutLinkType, const wchar_t* pText, int length,
49 TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, Font* pFont = null,
50 const Color& foregroundColor = 0, const Color& backgroundColor = 0, const Color& outlineColor = 0);
52 virtual ~TextCutLink(void);
55 virtual TextElement* CloneN(TextComponentInfoValueType type, unsigned int value);
57 virtual TextElement* CopyN(int startTextIndex, int textLength);
59 virtual result ChangeTextOffset(wchar_t* pText, int gap);
61 virtual unsigned int GetValue(TextComponentInfoValueType type) const;
63 virtual result SetValue(TextComponentInfoValueType type, unsigned int value);
65 virtual result SetTextOffset(int offset);
67 virtual const Font* GetFont(void) const;
69 bool GetEditable(void) const;
71 void SetEditModeEnable(bool enable);
73 bool IsEditModeEnable(void) const;
75 Tizen::Base::Utility::LinkType GetCutLinkType(void) const;
77 void SetSelect(bool isSelected);
79 bool GetSelect(void) const;
81 void SetUserColor(const Color& color, const Color& colorInSelect);
83 void ResetUserColor(void);
86 virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align,
87 const TextObjectActionType action);
89 virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align,
90 const TextObjectActionType action);
92 virtual Font* GetCurrentFont(void) const;
94 virtual Color GetCurrentForegroundColor(void) const;
96 virtual Color GetCurrentBackgroundColor(void) const;
98 virtual Color GetCurrentOutlineColor(void) const;
101 Tizen::Base::Utility::LinkType __linkType;
104 Color __linkSelectedColor;
105 bool __isColorDefined;
111 TextCutLink(const TextCutLink& other); // NOT IMPLMENTED
113 TextCutLink& operator =(const TextCutLink& rhs); // NOT IMPLMENTED
117 }}} // Tizen::Graphics::_Text
119 #endif // _FGRP_INTERNAL_TEXT_CUTLINK_H_