24#include "BaseClasses.h"
25#include "CommonClasses.h"
45 :
OthersBase(document, partId, shareMode, cmper) {}
54 MUSX_INTEGRITY_ERROR(
"Stated length does not match actual size of FileAlias " + std::to_string(
getCmper()) +
".");
73 :
OthersBase(document, partId, shareMode, cmper) {}
109 :
OthersBase(document, partId, shareMode, cmper) {}
128 :
OthersBase(document, partId, shareMode, cmper) {}
137 MUSX_INTEGRITY_ERROR(
"Stated length does not match actual size of FileUrlBookmark " + std::to_string(
getCmper()) +
".");
141 constexpr static std::string_view
XmlNodeName =
"fileURLBookmark";
190 :
OthersBase(document, partId, shareMode, cmper, inci)
248 MUSX_INTEGRITY_ERROR(
"PageGraphicAssign " + std::to_string(
getCmper()) +
" inci " + std::to_string(
getInci().value_or(0)) +
249 " has startPage or endPage value that does not match.");
269 constexpr static std::string_view
XmlNodeName =
"pageGraphicAssign";
293 :
OthersBase(document, partId, shareMode, cmper, inci)
315 constexpr static std::string_view
XmlNodeName =
"shapeGraphicAssign";
347 :
DetailsBase(document, partId, shareMode, staffId, meas, inci)
363 constexpr static std::string_view
XmlNodeName =
"measGraphicAssign";
virtual void integrityCheck(const std::shared_ptr< Base > &ptrToThis)
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition BaseClasses.h:154
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:91
Base class for all "details" types.
Definition BaseClasses.h:407
Provides optional per-type extension methods for MusxInstanceList.
Definition MusxInstance.h:96
Base class for all "others" types.
Definition BaseClasses.h:283
std::optional< Inci > getInci() const
Gets the optional array index (inci).
Definition BaseClasses.h:335
Cmper getCmper() const
Gets the cmper key value.
Definition BaseClasses.h:328
Represents a graphic assignment anchored to a specific staff and measure.
Definition Graphics.h:335
Evpu left
Graphic left coordinate in Evpu.
Definition Graphics.h:352
Evpu height
Graphic height in Evpu.
Definition Graphics.h:355
MeasureGraphicAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
Constructor.
Definition Graphics.h:346
bool hidden
Indicates the graphic is hidden from print/displayed as hidden (xml node is <displayHidden>)
Definition Graphics.h:357
Evpu width
Graphic width in Evpu.
Definition Graphics.h:354
bool savedRecord
Indicates a stored/saved record. (Used internally by Finale when a graphic is created....
Definition Graphics.h:358
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:363
uint32_t version
Always 0x100, meaning perhaps "v1.0". (This was intended for tracking changes to the data format,...
Definition Graphics.h:351
Cmper graphicCmper
Graphic instance Cmper. (See others::PageGraphicAssign::graphicCmper for full explanation....
Definition Graphics.h:361
Evpu origWidth
Original (intrinsic) width in Evpu.
Definition Graphics.h:359
Evpu bottom
Graphic bottom coordinate in Evpu.
Definition Graphics.h:353
Cmper fDescId
The Cmper of the assigned others::FileDescription. (xml tag is <fDescID>)
Definition Graphics.h:356
Evpu origHeight
Original (intrinsic) height in Evpu.
Definition Graphics.h:360
static const xml::XmlElementArray< MeasureGraphicAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
HorizontalAlignment
Horizontal alignment options for page text positioning.
Definition Options.h:1495
VerticalAlignment
Vertical alignment options for page text positioning.
Definition Options.h:1506
Opaque storage for a platform-specific alias handle associated with a graphic.
Definition Graphics.h:41
FileAlias(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor.
Definition Graphics.h:44
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Graphics.h:50
static const xml::XmlElementArray< FileAlias > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
size_t length
Declared byte length.
Definition Graphics.h:47
std::vector< std::uint8_t > aliasHandle
Opaque blob (decoded from hex text)
Definition Graphics.h:48
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:58
Describes the locator flavor Finale used for the associated file/graphic.
Definition Graphics.h:69
static const xml::XmlElementArray< FileDescription > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
int dirId
Classic Mac OS directory ID, used with legacy MacFsSpec path. (xml node is <dirID>)
Definition Graphics.h:88
Cmper pathId
Cmper of FilePath? It is unknown if this value ever differs from the cmper of FileDescription....
Definition Graphics.h:90
PathType
Defines the possible path types.
Definition Graphics.h:78
@ MacFsSpec
Path is a Mac FS Spec.
@ MacUrlBookmark
Path is a Mac URL bookmark. (See FileUrlBookmark.)
@ MacAlias
Path is defined by mac alias. (See FileAlias.)
@ DosPath
Path is a DOS filepath.
@ MacPosixPath
Path is a POSIX filepath.
int volRefNum
Classic Mac OS volume reference number, used with legacy MacFsSpec path.
Definition Graphics.h:87
FileDescription(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor.
Definition Graphics.h:72
PathType pathType
Path type. (Determines which of FileAlias and FileUrlBookmark to use as well as how to interpret File...
Definition Graphics.h:89
uint32_t version
Always 0x100, meaning perhaps "v1.0". (This was intended for tracking changes to the data format,...
Definition Graphics.h:86
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:92
Stores a human-readable path/leaf name recorded by Finale.
Definition Graphics.h:105
std::string path
Display/path string exactly as in XML. For MacAlias paths, this is only the source file name.
Definition Graphics.h:111
static const xml::XmlElementArray< FilePath > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
FilePath(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor.
Definition Graphics.h:108
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:113
Opaque storage for a platform-specific URL/bookmark blob (e.g., macOS CFURL bookmark).
Definition Graphics.h:124
size_t length
Declared byte length.
Definition Graphics.h:130
static const xml::XmlElementArray< FileUrlBookmark > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
FileUrlBookmark(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor.
Definition Graphics.h:127
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Graphics.h:133
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:141
std::vector< std::uint8_t > urlBookmarkData
Opaque blob decoded from hex text.
Definition Graphics.h:131
Represents a page graphic assignment with positioning and page-range properties.
Definition Graphics.h:160
Evpu rightPgLeft
Horizontal position for right pages.
Definition Graphics.h:216
HorizontalAlignment rightPgHAlign
Horizontal alignment on right pages.
Definition Graphics.h:211
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Graphics.h:243
bool savedRecord
Indicates a stored/saved record. (Used internally by Finale when a graphic is created....
Definition Graphics.h:208
bool isMultiPage() const
Returns true if this is a multi-page assignment.
Definition Graphics.h:236
PositionFrom rightPgPosFrom
Definition Graphics.h:213
bool fixedPerc
If true, preserve aspect ratio. This is a UI setting. Use width/origWidth and height/origHeight for a...
Definition Graphics.h:205
Evpu bottom
Vertical position from reference frame.
Definition Graphics.h:196
bool isMultiAssignedThruLastPage() const
Returns true if this is a multi-page assignment that is assigned to through last page,...
Definition Graphics.h:240
bool hidden
If true, the graphic does not display: inverse of "Show" context menu option. (xml tag is <displayHid...
Definition Graphics.h:201
PageGraphicAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, Inci inci)
Constructor.
Definition Graphics.h:189
Evpu origHeight
Intrinsic/original height of the graphic.
Definition Graphics.h:210
Cmper graphicCmper
Definition Graphics.h:218
Evpu left
Horizontal position from reference frame.
Definition Graphics.h:195
static MusxInstance< others::PageGraphicAssign > getForPageId(const DocumentPtr &document, Cmper partId, PageCmper pageId, Inci inci)
Returns a specific page graphic assignment for a given page number in a given part....
Definition Graphics.cpp:37
PositionFrom
Reference frame for positioning.
Definition Graphics.h:180
@ Margins
Position is relative to page margins.
@ PageEdge
Position is relative to page edge.
Evpu origWidth
Intrinsic/original width of the graphic.
Definition Graphics.h:209
uint32_t version
Always 0x100, meaning perhaps "v1.0". (This was intended for tracking changes to the data format,...
Definition Graphics.h:194
VerticalAlignment rightPgVAlign
Vertical alignment on right pages.
Definition Graphics.h:212
PageAssignType displayType
Whether the assignment appears on all/even/odd pages.
Definition Graphics.h:200
Cmper fDescId
The Cmper of the assigned FileDescription. (xml tag is <fDescID>)
Definition Graphics.h:199
static MusxInstanceList< others::PageGraphicAssign > getArrayForPageId(const DocumentPtr &document, Cmper partId, PageCmper pageId)
Returns all the page graphic assignments for a given page number in a given part. This allows the cal...
Definition Graphics.cpp:46
std::optional< PageCmper > calcStartPageNumber(Cmper forPartId) const
Return the starting page number, taking into account leading blank pages in all parts....
Definition Graphics.cpp:55
PageCmper startPage
First page assignment ID where the graphic appears when cmper==0.
Definition Graphics.h:206
std::optional< PageCmper > calcEndPageNumber(Cmper forPartId) const
Return the ending page number, taking into account leading blank pages in all parts This calculation ...
Definition Graphics.cpp:73
PageAssignType
Which pages a multipage assignment appears on.
Definition Graphics.h:168
Evpu rightPgBottom
Vertical position for right pages.
Definition Graphics.h:217
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:269
static const xml::XmlElementArray< PageGraphicAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
VerticalAlignment vAlign
Vertical alignment for left/all pages. (xml tag is <valign>)
Definition Graphics.h:203
Evpu width
Display width of the placed graphic.
Definition Graphics.h:197
HorizontalAlignment hAlign
Horizontal alignment for left/all pages. (xml tag is <halign>)
Definition Graphics.h:202
Evpu height
Display height of the placed graphic.
Definition Graphics.h:198
PositionFrom posFrom
Position reference for left/all pages.
Definition Graphics.h:204
PageCmper endPage
Last page assignment ID where the graphic appears when cmper==0.
Definition Graphics.h:207
bool rightPgFixedPerc
If true, preserve aspect ratio on right-pages (UI setting only). The Finale UI appears to sync this w...
Definition Graphics.h:215
Represents a graphic assignment anchored to a specific staff and measure.
Definition Graphics.h:282
Cmper graphicCmper
Graphic instance Cmper. (See others::PageGraphicAssign::graphicCmper for full explanation....
Definition Graphics.h:313
Cmper fDescId
The Cmper of the assigned others::FileDescription. (xml tag is <fDescID>)
Definition Graphics.h:305
bool fixedPerc
UI setting to preserve aspect ratio. It may be meaningless here, since there is no UI setting for sha...
Definition Graphics.h:308
VerticalAlignment vAlign
Vertical alignment the placed graphic: possibly always Top. (xml tag is <valign>)
Definition Graphics.h:307
Evpu origWidth
Original (intrinsic) width in Evpu.
Definition Graphics.h:311
ShapeGraphicAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, Inci inci)
Constructor.
Definition Graphics.h:292
Evpu width
Graphic width in Evpu.
Definition Graphics.h:303
Evpu bottom
Graphic bottom coordinate in Evpu.
Definition Graphics.h:302
uint32_t version
Always 0x100, meaning perhaps "v1.0". (This was intended for tracking changes to the data format,...
Definition Graphics.h:300
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Graphics.h:315
Evpu origHeight
Original (intrinsic) height in Evpu.
Definition Graphics.h:312
static const xml::XmlElementArray< ShapeGraphicAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu height
Graphic height in Evpu.
Definition Graphics.h:304
HorizontalAlignment hAlign
Horizontal alignment of the placed graphic: possibly always Left. (xml tag is <halign>)
Definition Graphics.h:306
bool hidden
Indicates the graphic is hidden from print/displayed as hidden: possibly always false for ShapeGraphi...
Definition Graphics.h:309
bool savedRecord
Indicates a stored/saved record. (Used internally by Finale when a graphic is created....
Definition Graphics.h:310
Evpu left
Graphic left coordinate in Evpu.
Definition Graphics.h:301
std::shared_ptr< const T > MusxInstance
Defines the type of a musx instance stored in a pool.
Definition MusxInstance.h:35
int16_t Inci
Enigma "incident" key type.
Definition Fundamentals.h:56
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition BaseClasses.h:57
std::shared_ptr< Document > DocumentPtr
Shared Document pointer.
Definition BaseClasses.h:55
int16_t PageCmper
Enigma page Cmper (may be negative when not applicable)
Definition Fundamentals.h:67
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:127
object model for musx file (enigmaxml)
Definition BaseClasses.h:36