Go to the documentation of this file.
27 #ifndef vtkAbstractContextItem_h
28 #define vtkAbstractContextItem_h
30 #include "vtkRenderingContext2DModule.h"
266 vtkGetMacro(Visible,
bool);
274 vtkSetMacro(Visible,
bool);
281 vtkGetMacro(Interactive,
bool);
288 vtkSetMacro(Interactive,
bool);
328 #endif //vtkContextItem_h
virtual vtkVector2f MapFromParent(const vtkVector2f &point)
Maps the point from the parent coordinate system.
data structure to represent mouse events.
data structure to represent key events.
vtkContextScene * GetScene()
Get the vtkContextScene for the item, always set for an item in a scene.
vtkContextScene * Scene
Point to the scene the item is on - can be null.
base class for items that are part of a vtkContextScene.
bool RemoveItem(vtkAbstractContextItem *item)
Remove child item from this item.
vtkIdType Raise(vtkIdType index)
Raises the child to the top of the item's stack.
virtual vtkVector2f MapToScene(const vtkVector2f &point)
Maps the point to the scene coordinate system.
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
Key press event.
abstract base class for most VTK objects
virtual vtkAbstractContextItem * GetPickedItem(const vtkContextMouseEvent &mouse)
Return the item under the mouse.
Class for drawing 2D primitives to a graphical context.
bool RemoveItem(vtkIdType index)
Remove child item from this item.
vtkAbstractContextItem * Parent
Point to the parent item - can be null.
virtual vtkVector2f MapFromScene(const vtkVector2f &point)
Maps the point from the scene coordinate system.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Provides a 2D scene for vtkContextItem objects.
bool Visible
Store the visibility of the item (default is true).
virtual vtkVector2f MapToParent(const vtkVector2f &point)
Maps the point to the parent coordinate system.
a simple class to control print indentation
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
virtual vtkIdType StackAbove(vtkIdType index, vtkIdType under)
Raises the child above the under sibling.
vtkAbstractContextItem * GetItem(vtkIdType index)
Get the item at the specified index.
Private implementation for scene/items.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
virtual vtkIdType StackUnder(vtkIdType child, vtkIdType above)
Lowers the child under the above sibling.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
vtkContextScenePrivate * Children
This structure provides a list of children, along with convenience functions to paint the children et...
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
virtual void SetScene(vtkContextScene *scene)
Set the vtkContextScene for the item, always set for an item in a scene.
vtkIdType Lower(vtkIdType index)
Lowers the child to the bottom of the item's stack.
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
vtkIdType AddItem(vtkAbstractContextItem *item)
Add child items to this item.
virtual void SetParent(vtkAbstractContextItem *parent)
Set the parent item.
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event.
virtual bool KeyReleaseEvent(const vtkContextKeyEvent &key)
Key release event.
vtkAbstractContextItem * GetParent()
Get the parent item.
void ClearItems()
Remove all child items from this item.
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
vtkIdType GetNumberOfItems()
Get the number of child items.
~vtkAbstractContextItem() override
bool Interactive
Store whether the item should respond to interactions (default is true).
virtual bool PaintChildren(vtkContext2D *painter)
Paint the children of the item, should be called whenever the children need to be rendered.
vtkIdType GetItemIndex(vtkAbstractContextItem *item)
Get the index of the specified item in itemIndex.
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Mouse wheel event, positive delta indicates forward movement of the wheel.
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
virtual void ReleaseGraphicsResources()
Release graphics resources hold by the item.