MUSX Document Model
|
Represents a page text assignment with positioning and page range properties. More...
#include <Others.h>
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. | |
![]() | |
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. | |
![]() | |
Cmper | getCmper () const |
Gets the cmper key value. | |
std::optional< Inci > | getInci () const |
Gets the optional array index (inci ). | |
![]() | |
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::PartDefinition > | getPartDefinition () const |
Gets the others::PartDefinition corresponding to getPartId. | |
ShareMode | getShareMode () const |
Gets the sharing mode for this instance. | |
const SharedNodes & | getUnlinkedNodes () 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 | |
![]() | |
OthersBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt) | |
Constructs an OthersBase object. | |
![]() | |
Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode) | |
Constructs the base class and enforces the static constexpr XmlNodeName. | |
Base & | operator= (const Base &) |
assignment constructor: m_unlinkedNodes is intentionally omitted | |
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".
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>
)
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>
)
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>
)