:: com :: sun :: star :: awt ::

interface XPopupMenuExtended
Base Interfaces
XPopupMenuExtendedXPopupMenu
┃ ┗ XMenuXMenuExtended2XMenuExtendedXMenu

XPopupMenu
Description
specifies basic functions for a popup menu.
XMenuExtended2
Description
specifies extended menu functions, available for both MenuBar and PopupMenu.
Description
specifies extended functions for a PopupMenu.
Since
OOo 3.1

Methods' Summary
isInExecute queries if the PopupMenu is being executed as a result of invoking XPopupMenu::execute(); that is, for a PopupMenu activated by a MenuBar item, this methods returns false.  
endExecute ends the execution of the PopupMenu. XPopupMenu::execute() will then return 0.  
setLogo sets the MenuLogo for this PopupMenu.  
getLogo retrieves the MenuLogo for this PopupMenu.  
enableAutoMnemonics specifies whether mnemonics are automatically assigned to menu items, or not.  
setAcceleratorKeyEvent sets the KeyEvent for the menu item.  
getAcceleratorKeyEvent retrieves the KeyEvent for the menu item.  
setHelpText sets the help text for the menu item.  
getHelpText retrieves the help text for the menu item.  
setTipHelpText sets the tip help text for the menu item.  
getTipHelpText retrieves the tip help text for the menu item.  
setItemImage sets the image for the menu item.  
getItemImage retrieves the image for the menu item.  
setItemImageAngle sets the rotation angle of a menu item image.  
getItemImageAngle retrieves the rotation angle of a menu item image.  
setItemImageMirrorMode sets the mirror mode of a menu item image.  
isItemImageInMirrorMode indicates whether the menu item image is mirrored.  
Methods' Details
isInExecute
boolean
isInExecute();

Description
queries if the PopupMenu is being executed as a result of invoking XPopupMenu::execute(); that is, for a PopupMenu activated by a MenuBar item, this methods returns false.
Returns
true if the PopupMenu is being executed, false otherwise.
Since
OOo 3.1
See also
XPopupMenu::execute()
endExecute
void
endExecute();

Description
ends the execution of the PopupMenu. XPopupMenu::execute() will then return 0.
Since
OOo 3.1
See also
XPopupMenu::execute()
setLogo
void
setLogo( [in] MenuLogo  aMenuLogo );

Description
sets the MenuLogo for this PopupMenu.
Parameter aMenuLogo
the MenuLogo.
Since
OOo 3.1
getLogo
MenuLogo
getLogo();

Description
retrieves the MenuLogo for this PopupMenu.
Returns
the MenuLogo.
Since
OOo 3.1
enableAutoMnemonics
void
enableAutoMnemonics( [in] boolean  bEnable );

Description
specifies whether mnemonics are automatically assigned to menu items, or not.
Parameter bEnable
if true, mnemonics are automatically assigned to menu items.
setAcceleratorKeyEvent
void
setAcceleratorKeyEvent( [in] short  nItemId,
[in] KeyEvent  aKeyEvent )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the KeyEvent for the menu item.

The KeyEvent is only used as a container to transport the shortcut information, this methods only draws the text corresponding to this keyboard shortcut. The client code is responsible for listening to keyboard events (typicaly done via XUserInputInterception), and dispatch the respective command.

Parameter nItemId
specifies the menu item identifier for which the KeyEvent should be set.
Parameter aKeyEvent
specifies the KeyEvent for the menu item.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
getAcceleratorKeyEvent
KeyEvent
getAcceleratorKeyEvent( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
retrieves the KeyEvent for the menu item.

The KeyEvent is only used as a container to transport the shortcut information, so that in this case ::com::sun::star::lang::EventObject::Source is NULL.

Parameter nItemId
specifies the menu item identifier for which the KeyEvent should be retrieved.
Returns
the KeyEvent struct assigned to the requested menu item.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
setHelpText
void
setHelpText( [in] short  nItemId,
[in] string  sHelpText )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the help text for the menu item.
Parameter nItemId
specifies the menu item identifier for which the help text should be set.
Parameter sHelpText
specifies the help text for the menu item.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
getHelpText
string
getHelpText( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
retrieves the help text for the menu item.
Parameter nItemId
specifies the menu item identifier for which the help text should be retrieved.
Returns
a string with the help text.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
setTipHelpText
void
setTipHelpText( [in] short  nItemId,
[in] string  sTipHelpText )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the tip help text for the menu item.
Parameter nItemId
specifies the menu item identifier for which the tip help text should be set.
Parameter sTipHelpText
specifies the tip help text for the menu item.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
getTipHelpText
string
getTipHelpText( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
retrieves the tip help text for the menu item.
Parameter nItemId
specifies the menu item identifier for which the tip help text should be retrieved.
Returns
a string with the tip help text.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
setItemImage
void
setItemImage( [in] short  nItemId,
[in] ::com::sun::star::graphic::XGraphic  xGraphic,
[in] boolean  bScale )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the image for the menu item.
Parameter nItemId
specifies the menu item identifier for which the image should be set.
Parameter xGraphic
specifies the image for the menu item.
Parameter bScale
if true, the image will be scaled to the standard size used internally by the implementation.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
getItemImage
::com::sun::star::graphic::XGraphic
getItemImage( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
retrieves the image for the menu item.
Parameter nItemId
specifies the menu item identifier for which the image should be retrieved.
Returns
a ::com::sun::star::graphic::XGraphic reference to the current image for the requested menu item.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
setItemImageAngle
void
setItemImageAngle( [in] short  nItemId,
[in] long  nAngle )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the rotation angle of a menu item image.
Parameter nItemId
specifies the menu item identifier for which the image angle should be set.
Parameter nAngle
specifies the rotation angle for the menu item image.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
getItemImageAngle
long
getItemImageAngle( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
retrieves the rotation angle of a menu item image.
Parameter nItemId
specifies the menu item identifier for which the rotation angle should be retrieved.
Returns
the rotation angle of the menu item image, or 0 if it has no rotation.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
setItemImageMirrorMode
void
setItemImageMirrorMode( [in] short  nItemId,
[in] boolean  bMirror )
raises( ::com::sun::star::container::NoSuchElementException );

Description
sets the mirror mode of a menu item image.
Parameter nItemId
specifies the menu item identifier for which the mirror mode should be set.
Parameter bMirror
if true, the item image is mirrored.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
isItemImageInMirrorMode
boolean
isItemImageInMirrorMode( [in] short  nItemId )
raises( ::com::sun::star::container::NoSuchElementException );

Description
indicates whether the menu item image is mirrored.
Parameter nItemId
specifies the menu item identifier for which the image mirror mode should be checked.
Returns
true if the item image is mirrored, false otherwise.
Throws
::com::sun::star::container::NoSuchElementException if there is no menu item with the identifier specified in nItemId.
Since
OOo 3.1
Top of Page