|
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149 | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CefBaseRefCounted | +--CefMenuModelin cef_menu_model.h
Supports creation and modification of menus. See cef_menu_id_t for the command ids that have default implementations. All user-defined command ids should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The methods of this class can only be accessed on the browser process the UI thread.
Inner Classes, Typedefs, and Enums | |
typedef |
CefMenuModel::MenuItemType
|
Method Summary | |
virtual bool |
AddCheckItem( int command_id, const CefString& label )= 0
Add a check item to the menu. |
virtual bool |
AddItem( int command_id, const CefString& label )= 0
Add an item to the menu. |
virtual bool |
AddRadioItem( int command_id, const CefString& label, int group_id )= 0
Add a radio item to the menu. |
virtual bool |
AddSeparator()= 0
Add a separator to the menu. |
virtual CefRefPtr< CefMenuModel > |
AddSubMenu( int command_id, const CefString& label )= 0
Add a sub-menu to the menu. |
virtual bool |
Clear()= 0
Clears the menu. |
static CefRefPtr< CefMenuModel > |
CreateMenuModel( CefRefPtr< CefMenuModelDelegate > delegate )
Create a new MenuModel with the specified |delegate|. |
virtual bool |
GetAccelerator( int command_id, int& key_code, bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed )= 0
Retrieves the keyboard accelerator for the specified |command_id|. |
virtual bool |
GetAcceleratorAt( int index, int& key_code, bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed )= 0
Retrieves the keyboard accelerator for the specified |index|. |
virtual bool |
GetColor( int command_id, cef_menu_color_type_t color_type, cef_color_t& color )= 0
Returns in |color| the color that was explicitly set for |command_id| and |color_type|. |
virtual bool |
GetColorAt( int index, cef_menu_color_type_t color_type, cef_color_t& color )= 0
Returns in |color| the color that was explicitly set for |command_id| and |color_type|. |
virtual int |
GetCommandIdAt( int index )= 0
Returns the command id at the specified |index| or -1 if not found due to invalid range or the index being a separator. |
virtual int |
GetCount()= 0
Returns the number of items in this menu. |
virtual int |
GetGroupId( int command_id )= 0
Returns the group id for the specified |command_id| or -1 if invalid. |
virtual int |
GetGroupIdAt( int index )= 0
Returns the group id at the specified |index| or -1 if invalid. |
virtual int |
GetIndexOf( int command_id )= 0
Returns the index associated with the specified |command_id| or -1 if not found due to the command id not existing in the menu. |
virtual CefString |
GetLabel( int command_id )= 0
Returns the label for the specified |command_id| or empty if not found. |
virtual CefString |
GetLabelAt( int index )= 0
Returns the label at the specified |index| or empty if not found due to invalid range or the index being a separator. |
virtual CefRefPtr< CefMenuModel > |
GetSubMenu( int command_id )= 0
Returns the submenu for the specified |command_id| or empty if invalid. |
virtual CefRefPtr< CefMenuModel > |
GetSubMenuAt( int index )= 0
Returns the submenu at the specified |index| or empty if invalid. |
virtual CefMenuModel::MenuItemType |
GetType( int command_id )= 0
Returns the item type for the specified |command_id|. |
virtual CefMenuModel::MenuItemType |
GetTypeAt( int index )= 0
Returns the item type at the specified |index|. |
virtual bool |
HasAccelerator( int command_id )= 0
Returns true if the specified |command_id| has a keyboard accelerator assigned. |
virtual bool |
HasAcceleratorAt( int index )= 0
Returns true if the specified |index| has a keyboard accelerator assigned. |
virtual bool |
InsertCheckItemAt( int index, int command_id, const CefString& label )= 0
Insert a check item in the menu at the specified |index|. |
virtual bool |
InsertItemAt( int index, int command_id, const CefString& label )= 0
Insert an item in the menu at the specified |index|. |
virtual bool |
InsertRadioItemAt( int index, int command_id, const CefString& label, int group_id )= 0
Insert a radio item in the menu at the specified |index|. |
virtual bool |
InsertSeparatorAt( int index )= 0
Insert a separator in the menu at the specified |index|. |
virtual CefRefPtr< CefMenuModel > |
InsertSubMenuAt( int index, int command_id, const CefString& label )= 0
Insert a sub-menu in the menu at the specified |index|. |
virtual bool |
IsChecked( int command_id )= 0
Returns true if the specified |command_id| is checked. |
virtual bool |
IsCheckedAt( int index )= 0
Returns true if the specified |index| is checked. |
virtual bool |
IsEnabled( int command_id )= 0
Returns true if the specified |command_id| is enabled. |
virtual bool |
IsEnabledAt( int index )= 0
Returns true if the specified |index| is enabled. |
virtual bool |
IsSubMenu()= 0
Returns true if this menu is a submenu. |
virtual bool |
IsVisible( int command_id )= 0
Returns true if the specified |command_id| is visible. |
virtual bool |
IsVisibleAt( int index )= 0
Returns true if the specified |index| is visible. |
virtual bool |
Remove( int command_id )= 0
Removes the item with the specified |command_id|. |
virtual bool |
RemoveAccelerator( int command_id )= 0
Remove the keyboard accelerator for the specified |command_id|. |
virtual bool |
RemoveAcceleratorAt( int index )= 0
Remove the keyboard accelerator at the specified |index|. |
virtual bool |
RemoveAt( int index )= 0
Removes the item at the specified |index|. |
virtual bool |
SetAccelerator( int command_id, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0
Set the keyboard accelerator for the specified |command_id|. |
virtual bool |
SetAcceleratorAt( int index, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0
Set the keyboard accelerator at the specified |index|. |
virtual bool |
SetChecked( int command_id, bool checked )= 0
Check the specified |command_id|. |
virtual bool |
SetCheckedAt( int index, bool checked )= 0
Check the specified |index|. |
virtual bool |
SetColor( int command_id, cef_menu_color_type_t color_type, cef_color_t color )= 0
Set the explicit color for |command_id| and |color_type| to |color|. |
virtual bool |
SetColorAt( int index, cef_menu_color_type_t color_type, cef_color_t color )= 0
Set the explicit color for |command_id| and |index| to |color|. |
virtual bool |
SetCommandIdAt( int index, int command_id )= 0
Sets the command id at the specified |index|. |
virtual bool |
SetEnabled( int command_id, bool enabled )= 0
Change the enabled status of the specified |command_id|. |
virtual bool |
SetEnabledAt( int index, bool enabled )= 0
Change the enabled status at the specified |index|. |
virtual bool |
SetFontList( int command_id, const CefString& font_list )= 0
Sets the font list for the specified |command_id|. |
virtual bool |
SetFontListAt( int index, const CefString& font_list )= 0
Sets the font list for the specified |index|. |
virtual bool |
SetGroupId( int command_id, int group_id )= 0
Sets the group id for the specified |command_id|. |
virtual bool |
SetGroupIdAt( int index, int group_id )= 0
Sets the group id at the specified |index|. |
virtual bool |
SetLabel( int command_id, const CefString& label )= 0
Sets the label for the specified |command_id|. |
virtual bool |
SetLabelAt( int index, const CefString& label )= 0
Set the label at the specified |index|. |
virtual bool |
SetVisible( int command_id, bool visible )= 0
Change the visibility of the specified |command_id|. |
virtual bool |
SetVisibleAt( int index, bool visible )= 0
Change the visibility at the specified |index|. |
Methods inherited from class CefBaseRefCounted |
AddRef, Release, HasOneRef, HasAtLeastOneRef |
Method Detail |
public virtual bool AddCheckItem( int command_id, const CefString& label )= 0;
public virtual bool AddItem( int command_id, const CefString& label )= 0;
public virtual bool AddRadioItem( int command_id, const CefString& label, int group_id )= 0;
public virtual bool AddSeparator()= 0;
public virtual CefRefPtr< CefMenuModel > AddSubMenu( int command_id, const CefString& label )= 0;
public virtual bool Clear()= 0;
public static CefRefPtr< CefMenuModel > CreateMenuModel( CefRefPtr< CefMenuModelDelegate > delegate );
public virtual bool GetAccelerator( int command_id, int& key_code, bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed )= 0;
public virtual bool GetAcceleratorAt( int index, int& key_code, bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed )= 0;
public virtual bool GetColor( int command_id, cef_menu_color_type_t color_type, cef_color_t& color )= 0;
public virtual bool GetColorAt( int index, cef_menu_color_type_t color_type, cef_color_t& color )= 0;
public virtual int GetCommandIdAt( int index )= 0;
public virtual int GetCount()= 0;
public virtual int GetGroupId( int command_id )= 0;
public virtual int GetGroupIdAt( int index )= 0;
public virtual int GetIndexOf( int command_id )= 0;
public virtual CefString GetLabel( int command_id )= 0;
public virtual CefString GetLabelAt( int index )= 0;
public virtual CefRefPtr< CefMenuModel > GetSubMenu( int command_id )= 0;
public virtual CefRefPtr< CefMenuModel > GetSubMenuAt( int index )= 0;
public virtual CefMenuModel::MenuItemType GetType( int command_id )= 0;
public virtual CefMenuModel::MenuItemType GetTypeAt( int index )= 0;
public virtual bool HasAccelerator( int command_id )= 0;
public virtual bool HasAcceleratorAt( int index )= 0;
public virtual bool InsertCheckItemAt( int index, int command_id, const CefString& label )= 0;
public virtual bool InsertItemAt( int index, int command_id, const CefString& label )= 0;
public virtual bool InsertRadioItemAt( int index, int command_id, const CefString& label, int group_id )= 0;
public virtual bool InsertSeparatorAt( int index )= 0;
public virtual CefRefPtr< CefMenuModel > InsertSubMenuAt( int index, int command_id, const CefString& label )= 0;
public virtual bool IsChecked( int command_id )= 0;
public virtual bool IsCheckedAt( int index )= 0;
public virtual bool IsEnabled( int command_id )= 0;
public virtual bool IsEnabledAt( int index )= 0;
public virtual bool IsSubMenu()= 0;
public virtual bool IsVisible( int command_id )= 0;
public virtual bool IsVisibleAt( int index )= 0;
public virtual bool Remove( int command_id )= 0;
public virtual bool RemoveAccelerator( int command_id )= 0;
public virtual bool RemoveAcceleratorAt( int index )= 0;
public virtual bool RemoveAt( int index )= 0;
public virtual bool SetAccelerator( int command_id, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0;
public virtual bool SetAcceleratorAt( int index, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0;
public virtual bool SetChecked( int command_id, bool checked )= 0;
public virtual bool SetCheckedAt( int index, bool checked )= 0;
public virtual bool SetColor( int command_id, cef_menu_color_type_t color_type, cef_color_t color )= 0;
public virtual bool SetColorAt( int index, cef_menu_color_type_t color_type, cef_color_t color )= 0;
public virtual bool SetCommandIdAt( int index, int command_id )= 0;
public virtual bool SetEnabled( int command_id, bool enabled )= 0;
public virtual bool SetEnabledAt( int index, bool enabled )= 0;
public virtual bool SetFontList( int command_id, const CefString& font_list )= 0;
public virtual bool SetFontListAt( int index, const CefString& font_list )= 0;
public virtual bool SetGroupId( int command_id, int group_id )= 0;
public virtual bool SetGroupIdAt( int index, int group_id )= 0;
public virtual bool SetLabel( int command_id, const CefString& label )= 0;
public virtual bool SetLabelAt( int index, const CefString& label )= 0;
public virtual bool SetVisible( int command_id, bool visible )= 0;
public virtual bool SetVisibleAt( int index, bool visible )= 0;
|
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149 | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |