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