com.foxit.uiextensions.controls.menu.IMenuView Interface Reference

Public Member Functions

void addMenuGroup (MenuGroupImpl group)
 
void addMenuItem (int groupTag, MenuItemImpl item)
 
View getContentView ()
 
int getGroupVisibility (int tag)
 
int getItemVisibility (int groupTag, int itemTag)
 
MenuGroupImpl getMenuGroup (int tag)
 
void removeMenuGroup (int tag)
 
void removeMenuItem (int groupTag, int itemTag)
 
void setGroupVisibility (int visibility, int tag)
 
void setItemVisibility (int visibility, int groupTag, int itemTag)
 

Detailed Description

Control MoreMenuModule group and group's submenus display and hide, as well as add group ,or group submenus to the MoreMenuModule

You can use it through MoreMenuModule#getMenuView(), or UIExtensionsManager#getMenuView()

Member Function Documentation

◆ addMenuGroup()

void com.foxit.uiextensions.controls.menu.IMenuView.addMenuGroup ( MenuGroupImpl  group)

Add a group

Note1: We use this tag to sort/add/remove/get... group,so the tag must be unique when initializing the MenuGroupImpl . Note2: The tag must be less than 100, or more than 150, because the tag between 100 and 150 has been used or may be used in the future.

Parameters
groupthe group to be added to this menu view.

◆ addMenuItem()

void com.foxit.uiextensions.controls.menu.IMenuView.addMenuItem ( int  groupTag,
MenuItemImpl  item 
)

Add the item to the group according to the groupTag.

Note: We use this tag to sort/get/remove... item,so the tag must be unique when initializing the MenuItemImpl.

Parameters
groupTagthe group id and is unique, it may be the existing tag
or you custom tag.
itemthe item to be added to the specified group

◆ getContentView()

View com.foxit.uiextensions.controls.menu.IMenuView.getContentView ( )

the content view of the menu.

◆ getGroupVisibility()

int com.foxit.uiextensions.controls.menu.IMenuView.getGroupVisibility ( int  tag)

Returns the visibility status for this view by the groupTag.

Parameters
tagthe group id and is unique, it may be the existing tag
or you custom tag.
Returns
One of View#VISIBLE, View#INVISIBLE, View#GONE or -1. if return -1,means can't find this group.

◆ getItemVisibility()

int com.foxit.uiextensions.controls.menu.IMenuView.getItemVisibility ( int  groupTag,
int  itemTag 
)

Returns the visibility status for this view by the groupTag and itemTag.

Note: if the groupTag is MoreMenuConfig#GROUP_PROTECT,this method can be used only when the Doc is open success,otherwise, the use is not normal.

Parameters
groupTagthe group id and is unique, it may be the existing tag
or you custom tag.
itemTagthe item id ,it belongs to the group and is unique you can customize it, but you have to make sure that the tag is unique,and we use this to sort item.

The relationship between item and group is as follows:

Returns
One of View#VISIBLE, View#INVISIBLE, View#GONE or -1. if return -1,means can't find this item.

◆ getMenuGroup()

MenuGroupImpl com.foxit.uiextensions.controls.menu.IMenuView.getMenuGroup ( int  tag)

According to the tag get the group info.

Parameters
tagthe group id and is unique, it may be the existing tag
or you custom tag.
Returns
the group info

◆ removeMenuGroup()

void com.foxit.uiextensions.controls.menu.IMenuView.removeMenuGroup ( int  tag)

According to the tag to remove group.

Parameters
tagthe group id and is unique, it may be the existing tag
or you custom tag.

◆ removeMenuItem()

void com.foxit.uiextensions.controls.menu.IMenuView.removeMenuItem ( int  groupTag,
int  itemTag 
)

Remove item by grouptag and itemtag

Parameters
groupTagthe group id and is unique, it may be the existing tag
or you custom tag.
itemTagthe item id ,it belongs to the group and is unique you can customize it, but you have tomake sure that the tag is unique,and we use this to sort item.

The relationship between item and group is as follows:

See also
MoreMenuConfig

◆ setGroupVisibility()

void com.foxit.uiextensions.controls.menu.IMenuView.setGroupVisibility ( int  visibility,
int  tag 
)

According to the tag Set the enabled state of this group.

Parameters
visibilityOne of View#VISIBLE, View#INVISIBLE, or View#GONE.
tagthe group id and is unique, it may be the existing tag
or you custom tag.

◆ setItemVisibility()

void com.foxit.uiextensions.controls.menu.IMenuView.setItemVisibility ( int  visibility,
int  groupTag,
int  itemTag 
)

According to the groupTag and itemTag Set the enabled state of this item.

Note: 1:If the state of the group that the item belongs to is View.GONE,then using this method to set the state of the item is not effective. 2: if the groupTag is MoreMenuConfig#GROUP_PROTECT,this method can be used only when the Doc is open success,otherwise, the use is not normal.

Parameters
visibilityOne of View#VISIBLE, View#INVISIBLE, or View#GONE.
groupTagthe group id and is unique ,it may be the existing tag
or you custom tag.
itemTagthe item id ,it belongs to the group and is unique you can customize it, but you have tomake sure that the tag is unique,and we use this to sort item.

The relationship between item and group is as follows:

See also
MoreMenuConfig