AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
TextStyle.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_CAPTIONS_INTERFACE_INCLUDE_CAPTIONS_TEXTSTYLE_H_
17 #define ALEXA_CLIENT_SDK_CAPTIONS_INTERFACE_INCLUDE_CAPTIONS_TEXTSTYLE_H_
18 
19 #include <cstdint>
20 #include <iostream>
21 
22 namespace alexaClientSDK {
23 namespace captions {
24 
28 struct Style {
36  Style(bool bold = false, bool italic = false, bool underline = false);
37 
44  bool operator==(const Style& rhs) const;
45 
52  bool operator!=(const Style& rhs) const;
53 
55  bool m_bold;
56 
58  bool m_italic;
59 
62 };
63 
71 std::ostream& operator<<(std::ostream& stream, const Style& style);
72 
76 struct TextStyle {
82  TextStyle(size_t index = 0, const Style& style = Style());
83 
85  size_t charIndex;
86 
89 
96  bool operator==(const TextStyle& rhs) const;
97 
104  bool operator!=(const TextStyle& rhs) const;
105 };
106 
114 std::ostream& operator<<(std::ostream& stream, const TextStyle& textStyle);
115 
116 } // namespace captions
117 } // namespace alexaClientSDK
118 #endif // ALEXA_CLIENT_SDK_CAPTIONS_INTERFACE_INCLUDE_CAPTIONS_TEXTSTYLE_H_
bool operator==(const Style &rhs) const
Definition: TextStyle.cpp:24
std::ostream & operator<<(std::ostream &stream, const CaptionFormat &format)
Definition: CaptionFormat.h:59
Definition: TextStyle.h:76
Definition: TextStyle.h:28
Style(bool bold=false, bool italic=false, bool underline=false)
Definition: TextStyle.cpp:21
bool m_underline
Indicates whether the underlined text appearance should be applied to the text.
Definition: TextStyle.h:61
static int index
Mock buffer index.
Definition: AndroidSLESMediaQueueTest.cpp:70
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Style activeStyle
The styles that are active and should be applied from this charIndex forward.
Definition: TextStyle.h:88
bool m_bold
Indicates whether the bolded text appearance should be applied to the text.
Definition: TextStyle.h:55
size_t charIndex
The character index from which the activeStyle should be applied.
Definition: TextStyle.h:85
bool operator!=(const Style &rhs) const
Definition: TextStyle.cpp:28
bool m_italic
Indicates whether the italic text appearance should be applied to the text.
Definition: TextStyle.h:58

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0