struct CCL::IColorPalette
Overview
#include <ipalette.h> struct IColorPalette: public CCL::IPalette { // methods virtual tbool CCL_API fromStyle (const IVisualStyle& style) = 0; virtual tbool CCL_API setColors ( const Color colors [], int count, int startIndex = 0 ) = 0; virtual const Color&CCL_API getColorAt (int index) const = 0; virtual const Color&CCL_API getNextColor ( const Color& color, tbool wrap = true, tbool autoRange = false ) const = 0; virtual const Color&CCL_API getPrevColor ( const Color& color, tbool wrap = true, tbool autoRange = false ) const = 0; virtual tbool CCL_API removeColors (int startIndex = 0, int count = 1) = 0; bool removeAll (); bool appendColor (ColorRef color); };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; virtual int CCL_API getCount () const = 0; virtual Variant CCL_API getAt (int index) const = 0; virtual int CCL_API getIndex (VariantRef element) const = 0; virtual tbool CCL_API getDimensions ( int& columns, int& cellWidth, int& cellHeight ) const = 0; virtual IImage*CCL_API createIcon ( int index, int width, int height, const IVisualStyle& style ) const = 0; virtual tbool CCL_API getTitle (String& title, int index) const = 0; virtual tbool CCL_API getID (MutableCString& id, int index) const = 0; virtual tbool CCL_API getCategory (String& category, int index) const = 0; virtual tbool CCL_API isEnabled (int index) const = 0;
Detailed Documentation
Methods
virtual tbool CCL_API fromStyle (const IVisualStyle& style) = 0
Get colors from a bitmap named “palette”, using the metrics “rows”, “columns”, “margin”, “spacing”.
virtual tbool CCL_API setColors ( const Color colors [], int count, int startIndex = 0 ) = 0
Add or replace colors in palette.
Colors in the palette will be replaced from startIndex on; use startIndex = -1 to append.
virtual const Color&CCL_API getColorAt (int index) const = 0
Get palette color by index.
virtual tbool CCL_API removeColors (int startIndex = 0, int count = 1) = 0
Remove colors in palette - ‘count’ colors in the palette will be removed from startIndex on; use count = -1 to remove all subsequent colors.
bool removeAll ()
helper method to remove all colors
bool appendColor (ColorRef color)
helper method to append single color