VTK
|
Provides a 2D scene for vtkContextItem objects. More...
#include <vtkContextScene.h>
Public Types | |
typedef vtkObject | Superclass |
enum | { SELECTION_NONE = 0, SELECTION_DEFAULT, SELECTION_ADDITION, SELECTION_SUBTRACTION, SELECTION_TOGGLE } |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkContextScene * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual bool | Paint (vtkContext2D *painter) |
unsigned int | AddItem (vtkAbstractContextItem *item) |
bool | RemoveItem (vtkAbstractContextItem *item) |
bool | RemoveItem (unsigned int index) |
vtkAbstractContextItem * | GetItem (unsigned int index) |
unsigned int | GetNumberOfItems () |
void | ClearItems () |
virtual void | SetAnnotationLink (vtkAnnotationLink *link) |
virtual int | GetViewWidth () |
virtual int | GetViewHeight () |
int | GetSceneWidth () |
int | GetSceneHeight () |
vtkVector2i | GetLogicalTileScale () |
virtual void | SetRenderer (vtkRenderer *renderer) |
void | ReleaseGraphicsResources () |
vtkWeakPointer< vtkContext2D > | GetLastPainter () |
vtkAbstractContextBufferId * | GetBufferId () |
virtual void | SetTransform (vtkTransform2D *transform) |
vtkTransform2D * | GetTransform () |
bool | HasTransform () |
virtual vtkAnnotationLink * | GetAnnotationLink () |
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 () |
virtual void | SetScaleTiles (bool) |
virtual bool | GetScaleTiles () |
virtual void | ScaleTilesOn () |
virtual void | ScaleTilesOff () |
void | SetDirty (bool isDirty) |
bool | GetDirty () const |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkContextScene * | SafeDownCast (vtkObjectBase *o) |
static vtkContextScene * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Attributes | |
vtkAnnotationLink * | AnnotationLink |
int | Geometry [2] |
vtkContextScenePrivate * | Children |
vtkWeakPointer< vtkContext2D > | LastPainter |
vtkWeakPointer< vtkRenderer > | Renderer |
vtkAbstractContextBufferId * | BufferId |
bool | BufferIdDirty |
bool | UseBufferId |
bool | BufferIdSupportTested |
bool | BufferIdSupported |
bool | ScaleTiles |
vtkTransform2D * | Transform |
Private * | Storage |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Friends | |
class | vtkContextInteractorStyle |
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 49 of file vtkContextScene.h.
typedef vtkObject vtkContextScene::Superclass |
Definition at line 52 of file vtkContextScene.h.
anonymous enum |
Enum of valid selection modes for charts in the scene
Enumerator | |
---|---|
SELECTION_NONE | |
SELECTION_DEFAULT | |
SELECTION_ADDITION | |
SELECTION_SUBTRACTION | |
SELECTION_TOGGLE |
Definition at line 178 of file vtkContextScene.h.
|
protected |
|
protected |
|
static |
|
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 |
|
protectedvirtual |
Reimplemented from vtkObject.
vtkContextScene* vtkContextScene::NewInstance | ( | ) | const |
|
virtual |
|
static |
Creates a 2D Painter object.
|
virtual |
Paint event for the chart, called whenever the chart needs to be drawn
unsigned int vtkContextScene::AddItem | ( | vtkAbstractContextItem * | item | ) |
Add child items to this item. Increments reference count of item.
bool vtkContextScene::RemoveItem | ( | vtkAbstractContextItem * | item | ) |
Remove child item from this item. Decrements reference count of item.
item | the item to be removed. |
bool vtkContextScene::RemoveItem | ( | unsigned int | index | ) |
Remove child item from this item. Decrements reference count of item.
index | of the item to be removed. |
vtkAbstractContextItem* vtkContextScene::GetItem | ( | unsigned int | index | ) |
Get the item at the specified index.
unsigned int vtkContextScene::GetNumberOfItems | ( | ) |
Get the number of child items.
void vtkContextScene::ClearItems | ( | ) |
Remove all child items from this item.
|
virtual |
Set the vtkAnnotationLink for the chart.
|
virtual |
Get the vtkAnnotationLink for the chart.
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 |
Get the width and height of the scene in pixels.
Get the width and height of the scene in pixels.
|
virtual |
Get the width and height of the scene in pixels.
|
virtual |
Set whether the scene should use the color buffer. Default is true.
|
virtual |
Get whether the scene is using the color buffer. Default is true.
|
virtual |
Get the width of the view
|
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.
|
virtual |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
|
virtual |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
|
virtual |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
|
virtual |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
vtkVector2i vtkContextScene::GetLogicalTileScale | ( | ) |
The tile scale of the target vtkRenderWindow. Hardcoded pixel offsets, etc should properly account for these <x, y> scale factors. This will simply return vtkVector2i(1, 1) if ScaleTiles is false or if this->Renderer is NULL.
|
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.
bool vtkContextScene::GetDirty | ( | ) | const |
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 |
Set the transform for the scene.
vtkTransform2D* vtkContextScene::GetTransform | ( | ) |
Get the transform for the scene.
|
inline |
Check whether the scene has a transform.
Definition at line 174 of file vtkContextScene.h.
|
protectedvirtual |
Process a rubber band selection event.
|
protectedvirtual |
Process a mouse move event.
|
protectedvirtual |
Process a mouse button press event.
|
protectedvirtual |
Process a mouse button release event.
|
protectedvirtual |
Process a mouse button double click event.
|
protectedvirtual |
Process a mouse wheel event where delta is the movement forward or back.
|
protectedvirtual |
Process a key press event.
|
protectedvirtual |
Process a key release event.
|
protectedvirtual |
Paint the scene in a special mode to build a cache for picking. Use internally.
|
protected |
Test if BufferId is supported by the OpenGL context.
Return the item id under mouse cursor at position (x,y). Return -1 if there is no item under the mouse cursor.
|
protected |
Return the item under the mouse. If no item is under the mouse, the method returns a null pointer.
|
protected |
Make sure the buffer id used for picking is up-to-date.
|
friend |
The vtkContextInteractorStyle class delegates all of the events to the scene, accessing protected API.
Definition at line 242 of file vtkContextScene.h.
|
protected |
Definition at line 235 of file vtkContextScene.h.
|
protected |
Definition at line 238 of file vtkContextScene.h.
|
protected |
Definition at line 246 of file vtkContextScene.h.
|
protected |
This structure provides a list of children, along with convenience functions to paint the children etc. It is derived from std::vector<vtkAbstractContextItem>, defined in a private header.
Definition at line 253 of file vtkContextScene.h.
|
protected |
Definition at line 255 of file vtkContextScene.h.
|
protected |
Definition at line 257 of file vtkContextScene.h.
|
protected |
Definition at line 259 of file vtkContextScene.h.
|
protected |
Definition at line 260 of file vtkContextScene.h.
|
protected |
Definition at line 262 of file vtkContextScene.h.
|
protected |
Definition at line 264 of file vtkContextScene.h.
|
protected |
Definition at line 265 of file vtkContextScene.h.
|
protected |
Definition at line 267 of file vtkContextScene.h.
|
protected |
The scene level transform.
Definition at line 270 of file vtkContextScene.h.