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

Side by Side Diff: ui/views/controls/menu/menu_item_view.h

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Hides and cancels the menu. This does nothing if the menu is not open. 129 // Hides and cancels the menu. This does nothing if the menu is not open.
130 void Cancel(); 130 void Cancel();
131 131
132 // Add an item to the menu at a specified index. ChildrenChanged() should 132 // Add an item to the menu at a specified index. ChildrenChanged() should
133 // called after adding menu items if the menu may be active. 133 // called after adding menu items if the menu may be active.
134 MenuItemView* AddMenuItemAt(int index, 134 MenuItemView* AddMenuItemAt(int index,
135 int item_id, 135 int item_id,
136 const string16& label, 136 const string16& label,
137 const gfx::ImageSkia& icon, 137 const gfx::ImageSkia& icon,
138 Type type); 138 Type type);
139 139
Aaron Boodman 2012/07/02 22:41:34 Remove blank line.
yefimt 2012/07/11 22:34:34 It was a merging issue, it should not be here at a
140 void AddMenuItemAt(int index, MenuItemView* item);
141
140 // Remove an item from the menu at a specified index. 142 // Remove an item from the menu at a specified index.
141 // ChildrenChanged() should be called after removing menu items (whether 143 // ChildrenChanged() should be called after removing menu items (whether
142 // the menu may be active or not). 144 // the menu may be active or not).
143 void RemoveMenuItemAt(int index); 145 void RemoveMenuItemAt(int index);
144 146
145 // Appends an item to this menu. 147 // Appends an item to this menu.
146 // item_id The id of the item, used to identify it in delegate callbacks 148 // item_id The id of the item, used to identify it in delegate callbacks
147 // or (if delegate is NULL) to identify the command associated 149 // or (if delegate is NULL) to identify the command associated
148 // with this item with the controller specified in the ctor. Note 150 // with this item with the controller specified in the ctor. Note
149 // that this value should not be 0 as this has a special meaning 151 // that this value should not be 0 as this has a special meaning
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // If set to false, the right margin will be removed for menu lines 493 // If set to false, the right margin will be removed for menu lines
492 // containing other elements. 494 // containing other elements.
493 bool use_right_margin_; 495 bool use_right_margin_;
494 496
495 DISALLOW_COPY_AND_ASSIGN(MenuItemView); 497 DISALLOW_COPY_AND_ASSIGN(MenuItemView);
496 }; 498 };
497 499
498 } // namespace views 500 } // namespace views
499 501
500 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 502 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698