VTK
vtkTextPropertyCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTextPropertyCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkTextPropertyCollection_h
29 #define vtkTextPropertyCollection_h
30 
31 #include "vtkRenderingCoreModule.h" // For export macro
32 #include "vtkCollection.h"
33 #include "vtkTextProperty.h" // for inline functions
34 
36 {
37  public:
40  virtual void PrintSelf(ostream& os, vtkIndent indent);
41 
43  void AddItem(vtkTextProperty *a);
44 
46  vtkTextProperty *GetNextItem();
47 
49  vtkTextProperty *GetItem(int idx);
50 
52  vtkTextProperty *GetLastItem();
53 
56  vtkTextProperty *GetNextTextProperty(vtkCollectionSimpleIterator &cookie);
57 
58 protected:
60  ~vtkTextPropertyCollection();
61 
62 private:
63  // hide the standard AddItem from the user and the compiler.
64  void AddItem(vtkObject *o);
65 
66 private:
67  vtkTextPropertyCollection(const vtkTextPropertyCollection&); // Not implemented.
68  void operator=(const vtkTextPropertyCollection&); // Not implemented.
69 };
70 
71 inline void vtkTextPropertyCollection::AddItem(vtkTextProperty *a)
72 {
73  this->vtkCollection::AddItem(a);
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 == NULL )
89  {
90  return NULL;
91  }
92  else
93  {
94  return static_cast<vtkTextProperty *>(this->Bottom->Item);
95  }
96 }
97 
98 inline vtkTextProperty *
100 {
101  return static_cast<vtkTextProperty *>(this->GetNextItemAsObject(it));
102 }
103 
105 {
106  this->vtkCollection::AddItem(o);
107 }
108 
109 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkTextProperty * GetNextTextProperty(vtkCollectionSimpleIterator &cookie)
vtkTextProperty * GetItem(int idx)
abstract base class for most VTK objects
Definition: vtkObject.h:61
void AddItem(vtkTextProperty *a)
a list of vtkTextProperty objects.
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkCollection * New()
represent text properties.
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
#define VTKRENDERINGCORE_EXPORT
vtkObject * GetNextItemAsObject()
vtkObject * GetItemAsObject(int i)