VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkCategoryLegend Class Reference

Legend item to display categorical data. More...

#include <vtkCategoryLegend.h>

Inheritance diagram for vtkCategoryLegend:
[legend]
Collaboration diagram for vtkCategoryLegend:
[legend]

Public Types

typedef vtkChartLegend Superclass
 
enum  { VERTICAL = 0, HORIZONTAL }
 
- Public Types inherited from vtkChartLegend
enum  {
  LEFT = 0, CENTER, RIGHT, TOP,
  BOTTOM, CUSTOM
}
 
typedef vtkContextItem Superclass
 
- Public Types inherited from vtkContextItem
typedef vtkAbstractContextItem Superclass
 
- Public Types inherited from vtkAbstractContextItem
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkCategoryLegendNewInstance () const
 
virtual bool Paint (vtkContext2D *painter)
 
virtual vtkRectf GetBoundingRect (vtkContext2D *painter)
 
virtual void SetScalarsToColors (vtkScalarsToColors *stc)
 
virtual vtkScalarsToColorsGetScalarsToColors ()
 
virtual vtkVariantArrayGetValues ()
 
virtual void SetValues (vtkVariantArray *)
 
virtual void SetTitle (const vtkStdString &title)
 
virtual vtkStdString GetTitle ()
 
virtual vtkStdString GetOutlierLabel ()
 
virtual void SetOutlierLabel (vtkStdString)
 
- Public Member Functions inherited from vtkChartLegend
vtkChartLegendNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
void SetPoint (const vtkVector2f &point)
 
const vtkVector2fGetPointVector ()
 
virtual void SetLabelSize (int size)
 
virtual int GetLabelSize ()
 
void SetChart (vtkChart *chart)
 
vtkChartGetChart ()
 
virtual void Update ()
 
vtkPenGetPen ()
 
vtkBrushGetBrush ()
 
vtkTextPropertyGetLabelProperties ()
 
virtual bool Hit (const vtkContextMouseEvent &mouse)
 
virtual bool MouseMoveEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseButtonPressEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse)
 
virtual void SetPoint (float, float)
 
void SetPoint (float[2])
 
virtual floatGetPoint ()
 
virtual void GetPoint (float &, float &)
 
virtual void GetPoint (float[2])
 
virtual void SetHorizontalAlignment (int)
 
virtual int GetHorizontalAlignment ()
 
virtual void SetVerticalAlignment (int)
 
virtual int GetVerticalAlignment ()
 
virtual void SetPadding (int)
 
virtual int GetPadding ()
 
virtual void SetSymbolWidth (int)
 
virtual int GetSymbolWidth ()
 
virtual void SetInline (bool)
 
virtual bool GetInline ()
 
virtual void SetDragEnabled (bool)
 
virtual bool GetDragEnabled ()
 
virtual void SetCacheBounds (bool)
 
virtual bool GetCacheBounds ()
 
virtual void CacheBoundsOn ()
 
virtual void CacheBoundsOff ()
 
- Public Member Functions inherited from vtkContextItem
vtkContextItemNewInstance () const
 
virtual double GetOpacity ()
 
virtual void SetOpacity (double)
 
- Public Member Functions inherited from vtkAbstractContextItem
vtkAbstractContextItemNewInstance () const
 
virtual bool PaintChildren (vtkContext2D *painter)
 
virtual void ReleaseGraphicsResources ()
 
unsigned int AddItem (vtkAbstractContextItem *item)
 
bool RemoveItem (vtkAbstractContextItem *item)
 
bool RemoveItem (unsigned int index)
 
vtkAbstractContextItemGetItem (unsigned int index)
 
unsigned int GetItemIndex (vtkAbstractContextItem *item)
 
unsigned int GetNumberOfItems ()
 
void ClearItems ()
 
unsigned int Raise (unsigned int index)
 
unsigned int Lower (unsigned int index)
 
virtual vtkAbstractContextItemGetPickedItem (const vtkContextMouseEvent &mouse)
 
virtual bool MouseEnterEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseLeaveEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseDoubleClickEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta)
 
virtual bool KeyPressEvent (const vtkContextKeyEvent &key)
 
virtual void SetScene (vtkContextScene *scene)
 
virtual void SetParent (vtkAbstractContextItem *parent)
 
virtual vtkVector2f MapToParent (const vtkVector2f &point)
 
virtual vtkVector2f MapFromParent (const vtkVector2f &point)
 
virtual vtkVector2f MapToScene (const vtkVector2f &point)
 
virtual vtkVector2f MapFromScene (const vtkVector2f &point)
 
virtual unsigned int StackAbove (unsigned int index, unsigned int under)
 
virtual unsigned int StackUnder (unsigned int child, unsigned int above)
 
virtual bool KeyReleaseEvent (const vtkContextKeyEvent &key)
 
vtkContextSceneGetScene ()
 
vtkAbstractContextItemGetParent ()
 
virtual bool GetVisible ()
 
virtual void SetVisible (bool)
 
virtual bool GetInteractive ()
 
virtual void SetInteractive (bool)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkCategoryLegendSafeDownCast (vtkObjectBase *o)
 
static vtkCategoryLegendNew ()
 
- Static Public Member Functions inherited from vtkChartLegend
static int IsTypeOf (const char *type)
 
static vtkChartLegendSafeDownCast (vtkObjectBase *o)
 
static vtkChartLegendNew ()
 
- Static Public Member Functions inherited from vtkContextItem
static int IsTypeOf (const char *type)
 
static vtkContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractContextItem
static int IsTypeOf (const char *type)
 
static vtkAbstractContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkCategoryLegend ()
 
virtual ~vtkCategoryLegend ()
 
