Mercurial > hg > svgui
diff layer/Layer.h @ 287:cd2492c5fe45
* Add SingleColourLayer to manage colours for layers that have a single
predominant colour (i.e. most of them).
author | Chris Cannam |
---|---|
date | Thu, 12 Jul 2007 16:14:59 +0000 |
parents | 86a112b5b319 |
children | 5c59c433b358 |
line wrap: on
line diff
--- a/layer/Layer.h Wed Jul 11 20:46:37 2007 +0000 +++ b/layer/Layer.h Thu Jul 12 16:14:59 2007 +0000 @@ -229,15 +229,33 @@ */ virtual bool isLayerOpaque() const { return false; } + enum ColourSignificance { + ColourAbsent, + ColourIrrelevant, + ColourDistinguishes, + ColourAndBackgroundSignificant, + ColourHasMeaningfulValue + }; + /** - * This should return true if the layer uses colours to indicate - * meaningful information (as opposed to just using a single - * colour of the user's choice). If this is the case, the view - * will show selections using unfilled rectangles instead of - * translucent filled rectangles, so as not to disturb the colours - * underneath. + * This should return the degree of meaning associated with colour + * in this layer. + * + * If ColourAbsent, the layer does not use colour. If + * ColourIrrelevant, the layer is coloured and the colour may be + * set by the user, but it doesn't really matter what the colour + * is (for example, in a time ruler layer). If + * ColourDistinguishes, then the colour is used to distinguish + * this layer from other similar layers (e.g. for data layers). + * If ColourAndBackgroundSignificant, then the layer should be + * given greater weight than ColourDistinguishes layers when + * choosing a background colour (e.g. for waveforms). If + * ColourHasMeaningfulValue, colours are actually meaningful -- + * the view will then show selections using unfilled rectangles + * instead of translucent filled rectangles, so as not to disturb + * the colours underneath. */ - virtual bool isLayerColourSignificant() const { return false; } + virtual ColourSignificance getLayerColourSignificance() const = 0; /** * This should return true if the layer can be edited by the user.