#include <DisplayParams.h>
Inheritance diagram for TSE3::DisplayParams:
Public Types | |
enum | DrawingStyle { Default, PresetColour, Colour, None } |
enum | PresetColours { Intro, Verse, Chorus, Bridge, Coda, Refrain, Melody, Solo, Backing, Brass, Percussion, Drums, Guitar, Bass, Flute, Strings, Keyboard, Piano, Saxophone, NoPresetColours } |
Public Member Functions | |
DisplayParams () | |
DisplayParams (const DisplayParams &) | |
virtual | ~DisplayParams () |
DisplayParams & | operator= (const DisplayParams &) |
int | style () |
void | setStyle (int s) |
int | presetColour () const |
void | setPresetColour (int pc) |
void | colour (int &r, int &g, int &b) |
void | setColour (int r, int g, int b) |
virtual void | save (std::ostream &o, int i) const |
virtual void | load (std::istream &in, SerializableLoadInfo &info) |
Static Public Member Functions | |
const char * | presetColourString (int pc) |
The DisplayParams class holds data related to how a TSE3 object should be drawn on the screen by some application that uses the TSE3 library.
This is perhaps unusual for a pure 'sequencer engine' library, however it is a useful piece of application support. It also ensures that different applications based on TSE3 will display Song data in a relatively similar manner (as deemed appropriate).
Obviously, TSE3 does not use these display values itself (since it does no displaying whatsoever). An application is not required to use the information in this class; however for inter-application constency it is encouraged.
The classes that contain a DisplayParams object are:
The Part's DisplayParams are considered to 'override' that of it's Phrase.The DisplayParams object allows an object to be displayed in a number of different states (see the DrawingStyle enum type). For some of these states the DisplayParams object holds extra information (for example a specific colour).
|
Enum type describing how colour should be displayed. The values are:
|
|
As enum type describing a number of preset 'global' colours. The user may choose to display a DisplayParams object with a specific colour (see setColour()) or use a global colour from this list. The PresetColours object provides a central definiton of the colour rgb values.
The final anum value ( |
|
The default DisplayParams has the DrawingStyle None (but the colour() set to white, and presetColour() set to Verse). |
|
|
|
|
|
|
|
Returns a string containing a English representation of the specified PresetColours value.
|
|
Returns the drawing style of this displayable object. The value is defined by the DrawingStyle enum type.
|
|
Sets the draing style of this displayable object. The value is defined by the DrawingStyle enum type.
|
|
Returns the selected preset colour in the reference parameters. The colour is defined by the PresetColours enum type. This describes the colour used when in the PresetColour style(). Note that although you can specify both a presetColour and a colour, only one of them (or possibly neither) will be used at any once time, as specified by the style() method.
|
|
Sets the preset colour value.
|
|
Returns the selected colour in the reference parameters. The colour is returned as RGB values, each between 0-255. This is the colour used when in the Colour style(). Note that although you can specify both a presetColour and a colour, only one of them (or possibly neither) will be used at any once time, as specified by the style() method.
|
|
Sets the colour value.
|
|
Reimplemented from TSE3::Serializable. |
|
Reimplemented from TSE3::Serializable. |