- Protected Member Functions inherited from vtkChartLegend
 vtkChartLegend ()
 
 ~vtkChartLegend ()
 
- Protected Member Functions inherited from vtkContextItem
 vtkContextItem ()
 
 ~vtkContextItem ()
 
- Protected Member Functions inherited from vtkAbstractContextItem
 vtkAbstractContextItem ()
 
 ~vtkAbstractContextItem ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

bool HasOutliers
 
float TitleWidthOffset
 
vtkScalarsToColorsScalarsToColors
 
vtkStdString OutlierLabel
 
vtkStdString Title
 
vtkNew< vtkTextPropertyTitleProperties
 
vtkVariantArrayValues
 
- Protected Attributes inherited from vtkChartLegend
floatPoint
 
int HorizontalAlignment
 
int VerticalAlignment
 
vtkNew< vtkPenPen
 
vtkNew< vtkBrushBrush
 
vtkNew< vtkTextPropertyLabelProperties
 
bool DragEnabled
 
bool CacheBounds
 
int Button
 
vtkTimeStamp PlotTime
 
vtkTimeStamp RectTime
 
vtkRectf Rect
 
int Padding
 
int SymbolWidth
 
bool Inline
 
Private * Storage
 
- Protected Attributes inherited from vtkContextItem
double Opacity
 
- Protected Attributes inherited from vtkAbstractContextItem
vtkContextSceneScene
 
vtkAbstractContextItemParent
 
vtkContextScenePrivateChildren
 
bool Visible
 
bool Interactive
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Legend item to display categorical data.

vtkCategoryLegend will display a label and color patch for each value in a categorical data set. To use this class, you must first populate a vtkScalarsToColors by using the SetAnnotation() method. The other input to this class is a vtkVariantArray. This should contain the annotated values from the vtkScalarsToColors that you wish to include within the legend.

Tests:
vtkCategoryLegend (Tests)

Definition at line 43 of file vtkCategoryLegend.h.

Member Typedef Documentation

Definition at line 46 of file vtkCategoryLegend.h.

Member Enumeration Documentation

anonymous enum

Enum of legend orientation types

Enumerator
VERTICAL 
HORIZONTAL 

Definition at line 51 of file vtkCategoryLegend.h.

Constructor & Destructor Documentation

vtkCategoryLegend::vtkCategoryLegend ( )
protected
virtual vtkCategoryLegend::~vtkCategoryLegend ( )
protectedvirtual

Member Function Documentation

static int vtkCategoryLegend::IsTypeOf ( const char *  type)
static
virtual int vtkCategoryLegend::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkChartLegend.

static vtkCategoryLegend* vtkCategoryLegend::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkCategoryLegend::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkChartLegend.

vtkCategoryLegend* vtkCategoryLegend::NewInstance ( ) const
static vtkCategoryLegend* vtkCategoryLegend::New ( )
static
virtual bool vtkCategoryLegend::Paint ( vtkContext2D painter)
virtual

Paint the legend into a rectangle defined by the bounds.

Reimplemented from vtkChartLegend.

virtual vtkRectf vtkCategoryLegend::GetBoundingRect ( vtkContext2D painter)
virtual

Compute and return the lower left corner of this legend, along with its width and height.

Reimplemented from vtkChartLegend.

virtual void vtkCategoryLegend::SetScalarsToColors ( vtkScalarsToColors stc)
virtual

Get/Set the vtkScalarsToColors used to draw this legend. Since this legend represents categorical data, this vtkScalarsToColors must have been populated using SetAnnotation().

virtual vtkScalarsToColors* vtkCategoryLegend::GetScalarsToColors ( )
virtual

Get/Set the vtkScalarsToColors used to draw this legend. Since this legend represents categorical data, this vtkScalarsToColors must have been populated using SetAnnotation().

virtual vtkVariantArray* vtkCategoryLegend::GetValues ( )
virtual

Get/Set the array of values that will be represented by this legend. This array must contain distinct annotated values from the ScalarsToColors. Each value in this array will be drawn as a separate entry within this legend.

virtual void vtkCategoryLegend::SetValues ( vtkVariantArray )
virtual

Get/Set the array of values that will be represented by this legend. This array must contain distinct annotated values from the ScalarsToColors. Each value in this array will be drawn as a separate entry within this legend.

virtual void vtkCategoryLegend::SetTitle ( const vtkStdString title)
virtual

Get/set the title text of the legend.

virtual vtkStdString vtkCategoryLegend::GetTitle ( )
virtual

Get/set the title text of the legend.

virtual vtkStdString vtkCategoryLegend::GetOutlierLabel ( )
virtual

Get/set the label to use for outlier data.

virtual void vtkCategoryLegend::SetOutlierLabel ( vtkStdString  )
virtual

Get/set the label to use for outlier data.

Member Data Documentation

bool vtkCategoryLegend::HasOutliers
protected

Definition at line 97 of file vtkCategoryLegend.h.

float vtkCategoryLegend::TitleWidthOffset
protected

Definition at line 98 of file vtkCategoryLegend.h.

vtkScalarsToColors* vtkCategoryLegend::ScalarsToColors
protected

Definition at line 99 of file vtkCategoryLegend.h.

vtkStdString vtkCategoryLegend::OutlierLabel
protected

Definition at line 100 of file vtkCategoryLegend.h.

vtkStdString vtkCategoryLegend::Title
protected

Definition at line 101 of file vtkCategoryLegend.h.

vtkNew<vtkTextProperty> vtkCategoryLegend::TitleProperties
protected

Definition at line 102 of file vtkCategoryLegend.h.

vtkVariantArray* vtkCategoryLegend::Values
protected

Definition at line 103 of file vtkCategoryLegend.h.


The documentation for this class was generated from the following file: