13#ifndef ML_STYLE_PALETTE_H
14#define ML_STYLE_PALETTE_H
35#define MKT_DASH (static_cast<int>(StylePalette::mktDash))
static const int defaultNumStyles
Default number of styles (=12).
Vector3 getColor(MLssize_t index) const
~StylePalette() override
Destructor.
void copyStylesFrom(const StylePalette &palette)
Copy style palette from palette.
virtual StylePalette * clone() const
Create a clone of the StylePalette.
const char * getLineStyleName(LineStyle lst) const
Get name of line style lst.
std::string getName(MLssize_t index) const
void setColorDefaults()
Set color default values.
StylePalette * deepCopy() const override
int getMarkerSize(MLssize_t index) const
void setAntiAlias(MLssize_t index, bool aa)
void setLineWidth(MLssize_t index, int lw)
MarkerType
Marker type constants.
@ mktDash
Special marker type used for error bars.
void setLineStyle(MLssize_t index, LineStyle lst)
void addStateToTree(TreeNode *parent) const override
Attach the object state as children of the given parent node.
LineStyle
Line style constants.
static const char *const markerTypeNames[mktNumMarkerTypes]
Name constants for marker types.
int getLineWidth(MLssize_t index) const
static const char *const lineStyleNames[lstNumLineStyles]
Name constants for line styles.
ML_SET_ADDSTATE_VERSION(0)
Sets addState version number.
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 w...
MLssize_t getNumStyles() const
void dumpStyles()
Dump current style definitions to cout.
void setName(MLssize_t index, const std::string &n)
void setColor(MLssize_t index, const Vector3 &color)
StylePalette(MLssize_t numStyles)
void readStateFromTree(TreeNode *parent) override
Read the object state from the children of the given parent node.
const char * getMarkerTypeName(MarkerType mkt) const
Get name of marker type mkt.
void setColor(MLssize_t index, float r, float g, float b)
void clear()
Deallocate style definition arrays.
MarkerType getMarkerType(MLssize_t index) const
LineStyle getLineStyle(MLssize_t index) const
bool getAntiAlias(MLssize_t index) const
void setMarkerType(MLssize_t index, MarkerType mkt)
MLssize_t getAutoStyleIndex(MLssize_t n)
MLssize_t getReservedEntries() const
void setReservedEntries(MLssize_t reserved)
void getColor(MLssize_t index, float &r, float &g, float &b) const
void setMarkerSize(MLssize_t index, int ms)
void setNumStyles(MLssize_t newNumStyles)
StylePalette(const StylePalette &palette)
void init(MLssize_t numStyles)
Allocate style definition arrays.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
#define ML_CLASS_HEADER(className)
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...
Tvec3< MLdouble > Vector3
A vector with three components of type double.