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

Unified Diff: ui/base/text/text_elider.h

Issue 7328011: Introduce ui.dll / libui.so for the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: ui/base/text/text_elider.h
===================================================================
--- ui/base/text/text_elider.h (revision 91577)
+++ ui/base/text/text_elider.h (working copy)
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
+#include "ui/base/ui_base_api.h"
#include "ui/gfx/font.h"
class FilePath;
@@ -18,7 +19,7 @@
namespace ui {
-extern const char kEllipsis[];
+UI_BASE_API extern const char kEllipsis[];
// This function takes a GURL object and elides it. It returns a string
// which composed of parts from subdomain, domain, path, filename and query.
@@ -33,18 +34,18 @@
// as an LTR string (using base::i18n::WrapStringWithLTRFormatting()) so that it
// is displayed properly in an RTL context. Please refer to
// http://crbug.com/6487 for more information.
-string16 ElideUrl(const GURL& url,
- const gfx::Font& font,
- int available_pixel_width,
- const std::string& languages);
+UI_BASE_API string16 ElideUrl(const GURL& url,
+ const gfx::Font& font,
+ int available_pixel_width,
+ const std::string& languages);
// Elides |text| to fit in |available_pixel_width|. If |elide_in_middle| is
// set the ellipsis is placed in the middle of the string; otherwise it is
// placed at the end.
-string16 ElideText(const string16& text,
- const gfx::Font& font,
- int available_pixel_width,
- bool elide_in_middle);
+UI_BASE_API string16 ElideText(const string16& text,
+ const gfx::Font& font,
+ int available_pixel_width,
+ bool elide_in_middle);
// Elide a filename to fit a given pixel width, with an emphasis on not hiding
// the extension unless we have to. If filename contains a path, the path will
@@ -52,16 +53,16 @@
// filename is forced to have LTR directionality, which means that in RTL UI
// the elided filename is wrapped with LRE (Left-To-Right Embedding) mark and
// PDF (Pop Directional Formatting) mark.
-string16 ElideFilename(const FilePath& filename,
- const gfx::Font& font,
- int available_pixel_width);
+UI_BASE_API string16 ElideFilename(const FilePath& filename,
+ const gfx::Font& font,
+ int available_pixel_width);
// SortedDisplayURL maintains a string from a URL suitable for display to the
// use. SortedDisplayURL also provides a function used for comparing two
// SortedDisplayURLs for use in visually ordering the SortedDisplayURLs.
//
// SortedDisplayURL is relatively cheap and supports value semantics.
-class SortedDisplayURL {
+class UI_BASE_API SortedDisplayURL {
public:
SortedDisplayURL(const GURL& url, const std::string& languages);
SortedDisplayURL();
@@ -102,7 +103,8 @@
// puts "Hell...Tom" in str and returns true.
// TODO(tsepez): Doesn't handle UTF-16 surrogate pairs properly.
// TODO(tsepez): Doesn't handle bidi properly.
-bool ElideString(const string16& input, int max_len, string16* output);
+UI_BASE_API bool ElideString(const string16& input, int max_len,
+ string16* output);
// Reformat |input| into |output| so that it fits into a |max_rows| by
// |max_cols| rectangle of characters. Input newlines are respected, but
@@ -113,8 +115,9 @@
// intra-word (respecting UTF-16 surrogate pairs) as necssary. Truncation
// (indicated by an added 3 dots) occurs if the result is still too long.
// Returns true if the input had to be truncated (and not just reformatted).
-bool ElideRectangleString(const string16& input, size_t max_rows,
- size_t max_cols, bool strict, string16* output);
+UI_BASE_API bool ElideRectangleString(const string16& input, size_t max_rows,
+ size_t max_cols, bool strict,
+ string16* output);
} // namespace ui
« no previous file with comments | « ui/base/text/bytes_formatting.h ('k') | ui/base/theme_provider.h » ('j') | ui/base/ui_base_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698