OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_DECORATED_TEXT_H_ | 5 #ifndef UI_GFX_DECORATED_TEXT_H_ |
6 #define UI_GFX_DECORATED_TEXT_H_ | 6 #define UI_GFX_DECORATED_TEXT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 struct GFX_EXPORT RangedAttribute { | 21 struct GFX_EXPORT RangedAttribute { |
22 // Disallow default construction of Font, since that's slow. | 22 // Disallow default construction of Font, since that's slow. |
23 RangedAttribute() = delete; | 23 RangedAttribute() = delete; |
24 RangedAttribute(const Range& range, const Font& font); | 24 RangedAttribute(const Range& range, const Font& font); |
25 | 25 |
26 // The range in |text|, this RangedAttribute corresponds to. Should not be | 26 // The range in |text|, this RangedAttribute corresponds to. Should not be |
27 // reversed and should lie within the bounds of |text|. | 27 // reversed and should lie within the bounds of |text|. |
28 Range range; | 28 Range range; |
29 Font font; | 29 Font font; |
30 bool strike; | 30 bool strike; |
31 bool diagonal_strike; | |
32 }; | 31 }; |
33 | 32 |
34 DecoratedText(); | 33 DecoratedText(); |
35 ~DecoratedText(); | 34 ~DecoratedText(); |
36 | 35 |
37 base::string16 text; | 36 base::string16 text; |
38 | 37 |
39 // Vector of RangedAttribute describing styling of non-overlapping ranges | 38 // Vector of RangedAttribute describing styling of non-overlapping ranges |
40 // in |text|. | 39 // in |text|. |
41 std::vector<RangedAttribute> attributes; | 40 std::vector<RangedAttribute> attributes; |
42 }; | 41 }; |
43 | 42 |
44 }; // namespace gfx | 43 }; // namespace gfx |
45 | 44 |
46 #endif // UI_GFX_DECORATED_TEXT_H_ | 45 #endif // UI_GFX_DECORATED_TEXT_H_ |
OLD | NEW |