Lomse library. API documentation  0.30.0
SingleSystemView Class Reference

#include <lomse_graphic_view.h>

Inheritance diagram for SingleSystemView:
GraphicView

Detailed Description

SingleSystemView is a GraphicView for rendering documents that only contain one score (e.g. LDP files, LMD files with just one score, and score files imported from other formats such as MusicXML). If the document does not contains scores or contains more than one score, this view will display an empty view.

This view will display the score in a single system, as if the paper had infinite width. And for viewing the end of the score the user will have to scroll to the right.

When the displayed score does not end in barline but the staff lines continue running until the end of the page, the staff lines will be finished after running empty for the length of last occupied measure.

Margins

The score is displayed on a white paper and the margins around the score are as follows:

  • Top margin = document top margin + score top margin
  • Left margin = document left margin + score left margin
  • Bottom margin = Top margin
  • Right margin = Left margin

Background color

The white paper is surrounded by the background (gray color). As with all Views, the background color can be changed by invoking Interactor::set_view_background(). E.g. for suppressing the background:

m_pPresenter = lomse.open_document(k_view_single_system, filename);
if (SpInteractor spInteractor = m_pPresenter->get_interactor(0).lock())
{
spInteractor->set_view_background( Color(255,255,255) ); //white
...

AutoScroll

As playback advances the View generates EventUpdateViewport events so that measure being played is always totally visible.