| 
    MeVisLab Toolbox Reference
    
   | 
 
Base object class StylePalette for providing a collection of colors, line styles and marker types. More...
#include <mlStylePalette.h>
  
Public Types | |
| enum | LineStyle {  lstNone = 0 , lstSolid , lstDashed , lstDotted , lstNumLineStyles }  | 
| Line style constants.  More... | |
| enum | MarkerType {  mktNone = 0 , mktDot , mktAsterisk , mktCircle , mktSquare , mktTriangle , mktPlus , mktCross , mktNumMarkerTypes , mktDash = -1 }  | 
| Marker type constants.  More... | |
  Public Types inherited from ml::Base | |
| enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } | 
| This enum describes the different persistence interfaces available.  More... | |
Public Member Functions | |
| ~StylePalette () override | |
| Destructor.   | |
| StylePalette & | operator= (const StylePalette &palette) | 
| Assignment operator.   | |
| MLssize_t | getAutoStyleIndex (MLssize_t n) | 
| Get index for automatic style n (>= 1).   | |
| void | copyStylesFrom (const StylePalette &palette) | 
| Copy style palette from palette.   | |
| void | setColorDefaults () | 
| Set color default values.   | |
| void | setMonoDefaults () | 
| Set monochrome default values.   | |
| const char * | getLineStyleName (LineStyle lst) const | 
| Get name of line style lst.   | |
| const char * | getMarkerTypeName (MarkerType mkt) const | 
| Get name of marker type mkt.   | |
| void | dumpStyles () | 
| Dump current style definitions to cout.   | |
| bool | getStyleIndexForName (const std::string curveTitle, std::vector< MLssize_t > &indices) | 
| Get style indices using name, writes all matching indices into vector, returns true if at least one was found.   | |
| void | addStateToTree (TreeNode *parent) const override | 
| Attach the object state as children of the given parent node.   | |
| void | readStateFromTree (TreeNode *parent) override | 
| Read the object state from the children of the given parent node.   | |
| ML_SET_ADDSTATE_VERSION (0) | |
| Sets addState version number.   | |
| virtual StylePalette * | clone () const | 
| Create a clone of the StylePalette.   | |
| StylePalette * | deepCopy () const override | 
| Creates a deep copy of the given object.   | |
Constructors  | |
| StylePalette () | |
| StylePalette (MLssize_t numStyles) | |
| StylePalette (const StylePalette &palette) | |
Get/set total number of styles  | |
| MLssize_t | getNumStyles () const | 
| void | setNumStyles (MLssize_t newNumStyles) | 
Get and set the color for given index.  | |
| Vector3 | getColor (MLssize_t index) const | 
| void | getColor (MLssize_t index, float &r, float &g, float &b) const | 
| void | setColor (MLssize_t index, const Vector3 &color) | 
| void | setColor (MLssize_t index, float r, float g, float b) | 
Get and set style for given index (range = [1..numStyles])  | |
| LineStyle | getLineStyle (MLssize_t index) const | 
| void | setLineStyle (MLssize_t index, LineStyle lst) | 
| int | getLineWidth (MLssize_t index) const | 
| void | setLineWidth (MLssize_t index, int lw) | 
Get and set the type for given index.  | |
| MarkerType | getMarkerType (MLssize_t index) const | 
| void | setMarkerType (MLssize_t index, MarkerType mkt) | 
| int | getMarkerSize (MLssize_t index) const | 
| void | setMarkerSize (MLssize_t index, int ms) | 
Get and set anti aliasing for a given index.  | |
| bool | getAntiAlias (MLssize_t index) const | 
| void | setAntiAlias (MLssize_t index, bool aa) | 
Get and set the name for a given index.  | |
| std::string | getName (MLssize_t index) const | 
| void | setName (MLssize_t index, const std::string &n) | 
Get/set number of reserved entries  | |
| MLssize_t | getReservedEntries () const | 
| void | setReservedEntries (MLssize_t reserved) | 
  Public Member Functions inherited from ml::Base | |
