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

Unified Diff: ui/gfx/text_constants.h

Issue 10807082: Add RenderText DirectionalityMode enum and support; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove errant blank line. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text_win.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/text_constants.h
diff --git a/ui/gfx/text_constants.h b/ui/gfx/text_constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c644ab77e83cfbfbc54fa3d38143767aa04bac3
--- /dev/null
+++ b/ui/gfx/text_constants.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_TEXT_CONSTANTS_H_
+#define UI_GFX_TEXT_CONSTANTS_H_
+
+namespace gfx {
+
+// TODO(msw): Distinguish between logical character stops and glyph stops?
+// TODO(msw): Merge with base::i18n::BreakIterator::BreakType.
+enum BreakType {
+ // Stop cursor movement on neighboring characters.
+ CHARACTER_BREAK = 0,
+ // Stop cursor movement on nearest word boundaries.
+ WORD_BREAK,
+ // Stop cursor movement on line ends as shown on screen.
+ LINE_BREAK,
+};
+
+// Horizontal text alignment modes.
+enum HorizontalAlignment {
+ // Align the text's left edge with that of its display area.
+ ALIGN_LEFT = 0,
+ // Align the text's center with that of its display area.
+ ALIGN_CENTER,
+ // Align the text's right edge with that of its display area.
+ ALIGN_RIGHT,
+};
+
+// The directionality modes used to determine the base text direction.
+enum DirectionalityMode {
+ // Use the first strong character's direction.
+ DIRECTIONALITY_FROM_TEXT = 0,
+ // Use the UI locale's text reading direction.
+ DIRECTIONALITY_FROM_UI,
+ // Use LTR regardless of content or UI locale.
+ DIRECTIONALITY_FORCE_LTR,
+ // Use RTL regardless of content or UI locale.
+ DIRECTIONALITY_FORCE_RTL,
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_TEXT_CONSTANTS_H_
« no previous file with comments | « ui/gfx/render_text_win.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698