Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// 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.


#include "chrome/browser/gtk/menu_gtk.h"

class Menu;
class Profile;

enum MenuItemType {

  // Speical value to stop processing this MenuCreateMaterial.

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
  // label_id is just passed to GetString(). If both are 0, the menu delegate
  // is responsible for implementing GetLabel().
  unsigned int label_argument;

  // If non-NULL, a pointer to the struct we're supposed to use
  MenuCreateMaterial* submenu;

  // A gdk keysym that is used to activate this item from outside the menu.
  unsigned int accel_key;

  // GDK modifiers for the menu items (i.e., shift, ctrl, etc).
  unsigned int accel_modifiers;

  // If non-NULL, specifies a custom submenu to be used. MenuGtk will take
  // ownership of this submenu.
  MenuGtk* custom_submenu;

// Returns the menu construction data structure for the page menu.
// The parameters are used to construct the encodings menu.
const MenuCreateMaterial* GetStandardPageMenu(Profile* profile,
                                              MenuGtk::Delegate* delegate);

// Returns the menu construction data structure for the app menu.
const MenuCreateMaterial* GetStandardAppMenu();


Generated by  Doxygen 1.6.0   Back to index