FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
IContextMenu Class Reference

This is an abstract contextmenu class. The various behaviors of the user-customized contextmenu can be encapsulated in its subclasses, and then its subclasses should be created in the XViewerUI::createContextMenu to complete the contextmenu customization.. More...

Public Member Functions

 destroy ()
 Override this method to implement the destruction logic of contextmenu component.
 
 disable ()
 Override this method to implement the logical to make contextmenu component unusable.
 
 enable ()
 Override this method to implement the logical to make contextmenu component usable.
 
 getCurrentTarget ()
 Obtains current target object for menu items. More...
 
 setCurrentTarget (target)
 Set a target object when the right-click menu is displayed, and the menu item can get the target object for some operations. More...
 
 showAt (x, y)
 Override this method to implement the logical to display the contextmenu at specific position which relative to the top left of the fully rendered content area in the browser. More...
 

Detailed Description

This is an abstract contextmenu class. The various behaviors of the user-customized contextmenu can be encapsulated in its subclasses, and then its subclasses should be created in the XViewerUI::createContextMenu to complete the contextmenu customization.

.

Member Function Documentation

◆ getCurrentTarget()

IContextMenu::getCurrentTarget ( )
inline

Obtains current target object for menu items.

Returns
any

◆ setCurrentTarget()

IContextMenu::setCurrentTarget (   target)
inline

Set a target object when the right-click menu is displayed, and the menu item can get the target object for some operations.

Parameters
targetany

◆ showAt()

IContextMenu::showAt (   x,
  y 
)
inline

Override this method to implement the logical to display the contextmenu at specific position which relative to the top left of the fully rendered content area in the browser.

Parameters
pageXnumber -
pageYnumber -
Returns
boolean - True indicates that the custom context menu is displayed and the built-in menu does not need to be displayed. False indicates that the custom menu is not displayed and the built-in menu needs to be displayed.

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.