diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 19:02:45 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 19:02:45 +0000 |
commit | fa990bb1e3c09ffb4f47418fcad2b8f6d322a75a (patch) | |
tree | 28d314754a9859626f9d66518912761e86502b2e /chrome/browser/gtk/standard_menus.h | |
parent | 500c9f12f3f90e82ad0108edbfd35fc499d5b21d (diff) | |
download | chromium_src-fa990bb1e3c09ffb4f47418fcad2b8f6d322a75a.zip chromium_src-fa990bb1e3c09ffb4f47418fcad2b8f6d322a75a.tar.gz chromium_src-fa990bb1e3c09ffb4f47418fcad2b8f6d322a75a.tar.bz2 |
Create a menu wrapper class for GTK menus, and use it for the page and app menus.
Review URL: http://codereview.chromium.org/20245
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/standard_menus.h')
-rw-r--r-- | chrome/browser/gtk/standard_menus.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome/browser/gtk/standard_menus.h b/chrome/browser/gtk/standard_menus.h new file mode 100644 index 0000000..a26643e --- /dev/null +++ b/chrome/browser/gtk/standard_menus.h @@ -0,0 +1,44 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_VIEWS_STANDARD_MENUS_H_ +#define CHROME_VIEWS_STANDARD_MENUS_H_ + +class Menu; +class Profile; + +enum MenuItemType { + MENU_NORMAL = 0, + MENU_CHECKBOX, + MENU_SEPARATOR, + + // Speical value to stop processing this MenuCreateMaterial. + MENU_END +}; + +struct MenuCreateMaterial { + // This menu item type + MenuItemType type; + + // The command id (an IDC_* value) + unsigned int id; + + // The label id (an IDS_* value) + unsigned int label_id; + + // An argument to GetStringF(menu_label_id, ...). When 0, the value of + // menu_label_id is just passed to GetString(). + unsigned int label_argument; + + // If non-NULL, a pointer to the struct we're supposed to use + MenuCreateMaterial* submenu; +}; + +// Returns the menu construction data structure for the page menu. +const MenuCreateMaterial* GetStandardPageMenu(); + +// Returns the menu construction data structure for the app menu. +const MenuCreateMaterial* GetStandardAppMenu(); + +#endif // CHROME_VIEWS_STANDARD_MENUS_H_ |