Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
PresShellViewEventListener Class Reference
Inheritance diagram for PresShellViewEventListener:
Inheritance graph
[legend]
Collaboration diagram for PresShellViewEventListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PresShellViewEventListener ()
virtual ~PresShellViewEventListener ()
NS_DECL_ISUPPORTS NS_IMETHOD ScrollPositionWillChange (nsIScrollableView *aView, nscoord aX, nscoord aY)
NS_IMETHOD ScrollPositionDidChange (nsIScrollableView *aView, nscoord aX, nscoord aY)
NS_IMETHOD WillRefreshRegion (nsIViewManager *aViewManager, nsIView *aView, nsIRenderingContext *aContext, nsIRegion *aRegion, PRUint32 aUpdateFlags)
 Notification before a view is refreshed.
NS_IMETHOD DidRefreshRegion (nsIViewManager *aViewManager, nsIView *aView, nsIRenderingContext *aContext, nsIRegion *aRegion, PRUint32 aUpdateFlags)
 Notification after a view was refreshed.
NS_IMETHOD WillRefreshRect (nsIViewManager *aViewManager, nsIView *aView, nsIRenderingContext *aContext, const nsRect *aRect, PRUint32 aUpdateFlags)
 Notification before a view is refreshed.
NS_IMETHOD DidRefreshRect (nsIViewManager *aViewManager, nsIView *aView, nsIRenderingContext *aContext, const nsRect *aRect, PRUint32 aUpdateFlags)
 Notification after a view was refreshed.
nsresult SetPresShell (nsIPresShell *aPresShell)

Private Member Functions

nsresult HideCaret ()
nsresult RestoreCaretVisibility ()

Private Attributes

nsIPresShellmPresShell
PRBool mWasVisible
PRInt32 mCallCount

Detailed Description

Definition at line 714 of file nsPresShell.cpp.


Constructor & Destructor Documentation

Definition at line 8029 of file nsPresShell.cpp.

Definition at line 8036 of file nsPresShell.cpp.

{
  mPresShell  = 0;
}

Member Function Documentation

NS_IMETHODIMP PresShellViewEventListener::DidRefreshRect ( nsIViewManager aViewManager,
nsIView aView,
nsIRenderingContext aContext,
const nsRect aRect,
PRUint32  aUpdateFlags 
) [virtual]

Notification after a view was refreshed.

Parameters:
aViewManagerview manager that "owns" the view. The view does NOT hold a reference to the view manager
aViewview that was refreshed.
aContextrendering context that was used during the refresh.
aRectrect region of the view that was refreshed.
aUpdateFlagssee bottom of nsIViewManager.h for description
Returns:
The result of the notification, NS_OK if no errors

Implements nsICompositeListener.

Definition at line 8132 of file nsPresShell.cpp.

Here is the call graph for this function:

NS_IMETHODIMP PresShellViewEventListener::DidRefreshRegion ( nsIViewManager aViewManager,
nsIView aView,
nsIRenderingContext aContext,
nsIRegion aRegion,
PRUint32  aUpdateFlags 
) [virtual]

Notification after a view was refreshed.

Parameters:
aViewManagerview manager that "owns" the view. The view does NOT hold a reference to the view manager
aViewview that was refreshed.
aContextrendering context that was used during the refresh.
aRegionregion of the view that was refreshed, IN DEVICE COORDINATES
aUpdateFlagssee bottom of nsIViewManager.h for description
Returns:
The result of the notification, NS_OK if no errors

Implements nsICompositeListener.

Definition at line 8110 of file nsPresShell.cpp.

Here is the call graph for this function:

Definition at line 8049 of file nsPresShell.cpp.

{
  nsresult result = NS_OK;

  if (mPresShell && 0 == mCallCount)
  {
    nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(mPresShell);
    if (selCon)
    {
      result = selCon->GetCaretEnabled(&mWasVisible);

      if (NS_SUCCEEDED(result) && mWasVisible)
        result = selCon->SetCaretEnabled(PR_FALSE);
    }
  }

  ++mCallCount;

  return result;
}

Here is the call graph for this function:

Definition at line 8071 of file nsPresShell.cpp.

{
  nsresult result = NS_OK;

  --mCallCount;

  if (mPresShell && 0 == mCallCount && mWasVisible)
  {
    nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(mPresShell);
    if (selCon)
      result = selCon->SetCaretEnabled(PR_TRUE);
  }

  return result;
}

Here is the call graph for this function:

Implements nsIScrollPositionListener.

Definition at line 8094 of file nsPresShell.cpp.

{
  return RestoreCaretVisibility();
}

Implements nsIScrollPositionListener.

Definition at line 8088 of file nsPresShell.cpp.

{
  return HideCaret();
}

Definition at line 8042 of file nsPresShell.cpp.

{
  mPresShell = aPresShell;
  return NS_OK;
}
NS_IMETHODIMP PresShellViewEventListener::WillRefreshRect ( nsIViewManager aViewManager,
nsIView aView,
nsIRenderingContext aContext,
const nsRect aRect,
PRUint32  aUpdateFlags 
) [virtual]

Notification before a view is refreshed.

Parameters:
aViewManagerview manager that "owns" the view. The view does NOT hold a reference to the view manager
aViewview to be refreshed.
aContextrendering context to be used during the refresh.
aRectrect region of the view to be refreshed.
aUpdateFlagssee bottom of nsIViewManager.h for description
Returns:
The result of the notification, NS_OK if no errors

Implements nsICompositeListener.

Definition at line 8122 of file nsPresShell.cpp.

{
  return HideCaret();
}
NS_IMETHODIMP PresShellViewEventListener::WillRefreshRegion ( nsIViewManager aViewManager,
nsIView aView,
nsIRenderingContext aContext,
nsIRegion aRegion,
PRUint32  aUpdateFlags 
) [virtual]

Notification before a view is refreshed.

Parameters:
aViewManagerview manager that "owns" the view. The view does NOT hold a reference to the view manager
aViewview to be refreshed.
aContextrendering context to be used during the refresh.
aRegionregion of the view to be refreshed, IN DEVICE COORDINATES
aUpdateFlagssee bottom of nsIViewManager.h for description
Returns:
The result of the notification, NS_OK if no errors

Implements nsICompositeListener.

Definition at line 8100 of file nsPresShell.cpp.

{
  return HideCaret();
}

Member Data Documentation

Definition at line 761 of file nsPresShell.cpp.

Definition at line 759 of file nsPresShell.cpp.

Definition at line 760 of file nsPresShell.cpp.


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