vtkContextScene Class Reference

#include <vtkContextScene.h>

Inheritance diagram for vtkContextScene:

Inheritance graph
[legend]
Collaboration diagram for vtkContextScene:

Collaboration graph
[legend]

List of all members.


Detailed Description

Provides a 2D scene for vtkContextItem objects.

Provides a 2D scene that vtkContextItem objects can be added to. Manages the items, ensures that they are rendered at the right times and passes on mouse events.

Definition at line 43 of file vtkContextScene.h.

Command * Observer
class Command

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual bool Paint (vtkContext2D *painter)
void AddItem (vtkContextItem *item)
int GetNumberOfItems ()
vtkContextItemGetItem (int index)
virtual void SetAnnotationLink (vtkAnnotationLink *link)
virtual int GetViewWidth ()
virtual int GetViewHeight ()
int GetSceneWidth ()
int GetSceneHeight ()
void SetInteractorStyle (vtkInteractorStyle *interactor)
virtual void SetRenderer (vtkRenderer *renderer)
void SetDirty (bool isDirty)
void ReleaseGraphicsResources ()
vtkWeakPointer< vtkContext2DGetLastPainter ()
vtkAbstractContextBufferIdGetBufferId ()
virtual void SetTransform (vtkTransform2D *transform)
vtkTransform2DGetTransform ()
bool HasTransform ()
virtual vtkAnnotationLinkGetAnnotationLink ()
virtual void SetGeometry (int, int)
void SetGeometry (int[2])
virtual int * GetGeometry ()
virtual void GetGeometry (int &, int &)
virtual void GetGeometry (int[2])
virtual void SetUseBufferId (bool)
virtual bool GetUseBufferId ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkContextSceneSafeDownCast (vtkObject *o)
static vtkContextSceneNew ()

Protected Member Functions

 vtkContextScene ()
 ~vtkContextScene ()
void CheckForRepaint ()
virtual void ProcessSelectionEvent (vtkObject *caller, void *callData)
virtual void MouseMoveEvent (int x, int y)
virtual void ButtonPressEvent (int button, int x, int y)
virtual void ButtonReleaseEvent (int button, int x, int y)
virtual void MouseWheelEvent (int delta, int x, int y)
virtual void PaintIds ()
vtkIdType GetPickedItem (int x, int y)
void UpdateBufferId ()
void PerformTransform (vtkTransform2D *transform, vtkContextMouseEvent &mouse)
virtual void ProcessEvents (vtkObject *caller, unsigned long eventId, void *callData)

Protected Attributes

vtkAnnotationLinkAnnotationLink
int Geometry [2]
vtkWeakPointer< vtkContext2DLastPainter
vtkWeakPointer< vtkRendererRenderer
vtkAbstractContextBufferIdBufferId
bool BufferIdDirty
bool UseBufferId
vtkTransform2DTransform
Private * Storage

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 46 of file vtkContextScene.h.


Constructor & Destructor Documentation

vtkContextScene::vtkContextScene (  )  [protected]

vtkContextScene::~vtkContextScene (  )  [protected]


Member Function Documentation

virtual const char* vtkContextScene::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkContextScene::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkContextScene::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkContextScene* vtkContextScene::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

virtual void vtkContextScene::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

static vtkContextScene* vtkContextScene::New (  )  [static]

Creates a 2D Painter object.

Reimplemented from vtkObject.

virtual bool vtkContextScene::Paint ( vtkContext2D painter  )  [virtual]

Paint event for the chart, called whenever the chart needs to be drawn

void vtkContextScene::AddItem ( vtkContextItem item  ) 

Add an item to the scene.

int vtkContextScene::GetNumberOfItems (  ) 

Get the number of items in the scene.

vtkContextItem* vtkContextScene::GetItem ( int  index  ) 

virtual void vtkContextScene::SetAnnotationLink ( vtkAnnotationLink link  )  [virtual]

Set the vtkAnnotationLink for the chart.

virtual vtkAnnotationLink* vtkContextScene::GetAnnotationLink (  )  [virtual]

Get the vtkAnnotationLink for the chart.

virtual void vtkContextScene::SetGeometry ( int  ,
int   
) [virtual]

Set the width and height of the scene in pixels.

void vtkContextScene::SetGeometry ( int  [2]  ) 

Set the width and height of the scene in pixels.

virtual int* vtkContextScene::GetGeometry (  )  [virtual]

Get the width and height of the scene in pixels.

virtual void vtkContextScene::GetGeometry ( int &  ,
int &   
) [virtual]

Get the width and height of the scene in pixels.

virtual void vtkContextScene::GetGeometry ( int  [2]  )  [virtual]

Get the width and height of the scene in pixels.

virtual void vtkContextScene::SetUseBufferId ( bool   )  [virtual]

