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

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

Issue 197031: Fleshes out the tooltip implementation for views on Gtk. It doesn't... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « views/widget/tooltip_manager_gtk.cc ('k') | views/widget/tooltip_manager_win.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_WIN_H_ 5 #ifndef VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_
6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ 6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <commctrl.h> 9 #include <commctrl.h>
10 #include <string> 10 #include <string>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 private: 102 private:
103 // Sets the tooltip position based on the x/y position of the text. If the 103 // Sets the tooltip position based on the x/y position of the text. If the
104 // tooltip fits, true is returned. 104 // tooltip fits, true is returned.
105 bool SetTooltipPosition(int text_x, int text_y); 105 bool SetTooltipPosition(int text_x, int text_y);
106 106
107 // Calculates the preferred height for tooltips. This always returns a 107 // Calculates the preferred height for tooltips. This always returns a
108 // positive value. 108 // positive value.
109 int CalcTooltipHeight(); 109 int CalcTooltipHeight();
110 110
111 // Trims the tooltip to fit, setting text to the clipped result, width to the
112 // width (in pixels) of the clipped text and line_count to the number of lines
113 // of text in the tooltip.
114 void TrimTooltipToFit(std::wstring* text,
115 int* width,
116 int* line_count,
117 int position_x,
118 int position_y,
119 HWND window);
120
121 // Invoked when the timer elapses and tooltip has to be destroyed. 111 // Invoked when the timer elapses and tooltip has to be destroyed.
122 void DestroyKeyboardTooltipWindow(HWND window_to_destroy); 112 void DestroyKeyboardTooltipWindow(HWND window_to_destroy);
123 113
124 // Hosting Widget. 114 // Hosting Widget.
125 Widget* widget_; 115 Widget* widget_;
126 116
127 // The View the mouse is under. This is null if the mouse isn't under a 117 // The View the mouse is under. This is null if the mouse isn't under a
128 // View. 118 // View.
129 View* last_tooltip_view_; 119 View* last_tooltip_view_;
130 120
(...skipping 20 matching lines...) Expand all
151 // Used to register DestroyTooltipWindow function with PostDelayedTask 141 // Used to register DestroyTooltipWindow function with PostDelayedTask
152 // function. 142 // function.
153 ScopedRunnableMethodFactory<TooltipManagerWin> keyboard_tooltip_factory_; 143 ScopedRunnableMethodFactory<TooltipManagerWin> keyboard_tooltip_factory_;
154 144
155 DISALLOW_COPY_AND_ASSIGN(TooltipManagerWin); 145 DISALLOW_COPY_AND_ASSIGN(TooltipManagerWin);
156 }; 146 };
157 147
158 } // namespace views 148 } // namespace views
159 149
160 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ 150 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_
OLDNEW
« no previous file with comments | « views/widget/tooltip_manager_gtk.cc ('k') | views/widget/tooltip_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698