28#ifndef vtkContextScenePrivate_h
29#define vtkContextScenePrivate_h
63 typedef std::vector<vtkAbstractContextItem*>::iterator
iterator;
75 if ((*it)->GetVisible())
77 (*it)->Paint(context);
93 this->push_back(item);
94 return static_cast<unsigned int>(this->size() - 1);
103 for (
iterator it = this->begin(); it != this->end(); ++it)
124 if (index < this->size())
140 (*it)->SetParent(
nullptr);
141 (*it)->SetScene(
nullptr);
154 if (this->
Scene == scene)
161 (*it)->SetScene(scene);
base class for items that are part of a vtkContextScene.
virtual void SetParent(vtkAbstractContextItem *parent)
Set the parent item.
virtual void SetScene(vtkContextScene *scene)
Set the vtkContextScene for the item, always set for an item in a scene.
Class for drawing 2D primitives to a graphical context.
Private implementation for scene/items.
unsigned int AddItem(vtkAbstractContextItem *item)
Add an item to the list - ensure it is not already in the list.
bool RemoveItem(unsigned int index)
Remove an item from the list.
vtkAbstractContextItem * Item
Store a reference to the item that these children are part of.
bool RemoveItem(vtkAbstractContextItem *item)
Remove an item from the list.
std::vector< vtkAbstractContextItem * >::const_iterator const_iterator
A few standard defines.
void SetScene(vtkContextScene *scene)
Set the scene for the instance (and its items).
void PaintItems(vtkContext2D *context)
Paint all items in the list.
~vtkContextScenePrivate()
Destructor.
void Clear()
Clear all items from the list - unregister.
vtkContextScene * Scene
Store a reference to the scene.
std::vector< vtkAbstractContextItem * >::iterator iterator
A few standard defines.
std::vector< vtkAbstractContextItem * >::reverse_iterator reverse_iterator
A few standard defines.
std::vector< vtkAbstractContextItem * >::const_reverse_iterator const_reverse_iterator
A few standard defines.
vtkContextScenePrivate(vtkAbstractContextItem *item)
Default constructor.
Provides a 2D scene for vtkContextItem objects.
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).