16#ifndef vtkContextScenePrivate_h
17#define vtkContextScenePrivate_h
25VTK_ABI_NAMESPACE_BEGIN
48 os << indent <<
"Number of children: " << this->size() <<
'\n';
49 os << indent <<
"Scene: " << this->
Scene <<
'\n';
61 typedef std::vector<vtkAbstractContextItem*>::iterator
iterator;
73 if ((*it)->GetVisible())
75 (*it)->Paint(context);
91 this->push_back(item);
92 return static_cast<unsigned int>(this->size() - 1);
101 for (
iterator it = this->begin(); it != this->end(); ++it)
122 if (index < this->size())
138 (*it)->SetParent(
nullptr);
139 (*it)->SetScene(
nullptr);
141 (*it)->ReleaseGraphicsResources();
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.
void PrintSelf(ostream &os, vtkIndent indent)
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
vtkIndent GetNextIndent()
Determine the next indentation level.
void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).