MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::others::PageTextAssign Class Reference

Represents a page text assignment with positioning and page range properties. More...

#include <Others.h>

+ Inheritance diagram for musx::dom::others::PageTextAssign:

Public Types

enum class  HorizontalAlignment { Left , Center , Right }
 Horizontal alignment options for page text positioning.
 
enum class  VerticalAlignment { Top , Center , Bottom }
 Vertical alignment options for page text positioning.
 
- Public Types inherited from musx::dom::Base
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

 PageTextAssign (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, Inci inci)
 Constructor function.
 
- Public Member Functions inherited from musx::dom::OthersBase
Cmper getCmper () const
 Gets the cmper key value.
 
std::optional< IncigetInci () const
 Gets the optional array index (inci).
 
- Public Member Functions inherited from musx::dom::Base
virtual ~Base () noexcept(false)=default
 Virtual destructor for polymorphic behavior.
 
DocumentPtr getDocument () const
 Gets a reference to the Document.
 
Cmper getPartId () const
 Gets the partId for this instance (or 0 for score)
 
std::shared_ptr< others::PartDefinitiongetPartDefinition () const
 Gets the others::PartDefinition corresponding to getPartId.
 
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 void integrityCheck ()
 Allows a class to determine if it has been properly contructed by the factory and fix issues that it can, such as creating default instances of contained classes.
 
virtual bool requireAllFields () const
 Specifies if the parser should alert (print or throw) when an unknown xml tag is found for this class.
 

Static Public Member Functions

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

Public Attributes

Cmper block {}
 The Cmper for the assigned TextBlock. (xml tag is <block>)
 
Evpu xDisp {}
 The horizontal displacement from the default position. (xml tag is <xdisp>)
 
Evpu yDisp {}
 The vertical displacement from the default position. (xml tag is <ydisp>)
 
Cmper startPage {}
 If cmper is zero, the first page on which the text appears. (xml tag is <startPage>)
 
Cmper endPage {}
 
HorizontalAlignment hPosLp {}
 Horizontal alignment on left or all pages (depending on indRpPos). (xml tag is <hposLp>)
 
HorizontalAlignment hPosRp {}
 Horizontal alignment on right pages (if indRpPos is true). (xml tag is <hposRp>)
 
bool hidden {}
 Indicates if the page text appears only on screen. (xml tag is <postIt>)
 
VerticalAlignment vPos {}
 Vertical alignment. (xml tag is <vpos>)
 
bool hPosPageEdge {}
 
bool vPosPageEdge {}
 
bool indRpPos {}
 Individual right page positioning indicator. (xml tag is <indRpPos>)
 
Evpu rightPgXDisp {}
 Horizontal displacement for right pages (if indRpPos is true). (xml tag is <rightPgXdisp>)
 
Evpu rightPgYDisp {}
 Vertical displacement for right pages (if indRpPos is true). (xml tag is <rightPgYdisp>)
 

Static Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from musx::dom::OthersBase
 OthersBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt)
 Constructs an OthersBase object.
 
- Protected Member Functions inherited from musx::dom::Base
 Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode)
 Constructs the base class and enforces the static constexpr XmlNodeName.
 
Baseoperator= (const Base &)
 assignment constructor: m_unlinkedNodes is intentionally omitted
 

Detailed Description

Represents a page text assignment with positioning and page range properties.

If the cmper is non-0, the startPage and endPage values are not used and the cmper specifies the page to which this text is assigned.

If the cmper is 0, the startPage and endPage values specify the range of pages to which this text is assigned.

The inci value specifies a particular page text when more than one exists for the cmper value.

Note that blank pages at the start of a linked part offset the page values (of either single- or multi-page blocks). The full details of how this works is yet to be tested.

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

Member Data Documentation

◆ endPage

Cmper musx::dom::others::PageTextAssign::endPage {}

If cmper is zero, the last page on which the text appears. A value of zero indicates the last page in the document, whatever number it may be. (xml tag is <endPage>)

◆ hPosPageEdge

bool musx::dom::others::PageTextAssign::hPosPageEdge {}

If true, horizontal position is relative to page edge. Otherwise it is relative to the left / right page margins. (xml tag is <hposPageEdge>)

◆ vPosPageEdge

bool musx::dom::others::PageTextAssign::vPosPageEdge {}

If true, vertical position is relative to page edge. Otherwise it is relative to the top / bottom page margins. (xml tag is <vposPageEdge>)