OLD | NEW |
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 // This file defines utility functions for eliding and formatting UI text. | 5 // This file defines utility functions for eliding and formatting UI text. |
6 | 6 |
7 #ifndef UI_BASE_TEXT_TEXT_ELIDER_H_ | 7 #ifndef UI_BASE_TEXT_TEXT_ELIDER_H_ |
8 #define UI_BASE_TEXT_TEXT_ELIDER_H_ | 8 #define UI_BASE_TEXT_TEXT_ELIDER_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "third_party/icu/public/common/unicode/uchar.h" | 15 #include "third_party/icu/source/common/unicode/uchar.h" |
16 #include "third_party/icu/public/i18n/unicode/coll.h" | 16 #include "third_party/icu/source/i18n/unicode/coll.h" |
17 #include "ui/base/ui_export.h" | 17 #include "ui/base/ui_export.h" |
18 #include "ui/gfx/font.h" | 18 #include "ui/gfx/font.h" |
19 | 19 |
20 class GURL; | 20 class GURL; |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class FilePath; | 23 class FilePath; |
24 } | 24 } |
25 | 25 |
26 namespace ui { | 26 namespace ui { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Truncates the string to length characters. This breaks the string at | 197 // Truncates the string to length characters. This breaks the string at |
198 // the first word break before length, adding the horizontal ellipsis | 198 // the first word break before length, adding the horizontal ellipsis |
199 // character (unicode character 0x2026) to render ... | 199 // character (unicode character 0x2026) to render ... |
200 // The supplied string is returned if the string has length characters or | 200 // The supplied string is returned if the string has length characters or |
201 // less. | 201 // less. |
202 UI_EXPORT string16 TruncateString(const string16& string, size_t length); | 202 UI_EXPORT string16 TruncateString(const string16& string, size_t length); |
203 | 203 |
204 } // namespace ui | 204 } // namespace ui |
205 | 205 |
206 #endif // UI_BASE_TEXT_TEXT_ELIDER_H_ | 206 #endif // UI_BASE_TEXT_TEXT_ELIDER_H_ |
OLD | NEW |