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:
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 
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
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkTextPropertyCollection::GetNextTextProperty
vtkTextProperty * GetNextTextProperty(vtkCollectionSimpleIterator &cookie)
Definition: vtkTextPropertyCollection.h:99
vtkCollection.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTextPropertyCollection
a list of vtkTextProperty objects.
Definition: vtkTextPropertyCollection.h:36
vtkTextPropertyCollection::AddItem
void AddItem(vtkTextProperty *a)
Definition: vtkTextPropertyCollection.h:71
vtkTextPropertyCollection::GetNextItem
vtkTextProperty * GetNextItem()
Definition: vtkTextPropertyCollection.h:76
vtkTextPropertyCollection::GetLastItem
vtkTextProperty * GetLastItem()
Definition: vtkTextPropertyCollection.h:86
vtkTextProperty.h
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Definition: vtkCollection.h:156
vtkCollection
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:53
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
vtkCollection::GetItemAsObject
vtkObject * GetItemAsObject(int i)
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkTextPropertyCollection::GetItem
vtkTextProperty * GetItem(int idx)
Definition: vtkTextPropertyCollection.h:81
vtkCollection::AddItem
void AddItem(vtkObject *)
vtkTextPropertyCollection::New
static vtkTextPropertyCollection * New()
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15