Public Member Functions | Public Attributes

nsIContextMenuListener2 Interface Reference

nsIContextMenuListener2 More...

import "nsIContextMenuListener2.idl";

List of all members.

Public Member Functions

void onShowContextMenu (in unsigned long aContextFlags, in nsIContextMenuInfo aUtils)
 Called when the browser receives a context menu event (e.g.

Public Attributes

const unsigned long CONTEXT_NONE = 0
 Flag.
const unsigned long CONTEXT_LINK = 1
 Flag.
const unsigned long CONTEXT_IMAGE = 2
 Flag.
const unsigned long CONTEXT_DOCUMENT = 4
 Flag.
const unsigned long CONTEXT_TEXT = 8
 Flag.
const unsigned long CONTEXT_INPUT = 16
 Flag.
const unsigned long CONTEXT_BACKGROUND_IMAGE = 32
 Flag.

Detailed Description

nsIContextMenuListener2

This is an extended version of nsIContextMenuListener It provides a helper class, nsIContextMenuInfo, to allow access to background images as well as various utilities.

See also:
nsIContextMenuListener
nsIContextMenuInfo
Status:
UNDER_REVIEW

Member Function Documentation

void nsIContextMenuListener2::onShowContextMenu ( in unsigned long  aContextFlags,
in nsIContextMenuInfo  aUtils 
)

Called when the browser receives a context menu event (e.g.

user is right-mouse clicking somewhere on the document). The combination of flags, along with the attributes of aUtils, indicate where and what was clicked on.

The following table describes what context flags and node combinations are possible.

aContextFlags aUtils.targetNode

CONTEXT_LINK CONTEXT_IMAGE CONTEXT_IMAGE | CONTEXT_LINK with as an ancestor CONTEXT_INPUT <INPUT> CONTEXT_INPUT | CONTEXT_IMAGE <INPUT> with type=image CONTEXT_TEXT <TEXTAREA> CONTEXT_DOCUMENT <HTML> CONTEXT_BACKGROUND_IMAGE <HTML> with background image

Parameters:
aContextFlags Flags indicating the kind of context.
aUtils Context information and helper utilities.
See also:
nsIContextMenuInfo

Member Data Documentation

Flag.

Context is a background image.

Flag.

Context is the whole document.

const unsigned long nsIContextMenuListener2::CONTEXT_IMAGE = 2

Flag.

Context is an image element.

const unsigned long nsIContextMenuListener2::CONTEXT_INPUT = 16

Flag.

Context is an input element.

const unsigned long nsIContextMenuListener2::CONTEXT_LINK = 1

Flag.

Context is a link element.

const unsigned long nsIContextMenuListener2::CONTEXT_NONE = 0

Flag.

No context.

const unsigned long nsIContextMenuListener2::CONTEXT_TEXT = 8

Flag.

Context is a text area element.


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