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

Unified Diff: views/widget/tooltip_manager_gtk.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/tooltip_manager.cc ('k') | views/widget/tooltip_manager_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/tooltip_manager_gtk.h
===================================================================
--- views/widget/tooltip_manager_gtk.h (revision 25502)
+++ views/widget/tooltip_manager_gtk.h (working copy)
@@ -7,18 +7,22 @@
#include "views/widget/tooltip_manager.h"
+#include <gtk/gtk.h>
+
namespace views {
-class Widget;
+class WidgetGtk;
-// TooltipManager takes care of the wiring to support tooltips for Views. You
-// almost never need to interact directly with TooltipManager, rather look to
-// the various tooltip methods on View.
+// TooltipManager implementation for Gtk.
class TooltipManagerGtk : public TooltipManager {
public:
- explicit TooltipManagerGtk(Widget* widget);
+ explicit TooltipManagerGtk(WidgetGtk* widget);
virtual ~TooltipManagerGtk() {}
+ // Shows the tooltip at the specified location. Returns true if the tooltip
+ // should be shown, false otherwise.
+ bool ShowTooltip(int x, int y, bool for_keyboard, GtkTooltip* gtk_tooltip);
+
// TooltipManager.
virtual void UpdateTooltip();
virtual void TooltipTextChanged(View* view);
@@ -26,9 +30,16 @@
virtual void HideKeyboardTooltip();
private:
+ // Sends the show_help signal to widget_. This signal triggers showing the
+ // keyboard tooltip if it isn't showing, or hides it if it is showing.
+ bool SendShowHelpSignal();
+
// Our owner.
- Widget* widget_;
+ WidgetGtk* widget_;
+ // The view supplied to the last invocation of ShowKeyboardTooltip.
+ View* keyboard_view_;
+
DISALLOW_COPY_AND_ASSIGN(TooltipManagerGtk);
};
« no previous file with comments | « views/widget/tooltip_manager.cc ('k') | views/widget/tooltip_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698