Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions
nsIMenuItem Class Reference

MenuItem widget. More...

#include <nsIMenuItem.h>

Inheritance diagram for nsIMenuItem:
Inheritance graph
[legend]
Collaboration diagram for nsIMenuItem:
Collaboration graph
[legend]

List of all members.

Public Types

enum  EMenuItemType { eRegular = 0, eCheckbox, eRadio }

Public Member Functions

NS_IMETHOD Create (nsIMenu *aParent, const nsString &aLabel, PRBool isSeparator, EMenuItemType aItemType, PRBool aEnabled, nsIChangeManager *aManager, nsIDocShell *aShell, nsIContent *aNode)=0
 Creates the MenuItem.
NS_IMETHOD GetLabel (nsString &aText)=0
 Get the MenuItem label.
NS_IMETHOD SetShortcutChar (const nsString &aText)=0
 Set the Menu shortcut char.
NS_IMETHOD GetShortcutChar (nsString &aText)=0
 Get the Menu shortcut char.
NS_IMETHOD GetEnabled (PRBool *aIsEnabled)=0
 Gets whether the item is enabled or disabled.
NS_IMETHOD SetChecked (PRBool aIsEnabled)=0
 Sets whether the item is checked or not.
NS_IMETHOD GetChecked (PRBool *aIsEnabled)=0
 Gets whether the item is checked or not.
NS_IMETHOD GetMenuItemType (EMenuItemType *aType)=0
 Gets whether the item is a checkbox or radio.
NS_IMETHOD GetTarget (nsIWidget *&aTarget)=0
 Gets the target for MenuItem.
NS_IMETHOD GetNativeData (void *&aData)=0
 Gets Native Menu Handle.
NS_IMETHOD AddMenuListener (nsIMenuListener *aMenuListener)=0
 Adds menu listener.
NS_IMETHOD RemoveMenuListener (nsIMenuListener *aMenuListener)=0
 Removes menu listener.
NS_IMETHOD IsSeparator (PRBool &aIsSep)=0
 Indicates whether it is a separator.
NS_IMETHOD DoCommand ()=0
 Executes the "cached" JavaScript Command.
NS_IMETHOD SetModifiers (PRUint8 aModifiers)=0
 
 

NS_IMETHOD GetModifiers (PRUint8 *aModifiers)=0

Detailed Description

MenuItem widget.

Definition at line 71 of file nsIMenuItem.h.


Member Enumeration Documentation

Enumerator:
eRegular 
eCheckbox 
eRadio 

Definition at line 76 of file nsIMenuItem.h.


Member Function Documentation

NS_IMETHOD nsIMenuItem::AddMenuListener ( nsIMenuListener aMenuListener) [pure virtual]

Adds menu listener.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::Create ( nsIMenu aParent,
const nsString aLabel,
PRBool  isSeparator,
EMenuItemType  aItemType,
PRBool  aEnabled,
nsIChangeManager aManager,
nsIDocShell aShell,
nsIContent aNode 
) [pure virtual]

Creates the MenuItem.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::DoCommand ( ) [pure virtual]

Executes the "cached" JavaScript Command.

Returns:
NS_OK if the command was executed properly, otherwise an error code

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

NS_IMETHOD nsIMenuItem::GetChecked ( PRBool aIsEnabled) [pure virtual]

Gets whether the item is checked or not.

 

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

NS_IMETHOD nsIMenuItem::GetEnabled ( PRBool aIsEnabled) [pure virtual]

Gets whether the item is enabled or disabled.

 

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

NS_IMETHOD nsIMenuItem::GetLabel ( nsString aText) [pure virtual]

Get the MenuItem label.

 

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

Gets whether the item is a checkbox or radio.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::GetModifiers ( PRUint8 aModifiers) [pure virtual]

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

NS_IMETHOD nsIMenuItem::GetNativeData ( void *&  aData) [pure virtual]

Gets Native Menu Handle.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::GetShortcutChar ( nsString aText) [pure virtual]

Get the Menu shortcut char.

 

Implemented in nsMenuItemX, and nsMenuItemX.

Here is the caller graph for this function:

NS_IMETHOD nsIMenuItem::GetTarget ( nsIWidget *&  aTarget) [pure virtual]

Gets the target for MenuItem.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::IsSeparator ( PRBool aIsSep) [pure virtual]

Indicates whether it is a separator.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::RemoveMenuListener ( nsIMenuListener aMenuListener) [pure virtual]

Removes menu listener.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::SetChecked ( PRBool  aIsEnabled) [pure virtual]

Sets whether the item is checked or not.

 

Implemented in nsMenuItemX, and nsMenuItemX.

NS_IMETHOD nsIMenuItem::SetModifiers ( PRUint8  aModifiers) [pure virtual]

 

Implemented in nsMenuItemX, and nsMenuItemX.

Set the Menu shortcut char.

 

Implemented in nsMenuItemX, and nsMenuItemX.


The documentation for this class was generated from the following file: