Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsMenuDismissalListener Class Reference

editor Implementation of the DragListener interface More...

#include <nsMenuDismissalListener.h>

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

List of all members.

Public Member Functions

 nsMenuDismissalListener ()
 default constructor
virtual ~nsMenuDismissalListener ()
 default destructor
NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_IMETHOD MouseDown (nsIDOMEvent *aMouseEvent)
 Processes a mouse down event.
NS_IMETHOD MouseUp (nsIDOMEvent *aMouseEvent)
 Processes a mouse up event.
NS_IMETHOD MouseClick (nsIDOMEvent *aMouseEvent)
 Processes a mouse click event.
NS_IMETHOD MouseDblClick (nsIDOMEvent *aMouseEvent)
 Processes a mouse click event.
NS_IMETHOD MouseOver (nsIDOMEvent *aMouseEvent)
 Processes a mouse enter event.
NS_IMETHOD MouseOut (nsIDOMEvent *aMouseEvent)
 Processes a mouse leave event.
NS_DECL_ISUPPORTS
NS_DECL_NSIROLLUPLISTENER
NS_DECL_NSIMENUROLLUP
NS_IMETHOD 
EnableListener (PRBool aEnabled)
void SetCurrentMenuParent (nsIMenuParent *aMenuParent)
nsIMenuParentGetCurrentMenuParent ()
NS_IMETHOD Unregister ()
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.
nsISupportsArray GetSubmenuWidgetChain ()
void Rollup ()
 Notifies the object to rollup.
void ShouldRollupOnMouseWheelEvent (out PRBool aShould)
 Asks the RollupListener if it should rollup on mousevents.
void ShouldRollupOnMouseActivate (out PRBool aShould)
 Asks the RollupListener if it should rollup on mouse activate, eg.

Protected Attributes

nsIMenuParentmMenuParent
nsCOMPtr< nsIWidgetmWidget
PRBool mEnabled

Detailed Description

editor Implementation of the DragListener interface

Definition at line 54 of file nsMenuDismissalListener.h.


Constructor & Destructor Documentation

default constructor

Definition at line 54 of file nsMenuDismissalListener.cpp.

default destructor

Definition at line 61 of file nsMenuDismissalListener.cpp.

{
}

Member Function Documentation

Definition at line 207 of file nsMenuDismissalListener.cpp.

{
  mEnabled = aEnabled;
  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 73 of file nsMenuDismissalListener.cpp.

{
  return mMenuParent;
}

Here is the caller graph for this function:

This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Parameters:
evtThe Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.

Definition at line 65 of file nsMenuDismissalListener.h.

{ return NS_OK; };
NS_IMETHOD nsMenuDismissalListener::MouseClick ( nsIDOMEvent aMouseEvent) [inline, virtual]

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 69 of file nsMenuDismissalListener.h.

{ return NS_OK; };
NS_IMETHOD nsMenuDismissalListener::MouseDblClick ( nsIDOMEvent aMouseEvent) [inline, virtual]

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 70 of file nsMenuDismissalListener.h.

{ return NS_OK; };

Processes a mouse down event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 67 of file nsMenuDismissalListener.cpp.

{
  return NS_OK;
}
NS_IMETHOD nsMenuDismissalListener::MouseOut ( nsIDOMEvent aMouseEvent) [inline, virtual]

Processes a mouse leave event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 72 of file nsMenuDismissalListener.h.

{ return NS_OK; };
NS_IMETHOD nsMenuDismissalListener::MouseOver ( nsIDOMEvent aMouseEvent) [inline, virtual]

Processes a mouse enter event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 71 of file nsMenuDismissalListener.h.

{ return NS_OK; };
NS_IMETHOD nsMenuDismissalListener::MouseUp ( nsIDOMEvent aMouseEvent) [inline, virtual]

Processes a mouse up event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 68 of file nsMenuDismissalListener.h.

{ return NS_OK; };

Notifies the object to rollup.

Returns:
NS_Ok if no errors

Implemented in nsComboboxControlFrame.

Here is the caller graph for this function:

Definition at line 79 of file nsMenuDismissalListener.cpp.

{
  if (aMenuParent == mMenuParent)
    return;

  nsCOMPtr<nsIRollupListener> kungFuDeathGrip = this;
  Unregister();
  
  mMenuParent = aMenuParent;
  if (!aMenuParent)
    return;

  nsCOMPtr<nsIWidget> widget;
  aMenuParent->GetWidget(getter_AddRefs(widget));
  if (!widget)
    return;

  PRBool consumeOutsideClicks = PR_FALSE;
  aMenuParent->ConsumeOutsideClicks(consumeOutsideClicks);
  widget->CaptureRollupEvents(this, PR_TRUE, consumeOutsideClicks);
  mWidget = widget;

  NS_ADDREF(nsMenuFrame::sDismissalListener = this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Asks the RollupListener if it should rollup on mouse activate, eg.

X-Mouse

Returns:
NS_Ok if no errors

Here is the caller graph for this function:

Asks the RollupListener if it should rollup on mousevents.

Returns:
NS_Ok if no errors

Here is the caller graph for this function:

Definition at line 195 of file nsMenuDismissalListener.cpp.

{
  if (mWidget) {
    mWidget->CaptureRollupEvents(this, PR_FALSE, PR_FALSE);
    mWidget = nsnull;
  }
  
  NS_RELEASE(nsMenuFrame::sDismissalListener);
  return NS_OK;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 87 of file nsMenuDismissalListener.h.

Definition at line 85 of file nsMenuDismissalListener.h.

Definition at line 86 of file nsMenuDismissalListener.h.


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