MUSX Document Model
Loading...
Searching...
No Matches
musx::util::Tie Class Reference

Static class containing utilites for ties. More...

#include <Tie.h>

Static Public Member Functions

static dom::CurveContourDirection calcDefaultDirection (const dom::NoteInfoPtr &noteInfo, bool forTieEnd)
 Calculates the default tie direction for the specified note.
 
static dom::CurveContourDirection calcEffectiveDirection (const dom::NoteInfoPtr &noteInfo, bool forTieEnd)
 Calculates the effective tie direction taking into account overrides and special rules.
 
static std::optional< std::pair< dom::TieConnectStyleType, dom::TieConnectStyleType > > calcConnectStyleTypes (const dom::NoteInfoPtr &noteInfo, bool forTieEnd)
 Calculates the connect style types for both endpoints of a tie.
 
static bool calcIsOuterConnectStyle (dom::TieConnectStyleType type)
 Returns true if the connect style is an outer placement.
 
static std::optional< dom::details::TieAlterBase::ConnectionTypecalcConnectionType (const dom::NoteInfoPtr &noteInfo, bool forTieEnd, bool forEndPoint, bool forPageView=false)
 Calculates the default connection type for a tie endpoint.
 

Detailed Description

Static class containing utilites for ties.

Member Function Documentation

◆ calcConnectionType()

std::optional< details::TieAlterBase::ConnectionType > musx::util::Tie::calcConnectionType ( const dom::NoteInfoPtr noteInfo,
bool  forTieEnd,
bool  forEndPoint,
bool  forPageView = false 
)
static

Calculates the default connection type for a tie endpoint.

Parameters
noteInfoThe note whose endpoint is being analyzed.
forTieEndTrue if the endpoint is for a tie end; false for a tie start.
forEndPointTrue if calculating the end point; false for the start point.
forPageViewTrue if calculating with page view system breaks, false for scroll/studio view.
Returns
The connection type, or std::nullopt if no applicable tie exists.

◆ calcConnectStyleTypes()

std::optional< std::pair< TieConnectStyleType, TieConnectStyleType > > musx::util::Tie::calcConnectStyleTypes ( const dom::NoteInfoPtr noteInfo,
bool  forTieEnd 
)
static

Calculates the connect style types for both endpoints of a tie.

Parameters
noteInfoThe note whose tie is being analyzed.
forTieEndTrue if the note represents a tie end; false for tie starts.
Returns
A pair containing start and end connect style types, or std::nullopt if no tie exists.

◆ calcDefaultDirection()

CurveContourDirection musx::util::Tie::calcDefaultDirection ( const dom::NoteInfoPtr noteInfo,
bool  forTieEnd 
)
static

Calculates the default tie direction for the specified note.

Parameters
noteInfoThe note whose default tie direction is being calculated.
forTieEndIf true, the tie-end contour is returned; otherwise the tie-start contour.
Returns
The contour direction that Finale would choose for the tie, or dom::CurveContourDirection::Unspecified when the contour cannot be determined.

◆ calcEffectiveDirection()

CurveContourDirection musx::util::Tie::calcEffectiveDirection ( const dom::NoteInfoPtr noteInfo,
bool  forTieEnd 
)
static

Calculates the effective tie direction taking into account overrides and special rules.

Parameters
noteInfoThe note whose effective tie direction is being calculated.
forTieEndIf true, uses the tie-end context; otherwise uses the tie-start context.
Returns
The contour direction that currently applies to the tie, or dom::CurveContourDirection::Unspecified when the contour cannot be determined.

◆ calcIsOuterConnectStyle()

bool musx::util::Tie::calcIsOuterConnectStyle ( dom::TieConnectStyleType  type)
static

Returns true if the connect style is an outer placement.

Parameters
typeThe connect style to classify.
Returns
True if type is an outer placement, otherwise false.