89#ifndef vtkContextScene_h
90#define vtkContextScene_h
93#include "vtkRenderingContext2DModule.h"
98VTK_ABI_NAMESPACE_BEGIN
181 vtkSetVector2Macro(Origin,
int);
182 vtkGetVector2Macro(Origin,
int);
189 vtkSetVector2Macro(Geometry,
int);
196 vtkGetVector2Macro(Geometry,
int);
203 vtkSetMacro(UseBufferId,
bool);
210 vtkGetMacro(UseBufferId,
bool);
257 vtkSetMacro(ScaleTiles,
bool);
258 vtkGetMacro(ScaleTiles,
bool);
259 vtkBooleanMacro(ScaleTiles,
bool);
341 SELECTION_DEFAULT = 0,
2D array of ids, used for picking.
base class for items that are part of a vtkContextScene.
An algorithm for linking annotations among objects.
Class for drawing 2D primitives to a graphical context.
An interactor for chart views.
data structure to represent key events.
data structure to represent mouse events.
Private implementation for scene/items.
Provides a 2D scene for vtkContextItem objects.
bool BufferIdSupportTested
unsigned int AddItem(vtkAbstractContextItem *item)
Add child items to this item.
~vtkContextScene() override
bool RemoveItem(vtkAbstractContextItem *item)
Remove child item from this item.
virtual void SetTransform(vtkTransform2D *transform)
Set the transform for the scene.
virtual bool MouseWheelEvent(int delta, const vtkContextMouseEvent &event)
Process a mouse wheel event where delta is the movement forward or back.
virtual void SetAnnotationLink(vtkAnnotationLink *link)
Set the vtkAnnotationLink for the chart.
void ClearItems()
Remove all child items from this item.
vtkWeakPointer< vtkRenderer > Renderer
vtkAnnotationLink * AnnotationLink
virtual void PaintIds()
Paint the scene in a special mode to build a cache for picking.
void SetDirty(bool isDirty)
Inform the scene that something changed that requires a repaint of the scene.
unsigned int GetNumberOfItems()
Get the number of child items.
virtual int GetSceneLeft()
Get the left of the scene in screen coordinates.
vtkAbstractContextBufferId * BufferId
virtual int GetSceneBottom()
Get the bottom of the scene in screen coordinates.
void UpdateBufferId()
Make sure the buffer id used for picking is up-to-date.
SelectionModifier
Enum of valid selection modes for charts in the scene.
virtual bool KeyPressEvent(const vtkContextKeyEvent &keyEvent)
Process a key press event.
virtual int GetViewHeight()
Get the height of the view (render window) containing this scene.
bool RemoveItem(unsigned int index)
Remove child item from this item.
vtkWeakPointer< vtkContext2D > LastPainter
vtkWeakPointer< vtkContext2D > GetLastPainter()
Last painter used.
vtkVector2i GetLogicalTileScale()
The tile scale of the target vtkRenderWindow.
vtkTransform2D * GetTransform()
Get the transform for the scene.
bool GetDirty() const
Inform the scene that something changed that requires a repaint of the scene.
vtkAbstractContextBufferId * GetBufferId()
Return buffer id.
int GetSceneHeight()
Get the height of the scene.
vtkAbstractContextItem * GetPickedItem()
Return the item under the mouse.
virtual bool Paint(vtkContext2D *painter)
Paint event for the chart, called whenever the chart needs to be drawn.
void ReleaseGraphicsResources()
Release graphics resources hold by the scene.
virtual bool DoubleClickEvent(const vtkContextMouseEvent &event)
Process a mouse button double click event.
virtual void SetRenderer(vtkRenderer *renderer)
This should not be necessary as the context view should take care of rendering.
vtkAbstractContextItem * GetItem(unsigned int index)
Get the item at the specified index.
virtual vtkRenderer * GetRenderer()
This should not be necessary as the context view should take care of rendering.
virtual int GetViewWidth()
Get the width of the view (render window) containing this scene.
void TestBufferIdSupport()
Test if BufferId is supported by the OpenGL context.
vtkContextScenePrivate * Children
This structure provides a list of children, along with convenience functions to paint the children et...
bool HasTransform()
Check whether the scene has a transform.
virtual bool ProcessSelectionEvent(unsigned int rect[5])
Process a rubber band selection event.
int GetSceneWidth()
Get the width of the scene.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &event)
Process a mouse move event.
vtkIdType GetPickedItem(int x, int y)
Return the item id under mouse cursor at position (x,y).
vtkTransform2D * Transform
The scene level transform.
virtual bool ButtonPressEvent(const vtkContextMouseEvent &event)
Process a mouse button press event.
virtual bool KeyReleaseEvent(const vtkContextKeyEvent &keyEvent)
Process a key release event.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkContextScene * New()
Creates a 2D Painter object.
virtual bool ButtonReleaseEvent(const vtkContextMouseEvent &event)
Process a mouse button release event.
a simple class to control print indentation
abstract base class for most VTK objects
abstract specification for renderers
Some derived classes for the different vectors commonly used.
a weak reference to a vtkObject.