MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::options::LyricOptions Class Reference

Options controlling lyric rendering in the musx file. More...

#include <Options.h>

+ Inheritance diagram for musx::dom::options::LyricOptions:

Classes

struct  SyllablePosStyle
 Syllable position style. More...
 
struct  WordExtConnectStyle
 Word extension connection style. More...
 

Public Types

enum class  SmartHyphenStart { Always , Sometimes , Never }
 When to start hyphenation. More...
 
enum class  AutoNumberingAlign { None , Align }
 Autonumbering type. More...
 
enum class  WordExtConnectIndex {
  LyricRightBottom , HeadRightLyrBaseline , SystemLeft , SystemRight ,
  DotRightLyrBaseline , DurationLyrBaseline
}
 Word extension connection points.
 
enum class  WordExtConnectStyleType {
  DefaultStart , DefaultEnd , SystemStart , SystemEnd ,
  DottedEnd , DurationEnd , OneEntryEnd , ZeroLengthEnd ,
  ZeroOffset
}
 Word extension connection style categories.
 
enum class  SyllablePosStyleType { Default , WordExt , First , SystemStart }
 Lyric syllable position style types. More...
 
- Public Types inherited from musx::dom::EnigmaBase
enum class  ShareMode { All , Partial , None }
 Describes how this instance is shared between part and score. More...
 
using SharedNodes = std::set< std::string >
 The container type for shared nodes.
 

Public Member Functions

 LyricOptions (const DocumentWeakPtr &document, Cmper partId=0, ShareMode shareMode=ShareMode::All)
 Constructor.
 
void integrityCheck (const std::shared_ptr< EnigmaBase > &ptrToThis) override
 Performs a final consistency check after population.
 
- Public Member Functions inherited from musx::dom::EnigmaBase
Cmper getSourcePartId () const
 Gets the source partId for this instance. If an instance is fully shared with the score, the source is SCORE_PARTID. If an instance is partially shared or non shared, the source is the ID of the part that sourced it.
 
ShareMode getShareMode () const
 Gets the sharing mode for this instance.
 
const SharedNodesgetUnlinkedNodes () const
 Gets the unlinked nodes for this instance. (Only populated for ShareMode::Partial)
 
void addUnlinkedNode (const std::string &nodeName)
 Adds a shared node for this instance.
 
virtual bool requireAllFields () const
 Returns true if all fields are required for valid input.
 
- Public Member Functions inherited from musx::dom::DocumentElement
virtual ~DocumentElement () noexcept(false)=default
 Virtual destructor for polymorphic behavior.
 
DocumentPtr getDocument () const
 Gets a reference to the Document.
 
Cmper getPartId () const
 Gets the part id associated with this instance.
 

Static Public Member Functions

static const xml::XmlElementArray< LyricOptions > & xmlMappingArray ()
 Required for musx::factory::FieldPopulator.
 

Public Attributes

char32_t hyphenChar {}
 "Hyphen Character"
 
Evpu maxHyphenSeparation {}
 "Maximum Space Between Hyphens"
 
Evpu wordExtVertOffset {}
 "Word Extension Vertical Offset from Baseline"
 
Evpu wordExtHorzOffset {}
 "Word Extension Horizontal Offset from Syllable"
 
bool useSmartWordExtensions {}
 "Use Smart Word Extensions"
 
bool useAltHyphenFont {}
 "Use Alternate Hyphen Font"
 
std::shared_ptr< FontInfoaltHyphenFont
 "Alternate Hyphen Font"
 
bool useSmartHyphens {}
 "Use Smart Hyphens"
 
SmartHyphenStart smartHyphenStart {}
 "Smart Hyphen Start"
 
bool wordExtNeedUnderscore {}
 "Only Create on Lyrics With Underscores"
 
Evpu wordExtMinLength {}
 "Word Extension Minimum Length"
 
bool wordExtOffsetToNotehead {}
 "Notehead Alignment: Align to Notehead" (if false: "Stretch to Note Duration")
 
bool lyricUseEdgePunctuation {}
 reverse of "Ignore SyllableEdgePunctuation"
 
std::string lyricPunctuationToIgnore
 If this string is omitted in the xml, the default value is populated in integrityCheck.
 
bool showAutoNumbersOnVerses {}
 Auto-Number -> Verses.
 
bool showAutoNumbersOnChoruses {}
 Auto-Number -> Choruses.
 
bool showAutoNumbersOnSections {}
 Auto-Number -> Sections.
 
AutoNumberingAlign lyricAutoNumType {}
 "Automatic Lyric Numbers"
 
Efix wordExtLineWidth {}
 "Word Extension Line Width"
 
std::unordered_map< SyllablePosStyleType, std::shared_ptr< SyllablePosStyle > > syllablePosStyles
 Syllable positioning styles.
 
std::unordered_map< WordExtConnectStyleType, std::shared_ptr< WordExtConnectStyle > > wordExtConnectStyles
 Word extension connection styles.
 

Static Public Attributes

static constexpr std::string_view XmlNodeName = "lyricOptions"
 The XML node name for this type.
 

Additional Inherited Members

- Protected Member Functions inherited from musx::dom::OptionsBase
 OptionsBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode)
 Constructs the OptionsBase and validates XmlNodeName in the derived class.
 
- Protected Member Functions inherited from musx::dom::EnigmaBase
 EnigmaBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode)
 Constructs the base class.
 
 EnigmaBase (const EnigmaBase &)=default
 explicit default copy constructor
 
 EnigmaBase (EnigmaBase &&) noexcept=default
 explicit default move constructor
 
EnigmaBaseoperator= (const EnigmaBase &)
 no-op copy assignment operator allows subclasses to copy their values.
 
EnigmaBaseoperator= (EnigmaBase &&) noexcept
 no-op move assignment operator allows subclasses to move their values.
 
- Protected Member Functions inherited from musx::dom::DocumentElement
 DocumentElement (const DocumentWeakPtr &document, Cmper partId)
 Constructs the document element.
 
 DocumentElement (const DocumentElement &)=default
 explicit default copy constructor
 
 DocumentElement (DocumentElement &&) noexcept=default
 explicit default move constructor
 
DocumentElementoperator= (const DocumentElement &)
 no-op copy assignment operator allows subclasses to copy their values.
 
DocumentElementoperator= (DocumentElement &&) noexcept
 no-op move assignment operator allows subclasses to move their values.
 

Detailed Description

Options controlling lyric rendering in the musx file.

This class is identified by the XML node name "lyricOptions".

Member Enumeration Documentation

◆ AutoNumberingAlign

Autonumbering type.

Enumerator
None 

"Keep with First Syllable in Lyric" (default value)

Align 

"Group Under the Same Note"

◆ SmartHyphenStart

When to start hyphenation.

Enumerator
Always 

"Always" (default value)

Sometimes 

"Only when the first syllable is attached to the second note or later"

Never 

"Never"

◆ SyllablePosStyleType

Lyric syllable position style types.

Enumerator
Default 

"Others:" (always on, even though the on member may be false)

WordExt 

"Syllables with Word Extensions"

First 

"First Syllable in Lyric"

SystemStart 

"Syllable at Start of System"

Member Function Documentation

◆ integrityCheck()

void musx::dom::options::LyricOptions::integrityCheck ( const std::shared_ptr< EnigmaBase > &  ptrToThis)
inlineoverridevirtual

Performs a final consistency check after population.

Reimplemented from musx::dom::EnigmaBase.