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_GFX_TEXT_ELIDER_H_ | 7 #ifndef UI_GFX_TEXT_ELIDER_H_ |
8 #define UI_GFX_TEXT_ELIDER_H_ | 8 #define UI_GFX_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/source/common/unicode/uchar.h" | |
16 #include "third_party/icu/source/i18n/unicode/coll.h" | |
17 #include "ui/gfx/gfx_export.h" | 15 #include "ui/gfx/gfx_export.h" |
18 | 16 |
19 class GURL; | 17 class GURL; |
20 | 18 |
21 namespace base { | 19 namespace base { |
22 class FilePath; | 20 class FilePath; |
23 } | 21 } |
24 | 22 |
25 namespace gfx { | 23 namespace gfx { |
26 class FontList; | 24 class FontList; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // the first word break before length, adding the horizontal ellipsis | 184 // the first word break before length, adding the horizontal ellipsis |
187 // character (unicode character 0x2026) to render ... | 185 // character (unicode character 0x2026) to render ... |
188 // The supplied string is returned if the string has length characters or | 186 // The supplied string is returned if the string has length characters or |
189 // less. | 187 // less. |
190 GFX_EXPORT base::string16 TruncateString(const base::string16& string, | 188 GFX_EXPORT base::string16 TruncateString(const base::string16& string, |
191 size_t length); | 189 size_t length); |
192 | 190 |
193 } // namespace gfx | 191 } // namespace gfx |
194 | 192 |
195 #endif // UI_GFX_TEXT_ELIDER_H_ | 193 #endif // UI_GFX_TEXT_ELIDER_H_ |
OLD | NEW |