class DisplayParams

A collection of application display parameter values. More...

Full nameTSE3::DisplayParams
Definition#include <DisplayParams.h>
InheritsTSE3::Notifier [public ], TSE3::Serializable [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Static Methods


Detailed Description

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).

Command classes

Use the following command classes to manipute this object in a undo/redo environment.

 DisplayParams ()

DisplayParams

The default DisplayParams has the DrawingStyle None (but the colour() set to white, and presetColour() set to Verse).

 DisplayParams (const DisplayParams &)

DisplayParams

 ~DisplayParams ()

~DisplayParams

[virtual]

DisplayParams & operator= (const DisplayParams &)

operator=

Reimplemented from Notifier.

enum DrawingStyle { Default, PresetColour, Colour, None }

DrawingStyle

Enum type describing how colour should be displayed.

The values are:

enum PresetColours { Intro, Verse, Chorus, Bridge, Coda, Refrain, Melody, Solo, Backing, Brass, Percussion, Drums, Guitar, Bass, Flute, Strings, Keyboard, Piano, Saxophone, NoPresetColours }

PresetColours

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 (NoPresetColours) is not a valid value but a descrition of the number of PresetColours available.

const char * presetColourString (int pc)

presetColourString

[static]

Returns a string containing a English representation of the specified PresetColours value.

Parameters:
pcPresetColours value to get string for

Returns: String represeting pc

int  style ()

style

Returns the drawing style of this displayable object.

The value is defined by the DrawingStyle enum type.

Returns: Whether to use to r, g, b values

See also: setStyle, colour, DrawingStyle

void  setStyle (int s)

setStyle

Sets the draing style of this displayable object. The value is defined by the DrawingStyle enum type.

See also: style

int  presetColour ()

presetColour

[const]

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.

Returns: Current preset colour

See also: setPresetColour

void  setPresetColour (int pc)

setPresetColour

Sets the preset colour value.

Parameters:
pcNew preset colour

See also: presetColour

void  colour (int &r, int &g, int &b)

colour

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.

Parameters:
rInteger the blue value is returned in (0-255)
gInteger the green value is returned in (0-255)
bInteger the red value is returned in (0-255)

See also: setColour

void  setColour (int r, int g, int b)

setColour

Sets the colour value.

Parameters:
rNew blue value (0-255)
gNew green value (0-255)
bNew red value (0-255)

See also: colour

void  save (std::ostream &o, int i)

save

[const virtual]

Reimplemented from Serializable for internal purposes..

void  load (std::istream &in, SerializableLoadInfo &info)

load

[virtual]

Reimplemented from Serializable for internal purposes..