Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: ui/gfx/text_constants.h

Issue 1015533016: Move allow_character_break property to RenderText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TEXT_CONSTANTS_H_ 5 #ifndef UI_GFX_TEXT_CONSTANTS_H_
6 #define UI_GFX_TEXT_CONSTANTS_H_ 6 #define UI_GFX_TEXT_CONSTANTS_H_
7 7
8 namespace gfx { 8 namespace gfx {
9 9
10 // TODO(msw): Distinguish between logical character stops and glyph stops? 10 // TODO(msw): Distinguish between logical character stops and glyph stops?
11 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType. 11 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType.
12 enum BreakType { 12 enum BreakType {
13 CHARACTER_BREAK = 0, // Stop cursor movement on neighboring characters. 13 CHARACTER_BREAK = 0, // Stop cursor movement on neighboring characters.
14 WORD_BREAK, // Stop cursor movement on nearest word boundaries. 14 WORD_BREAK, // Stop cursor movement on nearest word boundaries.
15 LINE_BREAK, // Stop cursor movement on line ends as shown on screen. 15 LINE_BREAK, // Stop cursor movement on line ends as shown on screen.
16 }; 16 };
17 17
18 // Specifies the word wrapping behavior of |ElideRectangleText()| when a word
msw 2015/03/26 19:36:30 nit: Consider revising the comments like this: //
Jun Mukai 2015/03/26 22:47:39 Done.
19 // would exceed the available width.
20 enum WordWrapBehavior {
21 // Words that are too wide will be put on a new line, but will not be
22 // truncated or elided.
23 IGNORE_LONG_WORDS,
24
25 // Words that are too wide will be put on a new line and will be truncated to
26 // the available width.
27 TRUNCATE_LONG_WORDS,
28
29 // Words that are too wide will be put on a new line and will be elided to the
30 // available width.
31 ELIDE_LONG_WORDS,
32
33 // Words that are too wide will be put on a new line and will be wrapped over
34 // multiple lines.
35 WRAP_LONG_WORDS,
36 };
37
18 // Horizontal text alignment modes. 38 // Horizontal text alignment modes.
19 enum HorizontalAlignment { 39 enum HorizontalAlignment {
20 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area. 40 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area.
21 ALIGN_CENTER, // Align the text's center with that of its display area. 41 ALIGN_CENTER, // Align the text's center with that of its display area.
22 ALIGN_RIGHT, // Align the text's right edge with that of its display area. 42 ALIGN_RIGHT, // Align the text's right edge with that of its display area.
23 ALIGN_TO_HEAD, // Align the text to its first strong character's direction. 43 ALIGN_TO_HEAD, // Align the text to its first strong character's direction.
24 }; 44 };
25 45
26 // The directionality modes used to determine the base text direction. 46 // The directionality modes used to determine the base text direction.
27 enum DirectionalityMode { 47 enum DirectionalityMode {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ELIDE_HEAD, // Add an ellipsis at the start of the string. 88 ELIDE_HEAD, // Add an ellipsis at the start of the string.
69 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string. 89 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string.
70 ELIDE_TAIL, // Add an ellipsis at the end of the string. 90 ELIDE_TAIL, // Add an ellipsis at the end of the string.
71 ELIDE_EMAIL, // Add ellipses to username and domain substrings. 91 ELIDE_EMAIL, // Add ellipses to username and domain substrings.
72 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment. 92 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment.
73 }; 93 };
74 94
75 } // namespace gfx 95 } // namespace gfx
76 96
77 #endif // UI_GFX_TEXT_CONSTANTS_H_ 97 #endif // UI_GFX_TEXT_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698