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

Side by Side Diff: views/widget/tooltip_manager.h

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
« no previous file with comments | « views/drag_utils.cc ('k') | views/widget/tooltip_manager.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <commctrl.h> 9 #include <commctrl.h>
10 10
11 #include <string> 11 #include <string>
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/task.h" 13 #include "base/task.h"
14 14
15 class ChromeFont; 15 namespace gfx {
16 class Font;
17 }
16 18
17 namespace views { 19 namespace views {
18 20
19 class View; 21 class View;
20 class Widget; 22 class Widget;
21 23
22 // TooltipManager takes care of the wiring to support tooltips for Views. 24 // TooltipManager takes care of the wiring to support tooltips for Views.
23 // This class is intended to be used by Widgets. To use this, you must 25 // This class is intended to be used by Widgets. To use this, you must
24 // do the following: 26 // do the following:
25 // Add the following to your MSG_MAP: 27 // Add the following to your MSG_MAP:
(...skipping 22 matching lines...) Expand all
48 // Lastly, you'll need to override GetTooltipManager. 50 // Lastly, you'll need to override GetTooltipManager.
49 // 51 //
50 // See XPFrame for an example of this in action. 52 // See XPFrame for an example of this in action.
51 class TooltipManager { 53 class TooltipManager {
52 public: 54 public:
53 // Returns the height of tooltips. This should only be invoked from within 55 // Returns the height of tooltips. This should only be invoked from within
54 // GetTooltipTextOrigin. 56 // GetTooltipTextOrigin.
55 static int GetTooltipHeight(); 57 static int GetTooltipHeight();
56 58
57 // Returns the default font used by tooltips. 59 // Returns the default font used by tooltips.
58 static ChromeFont GetDefaultFont(); 60 static gfx::Font GetDefaultFont();
59 61
60 // Returns the separator for lines of text in a tooltip. 62 // Returns the separator for lines of text in a tooltip.
61 static const std::wstring& GetLineSeparator(); 63 static const std::wstring& GetLineSeparator();
62 64
63 // Creates a TooltipManager for the specified Widget and parent window. 65 // Creates a TooltipManager for the specified Widget and parent window.
64 TooltipManager(Widget* widget, HWND parent); 66 TooltipManager(Widget* widget, HWND parent);
65 virtual ~TooltipManager(); 67 virtual ~TooltipManager();
66 68
67 // Notification that the view hierarchy has changed in some way. 69 // Notification that the view hierarchy has changed in some way.
68 void UpdateTooltip(); 70 void UpdateTooltip();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Used to register DestroyTooltipWindow function with PostDelayedTask 161 // Used to register DestroyTooltipWindow function with PostDelayedTask
160 // function. 162 // function.
161 ScopedRunnableMethodFactory<TooltipManager> keyboard_tooltip_factory_; 163 ScopedRunnableMethodFactory<TooltipManager> keyboard_tooltip_factory_;
162 164
163 DISALLOW_EVIL_CONSTRUCTORS(TooltipManager); 165 DISALLOW_EVIL_CONSTRUCTORS(TooltipManager);
164 }; 166 };
165 167
166 } // namespace views 168 } // namespace views
167 169
168 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_H_ 170 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_H_
OLDNEW
« no previous file with comments | « views/drag_utils.cc ('k') | views/widget/tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698