| OLD | NEW |
| 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 VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 5 #ifndef VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| 6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "views/views_api.h" | 12 #include "views/views_export.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Font; | 15 class Font; |
| 16 } // namespace gfx | 16 } // namespace gfx |
| 17 | 17 |
| 18 namespace views { | 18 namespace views { |
| 19 | 19 |
| 20 class View; | 20 class View; |
| 21 | 21 |
| 22 // TooltipManager takes care of the wiring to support tooltips for Views. You | 22 // TooltipManager takes care of the wiring to support tooltips for Views. You |
| 23 // almost never need to interact directly with TooltipManager, rather look to | 23 // almost never need to interact directly with TooltipManager, rather look to |
| 24 // the various tooltip methods on View. | 24 // the various tooltip methods on View. |
| 25 class VIEWS_API TooltipManager { | 25 class VIEWS_EXPORT TooltipManager { |
| 26 public: | 26 public: |
| 27 // Returns the height of tooltips. This should only be invoked from within | 27 // Returns the height of tooltips. This should only be invoked from within |
| 28 // GetTooltipTextOrigin. | 28 // GetTooltipTextOrigin. |
| 29 static int GetTooltipHeight(); | 29 static int GetTooltipHeight(); |
| 30 | 30 |
| 31 // Returns the default font used by tooltips. | 31 // Returns the default font used by tooltips. |
| 32 static gfx::Font GetDefaultFont(); | 32 static gfx::Font GetDefaultFont(); |
| 33 | 33 |
| 34 // Returns the separator for lines of text in a tooltip. | 34 // Returns the separator for lines of text in a tooltip. |
| 35 static const std::wstring& GetLineSeparator(); | 35 static const std::wstring& GetLineSeparator(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 61 static void TrimTooltipToFit(std::wstring* text, | 61 static void TrimTooltipToFit(std::wstring* text, |
| 62 int* max_width, | 62 int* max_width, |
| 63 int* line_count, | 63 int* line_count, |
| 64 int x, | 64 int x, |
| 65 int y); | 65 int y); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace views | 68 } // namespace views |
| 69 | 69 |
| 70 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 70 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| OLD | NEW |