Set whether the scene should use the color buffer. Default is true.

virtual bool vtkContextScene::GetUseBufferId (  )  [virtual]

Get whether the scene is using the color buffer. Default is true.

virtual int vtkContextScene::GetViewWidth (  )  [virtual]

Get the width of the view

virtual int vtkContextScene::GetViewHeight (  )  [virtual]

Get the height of the view

int vtkContextScene::GetSceneWidth (  ) 

Get the width of the scene.

int vtkContextScene::GetSceneHeight (  ) 

Get the height of the scene.

void vtkContextScene::SetInteractorStyle ( vtkInteractorStyle interactor  ) 

Add the scene as an observer on the supplied interactor style.

virtual void vtkContextScene::SetRenderer ( vtkRenderer renderer  )  [virtual]

This should not be necessary as the context view should take care of rendering.

void vtkContextScene::SetDirty ( bool  isDirty  ) 

Inform the scene that something changed that requires a repaint of the scene. This should only be used by the vtkContextItem derived objects in a scene in their event handlers.

void vtkContextScene::ReleaseGraphicsResources (  ) 

Release graphics resources hold by the scene.

vtkWeakPointer<vtkContext2D> vtkContextScene::GetLastPainter (  ) 

Last painter used. Not part of the end-user API. Can be used by context items to create their own colorbuffer id (when a context item is a container).

vtkAbstractContextBufferId* vtkContextScene::GetBufferId (  ) 

Return buffer id. Not part of the end-user API. Can be used by context items to initialize their own colorbuffer id (when a context item is a container).

virtual void vtkContextScene::SetTransform ( vtkTransform2D transform  )  [virtual]

Set the transform for the scene.

vtkTransform2D* vtkContextScene::GetTransform (  ) 

Get the transform for the scene.

bool vtkContextScene::HasTransform (  )  [inline]

Check whether the scene has a transform.

Definition at line 138 of file vtkContextScene.h.

void vtkContextScene::CheckForRepaint (  )  [protected]

Protected function called after any event to check if a repaint of the scene is required. Called by the Command object after interaction events.

virtual void vtkContextScene::ProcessEvents ( vtkObject caller,
unsigned long  eventId,
void *  callData 
) [protected, virtual]

Called to process events - figure out what child(ren) to propagate events to.

virtual void vtkContextScene::ProcessSelectionEvent ( vtkObject caller,
void *  callData 
) [protected, virtual]

Process a rubber band selection event.

virtual void vtkContextScene::MouseMoveEvent ( int  x,
int  y 
) [protected, virtual]

Process a mouse move event.

virtual void vtkContextScene::ButtonPressEvent ( int  button,
int  x,
int  y 
) [protected, virtual]

Process a mouse button press event.

virtual void vtkContextScene::ButtonReleaseEvent ( int  button,
int  x,
int  y 
) [protected, virtual]

Process a mouse button release event.

virtual void vtkContextScene::MouseWheelEvent ( int  delta,
int  x,
int  y 
) [protected, virtual]

Process a mouse wheel event where delta is the movement forward or back.

virtual void vtkContextScene::PaintIds (  )  [protected, virtual]

Paint the scene in a special mode to build a cache for picking. Use internally.

vtkIdType vtkContextScene::GetPickedItem ( int  x,
int  y 
) [protected]

Return the item id under mouse cursor at position (x,y). Return -1 if there is no item under the mouse cursor.

Postcondition:
valid_result: result>=-1 && result<this->GetNumberOfItems()

void vtkContextScene::UpdateBufferId (  )  [protected]

Make sure the buffer id used for picking is up-to-date.

void vtkContextScene::PerformTransform ( vtkTransform2D transform,
vtkContextMouseEvent mouse 
) [protected]

Perform translation and fill in the vtkContextMouseEvent struct.


Friends And Related Function Documentation

friend class Command [friend]

Definition at line 191 of file vtkContextScene.h.


Member Data Documentation

Definition at line 184 of file vtkContextScene.h.

int vtkContextScene::Geometry[2] [protected]

Definition at line 187 of file vtkContextScene.h.

Command* vtkContextScene::Observer [protected]

Definition at line 193 of file vtkContextScene.h.

Private* vtkContextScene::Storage [protected]

Definition at line 198 of file vtkContextScene.h.

Definition at line 202 of file vtkContextScene.h.

Definition at line 204 of file vtkContextScene.h.

Definition at line 206 of file vtkContextScene.h.

Definition at line 207 of file vtkContextScene.h.

bool vtkContextScene::UseBufferId [protected]

Definition at line 209 of file vtkContextScene.h.

The scene level transform.

Definition at line 212 of file vtkContextScene.h.


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

Generated on Mon Sep 27 18:20:43 2010 for VTK by  doxygen 1.5.6