Planeshift
Public Member Functions

pawsSheetLine Class Reference

This class draws a musical staff on the widget and creates notes and chords that it can represent on the staff. More...

#include <pawssheetline.h>

List of all members.

Public Member Functions

virtual void Draw ()
 Draws the widget and all of it's children.
void DrawDoubleLine (int x, int y, int height)
 Draw the double line for the end of the sheet or for a repeat.
bool GetDoubleStaff ()
 Gets the staff status (double or single).
SheetLineGetLine ()
 Gets the sheet line drawn by this widget.
virtual bool OnMouseDown (int button, int modifiers, int x, int y)
 Manage mouse down event to test for and apply window changes.
 pawsSheetLine ()
 Constructor.
virtual bool PostSetup ()
 This is called after the widget and all of it's children have been created.
void SetDoubleStaff (bool doubleStaff)
 Sets the staff to be double or single.
void SetLine (SheetLine *sheetLine, bool resize=true)
 Sets the line to draw on the staff and update its size.
virtual ~pawsSheetLine ()
 Destructor.

Detailed Description

This class draws a musical staff on the widget and creates notes and chords that it can represent on the staff.

At the moment it supports only the font Sonora.

Definition at line 651 of file pawssheetline.h.


Constructor & Destructor Documentation

pawsSheetLine::pawsSheetLine ( )

Constructor.

virtual pawsSheetLine::~pawsSheetLine ( ) [virtual]

Destructor.


Member Function Documentation

virtual void pawsSheetLine::Draw ( ) [virtual]

Draws the widget and all of it's children.

Remarks:
Uses clipping rect of it's parent to define drawing area. If the drawing area defined is empty it returns.

Reimplemented from pawsWidget.

void pawsSheetLine::DrawDoubleLine ( int  x,
int  y,
int  height 
)

Draw the double line for the end of the sheet or for a repeat.

Parameters:
xthe ending horizontal position of the thick line (the second one).
ythe starting vertical position.
heightthe height of the double line.
bool pawsSheetLine::GetDoubleStaff ( ) [inline]

Gets the staff status (double or single).

Returns:
true if staff is double, false if it is single.

Definition at line 681 of file pawssheetline.h.

SheetLine* pawsSheetLine::GetLine ( ) [inline]

Gets the sheet line drawn by this widget.

Returns:
the sheet line drawn by this widget.

Definition at line 668 of file pawssheetline.h.

virtual bool pawsSheetLine::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

virtual bool pawsSheetLine::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

void pawsSheetLine::SetDoubleStaff ( bool  doubleStaff)

Sets the staff to be double or single.

Parameters:
doubleStafftrue to set double staff, false to set single.
void pawsSheetLine::SetLine ( SheetLine sheetLine,
bool  resize = true 
)

Sets the line to draw on the staff and update its size.

Parameters:
sheetLinethe line to be drawn.
resizetrue to resize the given line and its following, false to not resize.

The documentation for this class was generated from the following file: