All Frameworks  Class Hierarchy  This Framework  Previous  Indexes

Visualization Notification CATVisViewerFeedbackEvent

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATNotification
        |
        +---VisualizationBase.CATTimeStampedEvent
          |
          +---CATVisViewerFeedbackEvent
 

Usage: you must use this class as is. You should never derive it.


public class CATVisViewerFeedbackEvent

Class notification for CATViewer interactions.
Role: A such notification is sent when an interaction occurs in a CATViewer which has the feedback mode active. The CATViewer.GetFeedbackMode method enables you to set the feedback mode, and the CATViewer.SetFeedbackMode method enables you to unset it.
This class notification offers methods to access information concerning the interaction, be it a mouse motion or a button action.
To receive such notifications, you should set a callback on a CATViewer::VIEWER_FEEDBACK_UPDATE class event.

See also:
CATViewer


Constructor and Destructor Index


o ~CATVisViewerFeedbackEvent()

Method Index


o GetContext()
Retrieves the context that gave birth to the event.
o GetElementsUnder()
Retrieves elements under the mouse.
o GetIntersection()
Retrieves the intersection point between the mouse pointer and the underlying geometry.
o GetMousePosition(int*,int*)
Retrieves the mouse pointer position in screen coordinates.
o GetViewer()
Retrieves the viewer that triggered the event.

Enumerated Type Index


o EventContext
Defines the notification creation context.

Constructor and Destructor


o ~CATVisViewerFeedbackEvent
public virtual ~CATVisViewerFeedbackEvent()

Methods


o GetContext
public CATVisViewerFeedbackEvent::EventContext GetContext()
Retrieves the context that gave birth to the event.
Returns:
The event context.
o GetElementsUnder
public CATSO* GetElementsUnder()
Retrieves elements under the mouse.
RoleThis methods enables you to know all the elements (until the geometry level) under the mouse. The elements in the CATSO are sorted: the first (0 index) is the nearest, and the last (n-1 index) is the further.
Returns:
The set of element under the mouse.
o GetIntersection
public CATGraphicElementIntersection* GetIntersection()
Retrieves the intersection point between the mouse pointer and the underlying geometry.
Returns:
The intersection point.
o GetMousePosition
public void GetMousePosition(int* oXPixel,
int* oYPixel)
Retrieves the mouse pointer position in screen coordinates.
Parameters:
oXPixel
The X position. The range of the value is between 0 and the width (-1) of the support (
CATSupport.GetWidthAndHeight ).
oXPixel increases from left to right.
oYPixel
The Y position. The range of the value is between 0 and the height (-1) of the support (
CATSupport.GetWidthAndHeight ).
oYPixel increases from top to bottom.
o GetViewer
public CATViewer* GetViewer()
Retrieves the viewer that triggered the event.
Returns:
The viewer.

Enumerated Types


o EventContext
enum EventContext {
  Preactivate,
  MoveOver,
  Move,
  EndPreactivate,
  BeginManipulate,
  Activate,
  Context
}
Defines the notification creation context.
Parameters:
Preactivate
There are two cases to consider:
  • The mouse pointer, coming from the background, enters on a graphic representation. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by
GetElementsUnder is null
  • A Preactivate context: The pointer returned by GetElementsUnder is not null
  • The mouse pointer leaves a graphic representation to the background. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by GetElementsUnder is not null
    2. A Preactivate context: The pointer returned by GetElementsUnder is null
    MoveOver
    The mouse pointer leaves a graphic representation to enter on a new one. The pointer returned by
    GetElementsUnder is not null.
    Move
    The mouse pointer moves on a graphic representation or the background. In the first case, the pointer returned by
    GetElementsUnder is not null, otherwise the pointer is nul.
    EndPreactivate
    There are two cases to consider:
    • The mouse pointer, coming from the background, enters on a graphic representation. Two notifications with the following context are sent in this order:
      1. A EndPreactivate context: The pointer returned by
    GetElementsUnder is null
  • A Preactivate context: The pointer returned by GetElementsUnder is not null
  • The mouse pointer leaves a graphic representation to the background. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by GetElementsUnder is not null
    2. A Preactivate context: The pointer returned by GetElementsUnder is null
    BeginManipulate
    If a graphic representation is taken for manipulation, the pointer returned by
    GetElementsUnder is not null, otherwise if the background is taken for manipulation, the pointer is null.
    Activate
    If a graphic representation is selected, the pointer returned by
    GetElementsUnder is not null, otherwise if the background is selected, the pointer is null.
    Context
    Contextual action is asked. If a graphic representation is selected, the pointer returned by
    GetElementsUnder is not null, otherwise if the background is selected, the pointer is null.

    This object is included in the file: CATVisViewerFeedbackEvent.h
    If needed, your Imakefile.mk should include the module: CATVisualization

    Copyright © 2003, Dassault Systèmes. All rights reserved.