VTK
|
Provides a 2D scene for vtkContextItem objects. More...
#include <vtkContextScene.h>
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 48 of file vtkContextScene.h.
typedef vtkObject vtkContextScene::Superclass |
Reimplemented from vtkObject.
Definition at line 51 of file vtkContextScene.h.
anonymous enum |
Enum of valid selection modes for charts in the scene
SELECTION_NONE | |
SELECTION_DEFAULT | |
SELECTION_ADDITION | |
SELECTION_SUBTRACTION | |
SELECTION_TOGGLE |
Definition at line 171 of file vtkContextScene.h.
vtkContextScene::vtkContextScene | ( | ) | [protected] |
vtkContextScene::~vtkContextScene | ( | ) | [protected] |
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 | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkContextScene::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
vtkContextScene* vtkContextScene::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
virtual void vtkContextScene::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
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
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 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
Get the width of the scene.
Get the height of the scene.
virtual void vtkContextScene::SetScaleTiles | ( | bool | ) | [virtual] |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
virtual bool vtkContextScene::GetScaleTiles | ( | ) | [virtual] |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
virtual void vtkContextScene::ScaleTilesOn | ( | ) | [virtual] |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
virtual void vtkContextScene::ScaleTilesOff | ( | ) | [virtual] |
Whether to scale the scene transform when tiling, for example when using vtkWindowToImageFilter to take a large screenshot. The default is true.
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.
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.
Release graphics resources hold by the scene.
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).
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.
Get the transform for the scene.
bool vtkContextScene::HasTransform | ( | ) | [inline] |
Check whether the scene has a transform.
Definition at line 167 of file vtkContextScene.h.
virtual bool vtkContextScene::ProcessSelectionEvent | ( | unsigned int | rect[5] | ) | [protected, virtual] |
Process a rubber band selection event.
virtual bool vtkContextScene::MouseMoveEvent | ( | const vtkContextMouseEvent & | event | ) | [protected, virtual] |
Process a mouse move event.
virtual bool vtkContextScene::ButtonPressEvent | ( | const vtkContextMouseEvent & | event | ) | [protected, virtual] |
Process a mouse button press event.
virtual bool vtkContextScene::ButtonReleaseEvent | ( | const vtkContextMouseEvent & | event | ) | [protected, virtual] |
Process a mouse button release event.
virtual bool vtkContextScene::DoubleClickEvent | ( | const vtkContextMouseEvent & | event | ) | [protected, virtual] |
Process a mouse button double click event.
virtual bool vtkContextScene::MouseWheelEvent | ( | int | delta, |
const vtkContextMouseEvent & | event | ||
) | [protected, virtual] |
Process a mouse wheel event where delta is the movement forward or back.
virtual bool vtkContextScene::KeyPressEvent | ( | const vtkContextKeyEvent & | keyEvent | ) | [protected, virtual] |
Process a key press event.
virtual bool vtkContextScene::KeyReleaseEvent | ( | const vtkContextKeyEvent & | keyEvent | ) | [protected, virtual] |
Process a key release event.
virtual void vtkContextScene::PaintIds | ( | ) | [protected, virtual] |
Paint the scene in a special mode to build a cache for picking. Use internally.
void vtkContextScene::TestBufferIdSupport | ( | ) | [protected] |
Test if BufferId is supported by the OpenGL context.
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.
vtkAbstractContextItem* vtkContextScene::GetPickedItem | ( | ) | [protected] |
Return the item under the mouse. If no item is under the mouse, the method returns a null pointer.
void vtkContextScene::UpdateBufferId | ( | ) | [protected] |
Make sure the buffer id used for picking is up-to-date.
friend class vtkContextInteractorStyle [friend] |
The vtkContextInteractorStyle class delegates all of the events to the scene, accessing protected API.
Definition at line 235 of file vtkContextScene.h.
vtkAnnotationLink* vtkContextScene::AnnotationLink [protected] |
Definition at line 228 of file vtkContextScene.h.
int vtkContextScene::Geometry[2] [protected] |
Definition at line 231 of file vtkContextScene.h.
Private* vtkContextScene::Storage [protected] |
Definition at line 239 of file vtkContextScene.h.
vtkContextScenePrivate* vtkContextScene::Children [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 246 of file vtkContextScene.h.
vtkWeakPointer<vtkContext2D> vtkContextScene::LastPainter [protected] |
Definition at line 248 of file vtkContextScene.h.
vtkWeakPointer<vtkRenderer> vtkContextScene::Renderer [protected] |
Definition at line 250 of file vtkContextScene.h.
vtkAbstractContextBufferId* vtkContextScene::BufferId [protected] |
Definition at line 252 of file vtkContextScene.h.
bool vtkContextScene::BufferIdDirty [protected] |
Definition at line 253 of file vtkContextScene.h.
bool vtkContextScene::UseBufferId [protected] |
Definition at line 255 of file vtkContextScene.h.
bool vtkContextScene::BufferIdSupportTested [protected] |
Definition at line 257 of file vtkContextScene.h.
bool vtkContextScene::BufferIdSupported [protected] |
Definition at line 258 of file vtkContextScene.h.
bool vtkContextScene::ScaleTiles [protected] |
Definition at line 260 of file vtkContextScene.h.
vtkTransform2D* vtkContextScene::Transform [protected] |
The scene level transform.
Definition at line 263 of file vtkContextScene.h.