| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 TabStripGtk* tabstrip); | 72 TabStripGtk* tabstrip); |
| 73 | 73 |
| 74 // motion-notify-event handler that handles mouse movement in the tabstrip. | 74 // motion-notify-event handler that handles mouse movement in the tabstrip. |
| 75 static gboolean OnMotionNotify(GtkWidget* widget, GdkEventMotion* event, | 75 static gboolean OnMotionNotify(GtkWidget* widget, GdkEventMotion* event, |
| 76 TabStripGtk* tabstrip); | 76 TabStripGtk* tabstrip); |
| 77 | 77 |
| 78 // button-press-event handler that handles mouse clicks. | 78 // button-press-event handler that handles mouse clicks. |
| 79 static gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event, | 79 static gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event, |
| 80 TabStripGtk* tabstrip); | 80 TabStripGtk* tabstrip); |
| 81 | 81 |
| 82 // leave-notify-event handler that signals when the mouse leaves the tabstrip. |
| 83 static gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event, |
| 84 TabStripGtk* tabstrip); |
| 85 |
| 82 // Gets the number of Tabs in the collection. | 86 // Gets the number of Tabs in the collection. |
| 83 int GetTabCount() const; | 87 int GetTabCount() const; |
| 84 | 88 |
| 85 // Retrieves the Tab at the specified index. | 89 // Retrieves the Tab at the specified index. |
| 86 TabGtk* GetTabAt(int index) const; | 90 TabGtk* GetTabAt(int index) const; |
| 87 | 91 |
| 88 // Returns the exact (unrounded) current width of each tab. | 92 // Returns the exact (unrounded) current width of each tab. |
| 89 void GetCurrentTabWidths(double* unselected_width, | 93 void GetCurrentTabWidths(double* unselected_width, |
| 90 double* selected_width) const; | 94 double* selected_width) const; |
| 91 | 95 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 gfx::Rect bounds_; | 153 gfx::Rect bounds_; |
| 150 | 154 |
| 151 // Our model. | 155 // Our model. |
| 152 TabStripModel* model_; | 156 TabStripModel* model_; |
| 153 | 157 |
| 154 // The index of the tab the mouse is currently over. -1 if not over a tab. | 158 // The index of the tab the mouse is currently over. -1 if not over a tab. |
| 155 int hover_index_; | 159 int hover_index_; |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 162 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
| OLD | NEW |