public interface CefMenuModel
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
CefMenuModel.MenuId |
static class |
CefMenuModel.MenuItemType
Supported menu item types.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addCheckItem(int command_id,
String label)
Add a check item to the menu.
|
boolean |
addItem(int command_id,
String label)
Add an item to the menu.
|
boolean |
addRadioItem(int command_id,
String label,
int group_id)
Add a radio item to the menu.
|
boolean |
addSeparator()
Add a separator to the menu.
|
CefMenuModel |
addSubMenu(int command_id,
String label)
Add a sub-menu to the menu.
|
boolean |
clear()
Clears the menu.
|
boolean |
getAccelerator(int command_id,
IntRef key_code,
BoolRef shift_pressed,
BoolRef ctrl_pressed,
BoolRef alt_pressed)
Retrieves the keyboard accelerator for the specified |command_id|.
|
boolean |
getAcceleratorAt(int index,
IntRef key_code,
BoolRef shift_pressed,
BoolRef ctrl_pressed,
BoolRef alt_pressed)
Retrieves the keyboard accelerator for the specified |index|.
|
int |
getCommandIdAt(int index)
Returns the command id at the specified |index| or -1 if not found due to
invalid range or the index being a separator.
|
int |
getCount()
Returns the number of items in this menu.
|
int |
getGroupId(int command_id)
Returns the group id for the specified |command_id| or -1 if invalid.
|
int |
getGroupIdAt(int index)
Returns the group id at the specified |index| or -1 if invalid.
|
int |
getIndexOf(int command_id)
Returns the index associated with the specified |command_id| or -1 if not
found due to the command id not existing in the menu.
|
String |
getLabel(int command_id)
Returns the label for the specified |command_id| or empty if not found.
|
String |
getLabelAt(int index)
Returns the label at the specified |index| or empty if not found due to
invalid range or the index being a separator.
|
CefMenuModel |
getSubMenu(int command_id)
Returns the submenu for the specified |command_id| or empty if invalid.
|
CefMenuModel |
getSubMenuAt(int index)
Returns the submenu at the specified |index| or empty if invalid.
|
CefMenuModel.MenuItemType |
getType(int command_id)
Returns the item type for the specified |command_id|.
|
CefMenuModel.MenuItemType |
getTypeAt(int index)
Returns the item type at the specified |index|.
|
boolean |
hasAccelerator(int command_id)
Returns true if the specified |command_id| has a keyboard accelerator
assigned.
|
boolean |
hasAcceleratorAt(int index)
Returns true if the specified |index| has a keyboard accelerator assigned.
|
boolean |
insertCheckItemAt(int index,
int command_id,
String label)
Insert a check item in the menu at the specified |index|.
|
boolean |
insertItemAt(int index,
int command_id,
String label)
Insert an item in the menu at the specified |index|.
|
boolean |
insertRadioItemAt(int index,
int command_id,
String label,
int group_id)
Insert a radio item in the menu at the specified |index|.
|
boolean |
insertSeparatorAt(int index)
Insert a separator in the menu at the specified |index|.
|
CefMenuModel |
insertSubMenuAt(int index,
int command_id,
String label)
Insert a sub-menu in the menu at the specified |index|.
|
boolean |
isChecked(int command_id)
Returns true if the specified |command_id| is checked.
|
boolean |
isCheckedAt(int index)
Returns true if the specified |index| is checked.
|
boolean |
isEnabled(int command_id)
Returns true if the specified |command_id| is enabled.
|
boolean |
isEnabledAt(int index)
Returns true if the specified |index| is enabled.
|
boolean |
isVisible(int command_id)
Returns true if the specified |command_id| is visible.
|
boolean |
isVisibleAt(int index)
Returns true if the specified |index| is visible.
|
boolean |
remove(int command_id)
Removes the item with the specified |command_id|.
|
boolean |
removeAccelerator(int command_id)
Remove the keyboard accelerator for the specified |command_id|.
|
boolean |
removeAcceleratorAt(int index)
Remove the keyboard accelerator at the specified |index|.
|
boolean |
removeAt(int index)
Removes the item at the specified |index|.
|
boolean |
setAccelerator(int command_id,
int key_code,
boolean shift_pressed,
boolean ctrl_pressed,
boolean alt_pressed)
Set the keyboard accelerator for the specified |command_id|.
|
boolean |
setAcceleratorAt(int index,
int key_code,
boolean shift_pressed,
boolean ctrl_pressed,
boolean alt_pressed)
Set the keyboard accelerator at the specified |index|.
|
boolean |
setChecked(int command_id,
boolean checked)
Check the specified |command_id|.
|
boolean |
setCheckedAt(int index,
boolean checked)
Check the specified |index|.
|
boolean |
setCommandIdAt(int index,
int command_id)
Sets the command id at the specified |index|.
|
boolean |
setEnabled(int command_id,
boolean enabled)
Change the enabled status of the specified |command_id|.
|
boolean |
setEnabledAt(int index,
boolean enabled)
Change the enabled status at the specified |index|.
|
boolean |
setGroupId(int command_id,
int group_id)
Sets the group id for the specified |command_id|.
|
boolean |
setGroupIdAt(int index,
int group_id)
Sets the group id at the specified |index|.
|
boolean |
setLabel(int command_id,
String label)
Sets the label for the specified |command_id|.
|
boolean |
setLabelAt(int index,
String label)
Set the label at the specified |index|.
|
boolean |
setVisible(int command_id,
boolean visible)
Change the visibility of the specified |command_id|.
|
boolean |
setVisibleAt(int index,
boolean visible)
Change the visibility at the specified |index|.
|
boolean clear()
int getCount()
boolean addSeparator()
boolean addItem(int command_id,
String label)
boolean addCheckItem(int command_id,
String label)
boolean addRadioItem(int command_id,
String label,
int group_id)
CefMenuModel addSubMenu(int command_id, String label)
boolean insertSeparatorAt(int index)
boolean insertItemAt(int index,
int command_id,
String label)
boolean insertCheckItemAt(int index,
int command_id,
String label)
boolean insertRadioItemAt(int index,
int command_id,
String label,
int group_id)
CefMenuModel insertSubMenuAt(int index, int command_id, String label)
boolean remove(int command_id)
boolean removeAt(int index)
int getIndexOf(int command_id)
int getCommandIdAt(int index)
boolean setCommandIdAt(int index,
int command_id)
String getLabel(int command_id)
String getLabelAt(int index)
boolean setLabel(int command_id,
String label)
boolean setLabelAt(int index,
String label)
CefMenuModel.MenuItemType getType(int command_id)
CefMenuModel.MenuItemType getTypeAt(int index)
int getGroupId(int command_id)
int getGroupIdAt(int index)
boolean setGroupId(int command_id,
int group_id)
boolean setGroupIdAt(int index,
int group_id)
CefMenuModel getSubMenu(int command_id)
CefMenuModel getSubMenuAt(int index)
boolean isVisible(int command_id)
boolean isVisibleAt(int index)
boolean setVisible(int command_id,
boolean visible)
boolean setVisibleAt(int index,
boolean visible)
boolean isEnabled(int command_id)
boolean isEnabledAt(int index)
boolean setEnabled(int command_id,
boolean enabled)
boolean setEnabledAt(int index,
boolean enabled)
boolean isChecked(int command_id)
boolean isCheckedAt(int index)
boolean setChecked(int command_id,
boolean checked)
boolean setCheckedAt(int index,
boolean checked)
boolean hasAccelerator(int command_id)
boolean hasAcceleratorAt(int index)
boolean setAccelerator(int command_id,
int key_code,
boolean shift_pressed,
boolean ctrl_pressed,
boolean alt_pressed)
boolean setAcceleratorAt(int index,
int key_code,
boolean shift_pressed,
boolean ctrl_pressed,
boolean alt_pressed)
boolean removeAccelerator(int command_id)
boolean removeAcceleratorAt(int index)
boolean getAccelerator(int command_id,
IntRef key_code,
BoolRef shift_pressed,
BoolRef ctrl_pressed,
BoolRef alt_pressed)
Copyright © 2017. All rights reserved.