VTK  9.4.20250509
vtkTextPropertyCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
17#ifndef vtkTextPropertyCollection_h
18#define vtkTextPropertyCollection_h
19
20#include "vtkCollection.h"
21#include "vtkRenderingCoreModule.h" // For export macro
22#include "vtkTextProperty.h" // for inline functions
23#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24
25VTK_ABI_NAMESPACE_BEGIN
26class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkTextPropertyCollection : public vtkCollection
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
36 void AddItem(vtkTextProperty* a);
37
41 vtkTextProperty* GetNextItem();
42
46 vtkTextProperty* GetItem(int idx);
47
51 vtkTextProperty* GetLastItem();
52
57 vtkTextProperty* GetNextTextProperty(vtkCollectionSimpleIterator& cookie);
58
59protected:
62
63private:
64 // hide the standard AddItem from the user and the compiler.
65 void AddItem(vtkObject* o);
66
68 void operator=(const vtkTextPropertyCollection&) = delete;
69};
70
72{
74}
75
77{
78 return static_cast<vtkTextProperty*>(this->GetNextItemAsObject());
79}
80
82{
83 return static_cast<vtkTextProperty*>(this->GetItemAsObject(idx));
84}
85
87{
88 if (this->Bottom == nullptr)
89 {
90 return nullptr;
91 }
92 else
93 {
94 return static_cast<vtkTextProperty*>(this->Bottom->Item);
95 }
96}
97
100{
101 return static_cast<vtkTextProperty*>(this->GetNextItemAsObject(it));
102}
103
105{
106 this->vtkCollection::AddItem(o);
107}
108
109VTK_ABI_NAMESPACE_END
110#endif
create and manipulate ordered lists of objects
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetItemAsObject(int i) VTK_FUTURE_CONST
Get the i'th item in the collection.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
an ordered list of vtkTextProperty objects.
vtkTextProperty * GetNextTextProperty(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkTextProperty *a)
Add a vtkTextProperty to the bottom of the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTextProperty * GetNextItem()
Get the next vtkTextProperty in the list.
vtkTextProperty * GetLastItem()
Get the last TextProperty in the list.
~vtkTextPropertyCollection() override
static vtkTextPropertyCollection * New()
vtkTextProperty * GetItem(int idx)
Get the vtkTextProperty at the specified index.
represent text properties.
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO