MUSX Document Model
|
Represents the Measure Number Region with detailed font and enclosure settings for score and part data. More...
#include <Others.h>
Classes | |
class | ScorePartData |
Measure number data that can differ in score or part. More... | |
Public Types | |
enum class | AlignJustify { Left , Right , Center } |
Alignment and justification options for measure numbers. More... | |
enum class | TimePrecision { WholeSeconds , Tenths , Hundredths , Thousandths } |
Precision for time display. More... | |
![]() | |
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 | |
MeasureNumberRegion (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper) | |
Constructor function. | |
bool | calcIncludesMeasure (MeasCmper measureId) const |
Calculates whether the input measure is covered by this measure number region. | |
int | getStartNumber () const |
Returns the starting measure number for this region. | |
int | calcDisplayNumberFor (MeasCmper measureId) const |
Returns the visible number for a measure id with respect to the region. | |
![]() | |
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. | |
virtual Cmper | getPartId () const |
Gets the partId for this instance (or SCORE_PARTID for score) | |
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 std::shared_ptr< MeasureNumberRegion > | findMeasure (const DocumentPtr &document, MeasCmper measureId) |
Finds the measure number region containing a measure. | |
static const xml::XmlElementArray< MeasureNumberRegion > & | xmlMappingArray () |
Required for musx::factory::FieldPopulator. | |
Public Attributes | |
std::shared_ptr< ScorePartData > | scoreData |
Score-wide measure number data. | |
std::shared_ptr< ScorePartData > | partData |
Part-specific measure number data. | |
MeasCmper | startMeas {} |
Starting measure number for the region. | |
MeasCmper | endMeas {} |
Ending measure number for the region (non-inclusive). | |
char32_t | startChar {} |
UTF-32 code for the first character in the sequence. (Frequently '0', 'a', or 'A') | |
int | base {} |
The base used for measure number calculations. (Frequently 10 for numeric or 26 for alpha) | |
int | numberOffset {} |
This value is 1 less than the "Starting Number" field in the Finale UI. (xml node is <offset> ) | |
std::string | prefix |
Text prefix for measure numbers (encoded UTF-8). | |
std::string | suffix |
Text suffix for measure numbers (encoded UTF-8). | |
bool | countFromOne {} |
Start counting from 1 rather than 0, e.g., "1, 2, 3, 4" numbering style (in conjuction with base 10) | |
bool | noZero |
Indicates the base has no zero value: true for alpha sequences and false for numeric sequences. | |
bool | doubleUp {} |
Indicates "a, b, c...aa, bb, cc" number style: the symbols are repeated when they exceed the base. | |
bool | time {} |
Display real time sequences rather than numbers or letters. | |
bool | includeHours {} |
Display hours (when showing real time measure numbers) | |
bool | smpteFrames {} |
SMPTE frames (when showing real time measure numbers). This option supercedes timePrecision . | |
bool | useScoreInfoForPart {} |
Use score-wide settings for parts. | |
int | region {} |
The region ID. This 1-based value is set by Finale and never changes, whereas the Cmper may change when Finale sorts the regions. | |
TimePrecision | timePrecision {} |
Precision for real-time sequences. | |
bool | hideScroll {} |
Indicates if numbers are hidden in Scroll View and Studio View. | |
bool | hidePage {} |
Indicates if numbers are hidden in Page View. | |
Static Public Attributes | |
static constexpr std::string_view | XmlNodeName = "measNumbRegion" |
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. | |
Base (const Base &)=default | |
explicit default copy constructor | |
Base (Base &&) noexcept=default | |
explicit default move constructor | |
Base & | operator= (const Base &) |
no-op copy assignment operator allows subclasses to copy their values. | |
Base & | operator= (Base &&) noexcept |
no-op move assignment operator allows subclasses to move their values. | |
Represents the Measure Number Region with detailed font and enclosure settings for score and part data.
This class is identified by the XML node name "measNumbRegion".
|
strong |
|
strong |
int musx::dom::others::MeasureNumberRegion::calcDisplayNumberFor | ( | MeasCmper | measureId | ) | const |
Returns the visible number for a measure id with respect to the region.
std::logic_error | if measureId is not contained in the region |
|
inline |
Calculates whether the input measure is covered by this measure number region.
measureId | The measure id to check. |
|
static |
Finds the measure number region containing a measure.
document | The document to search |
measureId | The measure Id to search for |
measureId
, or nullptr if not found.