Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsPrintPreviewListener Class Reference

#include <nsPrintPreviewListener.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIDOMEVENTLISTENER 
nsPrintPreviewListener (nsIDOMEventTarget *aTarget)
nsresult AddListeners ()
nsresult RemoveListeners ()
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Private Attributes

nsCOMPtr< nsIDOMEventTargetmEventTarget

Detailed Description

Definition at line 56 of file nsPrintPreviewListener.h.


Constructor & Destructor Documentation

Definition at line 57 of file nsPrintPreviewListener.cpp.

  : mEventTarget(aTarget)
{
  NS_ADDREF_THIS();
} // ctor

Member Function Documentation

Definition at line 71 of file nsPrintPreviewListener.cpp.

{
  if (mEventTarget) {
    mEventTarget->AddEventListener(NS_LITERAL_STRING("click"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("contextmenu"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("keydown"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("keypress"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("keyup"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("mousemove"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseout"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseover"), this, true);
    mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseup"), this, true);
  }

  return NS_OK;
}

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 97 of file nsPrintPreviewListener.cpp.

{
  if (mEventTarget) {
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("click"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("contextmenu"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mousemove"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseout"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseover"), this, true);
    mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseup"), this, true);
  }

  return NS_OK;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 72 of file nsPrintPreviewListener.h.


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