summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/menu_gtk.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 17:26:18 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 17:26:18 +0000
commit564a9026f2f0c9baf0c12b6e72a959ffc8beb985 (patch)
treef51454a79ae8aee7f0d6edc29b40ff95fa148964 /chrome/browser/gtk/menu_gtk.h
parent49857a356c68f5915ed73452cfc162c18576fedd (diff)
downloadchromium_src-564a9026f2f0c9baf0c12b6e72a959ffc8beb985.zip
chromium_src-564a9026f2f0c9baf0c12b6e72a959ffc8beb985.tar.gz
chromium_src-564a9026f2f0c9baf0c12b6e72a959ffc8beb985.tar.bz2
GTK: First draft of the unified cut/copy/paste and +/-/Fullscreen menu items.
Adds special menu item types that allow shoving buttons into them, along with tracking which button is selected. We now are halfway to the mocks that the chrome-ui-leads sent out. BUG=45757 TEST=none Review URL: http://codereview.chromium.org/2800015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/menu_gtk.h')
-rw-r--r--chrome/browser/gtk/menu_gtk.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/gtk/menu_gtk.h b/chrome/browser/gtk/menu_gtk.h
index 0612d4c..a9a703a 100644
--- a/chrome/browser/gtk/menu_gtk.h
+++ b/chrome/browser/gtk/menu_gtk.h
@@ -16,6 +16,7 @@
class SkBitmap;
namespace menus {
+class ButtonMenuItemModel;
class MenuModel;
}
@@ -60,7 +61,8 @@ class MenuGtk {
GtkWidget* AppendMenuItem(int command_id, GtkWidget* menu_item);
GtkWidget* AppendMenuItemToMenu(int command_id,
GtkWidget* menu_item,
- GtkWidget* menu);
+ GtkWidget* menu,
+ bool connect_to_activate);
// Displays the menu. |timestamp| is the time of activation. The popup is
// statically positioned at |widget|.
@@ -114,6 +116,8 @@ class MenuGtk {
void BuildMenuFromModel();
// Implementation of the above; called recursively.
void BuildSubmenuFromModel(menus::MenuModel* model, GtkWidget* menu);
+ // Builds a menu item with buttons in it from the data in the model.
+ GtkWidget* BuildButtomMenuItem(menus::ButtonMenuItemModel* model);
// Contains implementation for OnMenuShow.
void UpdateMenu();
@@ -123,6 +127,10 @@ class MenuGtk {
// Callback for when a menu item is clicked.
static void OnMenuItemActivated(GtkMenuItem* menuitem, MenuGtk* menu);
+ // Called when one of the buttons are pressed.
+ static void OnMenuButtonPressed(GtkMenuItem* menuitem, int command_id,
+ MenuGtk* menu);
+
// Sets the check mark and enabled/disabled state on our menu items.
static void SetMenuItemInfo(GtkWidget* widget, void* raw_menu);