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

Side by Side Diff: ui/base/text/text_elider.h

Issue 7669040: content: Move render_widget_host_view_gtk to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix. 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 | « ui/base/l10n/l10n_util_unittest.cc ('k') | ui/base/text/text_elider.cc » ('j') | no next file with comments »
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 UI_BASE_TEXT_TEXT_ELIDER_H_ 5 #ifndef UI_BASE_TEXT_TEXT_ELIDER_H_
6 #define UI_BASE_TEXT_TEXT_ELIDER_H_ 6 #define UI_BASE_TEXT_TEXT_ELIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <unicode/coll.h> 9 #include <unicode/coll.h>
10 #include <unicode/uchar.h> 10 #include <unicode/uchar.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // we break first at naturally occuring whitespace boundaries, otherwise 112 // we break first at naturally occuring whitespace boundaries, otherwise
113 // we assume some other mechanism will do this in approximately the same 113 // we assume some other mechanism will do this in approximately the same
114 // spot after the fact. If the word itself is too long, we always break 114 // spot after the fact. If the word itself is too long, we always break
115 // intra-word (respecting UTF-16 surrogate pairs) as necssary. Truncation 115 // intra-word (respecting UTF-16 surrogate pairs) as necssary. Truncation
116 // (indicated by an added 3 dots) occurs if the result is still too long. 116 // (indicated by an added 3 dots) occurs if the result is still too long.
117 // Returns true if the input had to be truncated (and not just reformatted). 117 // Returns true if the input had to be truncated (and not just reformatted).
118 UI_EXPORT bool ElideRectangleString(const string16& input, size_t max_rows, 118 UI_EXPORT bool ElideRectangleString(const string16& input, size_t max_rows,
119 size_t max_cols, bool strict, 119 size_t max_cols, bool strict,
120 string16* output); 120 string16* output);
121 121
122 // Truncates the string to length characters. This breaks the string at
123 // the first word break before length, adding the horizontal ellipsis
124 // character (unicode character 0x2026) to render ...
125 // The supplied string is returned if the string has length characters or
126 // less.
127 UI_EXPORT string16 TruncateString(const string16& string, size_t length);
122 128
123 } // namespace ui 129 } // namespace ui
124 130
125 #endif // UI_BASE_TEXT_TEXT_ELIDER_H_ 131 #endif // UI_BASE_TEXT_TEXT_ELIDER_H_
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util_unittest.cc ('k') | ui/base/text/text_elider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698