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

Side by Side Diff: base/i18n/break_iterator.h

Issue 7458014: Implement Uniscribe RenderText for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix RenderText::RightEndSelectionModel. Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/i18n/break_iterator.cc » ('j') | ui/gfx/render_text.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 BASE_I18N_BREAK_ITERATOR_H_ 5 #ifndef BASE_I18N_BREAK_ITERATOR_H_
6 #define BASE_I18N_BREAK_ITERATOR_H_ 6 #define BASE_I18N_BREAK_ITERATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // character in the string, and when we advance to that position it's the 80 // character in the string, and when we advance to that position it's the
81 // last time Advance() returns true.) 81 // last time Advance() returns true.)
82 bool Advance(); 82 bool Advance();
83 83
84 // Under BREAK_WORD mode, returns true if the break we just hit is the 84 // Under BREAK_WORD mode, returns true if the break we just hit is the
85 // end of a word. (Otherwise, the break iterator just skipped over e.g. 85 // end of a word. (Otherwise, the break iterator just skipped over e.g.
86 // whitespace or punctuation.) Under BREAK_LINE and BREAK_NEWLINE modes, 86 // whitespace or punctuation.) Under BREAK_LINE and BREAK_NEWLINE modes,
87 // this distinction doesn't apply and it always retuns false. 87 // this distinction doesn't apply and it always retuns false.
88 bool IsWord() const; 88 bool IsWord() const;
89 89
90 // Returns true if |position| is a valid word break.
91 // Loosely follow common Windows behavior; break at word logical beginnings.
92 // TODO(msw): Consider "better" word break algorithms and other platforms.
93 bool IsWordBreakAt(size_t position);
94
90 // Returns the string between prev() and pos(). 95 // Returns the string between prev() and pos().
91 // Advance() must have been called successfully at least once for pos() to 96 // Advance() must have been called successfully at least once for pos() to
92 // have advanced to somewhere useful. 97 // have advanced to somewhere useful.
93 string16 GetString() const; 98 string16 GetString() const;
94 99
95 // Returns the value of pos() returned before Advance() was last called. 100 // Returns the value of pos() returned before Advance() was last called.
96 size_t prev() const { return prev_; } 101 size_t prev() const { return prev_; }
97 102
98 // Returns the current break position within the string, 103 // Returns the current break position within the string,
99 // or BreakIterator::npos when done. 104 // or BreakIterator::npos when done.
(...skipping 15 matching lines...) Expand all
115 // Previous and current iterator positions. 120 // Previous and current iterator positions.
116 size_t prev_, pos_; 121 size_t prev_, pos_;
117 122
118 DISALLOW_COPY_AND_ASSIGN(BreakIterator); 123 DISALLOW_COPY_AND_ASSIGN(BreakIterator);
119 }; 124 };
120 125
121 } // namespace i18n 126 } // namespace i18n
122 } // namespace base 127 } // namespace base
123 128
124 #endif // BASE_I18N_BREAK_ITERATOR_H_ 129 #endif // BASE_I18N_BREAK_ITERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | base/i18n/break_iterator.cc » ('j') | ui/gfx/render_text.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698