Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::DisplayParams Class Reference

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

#include <DisplayParams.h>

Inheritance diagram for TSE3::DisplayParams:

Inheritance graph
[legend]
Collaboration diagram for TSE3::DisplayParams:

Collaboration graph
[legend]
List of all members.

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 ()
DisplayParamsoperator= (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)

Detailed Description

A collection of application display parameter values.

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.

Author:
Pete Goodliffe
Version:
3.00


Member Enumeration Documentation

enum TSE3::DisplayParams::DrawingStyle
 

Enum type describing how colour should be displayed.

The values are:

  • Default Do whatever the default for this displayable object is. Usually this will be the same as None - some default system drawing style will be used. Default may allow a colour to be used, for example when a Part is set to Default but its Phrase is set to UseColour.
  • PresetColour Display the object using the preset colour defined by this DisplayParams object (see presetColour())
  • Colour Display the object using the colour defined by this DisplayParams object (see colour()).
  • None Force no colour to be used, and the object to be displayed with some system default drawing style.
Enumeration values:
Default 
PresetColour 
Colour 
None 

enum TSE3::DisplayParams::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.

Enumeration values:
Intro 
Verse 
Chorus 
Bridge 
Coda 
Refrain 
Melody 
Solo 
Backing 
Brass 
Percussion 
Drums 
Guitar 
Bass 
Flute 
Strings 
Keyboard 
Piano 
Saxophone 
NoPresetColours 


Constructor & Destructor Documentation

TSE3::DisplayParams::DisplayParams  ) 
 

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

TSE3::DisplayParams::DisplayParams const DisplayParams  ) 
 

virtual TSE3::DisplayParams::~DisplayParams  )  [virtual]
 


Member Function Documentation

DisplayParams& TSE3::DisplayParams::operator= const DisplayParams  ) 
 

const char* TSE3::DisplayParams::presetColourString int  pc  )  [static]
 

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

Parameters:
pc PresetColours value to get string for
Returns:
String represeting pc

int TSE3::DisplayParams::style  )  [inline]
 

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 TSE3::DisplayParams::setStyle int  s  ) 
 

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

See also:
style

int TSE3::DisplayParams::presetColour  )  const [inline]
 

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 TSE3::DisplayParams::setPresetColour int  pc  ) 
 

Sets the preset colour value.

Parameters:
pc New preset colour
See also:
presetColour

void TSE3::DisplayParams::colour int &  r,
int &  g,
int &  b
[inline]
 

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:
r Integer the blue value is returned in (0-255)
g Integer the green value is returned in (0-255)
b Integer the red value is returned in (0-255)
See also:
setColour

void TSE3::DisplayParams::setColour int  r,
int  g,
int  b
 

Sets the colour value.

Parameters:
r New blue value (0-255)
g New green value (0-255)
b New red value (0-255)
See also:
colour

virtual void TSE3::DisplayParams::save std::ostream &  o,
int  i
const [virtual]
 

Reimplemented from TSE3::Serializable.

virtual void TSE3::DisplayParams::load std::istream &  in,
SerializableLoadInfo info
[virtual]
 

Reimplemented from TSE3::Serializable.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:05 2005 for TSE3 by doxygen 1.3.2