Tizen 2.1 base
[framework/osp/uifw.git] / inc / FGrpEnrichedText.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file        FGrpEnrichedText.h
20  * @brief       This is the header file for the %EnrichedText class.
21  *
22  * This header file contains the definitions of the %EnrichedText class.
23  *
24  */
25
26 #ifndef _FGRP_ENRICHED_TEXT_H_
27 #define _FGRP_ENRICHED_TEXT_H_
28
29 #include <FBase.h>
30 #include <FBaseUtilLinkInfo.h>
31 #include <FGrpTextElement.h>
32
33 namespace Tizen { namespace Graphics
34 {
35 /**
36  * @enum TextHorizontalAlignment
37  *
38  * Defines the horizontal alignment of the text.
39  *
40  * @since               2.0
41  */
42 enum TextHorizontalAlignment
43 {
44         TEXT_ALIGNMENT_LEFT = 1,                    /**< The position of the text is towards the left of the object */
45         TEXT_ALIGNMENT_CENTER,                  /**< The position of the text is towards the center of the object */
46         TEXT_ALIGNMENT_RIGHT,                   /**< The position of the text is towards the right of the object */
47         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.
48         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.
49 };
50
51 /**
52  * @enum TextVerticalAlignment
53  *
54  * Defines the vertical alignment of the text.
55  *
56  * @since               2.0
57  */
58 enum TextVerticalAlignment
59 {
60         TEXT_ALIGNMENT_TOP = 1,                                 /**< The position of the text is towards the top of the object */
61         TEXT_ALIGNMENT_MIDDLE,                                  /**< The position of the text is towards the middle of the object */
62         TEXT_ALIGNMENT_BOTTOM,                                  /**< The position of the text is towards the bottom of the object */
63         TEXT_ALIGNMENT_BASELINE,                                /**< The position of the text is aligned along the baseline of the object */
64         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.
65         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.
66 };
67
68 /**
69  * @enum TextWrap
70  *
71  * Defines the style of wrapping of the text in %EnrichedText.
72  *
73  * @since               2.0
74  */
75 enum TextWrap
76 {
77         TEXT_WRAP_NONE = 1,                     /**< The wrapping of text is not applied */
78         TEXT_WRAP_CHARACTER_WRAP,           /**< The wrapping of text is applied at the character unit */
79         TEXT_WRAP_WORD_WRAP,                /**< The wrapping of text is applied at the word unit */
80         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.
81         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.
82 };
83
84 /**
85  * @class       EnrichedText
86  * @brief       This class provides enriched text content.
87  *
88  * @since       2.0
89  *
90  * @final       This class is not intended for extension.
91  *
92  * The %EnrichedText class provides methods that enable your application to support texts with various styles, such
93  * as font, color, and layout. An %EnrichedText instance can be drawn to a Canvas.
94  *
95  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/enriched_text.htm">EnrichedText</a>.
96  *
97  * The following example demonstrates how to use the %EnrichedText class.
98  *
99  * @code
100 #include <FApp.h>
101 #include <FBase.h>
102 #include <FGraphics.h>
103
104 using namespace Tizen::App;
105 using namespace Tizen::Graphics;
106
107 bool
108 MyClass::EnrichedTextSample(void)
109 {
110     result r = E_SUCCESS;
111     EnrichedText* pEnrichedText = null;
112     TextElement* pTextElement1 = null;
113     TextElement* pTextElement2 = null;
114     Bitmap* pBitmap = null;
115
116     // Creates an EnrichedText instance and sets the attributes
117     pEnrichedText = new EnrichedText();
118     r = pEnrichedText->Construct(Dimension(200, 200));
119     if (IsFailed(r))
120     {
121         goto CATCH;
122     }
123     pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
124     pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);
125     pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
126     pEnrichedText->SetTextAbbreviationEnabled(true);
127
128     // Creates a TextElement and sets attributes
129     pTextElement1 = new TextElement();
130     r = pTextElement1->Construct(L"0123456789");
131     if (IsFailed(r))
132     {
133         goto CATCH;
134     }
135     pTextElement1->SetTextColor(Color::GetColor(COLOR_ID_BLUE));
136     {
137         Font font;
138         font.Construct(FONT_STYLE_BOLD, 40);
139         pTextElement1->SetFont(font);
140     }
141
142     // Creates another TextElement and sets the attributes
143     pTextElement2 = new TextElement();
144     r = pTextElement2->Construct(L"abcdefghijklmn\nABCDEFGHIJKLMN");
145     if (IsFailed(r))
146     {
147         goto CATCH;
148     }
149     pTextElement2->SetTextColor(Color::GetColor(COLOR_ID_VIOLET));
150
151     // Creates a bitmap and scales the size
152     pBitmap = App::GetInstance()->GetAppResource()->GetBitmapN(L"example.bmp");
153     pBitmap->Scale(Dimension(40, 40));
154
155     // Adds the TextElement and the bitmap to the EnrichedText
156     pEnrichedText->Add(*pTextElement1);
157     pEnrichedText->Add(*pTextElement2);
158     pEnrichedText->Add(*pBitmap);
159
160     // Draws
161     {
162         Canvas canvas;
163         r = canvas.Construct();
164         if (IsFailed(r))
165         {
166             goto CATCH;
167         }
168         canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
169         canvas.Clear();
170         canvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), Rectangle(50, 50, 380, 380));
171
172         // Draws the covered area of the EnrichedText in the Canvas coordinate
173         int width, height;
174         pEnrichedText->GetSize(width, height);
175         canvas.FillRectangle(Color::GetColor(COLOR_ID_GREY), Rectangle(60, 60, width, height));
176
177         // Draws the EnrichedText at the specified Point
178         canvas.DrawText(Point(60, 60), *pEnrichedText);
179         canvas.Show();
180     }
181
182     // Cleans up
183     pEnrichedText->RemoveAll(true);
184     delete pEnrichedText;
185
186     return true;
187
188 CATCH:
189     if (pEnrichedText)
190     {
191         pEnrichedText->RemoveAll(true);
192         delete pEnrichedText;
193     }
194
195     return false;
196 }
197  *      @endcode
198  *
199  *
200  *
201  *
202  */
203
204 class _OSP_EXPORT_ EnrichedText
205         : public Tizen::Base::Object
206 {
207 public:
208         /**
209          * This is the default constructor for this class.
210          *
211          * @since               2.0
212          *
213          * @remarks             After creating an instance of this class, one of the Construct() methods must be called explicitly
214          *                              to initialize this instance.
215          */
216         EnrichedText(void);
217
218         /**
219          * This is the destructor for this class.
220          *
221          * @since               2.0
222          */
223         virtual ~EnrichedText(void);
224
225         /**
226          * Initializes this instance of %EnrichedText with the specified parameter.
227          *
228          * @since               2.0
229          *
230          * @return              An error code
231          * @param[in]   dim                                     The dimension to set for %EnrichedText @n
232          *                                                                      The width and height must be greater than @c 0.
233          * @exception   E_SUCCESS                       The method is successful.
234          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
235          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
236          */
237         result Construct(const Tizen::Graphics::Dimension& dim);
238
239         /**
240          * Inserts the TextElement instance in the %EnrichedText instance at the specified index.
241          *
242          * @since               2.0
243          *
244          * @return              An error code
245          * @param[in]   elementIndex            The index at which the text element is to add
246          * @param[in]   element                         The TextElement to add
247          * @exception   E_SUCCESS                       The method is successful.
248          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
249          */
250         result InsertAt(int elementIndex, TextElement& element);
251
252         /**
253          * Removes the TextElement instance at the specified index of the %EnrichedText instance.
254          *
255          * @since               2.0
256          *
257          * @return              An error code
258          * @param[in]   elementIndex            The index of TextElement
259          * @param[in]   deallocate                      Set to @c true to deallocate the TextElement instance, @n
260          *                                                                      else @c false
261          * @exception   E_SUCCESS                       The method is successful.
262          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
263          *
264          */
265         result RemoveAt(int elementIndex, bool deallocate);
266
267         /**
268          * Removes the TextElement instance from the %EnrichedText instance.
269          *
270          * @since               2.0
271          *
272          * @return              An error code
273          * @param[in]   element                 The TextElement to remove
274          * @param[in]   deallocate                      Set to @c true to deallocate the TextElement instance, @n
275          *                                                                              else @c false
276          * @exception   E_SUCCESS                       The method is successful.
277          *
278          */
279         result Remove(TextElement& element, bool deallocate);
280
281         /**
282          * Adds the specified TextElement instance to the %EnrichedText instance.
283          *
284          * @since               2.0
285          *
286          * @return              An error code
287          * @param[in]   element                         The TextElement to append
288          * @exception   E_SUCCESS                       The method is successful.
289          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
290          *
291          */
292         result Add(TextElement& element);
293
294         /**
295          * @if OSPDEPREC
296          * Removes all the %TextElement instances from the %EnrichedText instance.
297          *
298          * @brief       <i> [Deprecated] </i>
299          * @deprecated  This method is deprecated. Instead of this method, use the RemoveAll().
300          * @since               2.0
301          * @endif
302          *
303          * @return              An error code
304          * @param[in]   deallocate                      Set to @c true to deallocate the %TextElement instance, @n
305          *                                                                      else @c false
306          * @exception   E_SUCCESS                       The method is successful.
307          * @see         RemoveAll()
308          *
309          */
310         result RemoveAllTextElements(bool deallocate);
311
312         /**
313          * Removes all the text and image elements from the %EnrichedText instance.
314          *
315          * @since          2.0
316          *
317          * @return         An error code
318          * @param[in]      deallocate                   Set to @c true to deallocate the elements to be removed, @n
319          *                                                                              else @c false
320          * @exception      E_SUCCESS            The method is successful.
321          * @exception      E_SYSTEM             An unknown operating system error has occurred.
322          *
323          */
324         result RemoveAll(bool deallocate);
325
326         /**
327          * Gets the %TextElement instance at the specified index from the %EnrichedText instance.
328          *
329          * @since               2.0
330          *
331          * @return              The %TextElement instance at the specified index, @n
332          *                              else @c null if the method fails
333          * @param[in]   elementIndex            The index of the %TextElement
334          * @exception   E_SUCCESS                       The method is successful.
335          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
336          * @remarks             The specific error code can be accessed using the GetLastResult() method.
337          */
338         TextElement* GetTextElementAt(int elementIndex) const;
339
340         /**
341          * Gets the count of the %TextElement instances.
342          *
343          * @since               2.0
344          *
345          * @return              The count of the %TextElement instances
346          */
347         int GetTextElementCount(void) const;
348
349         /**
350          * Sets the text size.
351          *
352          * @since               2.0
353          *
354          * @return      An error code
355          * @param[in]   size                The new size of the %EnrichedText @n
356          *                                  The width and height must be greater than @c 0.
357          * @exception   E_SUCCESS           The method is successful.
358          * @exception   E_OUT_OF_RANGE      The value of the parameter is outside the valid range defined by the method.
359          */
360         result SetSize(const Tizen::Graphics::Dimension& size);
361
362         /**
363          * Sets the text size.
364          *
365          * @since               2.0
366          *
367          * @return      An error code
368          * @param[in]   width   The new width of %EnrichedText @n
369          *                                      It must be greater than @c 0.
370          * @param[in]   height  The new height of %EnrichedText @n
371          *                                      It must be greater than @c 0.
372          * @exception   E_SUCCESS           The method is successful.
373          * @exception   E_OUT_OF_RANGE      The value of the argument is outside the valid range defined by the method.
374          */
375         result SetSize(int width, int height);
376
377         /**
378          * Gets the size.
379          *
380          * @since               2.0
381          *
382          * @return              An instance of %Dimension containing the width and the height of the %EnrichedText instance
383          *
384          */
385         Tizen::Graphics::Dimension GetSize(void) const;
386
387         /**
388          * Gets the size of the %EnrichedText instance.
389          *
390          * @since               2.0
391          *
392          * @param[out]  width           The width of the control
393          * @param[out]  height          The height of the control
394          */
395         void GetSize(int& width, int& height) const;
396
397         /**
398          * Gets the width of the %EnrichedText instance.
399          *
400          * @since               2.0
401          *
402          * @return              The width
403          */
404         int GetWidth(void) const;
405
406         /**
407          * Gets the height of the %EnrichedText instance.
408          *
409          * @since               2.0
410          *
411          * @return              The height
412          */
413         int GetHeight(void) const;
414
415
416         /**
417          * Sets the vertical alignment.
418          *
419          * @since               2.0
420          *
421          * @return              An error code
422          * @param[in]   alignment               The vertical alignment of the text
423          * @exception   E_SUCCESS                       The method is successful.
424          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
425          */
426         result SetVerticalAlignment(TextVerticalAlignment alignment);
427
428         /**
429          * Sets the horizontal alignment.
430          *
431          * @since               2.0
432          *
433          * @return              An error code
434          * @param[in]   alignment                       The horizontal alignment of the text
435          * @exception   E_SUCCESS                       The method is successful.
436          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
437          */
438         result SetHorizontalAlignment(TextHorizontalAlignment alignment);
439
440         /**
441          * Gets the vertical alignment.
442          *
443          * @since               2.0
444          *
445          * @return              alignment                       The vertical alignment of the text
446          */
447         TextVerticalAlignment GetVerticalAlignment(void) const;
448
449         /**
450          * Gets the horizontal alignment.
451          *
452          * @since               2.0
453          *
454          * @return              alignment               The horizontal alignment of the text
455          */
456         TextHorizontalAlignment GetHorizontalAlignment(void) const;
457
458         /**
459          * Sets the text wrap style.
460          *
461          * @since               2.0
462          *
463          * @return              An error code
464          * @param[in]   wrap                            The text wrapping style
465          * @exception   E_SUCCESS                       The method is successful.
466          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
467          */
468         result SetTextWrapStyle(TextWrap wrap);
469
470         /**
471          * Gets the text wrap style.
472          *
473          * @since               2.0
474          *
475          * @return              wrap            The text wrapping style in the %EnrichedText bounds
476          */
477         TextWrap GetTextWrapStyle(void) const;
478
479         /**
480          * Sets the text abbreviation status.
481          *
482          * @since               2.0
483          *
484          * @return              An error code
485          * @param[in]   enable                          Set to @c true to enable text abbreviation, @n
486          *                                                                      else @c false
487          * @exception   E_SUCCESS                       The method is successful.
488          */
489         result SetTextAbbreviationEnabled(bool enable);
490
491         /**
492          * Checks whether the text abbreviation is enabled.
493          *
494          * @since               2.0
495          *
496          * @return              @c true if the text abbreviation is enabled, @n
497          *                              else @c false
498          */
499         bool IsTextAbbreviationEnabled(void) const;
500
501         /**
502          * Sets the line spacing.
503          *
504          * @since               2.0
505          *
506          * @return              An error code
507          * @param[in]   lineSpace                       The space between lines
508          * @exception   E_SUCCESS                       The method is successful.
509          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
510          *
511          */
512         result SetLineSpace(int lineSpace);
513
514         /**
515          * Gets the line spacing.
516          *
517          * @since               2.0
518          *
519          * @return              space           The space between lines
520          */
521         int GetLineSpace(void) const;
522
523         /**
524          * Refreshes the texts and bitmap according to the %EnrichedText instance's attributes. @n
525          * If some attributes are changed (such as changes using @ref SetSize), you can get the exact
526          * information of the text position or the number of lines after this method is called.
527          *
528          * @since               2.0
529          */
530         void Refresh(void);
531
532         /**
533          * Gets the total line count of the text in the %EnrichedText instance.
534          *
535          * @since               2.0
536          *
537          * @return              The total line count
538          */
539         int GetTotalLineCount(void) const;
540
541         /**
542          * Gets the height of the text in the %EnrichedText instance.
543          *
544          * @since               2.0
545          *
546          * @return              The line height
547          */
548         int GetTotalLineHeight(void) const;
549
550         /**
551          * Gets the displayed line count of the text in the %EnrichedText instance. @n
552          *
553          * @since               2.0
554          *
555          * @return              The displayed line count
556          */
557         int GetDisplayLineCount(void) const;
558
559         /**
560          * Gets the length of the specified line.
561          *
562          * @since               2.0
563          *
564          * @return              The line length, @n
565          *                              else @c -1 if the method fails
566          * @param[in]   lineIndex                       The index of the specified line
567          * @exception   E_SUCCESS                       The method is successful.
568          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
569          * @remarks             The specific error code can be accessed using the GetLastResult() method.
570          */
571         int GetLineLength(int lineIndex) const;
572
573         /**
574          * Gets the first character index of the specified line.
575          *
576          * @since               2.0
577          *
578          * @return              The first text offset, @n
579          *                              else @c -1 if the method fails
580          * @param[in]   lineIndex                       The line index of the %EnrichedText object
581          * @exception   E_SUCCESS                       The method is successful.
582          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
583          * @remarks             The specific error code can be accessed using the GetLastResult() method.
584          */
585         int GetFirstTextIndex(int lineIndex) const;
586
587         /**
588          * Gets the line index of the specified character.
589          *
590          * @since               2.0
591          *
592          * @return              The line index, @n
593          *                              else @c -1 if the method fails
594          * @param[in]   textIndex                       The text index
595          * @exception   E_SUCCESS                       The method is successful.
596          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
597          * @remarks             The specific error code can be accessed using the GetLastResult() method.
598          */
599         int GetLineIndex(int textIndex) const;
600
601         /**
602          * Gets the line height of the specified line.
603          *
604          * @since               2.0
605          *
606          * @return              The line height, @n
607          *                              else @c -1 if the method fails
608          * @param[in]   lineIndex                       The line index
609          * @exception   E_SUCCESS                       The method is successful.
610          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
611          * @remarks             The specific error code can be accessed using the GetLastResult() method.
612          */
613         int GetLineHeight(int lineIndex) const;
614
615         /**
616          * Gets the text length of the %EnrichedText object.
617          *
618          * @since               2.0
619          *
620          * @return              The text length
621          */
622         int GetTextLength(void) const;
623
624         /**
625          * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
626          * expanded to one line.
627          *
628          * @since               2.0
629          *
630          * @return              An error code
631          * @param[in]   startTextIndex          The starting text index of the %EnrichedText
632          * @param[in]   textLength                      The length of the specified text @n
633          *                                                                      It must be greater than or equal to @c 0.
634          * @param[out]  width                           The width of the specified text
635          * @param[out]  height                          The height of the specified text
636          * @param[out]  actualLength            The actual text length measured
637          * @exception   E_SUCCESS                       The method is successful.
638          * @exception   E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method.
639          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
640          */
641         result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const;
642
643         /**
644          * Gets the extent of the %EnrichedText instance on the assumption that all %TextElements are
645          * expanded to one line.
646          *
647          * @since 2.0
648          * @return              An error code
649          * @param[in]   startTextIndex          The starting text index of the EnrichedText
650          * @param[in]   textLength                      The length of the specified text @n
651          *                                                                      It must be greater than or equal to @c 0.
652          * @param[out]  size                            The extent of the specified text
653          * @param[out]  actualLength            The actual text length measured
654          * @exception   E_SUCCESS                       The method is successful.
655          * @exception   E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method.
656          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
657          */
658         result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const;
659
660         /**
661          * Gets the extent of the %EnrichedText instance on the assumption that all %TextElements are
662          * not expanded to one line. This function is useful for finding the extent of EnrichedText spanning multiple lines.
663          *
664          * @since 2.0
665          * @return              An instance of %Dimension containing the extent of the %EnrichedText instance, @n
666          *                              else (-1, -1) if the method fails
667          */
668         Tizen::Graphics::Dimension GetTextExtent(void) const;
669
670         /**
671          * Adds the specified bitmap image to the %EnrichedText instance.
672          *
673          * @since                       2.0
674          *
675          * @return              An error code
676          * @param[in]   bitmap                                  The bitmap to draw @n
677          *                                              The bitmap must be constructed before being passed to this method.
678          * @exception   E_SUCCESS                               The method is successful.
679          * @exception   E_SYSTEM                An unknown operating system error has occurred.
680          * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
681          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
682          */
683         result Add(const Tizen::Graphics::Bitmap& bitmap);
684
685         /**
686          * Inserts the specified bitmap image to the %EnrichedText instance at the specified index.
687          *
688          * @since 2.0
689          *
690          * @return              An error code
691          * @param[in]   bitmap                                  The @c bitmap to draw @n
692          *                                              The bitmap must be constructed before being passed to this method.
693          * @param[in]   elementIndex                The index at which the @c bitmap image is to add
694          * @exception   E_SUCCESS                               The method is successful.
695          * @exception   E_SYSTEM                An unknown operating system error has occurred.
696          * @exception   E_OUT_OF_RANGE                  The value of the argument is outside the valid range defined by the method.
697          * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
698          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.
699          */
700         result InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap);
701
702         /**
703          * Gets the information about the link at the specified position.
704          *
705          * @since      2.0
706          *
707          * @return     An error code
708          * @param[in]  point              A point that is within the %EnrichedText object
709          * @param[out] linkInfo           The LinkInfo object that represents the link at the specified position
710          * @exception  E_SUCCESS          The method is successful.
711          * @exception  E_INVALID_ARG      A specified input parameter is invalid.
712          * @exception  E_OBJ_NOT_FOUND    The required instance is not found.
713          * @remarks    The method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
714          * @see        Tizen::Base::Utility::LinkInfo
715          */
716         result GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const;
717
718
719         /**
720          * Gets the information about the link at the specified position.
721          *
722          * @since      2.0
723          *
724          * @return     An error code
725          * @param[in]  x                  The x-coordinate of a point that is within the %EnrichedText object
726          * @param[in]  y                  The y-coordinate of a point that is within the %EnrichedText object
727          * @param[out] linkInfo           The LinkInfo object that represents the link at the specified position
728          * @exception  E_SUCCESS          The method is successful.
729          * @exception  E_INVALID_ARG      A specified input parameter is invalid.
730          * @exception  E_OBJ_NOT_FOUND    The required instance is not found.
731          * @remarks    The method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
732          * @see        Tizen::Base::Utility::LinkInfo
733          */
734         result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const;
735
736         /**
737          * Gets the vertical alignment among text and bitmap element.
738          *
739          * @since               2.0
740          *
741          * @return              The vertical alignment among the text and the bitmap element
742          */
743         TextVerticalAlignment GetElementVerticalAlignment(void) const;
744
745         /**
746          * Sets the vertical alignment among text and bitmap element.
747          *
748          * @since               2.0
749          *
750          * @return              An error code
751          * @param[in]   alignment               The vertical alignment among the text and the bitmap element
752          * @exception   E_SUCCESS                       The method is successful.
753          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
754          * @remarks             This method sets how one element is positioned relative to the other elements. @n
755          *                              The vertical alignment of text and bitmap elements are decided based on the maximum height among elements.
756          * @remarks             The default alignment TEXT_ALIGNMENT_BOTTOM.
757          */
758         result SetElementVerticalAlignment(TextVerticalAlignment alignment);
759
760 private:
761         friend class _EnrichedTextImpl;
762
763         //
764         // This value is for internal use only. Using this value can cause behavioral, security-related,
765         // and consistency-related issues in the application.
766         //
767         class _EnrichedTextImpl * __pImpl;
768
769         //
770         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
771         //
772         EnrichedText(const EnrichedText& font);
773
774         //
775         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
776         //
777         EnrichedText& operator =(const EnrichedText& rhs);
778 }; // EnrichedText
779
780 }} // Tizen::Graphics
781
782 #endif // _FGRP_ENRICHED_TEXT_H_