| Base () | |
| Constructor.   | |
| virtual | ~Base () | 
| Destructor.   | |
| bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const | 
| Checks whether this object's type is equal to or derived from one of the types given in the argument.   | |
| virtual bool | isRefCountedBase () const | 
| Returns whether the instance is derived from RefCountedBase.   | |
| virtual std::string | detailString () const | 
| Returns a string describing this object.   | |
| virtual bool | implementsPersistence (PersistenceInterface) const | 
| Override this method to declare which persistence interfaces are implemented by your derived class.   | |
| virtual std::string | persistentState () const | 
| Returns a string describing the object's internal state.   | |
| virtual void | setPersistentState (const std::string &state) | 
| Restores the object's internal state from a string that had been previously generated using persistentState().   | |
| virtual void | writeTo (AbstractPersistenceOutputStream *) const | 
| Writes the objects state to the data stream object.   | |
| virtual void | readFrom (AbstractPersistenceInputStream *, int) | 
| Reads the objects state from the data stream object.   | |
Static Public Attributes | |
| static const char *const | lineStyleNames [lstNumLineStyles] | 
| Name constants for line styles.   | |
| static const char *const | markerTypeNames [mktNumMarkerTypes] | 
| Name constants for marker types.   | |
| static const int | defaultNumStyles | 
| Default number of styles (=12)   | |
Protected Member Functions | |
| void | clear () | 
| Deallocate style definition arrays.   | |
| void | init (MLssize_t numStyles) | 
| Allocate style definition arrays.   | |
Base object class StylePalette for providing a collection of colors, line styles and marker types.
Definition at line 44 of file mlStylePalette.h.
Line style constants.
| Enumerator | |
|---|---|
| lstNone | |
| lstSolid | |
| lstDashed | |
| lstDotted | |
| lstNumLineStyles | |
Definition at line 64 of file mlStylePalette.h.
Marker type constants.
| Enumerator | |
|---|---|
| mktNone | |
| mktDot | |
| mktAsterisk | |
| mktCircle | |
| mktSquare | |
| mktTriangle | |
| mktPlus | |
| mktCross | |
| mktNumMarkerTypes | |
| mktDash | Special marker type used for error bars.  | 
Definition at line 73 of file mlStylePalette.h.
| ml::StylePalette::StylePalette | ( | ) | 
| ml::StylePalette::StylePalette | ( | MLssize_t | numStyles | ) | 
| ml::StylePalette::StylePalette | ( | const StylePalette & | palette | ) | 
      
  | 
  override | 
Destructor.
Attach the object state as children of the given parent node.
Reimplemented from ml::Base.
      
  | 
  protected | 
Deallocate style definition arrays.
      
  | 
  inlinevirtual | 
Create a clone of the StylePalette.
Definition at line 183 of file mlStylePalette.h.
| void ml::StylePalette::copyStylesFrom | ( | const StylePalette & | palette | ) | 
Copy style palette from palette.
      
  | 
  inlineoverridevirtual | 
Creates a deep copy of the given object.
The default implementation returns a NULL pointer and has to be overridden by derived classes. It can be used to clone Base objects without knowledge of the exact type of object.
Reimplemented from ml::Base.
Definition at line 184 of file mlStylePalette.h.
| void ml::StylePalette::dumpStyles | ( | ) | 
Dump current style definitions to cout.
Get index for automatic style n (>= 1).
Automatic styles cycle through indices in range [1..numStyles-reservedEntries].
Get name of line style lst.
Definition at line 156 of file mlStylePalette.h.
References mlrange_cast().
| MarkerType ml::StylePalette::getMarkerType | ( | MLssize_t | index | ) | const | 
      
  | 
  inline | 
Get name of marker type mkt.
Definition at line 161 of file mlStylePalette.h.
References mlrange_cast().
| std::string ml::StylePalette::getName | ( | MLssize_t | index | ) | const | 
      
  | 
  inline | 
Definition at line 102 of file mlStylePalette.h.
      
  | 
  inline | 
Definition at line 138 of file mlStylePalette.h.
| bool ml::StylePalette::getStyleIndexForName | ( | const std::string | curveTitle, | 
| std::vector< MLssize_t > & | indices ) | 
Get style indices using name, writes all matching indices into vector, returns true if at least one was found.
| ml::StylePalette::ML_SET_ADDSTATE_VERSION | ( | 0 | ) | 
Sets addState version number.
| StylePalette & ml::StylePalette::operator= | ( | const StylePalette & | palette | ) | 
Assignment operator.
Read the object state from the children of the given parent node.
Reimplemented from ml::Base.
| void ml::StylePalette::setColorDefaults | ( | ) | 
Set color default values.
| void ml::StylePalette::setMarkerType | ( | MLssize_t | index, | 
| MarkerType | mkt ) | 
| void ml::StylePalette::setMonoDefaults | ( | ) | 
Set monochrome default values.
Default number of styles (=12)
Definition at line 96 of file mlStylePalette.h.
      
  | 
  static | 
Name constants for line styles.
Definition at line 90 of file mlStylePalette.h.
      
  | 
  static | 
Name constants for marker types.
Definition at line 93 of file mlStylePalette.h.