15#ifdef PDK_FRAMEWORK_TINYXML
24#ifdef PDK_FRAMEWORK_DEBUG
25#if OPERATING_SYSTEM == WINDOWS
31#ifdef PDK_FRAMEWORK_LUAFRIENDLY
35#define _state_ptr lua_State*
36void __finale_version_check(EVERSION version,
const char* funcName,
const char* className);
37#define FINALE_VERSION_CHECK(version) __finale_version_check(version, __func__, typeid(*this).name())
40#define _NOLUACODE(x) x
41typedef void* _state_ptr;
42#define FINALE_VERSION_CHECK(version)
45#define _ENUMCODE(x) _NOLUACODE(x)
56#define _GET_OLD_NEW_MEMBER_SELECT(MEMBEROLD, MEMBERNEW, DATAOLD, DATANEW, ISNEW) \
57 ( (ISNEW) ? DATANEW.MEMBERNEW : static_cast<decltype(DATANEW.MEMBERNEW)>(DATAOLD.MEMBEROLD) )
58#define _SET_OLD_NEW_MEMBER_SELECT(MEMBEROLD, MEMBERNEW, DATAOLD, DATANEW, ISNEW) \
59 (([&]() -> decltype(DATANEW.MEMBERNEW)& { return (ISNEW) ? DATANEW.MEMBERNEW : DATAOLD.MEMBEROLD; })())
72#ifndef DOXYGEN_SHOULD_IGNORE_THIS
94 FCID_BEATCHARTELEMENT,
102 FCID_CENTERSMARTSHAPE,
105 FCID_CHORDSUFFIXELEMENT,
108 FCID_COMPOSITETIMESIGBOTTOMELEMENT,
109 FCID_COMPOSITETIMESIGTOPELEMENT,
111 FCID_CUSTOMSMARTLINEDEF,
117 FCID_ENIGMATEXTSTYLE,
119 FCID_EXECUTABLESHAPEDEF,
127 FCID_FRETBOARDSTYLEDEF,
128 FCID_FRETBOARDSTYLEDEFS,
129 FCID_FRETBOARDGROUPDEF,
130 FCID_FRETBOARDGROUPDEFS,
131 FCID_FRETINSTRUMENTDEF,
133 FCID_GRIDSGUIDESPREFS,
135 FCID_GROUPNAMEPOSITIONPREFS,
136 FCID_HUMANPLAYBACKPREFS,
137 FCID_INDEPENDENTCELLDETAIL,
139 FCID_INSTRUMENTPLAYBACKDATA,
146 FCID_MEASURENUMBERREGION,
147 FCID_METATOOLASSIGNMENT,
150 FCID_MULTIMEASUREREST,
151 FCID_MULTIMEASURERESTPREFS,
152 FCID_MULTISTAFFINSTRUMENT,
153 FCID_MULTISTAFFINSTRUMENTS,
154 FCID_MUSICCHARACTERPREFS,
155 FCID_MUSICSPACINGPREFS,
161 FCID_PERCUSSIONLAYOUTNOTE,
162 FCID_PERCUSSIONSTAFF,
165 FCID_PAGEFORMATPREFS,
169 FCID_PARTEXTRACTPREFS,
171 FCID_PARTSTAFFVOICING,
172 FCID_PERCUSSIONNOTEMOD,
173 FCID_PIANOBRACEPREFS,
178 FCID_SECONDARYBEAMBREAKMOD,
179 FCID_BEAMEXTENSIONMOD,
180 FCID_SECTIONSYLLABLE,
181 FCID_SEPARATEMEASURENUMBER,
182 FCID_SEPARATEPLACEMENT,
184 FCID_SHAPEEXPRESSIONDEF,
185 FCID_SLURCONTOURPREFS,
188 FCID_SMARTSHAPEENTRYMARK,
189 FCID_SMARTSHAPEMEASUREMARK,
190 FCID_SMARTSHAPEPREFS,
193 FCID_STAFFNAMEPOSITION,
194 FCID_STAFFNAMEPOSITIONPREFS,
195 FCID_STAFFSTYLEASSIGN,
198 FCID_STEMCONNECTIONTABLE,
204 FCID_SYLLABLEENTRYMOD,
206 FCID_TABLATURENOTEMOD,
209 FCID_TEXTEXPRESSIONDEF,
214 FCID_TIECONTOURPREFS,
215 FCID_TIEPLACEMENTPREFS,
231#ifdef PDK_FRAMEWORK_LUAFRIENDLY
232#ifndef DOXYGEN_SHOULD_IGNORE_THIS
235 int _Lua_GetClassID()
const {
return (
int)
GetClassID(); }
297#ifdef PDK_FRAMEWORK_DEBUG
303 void DebugMsgInt(
const char* pszPrefixText,
int i);
310 void DebugMsgHex(
const char* pszPrefixText,
int i);
317 void DebugMsgString(
const char* pszPrefixText,
const char * thestring);
332 static void DebugOutPtr(
const char* pszPrefixText,
void* ptr);
339 static void DebugOutInt(
const char* pszPrefixText,
int i);
346 static void DebugOutFloat(
const char* pszPrefixText,
double f);
353 static void DebugOutTag(
const char* pszPrefixText, EXTAG extag);
360 static void DebugOutHex(
const char* pszPrefixText,
int i);
367 static void DebugOutBin(
const char* pszPrefixText,
int i);
374 static void DebugOutString(
const char* pszPrefixText,
const char * thestring);
388 static void DebugOutBool(
const char* pszPrefixText,
bool state);
395 static void DebugOutBlock(
const void * pBuffer,
int startoffset,
int size);
413 static void DebugOut(
const char* pszLine);
421#ifdef PDK_FRAMEWORK_FORMAT
468 void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits,
bool state);
476 void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits,
bool state);
486 bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits)
const {
return (flag & flagbits) != 0; }
542 if (!pCompareObject)
return false;
548#ifdef PDK_FRAMEWORK_TINYXML
559 void StoreXML_Integer(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
int value);
565 void StoreXML_Bool(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
bool value);
597 virtual void StoreToXML([[maybe_unused]]tinyxml2::XMLElement* pParentNode) {}
606 bool ReadXML_String(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
FCString* pStringValue);
614 bool ReadXML_Integer(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
int* pValue);
622 bool ReadXML_Bool(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
bool *pValue);
664 virtual bool ReadFromXML([[maybe_unused]]tinyxml2::XMLElement* pParentNode) {
return false; }
678#ifndef DOXYGEN_SHOULD_IGNORE_THIS
682 virtual bool _RawRelink()
805 virtual EXTAG
Tag()
const = 0;
828 const char*
ClassName()
const override {
return "__FCBaseData"; }
1006#ifdef PDK_FRAMEWORK_DEBUG
1026#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1027 virtual void DebugDataCompare(
__FCBaseData *pCompareObject)
1029 if (!pCompareObject)
1031 DebugOut(
"DebugDataCompare(): Compare object is nil.");
1037 snprintf(szBuffer,
sizeof(szBuffer),
"DebugDataCompare(): Compare size differs. %d compared to %d byte(s)", (
int)
_GetLoadedSize(), (
int) pCompareObject->
_GetLoadedSize());
1041 unsigned char* pDataBlock = (
unsigned char*)
GetDataBlock();
1042 unsigned char* pCompareBlock = (
unsigned char*) pCompareObject->
GetDataBlock();
1046 if (pDataBlock[i] != pCompareBlock[i])
1050 snprintf(szBuffer,
sizeof(szBuffer),
"DebugDataCompare() DIFF at 0-based byte offset %d: 0x%02x - 0x%02x ", i, pDataBlock[i], pCompareBlock[i]);
1056 DebugOut(
"DebugDataCompare(): Data blocks are identical");
1084#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1086 luabridge::RefCountedPtr<FCNumbers> CreateRawDataDump_GC()
1152 const char*
ClassName()
const override {
return "__FCInci"; }
1155 bool Load(CMPER cmper, twobyte inci);
1164constexpr double kDisplayPercentForFixedFontSize = 1.1;
1193#if FXT_VERSION >= FINALEVERSION_25
1194 EnigmaFontName _nameUTF16;
1208 const static FCString DefaultFontName;
1210 const char*
ClassName()
const override {
return "FCFontInfo"; }
1263#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1265 static FCFontInfo* FCFontInfo_Lua(
void* ptr, lua_State *L);
1271#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1276 static int FCFontInfo_tostring(lua_State* L);
1308#ifdef PDK_FRAMEWORK_PREFS
1343 int GetSize()
const {
return static_cast<int>(_size); }
1356#if FXT_VERSION < FINALEVERSION_25
1357#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1359 void GetNameParam(
const EFONTNAME* pName) { strcpy((
char*)pName, (
const char*)_name); }
1414#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
1446#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1449 luabridge::RefCountedPtr<FCString>CreateEnigmaString_GC(
FCString* pFontTagString)
1453 static int CreateEnigmaString_CFunc(lua_State* L)
1455 return _CFunctionOneOptionalParameter<FCFontInfo, luabridge::RefCountedPtr<FCString>,
FCString*, &FCFontInfo::CreateEnigmaString_GC>(L,
nullptr);
1490#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1492 luabridge::RefCountedPtr<FCString> CreateEnigmaStyleString_GC()
1533#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1535 luabridge::RefCountedPtr<FCString> CreateDescription_GC()
1539#if FXT_VERSION < FINALEVERSION_25
1540#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1542 void SetName(
const EFONTNAME* pName) { strcpy((
char*)_name, (
const char*)pName); }
1552 void SetName(
const std::string& pszName);
1600 void SetSize(
int fontsize) { _size =
static_cast<double>(fontsize); }
1672 bool IsName(
const char* pszTestName)
const;
1735#if FXT_VERSION >= FINALEVERSION_27_1
1797#ifdef PDK_FRAMEWORK_DEBUG
1814 fourbyte _tracking{};
1815 Evpu32 _baselineshift{};
1816 Evpu32 _superscript{};
1819 const char*
ClassName()
const override {
return "FCEnigmaTextStyle"; }
1822#ifdef PDK_FRAMEWORK_LUAFRIENDLY
1826 return _OneOptionalParamLuaConstructor<FCEnigmaTextStyle, const FCFontInfo&>(ptr, L);
1845#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1850 _tracking = ts.tracking;
1851 _baselineshift = ts.baselineShift;
1852 _superscript = ts.superscript;
1864#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1911const eUniChar16 UTF16_HIGH_SURROGATE_MASK = 0xD800;
1912const eUniChar16 UTF16_LOW_SURROGATE_MASK = 0xDC00;
1934 using _fcStringChar = WINCODE(WCHAR) MACCODE(
char16_t);
1935 static_assert(
sizeof(_fcStringChar) ==
sizeof(eUniChar16),
"FCString internal _fcStringChar must match sizeof(eUniChar16).");
1937#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1940 _fcStringChar* _pStorage;
1943 mutable char* _pTempCBuffer;
1944 mutable char* _pTempCUTF8Buffer;
1946#if OPERATING_SYSTEM == MAC_OS
1947 mutable void* _nsstringobject;
1951 void _DeleteStorage();
1954 void _ExpandStorageIfNecessary(
int minimumlength);
1957 bool _SetFinalePath(FinPath pathconstant);
1964 _pTempCBuffer = NULL;
1965 _pTempCUTF8Buffer = NULL;
1966#if OPERATING_SYSTEM == MAC_OS
1967 _nsstringobject =
nullptr;
1975#ifdef PDK_FRAMEWORK_TINYXML
1982 void StoreToXML(tinyxml2::XMLElement* pParentNode)
override {
1990 bool ReadFromXML(tinyxml2::XMLElement* pParentNode)
override
1996 static bool _IsHighSurrogate(eUniChar16 value)
1998 return (value & 0xFC00) == UTF16_HIGH_SURROGATE_MASK;
2001 static bool _IsLowSurrogate(eUniChar16 value)
2003 return (value & 0xFC00) == UTF16_LOW_SURROGATE_MASK;
2011 bool _GetCodePointRange(
FCRange *pRange)
const;
2014 const char*
ClassName()
const override {
return "FCString"; }
2017#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2019 static FCString* FCString_Lua(
void* ptr, lua_State* L)
2021 return _OneOptionalParamLuaConstructor<FCString, const char *>(ptr, L);
2064#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2069 static int FCString_tostring(lua_State* L)
2071 FCString* pThis = luabridge::Stack<FCString*>::get(L, 1) LB3(.value());
2073 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
2096#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2097 bool operator==(
const FCString &src)
const
2098 {
return (0 == this->
Compare(src)); }
2099 template<
typename T>
2100 bool operator!=(T src)
const
2101 {
return ! (*
this == src); }
2104 const _fcStringChar* GetOSUnicodeString()
const {
return _pStorage; }
2107 const std::basic_string_view<eUniChar16> _GetBasicStringView()
const
2108 {
return std::basic_string_view<eUniChar16>(_GetUnicodeBuffer(),
GetLength()); }
2110 static const eUniChar16 emptyUniCharStr[];
2136#if defined(PDK_FRAMEWORK_LUAFRIENDLY) || defined(DOXYGEN_SHOULD_IGNORE_THIS)
2174#if OPERATING_SYSTEM == WINDOWS
2238 if (splitpointindex < -1)
return false;
2239 if (splitpointindex >=
GetLength())
return false;
2240 if ((pFirstString) && (pFirstString == pSecondString))
2245 if (pFirstString && pSecondString)
2248 if (pFirstString ==
this)
return false;
2249 if (pSecondString ==
this)
return false;
2256 const int splitoffset = includesplitposchar ? 1 : 0;
2260 pFirstString->
TruncateAt((std::max)(0, splitpointindex + splitoffset));
2265 if (splitpointindex >= 0)
2287#if OPERATING_SYSTEM == WINDOWS
2293 return SplitAt(pos, pPathPart, pFilePart,
true);
2393 _SetFinalePath(FinPath_PercNoteTypesFile);
2397#if FXT_VERSION >= FINALEVERSION_2012
2416#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2434#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2458 return std::char_traits<_fcStringChar>::compare(_pStorage, value._pStorage, maxSize);
2475 return string1.
Compare(string2);
2544 auto pos = _GetBasicStringView().rfind(subString._GetBasicStringView());
2545 if (pos == std::basic_string_view<eUniChar16>::npos)
2547 return static_cast<int>(pos);
2582 auto pos = _GetBasicStringView().find(subString._GetBasicStringView(),
static_cast<size_t>(startindex));
2583 if (pos == std::basic_string_view<eUniChar16>::npos)
2585 return static_cast<int>(pos);
2607#if OPERATING_SYSTEM == MAC_OS
2614#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2616 CFURLRef _GetPathCFURLRef()
const;
2621#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2647#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2649 luabridge::RefCountedPtr<FCStrings> CreateEnigmaComponents_GC()
const
2668#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2670 luabridge::RefCountedPtr<FCStrings> CreateEnigmaStrings_GC(
bool include_non_commands)
const
2685#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2687 luabridge::RefCountedPtr<FCFontInfo> CreateLastFontInfo_GC()
const
2706#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2708 luabridge::RefCountedPtr<FCStrings> CreateParsedStrings_GC(
const char* pszSeparators)
const
2724#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2726 luabridge::RefCountedPtr<FCStrings> CreateRows_GC()
const
2800 if (currentchar ==
'.')
2812 if (currentchar ==
'/')
break;
2813 if (currentchar ==
'\\')
break;
2834 twobyte firstchar = *pszSubStr;
2835 if (!firstchar)
return -1;
2839 if (character == firstchar)
2842 bool identical =
true;
2843 while (pszSubStr[j])
2845 twobyte testchar = pszSubStr[j];
2853 if (identical)
return i;
2873 twobyte firstchar = *pszSubStr;
2874 if (!firstchar)
return -1;
2875 int substrlength = (int) strlen(pszSubStr);
2877 for (
int i = (
int) (
GetLength() - substrlength); i >= 0; i--)
2880 if (character == firstchar)
2883 bool identical =
true;
2884 while (pszSubStr[j])
2886 twobyte testchar = pszSubStr[j];
2894 if (identical)
return i;
2901#ifdef PDK_FRAMEWORK_FORMAT
2971#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2973 static int GetLuaString_CFunc(lua_State *L)
2975 return _CFunctionProxyGetter<FCString, const char *, &FCString::GetLuaString>(L);
2994#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2996 UTRANSID _StartFinaleEdit()
const;
2999 eUniChar16* _GetUnicodeBuffer()
const;
3002#if OPERATING_SYSTEM == MAC_OS
3027#ifdef PDK_FRAMEWORK_LUAFRIENDLY
3028 static int GetInteger_CFunc(lua_State* L)
3030 return _CFunctionOneOptionalParameter<FCString, int, int, &FCString::GetInteger>(L, 0);
3054 double GetFloat(
int index = 0)
const;
3092#ifdef PDK_FRAMEWORK_LUAFRIENDLY
3093 static int GetCodePointAt_CFunc(lua_State* L)
3096 const FCString& selfStr = luabridge::Stack<const FCString&>::get(L, 1) LB3(.value());
3097 int index = luabridge::Stack<
int>::get(L, 2) LB3(.value());
3099 luabridge::Stack<eUniChar32>::push(L, codepoint) LB3(.throw_on_error());
3100 luabridge::Stack<
int>::push(L, nextIndex) LB3(.throw_on_error());
3119 const char*
GetEOL()
const;
3131 [[deprecated]]
void Insert(
const char* pszString,
int insertindex = 0);
3153 bool IsDigit(
int index)
const;
3211 bool IsCharacter(
int index, eUniChar32 character)
const;
3227 bool IsCharacters(
int index,
const char *pChars)
const;
3244#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3305#if OPERATING_SYSTEM == WINDOWS
3316 bool LoadResource(
int resourceID, HINSTANCE dllinstance = 0);
3318#if OPERATING_SYSTEM == MAC_OS
3339 const char* pszResourceFileName = NULL,
3340 const char* pszTableName = NULL);
3343#if OPERATING_SYSTEM == WINDOWS
3357 static int LoadIntegerResource(
int resourceID,
int defaultValue, HINSTANCE dllinstance = 0);
3359#if OPERATING_SYSTEM == MAC_OS
3384 const char* pszResourceFileName = NULL,
3385 const char* pszTableName = NULL);
3416#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3454 void SetCString(
const char* pszBuffer,
int maxchars = -1);
3456#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3457#if OPERATING_SYSTEM == WINDOWS
3459 void _SetWCHARString(
const WCHAR* pCharBuffer);
3472#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3474 static int SetLuaString_CFunc(lua_State *L)
3476 return _CFunctionProxySetter<FCString, const char *, &FCString::SetLuaString>(L);
3527 void SetHex(
int number,
int bitwidth);
3533#ifdef PDK_FRAMEWORK_PREFS
3589 time_t now = time(0);
3592 tstruct = *localtime(&now);
3593 strftime(buf,
sizeof(buf),
"%X", &tstruct);
3609 bool Replace(
const char* pszSource,
const char* pszReplacement);
3617 bool EndsWith(
const char* pszString)
const;
3633 bool StartsWith(
const char* pszString)
const;
3647 if (len > maxsize - 1) len = maxsize - 1;
3668#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3679#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3726 if (newlength < 0 || newlength >=
GetLength())
return false;
3727 _length = newlength;
3728 _pStorage[_length] = 0;
3742 if (count < 1)
return false;
3753 if (_length <= maxlength)
return;
3754 if (prefixchars + 3 > maxlength)
return;
3755 if (prefixchars < -1)
return;
3757 for (
int i = 0; i < prefixchars; i++)
3762 int startindex = _length - maxlength + prefixchars + 3;
3763 for (
int i = startindex; i < _length; i++)
3770#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3775 static EVERSION _GetFinPathVersion();
3783 bool MakeSpecFromFilePath(
void *pFinPathSpec, EVERSION convertversion)
const;
3791 bool MakeFullFilePath(
const void* pFinPathSpec, EVERSION convertversion);
3795#ifdef PDK_FRAMEWORK_DEBUG
3800 DebugOutInt(
"Storage length: ", (
int) _storagelength);
3819 const char*
ClassName()
const override {
return "FCSettingsPair"; }
3843#ifdef PDK_FRAMEWORK_DEBUG
3847 DebugOutString(
"Key: ", GetKeyString());
3848 DebugOutString(
"Value: ", GetValueString());
3854#ifdef PDK_FRAMEWORK_ENTRIES
3874 EMeasureMetrics2009a _metrics;
3878 static bool _metricsshouldupdate;
3881 const char*
ClassName()
const override {
return "FCCellMetrics"; }
3890 memset(&_metrics, 0,
sizeof(_metrics));
3914 bool LoadAtCell(
FCCell* pCell);
3916#ifdef PDK_FRAMEWORK_ENTRIES
3933 return _metrics.measMetrics.horzPercent;
3948 return _metrics.measMetrics.fipTopStaffLine;
3963 return _metrics.measMetrics.fipBottom;
3975 return _metrics.measMetrics.fipTop;
3984 return _metrics.measMetrics.lperc;
3993 return _metrics.measMetrics.percent;
4003 return _metrics.attachCount;
4013 return _metrics.measMetrics.meposadj;
4024 return _metrics.leftEdge;
4033 return _metrics.measMetrics.mewidth;
4042 return _metrics.measMetrics.scalewidth;
4051 return _metrics.measMetrics.frontRepWidth;
4060 return _metrics.measMetrics.backRepWidth;
4070 return _metrics.measMetrics.barWidth;
4079 return _metrics.measMetrics.ssys;
4089 return _metrics.measMetrics.ssysTop;
4099 return _metrics.measMetrics.slot;
4118 if (_metrics.attachCount == 0)
return false;
4119 for (
int i = 0; i < _metrics.attachCount; i++)
4121 EAttachment* pTest = &_metrics.pAttach[i];
4122 if (pTest->tag != pBaseDataObject->
Tag())
continue;
4123 if (pTest->id != the_id)
continue;
4126 if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE))
continue;
4128 memcpy(pAttachment, pTest,
sizeof(EAttachment));
4152#ifdef PDK_FRAMEWORK_DEBUG
4156 DebugOutInt(
"Horizontal stretch: ", GetHorizontalStretch());
4162#ifdef PDK_FRAMEWORK_ENTRIES
4174 ENTNUM _directaccess_entnum;
4177 EEntryMetrics2009a _metrics2009a;
4178#if FXT_VERSION >= FINALEVERSION_2014
4179 EEntryMetrics2014 _metrics2014;
4184 static bool _updatemetrics;
4187 EVERSION _VersionToUse()
const;
4192 EEntryMetrics2009a* _GetBasicMetricsPtr()
const
4194#if FXT_VERSION >= FINALEVERSION_2014
4195 if (_VersionToUse() == FINALEVERSION_2014)
4196 return (EEntryMetrics2009a*) &_metrics2014;
4199 return (EEntryMetrics2009a*) &_metrics2009a;
4203 const char*
ClassName()
const override {
return "FCEntryMetrics"; }
4211#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4213 void _EnableDirectAccessMode(EEntryMetrics2014* pMetrics, ENTNUM entrynumber);
4216 ENTNUM _GetConnectedEntryNumber() {
return _directaccess_entnum; }
4248 int CalcLeftmostNotePosition();
4257 return _GetBasicMetricsPtr()->attachCount;
4276 if (_GetBasicMetricsPtr()->attachCount == 0)
return false;
4277 for (
int i = 0; i < _GetBasicMetricsPtr()->attachCount; i++)
4279 EAttachment* pTest = &_GetBasicMetricsPtr()->pAttach[i];
4280 if (pTest->tag != pBaseDataObject->
Tag())
continue;
4281 if (pTest->id != the_id)
continue;
4284 if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE))
continue;
4286 memcpy(pAttachment, pTest,
sizeof(EAttachment));
4299 if (_GetBasicMetricsPtr()->headRect.top > _GetBasicMetricsPtr()->stemRect.top)
return _GetBasicMetricsPtr()->headRect.top;
4300 return _GetBasicMetricsPtr()->stemRect.top;
4309 if (_GetBasicMetricsPtr()->headRect.bottom < _GetBasicMetricsPtr()->stemRect.bottom)
return _GetBasicMetricsPtr()->headRect.bottom;
4310 return _GetBasicMetricsPtr()->stemRect.bottom;
4320 return _GetBasicMetricsPtr()->stemRect.bottom;
4330 return _GetBasicMetricsPtr()->stemRect.top;
4340 return _GetBasicMetricsPtr()->headRect.left;
4350 return _GetBasicMetricsPtr()->headRect.right;
4360 return _GetBasicMetricsPtr()->stemRect.left;
4370 return _GetBasicMetricsPtr()->stemRect.right;
4380 return _GetBasicMetricsPtr()->lastDot;
4391 return _GetBasicMetricsPtr()->firstAcci;
4397 return _GetBasicMetricsPtr()->entryFlags;
4401 ENoteMetrics* FindNoteMetrics(twobyte noteID);
4403#if FXT_VERSION >= FINALEVERSION_2014
4405 ENoteMetrics2014* FindNoteMetrics2014(twobyte noteID);
4415 return _GetBasicMetricsPtr()->numNotes;
4429 int GetNoteLeftPosition(
int index)
const;
4439 int GetNoteWidth(
int index)
const;
4452 int GetNoteCenterVerticalPos(
int index)
const;
4462 eNoteID GetNoteID(
int index)
const;
4470 if (!_loaded)
return NULL;
4471 return &_GetBasicMetricsPtr()->stemRect;
4480 if (!_loaded)
return NULL;
4481 return &_GetBasicMetricsPtr()->headRect;
4502#ifdef PDK_FRAMEWORK_DEBUG
4526#if FXT_VERSION >= FINALEVERSION_25
4527 ETextMetrics _textMetrics;
4576 bool LoadSymbol(eUniChar16 symbolchar,
FCFontInfo* pFont,
double percent);
4596 bool LoadArticulation(
FCArticulationDef* pArticDef,
bool flipped,
double percent);
4621#if FXT_VERSION >= FINALEVERSION_25
4622 return _textMetrics.width;
4640#if FXT_VERSION >= FINALEVERSION_25
4641 return _textMetrics.left;
4659#if FXT_VERSION >= FINALEVERSION_25
4660 return _textMetrics.right;
4678#if FXT_VERSION >= FINALEVERSION_25
4679 return _textMetrics.top;
4697#if FXT_VERSION >= FINALEVERSION_25
4698 return _textMetrics.bottom;
4713#if FXT_VERSION >= FINALEVERSION_25
4714 return _textMetrics.eWidth;
4728#if FXT_VERSION >= FINALEVERSION_25
4729 return _textMetrics.eLeft;
4743#if FXT_VERSION >= FINALEVERSION_25
4744 return _textMetrics.eRight;
4758#if FXT_VERSION >= FINALEVERSION_25
4759 return _textMetrics.eTop;
4773#if FXT_VERSION >= FINALEVERSION_25
4774 return _textMetrics.eBottom;
4792#if FXT_VERSION >= FINALEVERSION_25
4793 return GetTopPoints()-GetBottomPoints();
4811#if FXT_VERSION >= FINALEVERSION_25
4812 return GetRightPoints()-GetLeftPoints();
4826#if FXT_VERSION >= FINALEVERSION_25
4827 return GetTopEVPUs()-GetBottomEVPUs();
4841#if FXT_VERSION >= FINALEVERSION_25
4842 return GetRightEVPUs()-GetLeftEVPUs();
4848 const char*
ClassName()
const override {
return "FCTextMetrics"; }
4850#ifdef PDK_FRAMEWORK_DEBUG
4854 DebugOutFloat(
"Advance Width: ", GetAdvanceWidthPoints());
4855 DebugOutFloat(
"Left: ", GetLeftPoints());
4856 DebugOutFloat(
"Right: ", GetRightPoints());
4857 DebugOutFloat(
"Top: ", GetTopPoints());
4858 DebugOutFloat(
"Bottom: ", GetBottomPoints());
4860 DebugOutFloat(
"Advance Width EVPU: ", GetAdvanceWidthEVPUs());
4861 DebugOutFloat(
"Left EVPU: ", GetLeftEVPUs());
4862 DebugOutFloat(
"Right EVPU: ", GetRightEVPUs());
4863 DebugOutFloat(
"Top EVPU: ", GetTopEVPUs());
4864 DebugOutFloat(
"Bottom EVPU: ", GetBottomEVPUs());
4879 const char*
ClassName()
const override {
return "FCNumber"; }
4891 _intvalue =
static_cast<int>(value);
4892 _floatvalue = value;
4902 _floatvalue =
static_cast<double>(value);
4911 _intvalue =
static_cast<int>(value);
4912 _floatvalue = value;
4928#ifdef PDK_FRAMEWORK_DEBUG
4932 DebugOutFloat(
"Floating value", _floatvalue);
4933 DebugOutInt(
"Integer value: ", _intvalue);
4950 const char*
ClassName()
const override {
return "FCPoint"; }
4958#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
4963 static int FCPoint_tostring(lua_State* L)
4965 FCPoint* pThis = luabridge::Stack<FCPoint*>::get(L, 1) LB3(.value());
4966 FCString strX; strX.SetMeasurement(pThis->GetX(), UNIT_EVPUS);
4967 FCString strY; strY.SetMeasurement(pThis->GetY(), UNIT_EVPUS);
4968 std::
string s = std::
string(pThis->ClassName()) + ": (" + strX.GetLuaString() + ", " + strY.GetLuaString() + ")";
4969 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
4978 void SetX(
double value) { _x = value; }
4984 void SetY(
double value) { _y = value; }
5002 void MoveX(
double value) { _x += value; }
5008 void MoveY(
double value) { _y += value; }
5024 FinPrintSettings _settings;
5026 const char*
ClassName()
const override {
return "FCPrintSettings"; }
5036 PRINTODDEVEN_ALL = 0,
5039 PRINTODDEVEN_ODD = 1,
5042 PRINTODDEVEN_EVEN = 2
5053 _settings.copies = 1;
5054 _settings.startPage = 1;
5055 _settings.endPage = 1000;
5070 bool GetColor()
const {
return _settings.bPrintColor != 0; }
5112 bool GetTile()
const {
return _settings.tile != 0; }
5138#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5151 return _settings.pageRangeString;
5164 if (copies < 0)
return;
5165 if (copies > 100)
return;
5166 _settings.copies = copies;
5173 void SetColor(
bool state) { _settings.bPrintColor = state; }
5181 if (startpage < 1)
return;
5182 _settings.startPage = startpage;
5191 if (endpage < 1)
return;
5192 _settings.endPage = endpage;
5223 void SetTile(
bool state) { _settings.tile = state; }
5238 _settings.nUp = count;
5251 if (value < 0)
return;
5252 _settings.userOverlap = value;
5268#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5278 case PRINTODDEVEN_ALL:
5279 case PRINTODDEVEN_EVEN:
5280 case PRINTODDEVEN_ODD:
5281 _settings.oddEven = value;
5294 if (!pszString)
return;
5295 strncpy(_settings.pageRangeString, pszString,
sizeof(_settings.pageRangeString));
5296 _settings.pageRangeString[
sizeof(_settings.pageRangeString) - 1] = 0;
5309 bool PrintCurrent();
5334 ufourbyte _glyphnumber;
5335 float _height, _width, _left, _bottom;
5336 float _maxascent, _maxdescent;
5342 _height = _width = 0;
5343 _left = _bottom = 0;
5344 _maxascent = _maxdescent = 0;
5356 bool LoadInfo(
FCFontInfo* pFontInfo, ufourbyte glyphno);
5449 float GetTop()
const {
return _bottom+_height; }
5471#ifdef PDK_FRAMEWORK_DEBUG
5475 DebugOutHex(
"Glyph Number: ", GetGlyphNumber());
5476 DebugOutFloat(
"Width: ", GetWidth());
5477 DebugOutFloat(
"Height: ", GetHeight());
5478 DebugOutFloat(
"Left: ", GetLeft());
5479 DebugOutFloat(
"Bottom: ", GetBottom());
5480 DebugOutFloat(
"Max Ascender: ", GetMaxAscent());
5481 DebugOutFloat(
"Max Descender: ", GetMaxDescent());
5508 const char*
ClassName()
const override {
return "FCFontDialog"; }
5522 _pUserFontInfo = pFontInfo;
5563 if (!pString)
return;
5630 const char*
ClassName()
const override {
return "FCRange"; }
5641#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
5643 static FCRange* FCRange_Lua(
void* ptr, lua_State *L)
5645 const int numArgs = lua_gettop(L);
5646 const int start = (numArgs <= 2) ? 0 : luabridge::Stack<int>::get(L, 2) LB3(.value());
5647 const int length = (numArgs <= 3) ? 0 : luabridge::Stack<int>::get(L, 3) LB3(.value());;
5648 return new(ptr)
FCRange(start, length);
5652#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
5657 static int FCRange_tostring(lua_State* L)
5659 FCRange* pThis = luabridge::Stack<FCRange*>::get(L, 1) LB3(.value());
5660 std::
string s = std::
string(pThis->ClassName()) + ": (" + std::to_string(pThis->GetStart()) + ", " + std::to_string(pThis->GetLength()) + ")";
5661 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
5683 int GetEnd()
const {
return _start + _length; }
Base class for all data-related classes (that handles Finale data).
Definition ff_base.h:677
CMPER GetRawOtherCmper() const
Returns the current EDataID interpreted as other.cmper.
Definition ff_base.h:1102
virtual twobyte CalcLastInci()
For internal use only!
Definition ff_base.h:756
virtual void Deallocate()
Definition ff_base.h:726
EXTAG GetRawTag() const
Returns the currently active EXTAG for this object.
Definition ff_base.h:1096
void ClearData()
Definition finaleframework.cpp:1323
EXTAG GetCustomTag() const
Returns the custom Enigma tag, if any.
Definition ff_base.h:871
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
void DebugDataByteArrayDump() override
Outputs a memory dump of the data block in the object for debugging purposes, as a C++ byte array.
Definition ff_base.h:1020
void DebugDataOffsetDump(int offset, int size)
For debug mode only. Dumps a data memory block at a specific offset and with a specific size.
Definition finaleframework.cpp:1311
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:828
twobyte GetRawOtherInci() const
Returns the current EDataID interpreted as other.inci.
Definition ff_base.h:1108
virtual bool LoadFirst()=0
Loads the very first element in the database, if any.
FCNumbers * CreateRawDataDump()
Creates a byte collection with the raw loaded data block for the object (if the object type supports ...
Definition finaleframework.cpp:1414
const void * GetDataBlock()
Intended ONLY for the _CloneFrom implementation.
Definition ff_base.h:861
__FCBaseData()
The constructor.
Definition finaleframework.cpp:1216
const PDKFRAMEWORK_CLASSID GetClassID() const override=0
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
virtual bool DeepDeleteData()
Deletes data and all data that's connected to the object.
Definition ff_base.h:931
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition ff_base.h:713
virtual bool LoadPrevious()
Loads the previous element in the database, if any.
Definition ff_base.h:962
EDOCID GetConnectedDocID() const
Returns the document ID that was connected to the last load/save of the data.
Definition ff_base.h:788
bool DataIsLoaded() const
Returns true is any data has been loaded into the object.
Definition ff_base.h:771
CMPER GetRawDetailCmper2() const
Returns the current EDataID interpreted as detail.cmper2.
Definition ff_base.h:1120
bool LoadDataBlock()
Loads the data. If the object is of dynamic size, the old memory block is freed and a new is allocate...
Definition finaleframework.cpp:1349
void _CloneFrom(__FCBaseData *pSource)
For internal use only. Copies object data (except data block) from another object.
Definition finaleframework.cpp:1256
void SetCustomTag(EXTAG tag)
Sets the custom Enigma tag, for classes that support multiple Enigma tags.
Definition ff_base.h:883
twobyte GetRawDetailInci() const
Returns the current EDataID interpreted as detail.inci.
Definition ff_base.h:1126
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass.
Definition ff_base.h:696
virtual EVERSION EnigmaVersion() const
The Enigma version for save/load/create/delete operations.
Definition ff_base.h:813
virtual int DataSizeLoad() const =0
Returns the data size for the data structure that should be loaded.
virtual int DataSizeSave() const
Returns the data size for the data structure that should be saved or created.
Definition finaleframework.cpp:1344
virtual EXTAG Tag() const =0
The Enigma tag for the derived class.
int _GetLoadedSize() const
Intended ONLY for the _CloneFrom implementation.
Definition ff_base.h:855
__FCBaseData * CreateClone()
Creates an identical copy of an object.
Definition finaleframework.cpp:1303
const EDataID * _GetDataID()
Intended ONLY for the _CloneFrom implementation.
Definition ff_base.h:849
virtual bool DeleteData()
Deletes the associated data from Finale's database. Be careful when deleting multiple objects.
Definition finaleframework.cpp:1339
virtual bool IsDynamicSize()
Definition ff_base.h:734
CMPER GetRawDetailCmper1() const
Returns the current EDataID interpreted as detail.cmper1.
Definition ff_base.h:1114
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:1007
virtual bool LoadNext()
Loads the next element from the database, if any.
Definition finaleframework.cpp:1408
virtual ~__FCBaseData()
Virtual destructor.
Definition finaleframework.cpp:1226
bool _heapdatablock
Variable that tells if _datablock is dynamically created on the heap (and should be deleted at object...
Definition ff_base.h:700
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition finaleframework.cpp:1266
void _TagDocumentID()
For internal use only.
Definition finaleframework.cpp:1236
bool RelinkToCurrentView()
Relinks the contents in the current view so that the score and part(s) match.
Definition finaleframework.cpp:1285
virtual bool Save()
Saves the currently loaded to its current location.
Definition finaleframework.cpp:1379
ENTNUM GetRawEntryDetailEntryNumber() const
Returns the current EDataID interpreted as entryDetail.entryNumber.
Definition ff_base.h:1135
EDOCID _connecteddocID
The "connected" document ID., which is the document the where the document was loaded (or last saved)...
Definition ff_base.h:692
twobyte GetRawEntryDetailInci() const
Returns the current EDataID interpreted as entryDetail.inci.
Definition ff_base.h:1141
void DebugDataDump() override
Outputs a memory dump of the data block in the object for debugging purposes.
Definition ff_base.h:1014
bool RelinkToScore()
Relinks all parts to the contents of the score.
Definition finaleframework.cpp:1294
virtual bool LoadLast()
Loads the very last element in the database, if any.
Definition ff_base.h:950
bool VerifyConnectedDocID()
Checks that the stored document ID for the data object matches the current document's ID.
Definition finaleframework.cpp:1241
virtual void * Allocate()=0
virtual bool Reload()
Refreshes the data for the object, to synch the data with Finale's current data.
Definition finaleframework.cpp:1367
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition ff_base.h:709
Base class for the Finale Framework classes.
Definition ff_base.h:71
bool ReadXML_StringAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
Helper method to read FCString objects from the XML file, as an attribute to a node.
Definition finaleframework.cpp:1177
void DebugMsgString(const char *pszPrefixText, const char *thestring)
Creates a simple Message Box for debug purposes. The text appears with the extra string appearing aft...
Definition finaleframework.cpp:727
void SetUserData2(void *pData)
Sets the additional user data attached to the instance of an object.
Definition ff_base.h:511
bool ReadXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper method to read FCString objects from the XML file.
Definition finaleframework.cpp:1149
__FCBase()
The constructor.
Definition ff_base.h:279
bool ReadXML_FloatAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, float *pValue)
Helper method to read floating point objects from the XML file, as an attribute to a node.
Definition finaleframework.cpp:1201
static void DebugOutString(const char *pszPrefixText, const char *thestring)
Static method that outputs a line for debugging purposes (C string version). The text appears with th...
Definition finaleframework.cpp:864
int GetBitCount(FLAG_32 flag)
Returns the total number of set bits in a 32-bit unsigned int.
Definition finaleframework.cpp:1079
static void DebugOutHex(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in h...
Definition finaleframework.cpp:832
bool ReadXML_BoolAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool *pValue)
Helper method to read boolean objects from the XML file, as an attribute to a node.
Definition finaleframework.cpp:1193
int DebugOutFormat(const char *fmt,...)
Outputs debug text using C style "printf" syntax.
Definition finaleframework.cpp:1021
void StoreXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper function to store FCString objects in the XML file.
Definition finaleframework.cpp:1101
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag.
Definition finaleframework.cpp:1063
void StoreXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int value)
Helper function to store integer objects in the XML file.
Definition finaleframework.cpp:1109
void DebugMsg(const char *pszMsg)
Creates a simple Message Box for debug purposes with just one text string.
Definition finaleframework.cpp:738
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition ff_base.h:84
@ FCID_FONTINFO
Definition ff_base.h:123
@ FCID_NUMBER
Definition ff_base.h:158
@ FCID_STRING
Definition ff_base.h:202
void * GetUserData2() const
Gets the additional user data attached to the instance of an object.
Definition ff_base.h:525
static void DebugOutTag(const char *pszPrefixText, EXTAG extag)
Static method that outputs a line for debugging purposes. The text appears with the EXTAG (in text) a...
Definition finaleframework.cpp:778
void SetUserData(void *pData)
Sets the user data attached to the instance of an object.
Definition ff_base.h:504
bool ReadXML_IntegerAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, int *pValue)
Helper method to read integer objects from the XML file, as an attribute to a node.
Definition finaleframework.cpp:1185
virtual bool IsIdentical(const __FCBase *pCompareObject) const
Returns true if the data in the passed object is considered to be identical to the current object,...
Definition ff_base.h:540
void StoreXML_BoolAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool value)
Helper function to store boolean objects in the XML file, as an attribute to a node.
Definition finaleframework.cpp:1139
static void DebugOutInt(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in d...
Definition finaleframework.cpp:763
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets/resets a 32 bit flag, by using a bit mask.
Definition finaleframework.cpp:1071
MEASUREMENTUNITS
Constants for Finale's standard measurement units.
Definition ff_base.h:244
@ MEASUREMENTUNIT_EVPUS
Definition ff_base.h:249
@ MEASUREMENTUNIT_CENTIMETERS
Definition ff_base.h:255
@ MEASUREMENTUNIT_DEFAULT
Definition ff_base.h:246
@ MEASUREMENTUNIT_MILLIMETERS
Definition ff_base.h:267
@ MEASUREMENTUNIT_SPACES
Definition ff_base.h:264
@ MEASUREMENTUNIT_POINTS
Definition ff_base.h:258
@ MEASUREMENTUNIT_PICAS
Definition ff_base.h:261
@ MEASUREMENTUNIT_INCHES
Definition ff_base.h:252
bool ReadXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool *pValue)
Helper method to read boolean objects from the XML file.
Definition finaleframework.cpp:1169
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition finaleframework.cpp:954
bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits) const
Gets a state from flag bits. Returns true if any bit in the mask is set.
Definition ff_base.h:486
void * GetUserData() const
Gets the user data attached to the instance of an object.
Definition ff_base.h:518
void StoreXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool value)
Helper function to store boolean objects in the XML file.
Definition finaleframework.cpp:1119
virtual ~__FCBase()
Virtual destructor, so all inherited classes get the virtual destructor.
Definition ff_base.h:293
void SetSpecific32Bit(FLAG_32 *flag, int bitnumber, bool state)
Sets/resets a single bit in a 32 bit flag, by specifying one specific bit.
Definition finaleframework.cpp:1091
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:1037
void DebugMsgInt(const char *pszPrefixText, int i)
Creates a simple Message Box for debug purposes. The text appears with the extra digit (in decimal pr...
Definition finaleframework.cpp:705
static void DebugOutFloat(const char *pszPrefixText, double f)
Static method that outputs a line for debugging purposes. The text appears with the extra float value...
Definition finaleframework.cpp:771
static void DebugOutBin(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in b...
Definition finaleframework.cpp:839
virtual bool ReadFromXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to read object data.
Definition ff_base.h:664
static void DebugOutPtr(const char *pszPrefixText, void *ptr)
Static method that outputs a line for debugging purposes. The prefix text appears with the extra ptr ...
Definition finaleframework.cpp:747
void StoreXML_FloatAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, float value)
Helper function to store floating point objects in the XML file, as an attribute to a node.
Definition finaleframework.cpp:1144
virtual void StoreToXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to store an object's data.
Definition ff_base.h:597
static void DebugOutBool(const char *pszPrefixText, bool state)
Static method that outputs a line for debugging purposes. The boolean state appears afterwards as eit...
Definition finaleframework.cpp:879
virtual void DebugDataDump()
Outputs a memory dump of the data block in the object for debugging purposes.
Definition finaleframework.cpp:1045
virtual const char * ClassName() const =0
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
void DebugOutMenuInfo(FCUI *pUI, int menuixd_horiz, int menuixd_vert) const
Outputs the menu command info for debugging purposes.
Definition finaleframework.cpp:978
void DebugMsgHex(const char *pszPrefixText, int i)
Creates a simple Message Box for debug purposes. The text appears with the extra digit (as a hexadeci...
Definition finaleframework.cpp:716
static void DebugOutByteArrayBlock(const void *pBuffer, int startoffset, int size)
Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (a...
Definition finaleframework.cpp:908
bool ReadXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int *pValue)
Helper method to read integer objects from the XML file.
Definition finaleframework.cpp:1161
virtual const PDKFRAMEWORK_CLASSID GetClassID() const
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_base.h:229
void StoreXML_StringAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
Helper function to store FCString objects in the XML file, as an attribute to a node.
Definition finaleframework.cpp:1129
static void DebugOutBlock(const void *pBuffer, int startoffset, int size)
Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (a...
Definition finaleframework.cpp:886
void StoreXML_IntegerAttribute(tinyxml2::XMLElement *pNode, const char *pszAttributeName, int value)
Helper function to store integer objects in the XML file, as an attribute to a node.
Definition finaleframework.cpp:1134
virtual void DebugDataByteArrayDump()
Outputs a memory dump of the data block in the object for debugging purposes, as a C++ byte array.
Definition finaleframework.cpp:1052
An inci subrecord class for multi-inci data.
Definition ff_base.h:1150
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:1152
bool Load(CMPER cmper, twobyte inci)
Loads an object from a specific cmper/inci location.
Definition finaleframework.cpp:1434
The class for an articulation definition. On Finale 2012 and above, this class supports the Unicode c...
Definition ff_other.h:12287
Class for a category definition.
Definition ff_other.h:13416
The class that reference a cell (one measure on one staff) in the musical "grid".
Definition ff_cell.h:18
Class that encapsulate the measure metrics info data.
Definition ff_base.h:3871
int GetWidth() const
Returns the total width of the cell, at system scaling.
Definition ff_base.h:4031
int GetMusicStartPos() const
Returns position where the music starts in the cell (after the key/clef/repeats), at system scaling.
Definition ff_base.h:4011
Evpu32 GetSystemTopPos() const
Returns the position of the top of the system. The coordinate is referenced from the bottom of the pa...
Definition ff_base.h:4087
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4153
Evpu32 GetReferenceLinePos() const
Returns the position of the reference line of the staff. The coordinate is referenced from the bottom...
Definition ff_base.h:3973
int GetStaffSystem() const
Returns the staff system number for the cell.
Definition ff_base.h:4077
bool GetAttachment(__FCBaseData *pBaseDataObject, fourbyte the_id, EAttachment *pAttachment, bool stop=false)
Fills a buffer with the attachment data for an element.
Definition ff_base.h:4116
Int100 GetStaffScaling() const
Returns the accumulated staff scaling for the staff, in 100th of a percent.
Definition ff_base.h:3982
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:3881
int GetBackRepeatWidth() const
Returns the width of the back repeat for the cell.
Definition ff_base.h:4058
Evpu32 GetBottomStafflinePos() const
Returns the bottom line position of the staff. The coordinate is referenced from the bottom of the pa...
Definition ff_base.h:3961
int GetAttachmentCount() const
Returns the number of attachments that has info within the metrics data.
Definition ff_base.h:4001
int GetLeftEdge() const
Returns the left position of the cell cell (before the key/clef/repeat), at system scaling.
Definition ff_base.h:4022
Int100 GetSystemScaling() const
Returns the accumulated system scaling, in 100th of a percent.
Definition ff_base.h:3991
Evpu32 GetTopStafflinePos() const
Returns the top line position of the staff. The coordinate is referenced from the bottom of the page.
Definition ff_base.h:3946
int GetRightBarlineWidth() const
Returns the combined total width of the right barline, including double or final barlines and the gap...
Definition ff_base.h:4068
int GetFrontRepeatWidth() const
Returns the width of the front repeat for the cell.
Definition ff_base.h:4049
Evpu32 GetSlotNumber() const
Returns the 1-based slot number within its system for the cell's staff. Subtract 1 to get an index to...
Definition ff_base.h:4097
static void MarkMetricsForRebuild()
Static method that sets the flag that the metrics should be rebuilt on the next load.
Definition ff_base.h:3904
int GetMusicWidth() const
Returns the width of the music part of the cell, at system percent.
Definition ff_base.h:4040
FCCellMetrics()
The constructor. Defaults to unloaded. Metrics must be loaded with LoadAtCell or LoadAtEntry.
Definition ff_base.h:3888
Int100 GetHorizontalStretch() const
Returns the horizontal stretch of the staff system, in 100th of a percent.
Definition ff_base.h:3931
Class for an opened Finale document. An opened Finale document has a 1-based ID and can be displayed ...
Definition ff_documents.h:29
Class that specifies Enigma text style. This includes font, size, efx, superscript,...
Definition ff_base.h:1811
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_base.h:1820
void SetBaselineShift(Evpu32 value)
Returns the baseline shift in evpus. This value does not affect layout.
Definition ff_base.h:1897
void SetSuperscript(Evpu32 value)
Returns the superscript value. This value may affect layout. Negative values are subscripts.
Definition ff_base.h:1903
void SetInterletterSpacing(fourbyte value)
Sets the inter-letter spacing value in 1/1000 of an EM units.
Definition ff_base.h:1891
fourbyte GetInterletterSpacing() const
Returns the inter-letter spacing value in 1/1000 of an EM units.
Definition ff_base.h:1873
FCEnigmaTextStyle()
The constructor.
Definition ff_base.h:1834
Evpu32 GetSuperscript() const
Returns the superscript value. This value may affect layout. Negative values are subscripts.
Definition ff_base.h:1885
Evpu32 GetBaselineShift() const
Returns the baseline shift in evpus. This value does not affect layout.
Definition ff_base.h:1879
FCFontInfo * GetFont()
Returns the font. This is a pointer into the current instance of FCEnigmaTextStyle,...
Definition ff_base.h:1862
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:1819
FCEnigmaTextStyle(const FCFontInfo &font)
Constructor with font info.
Definition ff_base.h:1840
Class that encapsulate the entry metrics data.
Definition ff_base.h:4172
JWERECT * GetStemRect()
Returns a pointer to the stem rectangle in the metrics data.
Definition ff_base.h:4468
int GetTopPosition() const
Returns the highest position for the noteheads or stem.
Definition ff_base.h:4297
JWERECT * GetNoteheadRect()
Returns a pointer to the notehead rectangle in the metrics data.
Definition ff_base.h:4478
int GetLastDotPosition() const
Returns the horizontal position of rightmost augmentation dot.
Definition ff_base.h:4378
int GetRightPosition() const
Returns the right-side position for the noteheads or stem.
Definition ff_base.h:4348
int GetFirstAccidentalPosition() const
Returns the the left most edge of the accidental rectangle for all accidentals on the entry.
Definition ff_base.h:4389
int GetStemTopPosition() const
Returns the bottom position for the stem.
Definition ff_base.h:4328
int GetStemLeftPosition() const
Returns the left-side position for the stem.
Definition ff_base.h:4358
int GetStemBottomPosition() const
Returns the bottom position for the stem.
Definition ff_base.h:4318
int GetStemRightPosition() const
Returns the right-side position for the stem.
Definition ff_base.h:4368
int GetAttachmentCount() const
Returns the number of attachments that have info within the metrics data.
Definition ff_base.h:4255
int GetLeftPosition() const
Returns the left-side position for the noteheads or stem.
Definition ff_base.h:4338
int GetNoteCount() const
Returns the number of notes that the metrics data has information about.
Definition ff_base.h:4413
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4503
static void MarkMetricsForRebuild()
Static method that sets the refresh flag, so the next Load call will rebuild the metrics data.
Definition ff_base.h:4229
FLAG_32 GetEntryFlags()
Return the metrics entry flags.
Definition ff_base.h:4395
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:4203
int GetBottomPosition() const
Returns the lowest position for the noteheads or stem.
Definition ff_base.h:4307
bool GetAttachment(__FCBaseData *pBaseDataObject, fourbyte the_id, EAttachment *pAttachment, bool stop=false)
Fills a buffer with the attachment data for an note-attached element.
Definition ff_base.h:4274
Class to display the font selection dialog box to the user.
Definition ff_base.h:5500
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:5508
FCFontInfo * GetFontInfo() const
Gets the transfer object that should be used in the dialog. The object is used for both the input and...
Definition ff_base.h:5553
bool GetUseStyles() const
Returns if font styles should be selectable in the dialog box.
Definition ff_base.h:5543
void SetSampleString(FCString *pString)
Sets the sample string, that should be used to demo the apparence of the font selection.
Definition ff_base.h:5604
void GetSampleString(FCString *pString)
Gets the sample string, that is used to demo the apparence of the font selection.
Definition ff_base.h:5561
void SetUseStyles(bool state)
Sets if font styles (such as bold, underline, etc) should be selectable in the dialog box.
Definition ff_base.h:5583
void SetFontInfo(FCFontInfo *pFontInfo)
Sets the transfer object (of the FCFontInfo class). This is used for both font input and output in th...
Definition ff_base.h:5596
void SetUseSizes(bool state)
Sets if font sizes should be selectable in the dialog box.
Definition ff_base.h:5575
bool GetUseSizes() const
Returns if font sizes should be selectable in the dialog box.
Definition ff_base.h:5535
FCFontDialog(FCUI *pUI, FCFontInfo *pFontInfo)
The constructor.
Definition ff_base.h:5519
Class for document-independent font information.
Definition ff_base.h:1192
double CalcAverageRomanCharacterWidthPoints() const
Calculates the average width of the roman characters in the font in points.
Definition ff_base.h:1792
double CalcAverageRomanCharacterWidthEVPUs() const
Calculates the average width of the roman characters in the font in EVPUs.
Definition finaleframework.cpp:4151
void CopyFrom(const FCFontInfo *pInfo)
Copies data from another font info object.
Definition finaleframework.cpp:3822
bool GetBold() const
Returns true if the font style is boldface.
Definition ff_base.h:1694
bool IsName(const char *pszTestName) const
Checks if the font name is a perfect match to the C-string test string.
Definition finaleframework.cpp:4092
bool MakeDefaultMusicFont()
Changes the document's default music font to match this instance of FCFontInfo and modifies this inst...
Definition finaleframework.cpp:4141
void SetAbsolute(bool state)
Sets the absolute (fixed font) size state of the font info.
Definition ff_base.h:1616
bool MakeEnigmaString(FCString *pString, FCString *pFontTagString=NULL)
Creates an Enigma string (for use in raw strings) based on the current font information.
Definition finaleframework.cpp:3851
bool ParseEnigmaCommand(FCString *pString)
Parses a valid Enigma font command and changes the font information accordingly.
Definition finaleframework.cpp:3916
bool SaveFontPrefs(int prefsID)
Saves the font information to any of the preference fonts.
Definition finaleframework.cpp:3841
void ParseEnigmaFont(const EEnigmaFont *pEnigmaFont)
Transfers the info from a Finale-internal font structure to the FCFontInfo object.
Definition ff_base.h:1510
FCString * CreateDescription() const
Definition finaleframework.cpp:4008
double GetSizeFloat() const
Returns the font size as a floating point (with decimal digits).
Definition ff_base.h:1351
bool IsMacSymbolFont() const
returns true i the font is a Mac Symbol font.
Definition finaleframework.cpp:4113
void SetBold(bool state)
Sets the boldface attribute of the font info.
Definition ff_base.h:1632
void SetItalic(bool state)
Sets the italics attribute of the font info.
Definition ff_base.h:1648
FCFontInfo * CreateCopy()
Creates a copy of the font info object on the heap.
Definition ff_base.h:1301
void SetNameByID(EFONTID id)
Sets the font name by using the document's internal Enigma font ID.
Definition finaleframework.cpp:4078
void SetName(const std::string &pszName)
Sets the font name.
Definition finaleframework.cpp:4062
void SetSize(int fontsize)
Sets the font size as an integer value.
Definition ff_base.h:1600
FLAG_16 GetEnigmaStyles() const
Gets the font style as standard Enigma bit storage.
Definition ff_base.h:1412
void SetPlain()
Clears the styles so the font doesn't use any style.
Definition ff_base.h:1662
void SetStrikeOut(bool state)
Sets the strikeout state of the font info.
Definition ff_base.h:1624
void SetUnderline(bool state)
Sets the underline attribute of the font info.
Definition ff_base.h:1656
int GetSize() const
Returns the font size as an integer number.
Definition ff_base.h:1343
EFONTID GetFontID() const
Gets the internal document-specific font ID. It may not yet have been assigned a value,...
Definition ff_base.h:1565
bool GetHidden() const
Returns true if the font style is hidden (don't print).
Definition ff_base.h:1724
FCString * CreateEnigmaString(FCString *pFontTagString=NULL)
Returns a created FCString object that contains the font information as an Enigma string.
Definition finaleframework.cpp:3883
static fourbyte GetSystemTextEncoding()
Returns the internal Engima encoding number for the running Finale version. This value is appended to...
Definition finaleframework.cpp:3817
void SetSizeFloat(double fontsize)
Sets the font size as a floating point (with decimal digits) value.
Definition ff_base.h:1608
void MakeEnigmaStyleString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font style information.
Definition finaleframework.cpp:3893
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:4167
FCFontInfo()
Default constructor. This constructor does not add the font to the current document....
Definition finaleframework.cpp:3769
void SetHidden(bool state)
Sets the hidden state of the font info.
Definition ff_base.h:1640
bool IsPlain()
Returns true if the font has no special style flags.
Definition ff_base.h:1688
void SetFontID(EFONTID fontID)
Sets the internal document-specific font ID.
Definition ff_base.h:1579
bool GetIsSMuFLFont() const
Returns true if the font is a SMuFL font.
Definition ff_base.h:1733
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_base.h:1211
bool LoadFontPrefs(int prefsID)
Sets the font information to any of the preference fonts.
Definition finaleframework.cpp:3833
ENIGMASTYLES
Constants for enigma styles. These are bit-sensitve values that can be combined with bitwise-or.
Definition ff_base.h:1219
@ ENIGMASTYLE_STRIKEOUT
Definition ff_base.h:1233
@ ENIGMASTYLE_BOLD
Definition ff_base.h:1224
@ ENIGMASTYLE_HIDDEN
Definition ff_base.h:1239
@ ENIGMASTYLE_PLAIN
Definition ff_base.h:1221
@ ENIGMASTYLE_UNDERLINE
Definition ff_base.h:1230
@ ENIGMASTYLE_ABSOLUTE
Definition ff_base.h:1236
@ ENIGMASTYLE_ITALIC
Definition ff_base.h:1227
bool IsIdenticalTo(const FCFontInfo &compareWith) const
Returns true if all font information is identical to the compared object.
Definition finaleframework.cpp:4122
bool GetAbsolute() const
Returns true if the font size is absolute.
Definition ff_base.h:1718
void SetNameString(const FCString &value)
Sets the font name (FCString version).
Definition finaleframework.cpp:4067
EFONTID GetNameByID() const
Legacy version of GetIDByName with incorrect name.
Definition ff_base.h:1402
bool IsNameString(const FCString &pTestName) const
Checks if the font name is a perfect match to the test string.
Definition finaleframework.cpp:4106
bool GetStrikeOut() const
Returns true if the font style is strikeout.
Definition ff_base.h:1712
std::string GetName() const
Gets the font name (const C-string version).
Definition finaleframework.cpp:3978
bool GetItalic() const
Returns true if the font style is italic.
Definition ff_base.h:1700
bool GetUnderline() const
Returns true if the font style is underline.
Definition ff_base.h:1706
void GetNameString(FCString *pString) const
Gets the font name and puts it in a FCString object.
Definition finaleframework.cpp:3963
FCString * CreateEnigmaStyleString()
Creates a FCString object and creates the Enigma font style info string, based on only the current fo...
Definition finaleframework.cpp:3909
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:1210
void MakeEnigmaSizeString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font size information.
Definition finaleframework.cpp:3901
void SetEnigmaStyles(FLAG_16 fontstyles)
Sets the font style as standard Enigma bit storage.
Definition ff_base.h:1523
EFONTID GetIDByName() const
Gets the internal Enigma font ID for the current document by searching for the font name....
Definition finaleframework.cpp:3986
Encapsulates a note entry from an owner class (for example FCNoteEntryCell, FCNoteEntryLayer) class.
Definition ff_noteframe.h:940
Simple class to put numbers into collections.
Definition ff_base.h:4875
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4929
double GetFloat() const
Returns the integer value version of the number.
Definition ff_base.h:4925
int GetInt() const
Returns the integer value version of the number.
Definition ff_base.h:4919
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:4879
FCNumber(double value)
The constructor.
Definition ff_base.h:4888
void SetInt(int value)
Sets the number as an integer.
Definition ff_base.h:4899
void SetFloat(double value)
Sets the number as a float.
Definition ff_base.h:4909
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_base.h:4880
Simple collection class for FCNumber class objects.
Definition ff_basecollection.h:357
Simple class for the representation of x, y coordinates.
Definition ff_base.h:4946
void MoveY(double value)
Moves the y position from the current offset.
Definition ff_base.h:5008
double GetY() const
Returns the y position.
Definition ff_base.h:4996
void SetY(double value)
Sets the y position.
Definition ff_base.h:4984
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:4950
void SetX(double value)
Returns the x position.
Definition ff_base.h:4978
void MoveX(double value)
Moves the x position from the current offset.
Definition ff_base.h:5002
FCPoint(double x, double y)
The constructor.
Definition ff_base.h:4956
double GetX() const
Returns the x position.
Definition ff_base.h:4990
Class containing printing settings (and the ability to print documents).
Definition ff_base.h:5023
void SetPageRangeString(const char *pszString)
Returns the page range string as a C-style string.
Definition ff_base.h:5292
bool GetDrawCropMarks() const
Returns if crop marks should be printed.
Definition ff_base.h:5094
bool GetColor() const
Returns true if color printing should be used.
Definition ff_base.h:5070
bool GetReverse() const
Returns if the pages should be printed in reverse order.
Definition ff_base.h:5088
void SetReverse(bool state)
Sets if the pages should be printed in reverse order.
Definition ff_base.h:5199
twobyte GetStartPage() const
Returns the 1-based start page for printing.
Definition ff_base.h:5076
twobyte GetEndPage() const
Returns the 1-based end page for printing.
Definition ff_base.h:5082
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:5026
void SetFitWithinMargins(bool state)
Sets whether to use the printer margins when fitting a page to print.
Definition ff_base.h:5259
void SetStartPage(twobyte startpage)
Sets the 1-based start page.
Definition ff_base.h:5179
bool GetDrawFileName() const
Returns if the file name should be printed.
Definition ff_base.h:5106
bool GetTile() const
Returns if the document should be tited if bigger than specified page.
Definition ff_base.h:5112
PRINTODDEVENMODES GetOddEvenMode() const
Returns the odd/even printing mode.
Definition ff_base.h:5143
void SetTileOverlap(Evpu32 value)
Sets the user overlap for tiled pages.
Definition ff_base.h:5249
bool GetFitWithinMargins() const
Returns whether to use the printer margins when fitting a page to print.
Definition ff_base.h:5130
void SetEndPage(twobyte endpage)
Sets the 1-based end page.
Definition ff_base.h:5189
bool GetDrawRegistrationMarks() const
Returns if registration marks should be printed.
Definition ff_base.h:5100
void SetDrawFileName(bool state)
Sets if the file name should be printed.
Definition ff_base.h:5217
void SetLayoutCount(twobyte count)
Sets the n-Up layout value. Can be 0, 1, 2, 4.
Definition ff_base.h:5231
const char * GetPageRangeString() const
Returns the page range string as a C-style string.
Definition ff_base.h:5149
PRINTODDEVENMODES
Constants used for printing odd/even pages. Used with the GetOddEvenMode() and SetOddEvenMode() metho...
Definition ff_base.h:5034
FCPrintSettings()
The constructor.
Definition ff_base.h:5051
void SetTile(bool state)
Sets if the document should be tited if bigger than specified page.
Definition ff_base.h:5223
void SetOddEvenMode(PRINTODDEVENMODES value)
Sets the odd/even printing mode.
Definition ff_base.h:5267
void SetColor(bool state)
Sets if color printing should be used.
Definition ff_base.h:5173
twobyte GetLayoutCount() const
Returns the n-Up layout value. Can be 0, 1, 2, 4.
Definition ff_base.h:5118
void SetDrawCropMarks(bool state)
Sets if crop marks should be printed.
Definition ff_base.h:5205
twobyte GetCopyCount() const
Returns the number of copies to print.
Definition ff_base.h:5064
void SetDrawRegistrationMarks(twobyte state)
Sets if registration marks should be printed.
Definition ff_base.h:5211
void SetCopyCount(twobyte copies)
Sets the number of copies to print.
Definition ff_base.h:5162
Evpu32 GetTileOverlap() const
Returns the user overlap for tiled pages.
Definition ff_base.h:5124
Class that encapsulates a range (start, length)
Definition ff_base.h:5624
void SetStart(int val)
Sets the start value.
Definition ff_base.h:5689
int GetStart() const
Returns the start value.
Definition ff_base.h:5670
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:5630
int GetLength() const
Returns the length value.
Definition ff_base.h:5676
FCRange(int start=0, int length=0)
The constructor.
Definition ff_base.h:5639
int GetEnd() const
Returns the end value. The is the index after the end of the range, equal to GetStart + GetLength.
Definition ff_base.h:5683
void SetLength(int val)
Sets the length value.
Definition ff_base.h:5695
Class for storing a "key"+"value" pair of values.
Definition ff_base.h:3815
void SetValueString(FCString *pString)
Sets the "value" string.
Definition ff_base.h:3842
FCSettingsPair(FCString *pLeftString, FCString *pRightString)
The constructor.
Definition ff_base.h:3827
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:3819
FCString * GetValueString()
Returns the "value" string.
Definition ff_base.h:3839
FCString * GetKeyString()
Returns the "key" string.
Definition ff_base.h:3836
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:3844
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1931
void AppendEOL()
Appends a system-specific end-of-line string to the to the FCString object.
Definition ff_base.h:2163
int CalcStringPosFrom(const FCString &subString, int startindex) const
Returns the first position where a substring occurs, from a starting point.
Definition ff_base.h:2579
void AppendCharacter(eUniChar32 character)
Appends a character to the string.
Definition finaleframework.cpp:2253
void AppendLuaString(const char *pOtherString)
Appends a Lua string to the string. This method supports UTF-8.
Definition finaleframework.cpp:2297
void SetLuaString(const char *pszBuffer)
Sets the string, using a Lua string version of the string (as UTF-8).
Definition ff_base.h:3470
int CalcStringPos(const FCString &subString) const
Returns the first position where a substring occurs.
Definition ff_base.h:2530
std::pair< eUniChar32, int > GetCodePointAt(int index) const
Returns the Unicode codepoint at the index position. If the index position points to the high surroga...
Definition finaleframework.cpp:2444
void SetTemplateFolderPath()
Sets the path string to Finale's template folder.
Definition ff_base.h:2358
bool EncodeFromMacRoman()
Re-encodes the string to true Unicode from MacRoman.
Definition finaleframework.cpp:1619
bool SplitToPathAndFile(FCString *pPathPart, FCString *pFilePart) const
Splits a fully qualified file path into path part and file part copies.
Definition ff_base.h:2285
FCStrings * CreateParsedStrings(const char *pszSeparators) const
Creates a collection of strings based on the separator characters. C-style string version.
Definition finaleframework.cpp:3202
void ToLowerCase()
Transforms the string to lower case.
Definition finaleframework.cpp:3287
FCStrings * CreateEnigmaComponents() const
Creates a string collection that consists of the components from an Enigma text command (with correct...
Definition finaleframework.cpp:3058
eUniChar16 GetCharacterAt(int index) const
Returns the character at the index position.
Definition finaleframework.cpp:2436
FCString(const _fcStringChar *pszCString)
Constructor version that takes a the platform UTF16 type as argument.
Definition ff_base.h:2054
void ExtractFileExtension()
Removes everything except the file extension part of a file name.
Definition ff_base.h:2793
FCString * CreateCopy()
Creates a copy of the string object on the heap.
Definition finaleframework.cpp:2839
bool IsEnigmaFileInfoComposer() const
Returns true if the string is an "Composer" Enigma command.
Definition finaleframework.cpp:2065
int GetLength() const
Returns the length of the string.
Definition ff_base.h:3109
FCString(const eUniChar16 *pszCString)
Constructor version that takes a Unicode 16 string as argument.
Definition ff_base.h:2047
int CalcCStringPos(const FCString *pSubString, const char *pszSubString) const
Returns the first position where a substring occurs. C-string version.
Definition ff_base.h:2563
bool EndsWithString(const FCString *pString) const
Returns true if the string ends with the parameter string.
Definition finaleframework.cpp:3344
void SetBackupFolderPath()
Sets the path string to Finale's backup folder.
Definition ff_base.h:2342
bool IsEnigmaCommand() const
Returns true if the string is an Enigma command.
Definition ff_base.h:3249
void TrimWhitespace()
Trims whitespace at both ends of the string.
Definition finaleframework.cpp:1971
static int LoadIntegerResource(const char *resourceID, int defaultValue, const char *pszResourceFileName=NULL, const char *pszTableName=NULL)
Mac version. Static method that loads an integer from a resource string.
bool IsEnigmaFileInfoArranger() const
Returns true if the string is an "Arranger" Enigma command.
Definition finaleframework.cpp:2072
void TrimLinefeed()
Trims linefeed characters at both ends of the string.
Definition finaleframework.cpp:1978
void _SetCFURLRefPath(CFURLRef cfurl)
Definition finaleframework.cpp:2331
FCStrings * CreateEnigmaStrings(bool include_non_commands=false) const
Creates a string collection of every enigma text tag found in the string.
Definition finaleframework.cpp:3131
FCString(const FCString &src)
Copy constructor (required for classes that allocate memory.)
Definition ff_base.h:2080
bool SetCharacterUpperCase(int index)
Sets a specific character to upper case.
Definition finaleframework.cpp:2846
static int LoadIntegerResource(int resourceID, int defaultValue, HINSTANCE dllinstance=0)
Windows version. Static method that loads an integer from a resource string.
Definition finaleframework.cpp:3492
const char * GetEOL() const
Returns the platform-specific end-of-line character(s) as a C-string.
Definition finaleframework.cpp:2132
bool EndsWith(const char *pszString) const
Returns true if the string ends with the parameter string.
Definition finaleframework.cpp:3336
bool SplitAt(int splitpointindex, FCString *pFirstString, FCString *pSecondString, bool includesplitposchar) const
Splits a string into 2 substrings at a specific split point character position.
Definition ff_base.h:2235
bool ContainsStringFrom(const FCString &pSubString, int startindex) const
Returns true if the substring is found within the string from a certain position.
Definition finaleframework.cpp:3380
const char * GetUTF8String() const
Returns a C-string UTF-8 version of the string.
Definition finaleframework.cpp:1804
bool LoadResource(int resourceID, HINSTANCE dllinstance=0)
Windows version. Loads the resource string into the string object.
Definition finaleframework.cpp:3420
void InsertString(const FCString *pString, int insertindex=0)
Inserts a string object to the string at a specified index position.
Definition finaleframework.cpp:2152
bool IsEnigmaFileInfoLyricist() const
Returns true if the string is an "Lyricist" Enigma command.
Definition finaleframework.cpp:2079
bool StartsWith(const char *pszString) const
Returns true if the string starts with the parameter string.
Definition finaleframework.cpp:3270
bool IsEqualCString(const char *pszString) const
Returns true if the string is identical with the parameter. (C-style string version....
Definition finaleframework.cpp:2174
bool IsEnigmaFileInfoCopyright() const
Returns true if the string is an "Copyright" Enigma command.
Definition finaleframework.cpp:2086
void SetUserOptionsPath()
Sets the string to the user options path on the running system.
Definition finaleframework.cpp:2359
bool CopyToUnicodeBuffer(eUniChar16 *pBuffer, int maxbufferlen=0) const
Copies the string to a 16-bit Unicode buffer. The buffer must be big enough to have room for an endin...
Definition finaleframework.cpp:1725
void SetCString(const char *pszBuffer, int maxchars=-1)
Sets the string, using a C-string version of the string.
Definition finaleframework.cpp:1662
double GetMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) unit) const
Converts the string to an EVPU measurement value, based on a specific unit.
Definition finaleframework.cpp:2756
void SetPercussionTypesFilePath()
Sets the full path string to Finale's percussion note types text file. This file should NEVER be modi...
Definition ff_base.h:2391
FCString(const char *pszCString)
Constructor version that takes a C string (Lua string) as argument. The C string can be encoded eithe...
Definition ff_base.h:2040
void AppendFloat(double value)
Appends an floating-point value to the string.
Definition finaleframework.cpp:2312
bool IsEnigmaFont() const
Returns true if the string is an Enigma font command.
Definition finaleframework.cpp:2029
void SetMusicFolderPath()
Sets the path string to Finale's music folder.
Definition ff_base.h:2326
int GetInteger(int index=0) const
Converts the decimal string contents to an integer value.
Definition finaleframework.cpp:2484
void * GetNSString() const
Returns a NSString* version of the string (on Cocoa only).
Definition finaleframework.cpp:2472
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:3796
void SetPreferencesFolderPath()
Sets the path string to Finale's preference folder.
Definition ff_base.h:2404
FCString()
The constructor. Defaults to an empty string.
Definition ff_base.h:2029
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_base.h:2015
void SetCurrentTime()
Set the string to the current time in hh:mm:ss format.
Definition ff_base.h:3587
bool ContainsString(const FCString &pSubString) const
Returns true if the substring is found within the string.
Definition finaleframework.cpp:3375
void SetLibFolderPath()
Sets the path string to Finale's library folder.
Definition ff_base.h:2334
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:2014
int FormatString(FCString *fmt,...)
Formats a string using the same syntax and manner as the printf() function in C. The version of the m...
Definition finaleframework.cpp:1525
bool LoadResource(const char *resourceID, const char *pszResourceFileName=NULL, const char *pszTableName=NULL)
Mac version. Loads the resource string into the string object.
void SetFloat(double f)
Sets the string to a floating point value.
Definition finaleframework.cpp:2582
const char * GetCString() const
Returns a C-string version of the string.
Definition finaleframework.cpp:1766
void SetRunningLuaFilePath()
Sets the string to the folder for the running script file. The string is cleared if the script is run...
Definition finaleframework.cpp:2426
void SetHex(int number, int bitwidth)
Sets the string to a lower-case hexadecimal number.
Definition finaleframework.cpp:2536
bool IsEnigmaFileInfoTitle() const
Returns true if the string is an "Title" Enigma command.
Definition finaleframework.cpp:2051
void SetNSString(void *pNSString)
Sets the string to a NSString* value.
Definition finaleframework.cpp:2478
bool ContainsCStringFrom(const char *pszSubString, int startindex) const
Returns true if the substring is found from a certain position within the string.
Definition ff_base.h:2517
void AppendString(const FCString *pOtherString)
Appends another string object to the string.
Definition finaleframework.cpp:2277
void SetTempFolderPath()
Sets the path string to Finale's temp folder (for temporary files).
Definition ff_base.h:2366
void SetInteger(int i)
Sets the string to an integer.
Definition finaleframework.cpp:2569
void ToUnicode(eUniChar16 *pBuffer, int maxsize) const
Copies the string to a 16-bit Unicode string buffer.
Definition ff_base.h:3644
void SetDocStylesFolderPath()
Sets the path string to Finale's document styles folder.
Definition ff_base.h:2382
int CompareNoCase(const FCString &value) const
Case insensitive version of Compare.
Definition ff_base.h:2465
void FormatCharacterNumber(eUniChar32 character)
Formats a 16-bit character (symbol) number to a string for presentation purposes.
Definition finaleframework.cpp:1785
bool IsCharacters(int index, const char *pChars) const
Returns true if the character at the index matches any of the supplied character.
Definition finaleframework.cpp:2191
void ConvertToPascal(Str255 &pascalString)
Converts the string contents to a Str255 pascal string.
Definition finaleframework.cpp:2320
bool IsNumber() const
Returns true if the string is a number.
Definition finaleframework.cpp:2003
bool EncodeToMacRoman()
Re-encodes the string from true Unicode to faux MacRoman.
Definition finaleframework.cpp:1640
void SetAutoSaveFolderPath()
Sets the path string to Finale's auto-save folder.
Definition ff_base.h:2350
double GetFloat(int index=0) const
Converts the decimal string contents to a floating point value.
Definition finaleframework.cpp:2559
void SetString(const FCString *pString)
Copies a string.
Definition finaleframework.cpp:2826
void SetRunningLuaFolderPath()
Sets the string to the folder for the running script file. The string is cleared if the script is run...
Definition finaleframework.cpp:2415
void SetUTF8String(const char *pszBuffer)
Sets the string, using a UTF8 C-style string.
Definition finaleframework.cpp:1685
bool ReplaceCategoryFonts(FCCategoryDef *pCategoryDef, int fontmode, bool replacefonttag)
Parses the raw string and changes all text tags according to a category definition.
Definition finaleframework.cpp:2930
bool TruncateAt(int newlength)
Truncates the string at the indicated position.
Definition ff_base.h:3724
int FormatCString(const char *fmt,...)
Formats a string using the same syntax and manner as the printf() function in C. The version of the m...
Definition finaleframework.cpp:1516
bool ContainsEnigmaTextInsert(bool only_file_info_inserts=true) const
Returns true if the text block contains a text insert.
Definition finaleframework.cpp:3401
bool IsDigit(int index) const
Returns true if the character at the specified 0-based index position is a digit (0 through 9).
Definition finaleframework.cpp:1984
void Clear()
Creates an empty string.
Definition ff_base.h:2445
void SetUserPath()
Sets the string to the user path on the running system.
Definition finaleframework.cpp:2344
int Compare(const FCString &value) const
Compares string against another string.
Definition ff_base.h:2455
bool IsAllDigits() const
Returns true if all characters in the string are digits (0 through 9).
Definition finaleframework.cpp:1993
int GetHex() const
Converts the unsigned hexadecimal string to an integer value. The string can only contain valid hexad...
Definition finaleframework.cpp:2491
int FindLast(const char *pszSubStr) const
Returns the 0-based index for the last occurence of the substring.
Definition ff_base.h:2871
void ToUpperCase()
Transforms the string to upper case.
Definition finaleframework.cpp:3313
bool IsEnigmaFileInfoSubtitle() const
Returns true if the string is an "Subtitle" Enigma command.
Definition finaleframework.cpp:2058
int CalcLastStringPos(const FCString &subString) const
Returns the last position where a substring occurs.
Definition ff_base.h:2542
void AppendCString(const char *pOtherString)
Appends a C-style string to the string.
Definition finaleframework.cpp:2289
bool IsWhitespace(int index) const
Returns true if the character position contains a whitespace.
Definition finaleframework.cpp:2203
void SetFontAnnotationFolderPath()
Sets the path string to Finale's font annotation folder.
Definition ff_base.h:2374
bool ContainsCString(const char *pszSubString) const
Returns true if the substring is found within the string. C-string version.
Definition ff_base.h:2494
bool IsEmpty() const
Returns true if the string is empty.
Definition ff_base.h:3233
bool StartsWithString(const FCString *pString) const
Returns true if the string starts with the parameter string.
Definition finaleframework.cpp:3277
void Insert(const char *pszString, int insertindex=0)
Inserts a C string to the string at a specified index position.
Definition finaleframework.cpp:2143
bool DeleteCodePointsAt(int index, int count)
Removes a range of Unicode codepoints, starting at the 0-based index position.
Definition finaleframework.cpp:1935
FCStrings * CreateRows() const
Definition finaleframework.cpp:3226
int CalcCStringPosFrom(const char *pszSubString, int startindex) const
Returns the first position where a substring occurs, from a starting point. C-string version.
Definition ff_base.h:2599
int FindFirst(const char *pszSubStr) const
Returns the 0-based index for the first occurence of the substring.
Definition ff_base.h:2832
bool TrimEnigmaFontTags()
Removes all Enigma font tags from a string, leaving only the actual text and text insert tags,...
Definition finaleframework.cpp:1865
FCFontInfo * CreateLastFontInfo() const
Creates a FCFontInfo object with the last font information (based on the Enigma text tags) found in t...
Definition finaleframework.cpp:3365
bool IsEqualString(const FCString &value) const
Returns true if the string is identical with the parameter. (FCString string version....
Definition ff_base.h:3196
bool IsEqual(const char *pszString) const
Returns true if the string is identical with the parameter.
Definition ff_base.h:3189
bool DeleteCharacterAt(int index)
Removes a character at the 0-based index position.
Definition ff_base.h:2770
bool IsCharacter(int index, eUniChar32 character) const
Returns true if the character at the index matches the supplied character.
Definition finaleframework.cpp:2180
bool DeleteCharactersAt(int index, int count)
Removes a range of characters, starting at the 0-based index position.
Definition finaleframework.cpp:1919
const char * GetLuaString() const
Returns a Lua version of the string in UTF-8 format.
Definition finaleframework.cpp:1799
virtual ~FCString()
The destructor. Deletes the string storage as well as the C-string pointer (if any).
Definition finaleframework.cpp:1451
void TruncateWidth(int maxlength, int prefixchars)
Truncates the string by removing the middle part and inserting '...' instead.
Definition ff_base.h:3751
bool Replace(const char *pszSource, const char *pszReplacement)
Replaces all occurrences of a source pattern with a replacement string.
Definition finaleframework.cpp:1943
bool MakeSubString(int startindex, int substringlength, FCString *pDestinationString)
Creates a substring from the string.
Definition finaleframework.cpp:2234
void SetMeasurement(double value, twobyte unit)
Sets the string to an EVPU measurement value, formatted to a specific unit.
Definition finaleframework.cpp:2596
void SetUnicodeString(const eUniChar16 *pChar, int maxchars=-1)
Sets the string by using a 16-bit Unicode buffer as input parameter.
Definition finaleframework.cpp:1701
bool IsEnigmaTextInsert(bool only_file_info_inserts=true) const
Returns true if the string is an Enigma text command with a text insert.
Definition finaleframework.cpp:2093
bool TrimEnigmaTags()
Removes all Enigma tag information from a string, leaving only the actual text.
Definition finaleframework.cpp:1824
bool DeleteCodePointAt(int index)
Removes the Unicode codepoint at the 0-based index position.
Definition ff_base.h:2741
void SetCharacterAt(int index, eUniChar16 newcharacter)
Sets the character at the index position.
Definition finaleframework.cpp:2819
FCString & operator=(const FCString &src)
Assignment operator (required for classes that allocate memory.)
Definition ff_base.h:2088
void SetPluginsFolderPath()
Sets the path string to Finale's root plug-in folder.
Definition ff_base.h:2318
bool TruncateEnd(int count)
Truncates the end of the string by a specific number of characters.
Definition ff_base.h:3740
void AssureEndingPathDelimiter()
Makes sure that the string ends with a path delimiter (backslash or slash, depending on OS)....
Definition ff_base.h:2171
void AppendInteger(int value)
Appends an integer value (decimal) to the string.
Definition finaleframework.cpp:2305
int FormatCStringArgs(const char *fmt, va_list args)
Formats a string from an args list. Supports either UTF8 or platform encoding.
Collection class for FCString class objects.
Definition ff_basecollection.h:1085
An object to handle glyph information returned by the system.
Definition ff_base.h:5333
float GetBottom() const
Returns the bottom position of the glyph, relative to the baseline.
Definition ff_base.h:5428
void _SetMaxAscent(float b)
For internal use only.
Definition ff_base.h:5386
float GetTop() const
Returns the top position of the glyph, relative to the baseline.
Definition ff_base.h:5449
float GetHeight() const
Returns the height of the glyph, in fractional points.
Definition ff_base.h:5414
float GetMaxDescent()
Returns the maximum descender for the font, relative to the baseline.
Definition ff_base.h:5469
void _SetBottom(float b)
For internal use only.
Definition ff_base.h:5380
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:5472
float GetMaxAscent()
Returns the maximum ascender for the font, relative to the baseline.
Definition ff_base.h:5459
ufourbyte GetGlyphNumber()
Returns the glyph number for the loaded data.
Definition ff_base.h:5402
void _SetLeft(float l)
For internal use only.
Definition ff_base.h:5374
float GetLeft() const
Returns the left-side position of the glyph, in fractional points.
Definition ff_base.h:5420
float GetWidth()
Returns the width of the glyph, in fractional points.
Definition ff_base.h:5408
void _SetWidth(float w)
For internal use only.
Definition ff_base.h:5368
void _SetHeight(float h)
For internal use only.
Definition ff_base.h:5362
void _SetMaxDescent(float b)
For internal use only.
Definition ff_base.h:5392
float GetRight() const
Returns the right-side position of the glyph.
Definition ff_base.h:5438
FCSystemGlyphInfo()
The constructor.
Definition ff_base.h:5339
A class that fetches the metrics for text (for how Finale will render it), such as the boundary boxes...
Definition ff_base.h:4525
double CalcWidthEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition ff_base.h:4840
double CalcHeightEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition ff_base.h:4825
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_base.h:4848
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4851
double GetBottomEVPUs() const
Returns the bottom side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4772
double GetTopEVPUs() const
Returns the top side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4757
double GetAdvanceWidthPoints() const
Returns the advance width of the string (the pen position before and after printing the string),...
Definition ff_base.h:4620
double GetLeftPoints() const
Returns the left side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4639
double GetLeftEVPUs() const
Returns the left side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4727
double GetAdvanceWidthEVPUs() const
Returns the advance width of the string (the pen position before and after printing the string),...
Definition ff_base.h:4712
double GetRightEVPUs() const
Returns the right side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4742
double GetRightPoints() const
Returns the right side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4658
double CalcHeightPoints()
Returns the width of the bounding box, in fractional Points.
Definition ff_base.h:4791
double GetTopPoints() const
Returns the top side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4677
double CalcWidthPoints()
Returns the width of the bounding box, in fractional Points.
Definition ff_base.h:4810
double GetBottomPoints() const
Returns the bottom side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4696
FCTextMetrics()
The constructor. Defaults to unloaded. Metrics must be loaded with LoadString, LoadSymbol,...
Definition ff_base.h:4536
Standard class for basic user interface functionality.
Definition ff_ui.h:29