Spannable: Add BoldSpan
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / text / spans / bold-span.h
1 #ifndef DALI_TOOLKIT_TEXT_BOLD_SPAN_H
2 #define DALI_TOOLKIT_TEXT_BOLD_SPAN_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
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
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/devel-api/text/spans/base-span.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 namespace Text
29 {
30 namespace Internal DALI_INTERNAL
31 {
32 class BoldSpan;
33 }
34
35 /**
36  * @brief BoldSpan is a handle to an object that specifies the Bold for range of characters.
37  */
38 class DALI_TOOLKIT_API BoldSpan : public BaseSpan
39 {
40 public:
41   /**
42    * @brief Create an initialized BoldSpan.
43    *
44    * @return A handle to newly allocated Dali resource.
45    */
46   static BoldSpan New();
47
48   /**
49    * @brief Creates an uninitialized BoldSpan handle.
50    *
51    * Calling member functions with an uninitialized BoldSpan handle is not allowed.
52    */
53   BoldSpan();
54
55   /**
56    * @brief Copy constructor.
57    * @param[in] rhs A refrence to the copied handle.
58    */
59   BoldSpan(const BoldSpan& rhs);
60
61   /**
62    * @brief Move constructor.
63    *
64    * @param[in] rhs A refrence to the move handle.
65    */
66   BoldSpan(BoldSpan&& rhs);
67
68   /**
69    * @brief Assignment operator.
70    * @param[in] rhs A reference to the copied handle.
71    * @return A refrence to this.
72    */
73   BoldSpan& operator=(const BoldSpan& rhs);
74
75   /**
76    * @brief Assignment operator.
77    * @param[in] rhs rhs A reference to the move handle.
78    * @return A refrence to this.
79    */
80   BoldSpan& operator=(BoldSpan&& rhs);
81
82   /**
83    * @brief Non virtual destructor.
84    *
85    */
86   ~BoldSpan();
87
88   /**
89    * @brief Downcasts to a BoldSpan handle.
90    * If handle is not a BoldSpan, the returned handle is left uninitialized.
91    *
92    * @param[in] handle Handle to an object.
93    * @return BoldSpan handle or an uninitialized handle
94    */
95   static BoldSpan DownCast(BaseHandle handle);
96
97   // Not intended for application developers
98   /**
99    * @brief This constructor is used internally to create an initialized BoldSpan handle.
100    * @param[in] boldSpan Pointer to internal BoldSpan.
101    */
102   explicit DALI_INTERNAL BoldSpan(Internal::BoldSpan* boldSpan);
103 };
104
105 }// namespace Text
106
107 }// namespace Toolkit
108
109 }// namespace Dali
110
111 #endif // DALI_TOOLKIT_TEXT_BOLDSPAN_H