3 // Open Service Platform
4 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6 // Licensed under the Apache License, Version 2.0 (the License);
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
10 // http://www.apache.org/licenses/LICENSE-2.0/
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
20 * @file FGrpEnrichedText.h
21 * @brief This is the header file for the %EnrichedText class.
23 * This header file contains the definitions of the %EnrichedText class.
27 #ifndef _FGRP_ENRICHED_TEXT_H_
28 #define _FGRP_ENRICHED_TEXT_H_
31 #include <FBaseUtilLinkInfo.h>
32 #include <FGrpTextElement.h>
34 namespace Tizen { namespace Graphics
37 * @enum TextHorizontalAlignment
39 * Defines the horizontal alignment of the text.
43 enum TextHorizontalAlignment
45 TEXT_ALIGNMENT_LEFT = 1, /**< The position of the text is towards the left of the object */
46 TEXT_ALIGNMENT_CENTER, /**< The position of the text is towards the center of the object */
47 TEXT_ALIGNMENT_RIGHT, /**< The position of the text is towards the right of the object */
48 TEXT_ALIGNMENT_HORIZONTAL_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
49 TEXT_ALIGNMENT_HORIZONTAL_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
53 * @enum TextVerticalAlignment
55 * Defines the vertical alignment of the text.
59 enum TextVerticalAlignment
61 TEXT_ALIGNMENT_TOP = 1, /**< The position of the text is towards the top of the object */
62 TEXT_ALIGNMENT_MIDDLE, /**< The position of the text is towards the middle of the object */
63 TEXT_ALIGNMENT_BOTTOM, /**< The position of the text is towards the bottom of the object */
64 TEXT_ALIGNMENT_BASELINE, /**< The position of the text is aligned along the baseline of the object */
65 TEXT_ALIGNMENT_VERTICAL_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
66 TEXT_ALIGNMENT_VERTICAL_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
72 * Defines the style of wrapping of the text in %EnrichedText.
78 TEXT_WRAP_NONE = 1, /**< The wrapping of text is not applied */
79 TEXT_WRAP_CHARACTER_WRAP, /**< The wrapping of text is applied at the character unit */
80 TEXT_WRAP_WORD_WRAP, /**< The wrapping of text is applied at the word unit */
81 TEXT_WRAP_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
82 TEXT_WRAP_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
87 * @brief This class provides enriched text content.
91 * @final This class is not intended for extension.
93 * The %EnrichedText class provides methods that enable your application to support texts with various styles, such
94 * as font, color, and layout. An %EnrichedText instance can be drawn to a Canvas.
96 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/enriched_text.htm">EnrichedText</a>.
98 * The following example demonstrates how to use the %EnrichedText class.
103 #include <FGraphics.h>
105 using namespace Tizen::App;
106 using namespace Tizen::Graphics;
109 MyClass::EnrichedTextSample(Canvas& canvas)
111 result r = E_SUCCESS;
112 EnrichedText* pEnrichedText = null;
113 TextElement* pTextElement1 = null;
114 TextElement* pTextElement2 = null;
116 // Creates an EnrichedText instance and sets the attributes
117 pEnrichedText = new EnrichedText();
118 r = pEnrichedText->Construct(Dimension(200, 200));
123 pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
124 pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);
125 pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
126 pEnrichedText->SetTextAbbreviationEnabled(true);
128 // Creates a TextElement and sets attributes
129 pTextElement1 = new TextElement();
130 r = pTextElement1->Construct(L"0123456789");
135 pTextElement1->SetTextColor(Color::GetColor(COLOR_ID_BLUE));
138 font.Construct(FONT_STYLE_BOLD, 40);
139 pTextElement1->SetFont(font);
142 // Creates another TextElement and sets the attributes
143 pTextElement2 = new TextElement();
144 r = pTextElement2->Construct(L"abcdefghijklmn\nABCDEFGHIJKLMN");
149 pTextElement2->SetTextColor(Color::GetColor(COLOR_ID_VIOLET));
151 // Adds the TextElement and the bitmap to the EnrichedText
152 pEnrichedText->Add(*pTextElement1);
153 pEnrichedText->Add(*pTextElement2);
157 canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
159 canvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), Rectangle(50, 50, 380, 380));
161 // Draws the covered area of the EnrichedText in the Canvas coordinate
163 pEnrichedText->GetSize(width, height);
164 canvas.FillRectangle(Color::GetColor(COLOR_ID_GREY), Rectangle(60, 60, width, height));
166 // Draws the EnrichedText at the specified Point
167 canvas.DrawText(Point(60, 60), *pEnrichedText);
172 pEnrichedText->RemoveAll(true);
173 delete pEnrichedText;
180 pEnrichedText->RemoveAll(true);
181 delete pEnrichedText;
193 class _OSP_EXPORT_ EnrichedText
194 : public Tizen::Base::Object
198 * This is the default constructor for this class.
202 * @remarks After creating an instance of this class, one of the Construct() methods must be called explicitly
203 * to initialize this instance.
208 * This is the destructor for this class.
212 virtual ~EnrichedText(void);
215 * Initializes this instance of %EnrichedText with the specified parameter.
219 * @return An error code
220 * @param[in] dim The dimension to set for %EnrichedText @n
221 * The width and height must be greater than @c 0.
222 * @exception E_SUCCESS The method is successful.
223 * @exception E_OUT_OF_MEMORY The memory is insufficient.
224 * @exception E_INVALID_ARG The specified input parameter is invalid.
226 result Construct(const Tizen::Graphics::Dimension& dim);
229 * Initializes this instance of %EnrichedText with a specified parameter.
233 * @return An error code
234 * @param[in] dim The FloatDimension to set for %EnrichedText @n
235 * The width and height must be greater than @c 0.0f.
236 * @exception E_SUCCESS The method is successful.
237 * @exception E_OUT_OF_MEMORY The memory is insufficient.
238 * @exception E_INVALID_ARG The specified input parameter is invalid.
240 result Construct(const Tizen::Graphics::FloatDimension& dim);
243 * Inserts the TextElement instance in the %EnrichedText instance at the specified index.
247 * @return An error code
248 * @param[in] elementIndex The index at which the text element is to add
249 * @param[in] element The TextElement to add
250 * @exception E_SUCCESS The method is successful.
251 * @exception E_INVALID_ARG A specified input parameter is invalid.
253 result InsertAt(int elementIndex, TextElement& element);
256 * Removes the TextElement instance at the specified index of the %EnrichedText instance.
260 * @return An error code
261 * @param[in] elementIndex The index of TextElement
262 * @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n
264 * @exception E_SUCCESS The method is successful.
265 * @exception E_INVALID_ARG A specified input parameter is invalid.
268 result RemoveAt(int elementIndex, bool deallocate);
271 * Removes the TextElement instance from the %EnrichedText instance.
275 * @return An error code
276 * @param[in] element The TextElement to remove
277 * @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n
279 * @exception E_SUCCESS The method is successful.
282 result Remove(TextElement& element, bool deallocate);
285 * Adds the specified TextElement instance to the %EnrichedText instance.
289 * @return An error code
290 * @param[in] element The TextElement to append
291 * @exception E_SUCCESS The method is successful.
292 * @exception E_INVALID_ARG The specified input parameter is invalid.
295 result Add(TextElement& element);
299 * Removes all the %TextElement instances from the %EnrichedText instance.
301 * @brief <i> [Deprecated] </i>
302 * @deprecated This method is deprecated. Instead of this method, use the RemoveAll().
306 * @return An error code
307 * @param[in] deallocate Set to @c true to deallocate the %TextElement instance, @n
309 * @exception E_SUCCESS The method is successful.
313 result RemoveAllTextElements(bool deallocate);
316 * Removes all the text and image elements from the %EnrichedText instance.
320 * @return An error code
321 * @param[in] deallocate Set to @c true to deallocate the elements to remove, @n
323 * @exception E_SUCCESS The method is successful.
324 * @exception E_SYSTEM An unknown operating system error has occurred.
327 result RemoveAll(bool deallocate);
330 * Gets the %TextElement instance at the specified index from the %EnrichedText instance.
334 * @return The %TextElement instance at the specified index, @n
335 * else @c null if the method fails
336 * @param[in] elementIndex The index of the %TextElement
337 * @exception E_SUCCESS The method is successful.
338 * @exception E_INVALID_ARG The specified input parameter is invalid.
339 * @remarks The specific error code can be accessed using the GetLastResult() method.
341 TextElement* GetTextElementAt(int elementIndex) const;
344 * Gets the count of the %TextElement instances.
348 * @return The count of the %TextElement instances
350 int GetTextElementCount(void) const;
353 * Sets the text size.
357 * @return An error code
358 * @param[in] size The new size of the %EnrichedText instance @n
359 * The width and height must be greater than @c 0.
360 * @exception E_SUCCESS The method is successful.
361 * @exception E_OUT_OF_RANGE The value of the parameter is outside the valid range defined by the method.
363 result SetSize(const Tizen::Graphics::Dimension& size);
366 * Sets the text size.
370 * @return An error code
371 * @param[in] size The new size of the %EnrichedText instance @n
372 * The width and height must be greater than @c 0.0f.
373 * @exception E_SUCCESS The method is successful.
374 * @exception E_OUT_OF_RANGE The value of the parameter is outside the valid range defined by the method.
376 result SetSize(const Tizen::Graphics::FloatDimension& size);
379 * Sets the text size.
383 * @return An error code
384 * @param[in] width The new width of %EnrichedText @n
385 * It must be greater than @c 0.
386 * @param[in] height The new height of %EnrichedText @n
387 * It must be greater than @c 0.
388 * @exception E_SUCCESS The method is successful.
389 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
391 result SetSize(int width, int height);
394 * Sets the text size.
398 * @return An error code
399 * @param[in] width The new width of %EnrichedText @n
400 * It must be greater than @c 0.0f.
401 * @param[in] height The new height of %EnrichedText @n
402 * It must be greater than @c 0.0f.
403 * @exception E_SUCCESS The method is successful.
404 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
406 result SetSize(float width, float height);
413 * @return An instance of %Dimension containing the width and the height of the %EnrichedText instance
416 Tizen::Graphics::Dimension GetSize(void) const;
423 * @return An instance of FloatDimension containing the width and the height of the %EnrichedText instance
426 Tizen::Graphics::FloatDimension GetSizeF(void) const;
429 * Gets the size of the %EnrichedText instance.
433 * @param[out] width The width of the control
434 * @param[out] height The height of the control
436 void GetSize(int& width, int& height) const;
439 * Gets the size of the %EnrichedText instance.
443 * @param[out] width The width of the control
444 * @param[out] height The height of the control
446 void GetSize(float& width, float& height) const;
449 * Gets the width of the %EnrichedText instance.
455 int GetWidth(void) const;
458 * Gets the width of the %EnrichedText instance.
464 float GetWidthF(void) const;
467 * Gets the height of the %EnrichedText instance.
473 int GetHeight(void) const;
476 * Gets the height of the %EnrichedText instance.
482 float GetHeightF(void) const;
485 * Sets the vertical alignment.
489 * @return An error code
490 * @param[in] alignment The vertical alignment of the text
491 * @exception E_SUCCESS The method is successful.
492 * @exception E_INVALID_ARG The specified input parameter is invalid.
494 result SetVerticalAlignment(TextVerticalAlignment alignment);
497 * Sets the horizontal alignment.
501 * @return An error code
502 * @param[in] alignment The horizontal alignment of the text
503 * @exception E_SUCCESS The method is successful.
504 * @exception E_INVALID_ARG The specified input parameter is invalid.
506 result SetHorizontalAlignment(TextHorizontalAlignment alignment);
509 * Gets the vertical alignment.
513 * @return alignment The vertical alignment of the text
515 TextVerticalAlignment GetVerticalAlignment(void) const;
518 * Gets the horizontal alignment.
522 * @return alignment The horizontal alignment of the text
524 TextHorizontalAlignment GetHorizontalAlignment(void) const;
527 * Sets the text wrap style.
531 * @return An error code
532 * @param[in] wrap The text wrapping style
533 * @exception E_SUCCESS The method is successful.
534 * @exception E_INVALID_ARG The specified input parameter is invalid.
536 result SetTextWrapStyle(TextWrap wrap);
539 * Gets the text wrap style.
543 * @return wrap The text wrapping style in the %EnrichedText bounds
545 TextWrap GetTextWrapStyle(void) const;
548 * Sets the text abbreviation status.
552 * @return An error code
553 * @param[in] enable Set to @c true to enable text abbreviation, @n
555 * @exception E_SUCCESS The method is successful.
557 result SetTextAbbreviationEnabled(bool enable);
560 * Checks whether the text abbreviation is enabled.
564 * @return @c true if the text abbreviation is enabled, @n
567 bool IsTextAbbreviationEnabled(void) const;
570 * Sets the line spacing.
574 * @return An error code
575 * @param[in] lineSpace The space between lines
576 * @exception E_SUCCESS The method is successful.
577 * @exception E_INVALID_ARG The specified input parameter is invalid.
580 result SetLineSpace(int lineSpace);
583 * Sets the line spacing.
587 * @return An error code
588 * @param[in] lineSpace The space between lines
589 * @exception E_SUCCESS The method is successful.
590 * @exception E_INVALID_ARG The specified input parameter is invalid.
593 result SetLineSpace(float lineSpace);
596 * Gets the line spacing.
600 * @return space The space between lines
602 int GetLineSpace(void) const;
605 * Gets the line spacing.
609 * @return space The space between lines
611 float GetLineSpaceF(void) const;
614 * Refreshes the texts and bitmap according to the %EnrichedText instance's attributes. @n
615 * If some attributes are changed (such as changes using @ref SetSize), you can get the exact
616 * information of the text position or the number of lines after this method is called.
623 * Gets the total line count of the text in the %EnrichedText instance.
627 * @return The total line count
629 int GetTotalLineCount(void) const;
632 * Gets the height of the text in the %EnrichedText instance.
636 * @return The line height
638 int GetTotalLineHeight(void) const;
641 * Gets the height of the text in the %EnrichedText instance.
645 * @return The line height
647 float GetTotalLineHeightF(void) const;
650 * Gets the displayed line count of the text in the %EnrichedText instance.
654 * @return The displayed line count
656 int GetDisplayLineCount(void) const;
659 * Gets the length of the specified line.
663 * @return The line length, @n
664 * else @c -1 if the method fails
665 * @param[in] lineIndex The index of the specified line
666 * @exception E_SUCCESS The method is successful.
667 * @exception E_INVALID_ARG The specified input parameter is invalid.
668 * @remarks The specific error code can be accessed using the GetLastResult() method.
670 int GetLineLength(int lineIndex) const;
673 * Gets the first character index of the specified line.
677 * @return The first text offset, @n
678 * else @c -1 if the method fails
679 * @param[in] lineIndex The line index of the %EnrichedText object
680 * @exception E_SUCCESS The method is successful.
681 * @exception E_INVALID_ARG The specified input parameter is invalid.
682 * @remarks The specific error code can be accessed using the GetLastResult() method.
684 int GetFirstTextIndex(int lineIndex) const;
687 * Gets the line index of the specified character.
691 * @return The line index, @n
692 * else @c -1 if the method fails
693 * @param[in] textIndex The text index
694 * @exception E_SUCCESS The method is successful.
695 * @exception E_INVALID_ARG The specified input parameter is invalid.
696 * @remarks The specific error code can be accessed using the GetLastResult() method.
698 int GetLineIndex(int textIndex) const;
701 * Gets the line height of the specified line.
705 * @return The line height, @n
706 * else @c -1 if the method fails
707 * @param[in] lineIndex The line index
708 * @exception E_SUCCESS The method is successful.
709 * @exception E_INVALID_ARG The specified input parameter is invalid.
710 * @remarks The specific error code can be accessed using the GetLastResult() method.
712 int GetLineHeight(int lineIndex) const;
715 * Gets the line height of a specified line.
719 * @return The line height, @n
720 * else @c -1.0f if the method fails
721 * @param[in] lineIndex The line index
722 * @exception E_SUCCESS The method is successful.
723 * @exception E_INVALID_ARG The specified input parameter is invalid.
724 * @remarks The specific error code can be accessed using the GetLastResult() method.
726 float GetLineHeightF(int lineIndex) const;
729 * Gets the text length of the %EnrichedText object.
733 * @return The text length
735 int GetTextLength(void) const;
738 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
739 * expanded to one line.
743 * @return An error code
744 * @param[in] startTextIndex The starting text index of the %EnrichedText instance
745 * @param[in] textLength The length of the specified text @n
746 * It must be greater than or equal to @c 0.
747 * @param[out] width The width of the specified text
748 * @param[out] height The height of the specified text
749 * @param[out] actualLength The actual text length measured
750 * @exception E_SUCCESS The method is successful.
751 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
752 * @exception E_INVALID_ARG A specified input parameter is invalid.
754 result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const;
757 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
758 * expanded to one line.
762 * @return An error code
763 * @param[in] startTextIndex The starting text index of the %EnrichedText instance
764 * @param[in] textLength The length of the specified text @n
765 * It must be greater than or equal to @c 0.
766 * @param[out] width The width of the specified text
767 * @param[out] height The height of the specified text
768 * @param[out] actualLength The actual text length measured
769 * @exception E_SUCCESS The method is successful.
770 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
771 * @exception E_INVALID_ARG A specified input parameter is invalid.
773 result GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const;
776 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
777 * expanded to one line.
781 * @return An error code
782 * @param[in] startTextIndex The starting text index of the EnrichedText
783 * @param[in] textLength The length of the specified text @n
784 * It must be greater than or equal to @c 0.
785 * @param[out] size The extent of the specified text
786 * @param[out] actualLength The actual text length measured
787 * @exception E_SUCCESS The method is successful.
788 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
789 * @exception E_INVALID_ARG A specified input parameter is invalid.
791 result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const;
794 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
795 * expanded to one line.
799 * @return An error code
800 * @param[in] startTextIndex The starting text index of the %EnrichedText instance
801 * @param[in] textLength The length of the specified text @n
802 * It must be greater than or equal to @c 0.
803 * @param[out] size The extent of the specified text
804 * @param[out] actualLength The actual text length measured
805 * @exception E_SUCCESS The method is successful.
806 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
807 * @exception E_INVALID_ARG A specified input parameter is invalid.
809 result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int& actualLength) const;
812 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
813 * not expanded to one line. @n The %GetTextExtent() method is useful for finding the extent of %EnrichedText spanning multiple lines.
816 * @return An instance of Dimension containing the extent of the %EnrichedText instance, @n
817 * else (-1, -1) if the method fails
819 Tizen::Graphics::Dimension GetTextExtent(void) const;
822 * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
823 * not expanded to one line. @n The %GetTextExtentF() method is useful for finding the extent of %EnrichedText spanning multiple lines.
826 * @return An instance of FloatDimension containing the extent of the %EnrichedText instance, @n
827 * else (-1.0f, -1.0f) if the method fails
829 Tizen::Graphics::FloatDimension GetTextExtentF(void) const;
832 * Adds the specified bitmap image to the %EnrichedText instance.
836 * @return An error code
837 * @param[in] bitmap The bitmap to draw @n
838 * The bitmap must be constructed before being passed to this method.
839 * @exception E_SUCCESS The method is successful.
840 * @exception E_SYSTEM An unknown operating system error has occurred.
841 * @exception E_OUT_OF_MEMORY The memory is insufficient.
842 * @exception E_INVALID_ARG The specified input parameter is invalid.
844 result Add(const Tizen::Graphics::Bitmap& bitmap);
847 * Inserts the specified bitmap image to the %EnrichedText instance at the specified index.
851 * @return An error code
852 * @param[in] bitmap The @c bitmap to draw @n
853 * The bitmap must be constructed before being passed to this method.
854 * @param[in] elementIndex The index at which the @c bitmap image is to add
855 * @exception E_SUCCESS The method is successful.
856 * @exception E_SYSTEM An unknown operating system error has occurred.
857 * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
858 * @exception E_OUT_OF_MEMORY The memory is insufficient.
859 * @exception E_INVALID_ARG A specified input parameter is invalid.
861 result InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap);
864 * Gets the information about the link at the specified position.
868 * @return An error code
869 * @param[in] point A point that is within the %EnrichedText object
870 * @param[out] linkInfo The LinkInfo object that represents the link at the specified position
871 * @exception E_SUCCESS The method is successful.
872 * @exception E_INVALID_ARG A specified input parameter is invalid.
873 * @exception E_OBJ_NOT_FOUND The required instance is not found.
874 * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
875 * @see Tizen::Base::Utility::LinkInfo
877 result GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const;
880 * Gets the information about the link at the specified position.
884 * @return An error code
885 * @param[in] point A point that is within the %EnrichedText object
886 * @param[out] linkInfo The LinkInfo object that represents the link at the specified position
887 * @exception E_SUCCESS The method is successful.
888 * @exception E_INVALID_ARG A specified input parameter is invalid.
889 * @exception E_OBJ_NOT_FOUND The required instance is not found.
890 * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
891 * @see Tizen::Base::Utility::LinkInfo
893 result GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const;
896 * Gets the information about the link at the specified position.
900 * @return An error code
901 * @param[in] x The x-coordinate of a point that is within the %EnrichedText object
902 * @param[in] y The y-coordinate of a point that is within the %EnrichedText object
903 * @param[out] linkInfo The LinkInfo object that represents the link at the specified position
904 * @exception E_SUCCESS The method is successful.
905 * @exception E_INVALID_ARG A specified input parameter is invalid.
906 * @exception E_OBJ_NOT_FOUND The required instance is not found.
907 * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
908 * @see Tizen::Base::Utility::LinkInfo
910 result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const;
913 * Gets the information about the link at a specified position.
917 * @return An error code
918 * @param[in] x The x-coordinate of a point that is within the %EnrichedText object
919 * @param[in] y The y-coordinate of a point that is within the %EnrichedText object
920 * @param[out] linkInfo The LinkInfo object that represents the link at the specified position
921 * @exception E_SUCCESS The method is successful.
922 * @exception E_INVALID_ARG A specified input parameter is invalid.
923 * @exception E_OBJ_NOT_FOUND The required instance is not found.
924 * @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
925 * @see Tizen::Base::Utility::LinkInfo
927 result GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const;
930 * Gets the vertical alignment among text and bitmap element.
934 * @return The vertical alignment among the text and the bitmap element
936 TextVerticalAlignment GetElementVerticalAlignment(void) const;
939 * Sets the vertical alignment among text and bitmap element.
943 * @return An error code
944 * @param[in] alignment The vertical alignment among the text and the bitmap element
945 * @exception E_SUCCESS The method is successful.
946 * @exception E_INVALID_ARG The specified input parameter is invalid.
947 * @remarks This method sets how one element is positioned relative to the other elements. @n
948 * The vertical alignment of text and bitmap elements are decided based on the maximum height among elements.
949 * @remarks The default alignment @c TEXT_ALIGNMENT_BOTTOM.
951 result SetElementVerticalAlignment(TextVerticalAlignment alignment);
954 friend class _EnrichedTextImpl;
957 // This value is for internal use only. Using this value can cause behavioral, security-related,
958 // and consistency-related issues in the application.
963 class _EnrichedTextImpl * __pImpl;
965 EnrichedText(const EnrichedText& font);
966 EnrichedText& operator =(const EnrichedText& rhs);
970 } } // Tizen::Graphics
972 #endif // _FGRP_ENRICHED_TEXT_H_