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,
177 FCID_SECONDARYBEAMBREAKMOD,
178 FCID_BEAMEXTENSIONMOD,
179 FCID_SECTIONSYLLABLE,
180 FCID_SEPARATEMEASURENUMBER,
181 FCID_SEPARATEPLACEMENT,
183 FCID_SHAPEEXPRESSIONDEF,
184 FCID_SLURCONTOURPREFS,
187 FCID_SMARTSHAPEENTRYMARK,
188 FCID_SMARTSHAPEMEASUREMARK,
189 FCID_SMARTSHAPEPREFS,
192 FCID_STAFFNAMEPOSITION,
193 FCID_STAFFNAMEPOSITIONPREFS,
194 FCID_STAFFSTYLEASSIGN,
197 FCID_STEMCONNECTIONTABLE,
203 FCID_SYLLABLEENTRYMOD,
205 FCID_TABLATURENOTEMOD,
208 FCID_TEXTEXPRESSIONDEF,
213 FCID_TIECONTOURPREFS,
214 FCID_TIEPLACEMENTPREFS,
230#ifdef PDK_FRAMEWORK_LUAFRIENDLY
231#ifndef DOXYGEN_SHOULD_IGNORE_THIS
234 int _Lua_GetClassID()
const {
return (
int)
GetClassID(); }
296#ifdef PDK_FRAMEWORK_DEBUG
302 void DebugMsgInt(
const char* pszPrefixText,
int i);
309 void DebugMsgHex(
const char* pszPrefixText,
int i);
316 void DebugMsgString(
const char* pszPrefixText,
const char * thestring);
331 static void DebugOutPtr(
const char* pszPrefixText,
void* ptr);
338 static void DebugOutInt(
const char* pszPrefixText,
int i);
345 static void DebugOutFloat(
const char* pszPrefixText,
double f);
352 static void DebugOutTag(
const char* pszPrefixText, EXTAG extag);
359 static void DebugOutHex(
const char* pszPrefixText,
int i);
366 static void DebugOutBin(
const char* pszPrefixText,
int i);
373 static void DebugOutString(
const char* pszPrefixText,
const char * thestring);
387 static void DebugOutBool(
const char* pszPrefixText,
bool state);
394 static void DebugOutBlock(
const void * pBuffer,
int startoffset,
int size);
412 static void DebugOut(
const char* pszLine);
420#ifdef PDK_FRAMEWORK_FORMAT
467 void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits,
bool state);
475 void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits,
bool state);
485 bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits)
const {
return (flag & flagbits) != 0; }
541 if (!pCompareObject)
return false;
547#ifdef PDK_FRAMEWORK_TINYXML
558 void StoreXML_Integer(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
int value);
564 void StoreXML_Bool(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
bool value);
596 virtual void StoreToXML([[maybe_unused]]tinyxml2::XMLElement* pParentNode) {}
605 bool ReadXML_String(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
FCString* pStringValue);
613 bool ReadXML_Integer(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
int* pValue);
621 bool ReadXML_Bool(tinyxml2::XMLElement* pParentNode,
const char* pszElementName,
bool *pValue);
663 virtual bool ReadFromXML([[maybe_unused]]tinyxml2::XMLElement* pParentNode) {
return false; }
677#ifndef DOXYGEN_SHOULD_IGNORE_THIS
681 virtual bool _RawRelink()
804 virtual EXTAG
Tag()
const = 0;
827 const char*
ClassName()
const override {
return "__FCBaseData"; }
1005#ifdef PDK_FRAMEWORK_DEBUG
1025#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1026 virtual void DebugDataCompare(
__FCBaseData *pCompareObject)
1028 if (!pCompareObject)
1030 DebugOut(
"DebugDataCompare(): Compare object is nil.");
1036 snprintf(szBuffer,
sizeof(szBuffer),
"DebugDataCompare(): Compare size differs. %d compared to %d byte(s)", (
int)
_GetLoadedSize(), (
int) pCompareObject->
_GetLoadedSize());
1040 unsigned char* pDataBlock = (
unsigned char*)
GetDataBlock();
1041 unsigned char* pCompareBlock = (
unsigned char*) pCompareObject->
GetDataBlock();
1045 if (pDataBlock[i] != pCompareBlock[i])
1049 snprintf(szBuffer,
sizeof(szBuffer),
"DebugDataCompare() DIFF at 0-based byte offset %d: 0x%02x - 0x%02x ", i, pDataBlock[i], pCompareBlock[i]);
1055 DebugOut(
"DebugDataCompare(): Data blocks are identical");
1083#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1085 luabridge::RefCountedPtr<FCNumbers> CreateRawDataDump_GC()
1098 const char*
ClassName()
const override {
return "__FCInci"; }
1101 bool Load(CMPER cmper, twobyte inci);
1110constexpr double kDisplayPercentForFixedFontSize = 1.1;
1139#if FXT_VERSION >= FINALEVERSION_25
1140 EnigmaFontName _nameUTF16;
1154 const static FCString DefaultFontName;
1156 const char*
ClassName()
const override {
return "FCFontInfo"; }
1209#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1211 static FCFontInfo* FCFontInfo_Lua(
void* ptr, lua_State *L);
1217#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1222 static int FCFontInfo_tostring(lua_State* L);
1254#ifdef PDK_FRAMEWORK_PREFS
1289 int GetSize()
const {
return static_cast<int>(_size); }
1302#if FXT_VERSION < FINALEVERSION_25
1303#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1305 void GetNameParam(
const EFONTNAME* pName) { strcpy((
char*)pName, (
const char*)_name); }
1360#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
1392#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1395 luabridge::RefCountedPtr<FCString>CreateEnigmaString_GC(
FCString* pFontTagString)
1399 static int CreateEnigmaString_CFunc(lua_State* L)
1401 return _CFunctionOneOptionalParameter<FCFontInfo, luabridge::RefCountedPtr<FCString>,
FCString*, &FCFontInfo::CreateEnigmaString_GC>(L,
nullptr);
1436#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1438 luabridge::RefCountedPtr<FCString> CreateEnigmaStyleString_GC()
1479#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1481 luabridge::RefCountedPtr<FCString> CreateDescription_GC()
1485#if FXT_VERSION < FINALEVERSION_25
1486#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1488 void SetName(
const EFONTNAME* pName) { strcpy((
char*)_name, (
const char*)pName); }
1498 void SetName(
const std::string& pszName);
1546 void SetSize(
int fontsize) { _size =
static_cast<double>(fontsize); }
1618 bool IsName(
const char* pszTestName)
const;
1681#if FXT_VERSION >= FINALEVERSION_27_1
1743#ifdef PDK_FRAMEWORK_DEBUG
1760 fourbyte _tracking{};
1761 Evpu32 _baselineshift{};
1762 Evpu32 _superscript{};
1765 const char*
ClassName()
const override {
return "FCEnigmaTextStyle"; }
1768#ifdef PDK_FRAMEWORK_LUAFRIENDLY
1772 return _OneOptionalParamLuaConstructor<FCEnigmaTextStyle, const FCFontInfo&>(ptr, L);
1791#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1796 _tracking = ts.tracking;
1797 _baselineshift = ts.baselineShift;
1798 _superscript = ts.superscript;
1810#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1857const eUniChar16 UTF16_HIGH_SURROGATE_MASK = 0xD800;
1858const eUniChar16 UTF16_LOW_SURROGATE_MASK = 0xDC00;
1880 using _fcStringChar = WINCODE(WCHAR) MACCODE(
char16_t);
1881 static_assert(
sizeof(_fcStringChar) ==
sizeof(eUniChar16),
"FCString internal _fcStringChar must match sizeof(eUniChar16).");
1883#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1886 _fcStringChar* _pStorage;
1889 mutable char* _pTempCBuffer;
1890 mutable char* _pTempCUTF8Buffer;
1892#if OPERATING_SYSTEM == MAC_OS
1893 mutable void* _nsstringobject;
1897 void _DeleteStorage();
1900 void _ExpandStorageIfNecessary(
int minimumlength);
1903 bool _SetFinalePath(FinPath pathconstant);
1910 _pTempCBuffer = NULL;
1911 _pTempCUTF8Buffer = NULL;
1912#if OPERATING_SYSTEM == MAC_OS
1913 _nsstringobject =
nullptr;
1921#ifdef PDK_FRAMEWORK_TINYXML
1928 void StoreToXML(tinyxml2::XMLElement* pParentNode)
override {
1936 bool ReadFromXML(tinyxml2::XMLElement* pParentNode)
override
1942 static bool _IsHighSurrogate(eUniChar16 value)
1944 return (value & 0xFC00) == UTF16_HIGH_SURROGATE_MASK;
1947 static bool _IsLowSurrogate(eUniChar16 value)
1949 return (value & 0xFC00) == UTF16_LOW_SURROGATE_MASK;
1957 bool _GetCodePointRange(
FCRange *pRange)
const;
1960 const char*
ClassName()
const override {
return "FCString"; }
1963#ifdef PDK_FRAMEWORK_LUAFRIENDLY
1965 static FCString* FCString_Lua(
void* ptr, lua_State* L)
1967 return _OneOptionalParamLuaConstructor<FCString, const char *>(ptr, L);
2010#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2015 static int FCString_tostring(lua_State* L)
2017 FCString* pThis = luabridge::Stack<FCString*>::get(L, 1) LB3(.value());
2019 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
2042#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2043 bool operator==(
const FCString &src)
const
2044 {
return (0 == this->
Compare(src)); }
2045 template<
typename T>
2046 bool operator!=(T src)
const
2047 {
return ! (*
this == src); }
2050 const _fcStringChar* GetOSUnicodeString()
const {
return _pStorage; }
2053 const std::basic_string_view<eUniChar16> _GetBasicStringView()
const
2054 {
return std::basic_string_view<eUniChar16>(_GetUnicodeBuffer(),
GetLength()); }
2056 static const eUniChar16 emptyUniCharStr[];
2082#if defined(PDK_FRAMEWORK_LUAFRIENDLY) || defined(DOXYGEN_SHOULD_IGNORE_THIS)
2120#if OPERATING_SYSTEM == WINDOWS
2184 if (splitpointindex < -1)
return false;
2185 if (splitpointindex >=
GetLength())
return false;
2186 if ((pFirstString) && (pFirstString == pSecondString))
2191 if (pFirstString && pSecondString)
2194 if (pFirstString ==
this)
return false;
2195 if (pSecondString ==
this)
return false;
2202 const int splitoffset = includesplitposchar ? 1 : 0;
2206 pFirstString->
TruncateAt((std::max)(0, splitpointindex + splitoffset));
2211 if (splitpointindex >= 0)
2233#if OPERATING_SYSTEM == WINDOWS
2239 return SplitAt(pos, pPathPart, pFilePart,
true);
2339 _SetFinalePath(FinPath_PercNoteTypesFile);
2343#if FXT_VERSION >= FINALEVERSION_2012
2362#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2380#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2404 return std::char_traits<_fcStringChar>::compare(_pStorage, value._pStorage, maxSize);
2421 return string1.
Compare(string2);
2490 auto pos = _GetBasicStringView().rfind(subString._GetBasicStringView());
2491 if (pos == std::basic_string_view<eUniChar16>::npos)
2493 return static_cast<int>(pos);
2528 auto pos = _GetBasicStringView().find(subString._GetBasicStringView(),
static_cast<size_t>(startindex));
2529 if (pos == std::basic_string_view<eUniChar16>::npos)
2531 return static_cast<int>(pos);
2553#if OPERATING_SYSTEM == MAC_OS
2560#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2562 CFURLRef _GetPathCFURLRef()
const;
2567#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2593#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2595 luabridge::RefCountedPtr<FCStrings> CreateEnigmaComponents_GC()
const
2614#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2616 luabridge::RefCountedPtr<FCStrings> CreateEnigmaStrings_GC(
bool include_non_commands)
const
2631#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2633 luabridge::RefCountedPtr<FCFontInfo> CreateLastFontInfo_GC()
const
2652#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2654 luabridge::RefCountedPtr<FCStrings> CreateParsedStrings_GC(
const char* pszSeparators)
const
2670#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2672 luabridge::RefCountedPtr<FCStrings> CreateRows_GC()
const
2746 if (currentchar ==
'.')
2758 if (currentchar ==
'/')
break;
2759 if (currentchar ==
'\\')
break;
2780 twobyte firstchar = *pszSubStr;
2781 if (!firstchar)
return -1;
2785 if (character == firstchar)
2788 bool identical =
true;
2789 while (pszSubStr[j])
2791 twobyte testchar = pszSubStr[j];
2799 if (identical)
return i;
2819 twobyte firstchar = *pszSubStr;
2820 if (!firstchar)
return -1;
2821 int substrlength = (int) strlen(pszSubStr);
2823 for (
int i = (
int) (
GetLength() - substrlength); i >= 0; i--)
2826 if (character == firstchar)
2829 bool identical =
true;
2830 while (pszSubStr[j])
2832 twobyte testchar = pszSubStr[j];
2840 if (identical)
return i;
2847#ifdef PDK_FRAMEWORK_FORMAT
2917#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2919 static int GetLuaString_CFunc(lua_State *L)
2921 return _CFunctionProxyGetter<FCString, const char *, &FCString::GetLuaString>(L);
2940#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2942 UTRANSID _StartFinaleEdit()
const;
2945 eUniChar16* _GetUnicodeBuffer()
const;
2948#if OPERATING_SYSTEM == MAC_OS
2973#ifdef PDK_FRAMEWORK_LUAFRIENDLY
2974 static int GetInteger_CFunc(lua_State* L)
2976 return _CFunctionOneOptionalParameter<FCString, int, int, &FCString::GetInteger>(L, 0);
3000 double GetFloat(
int index = 0)
const;
3038#ifdef PDK_FRAMEWORK_LUAFRIENDLY
3039 static int GetCodePointAt_CFunc(lua_State* L)
3042 const FCString& selfStr = luabridge::Stack<const FCString&>::get(L, 1) LB3(.value());
3043 int index = luabridge::Stack<
int>::get(L, 2) LB3(.value());
3045 luabridge::Stack<eUniChar32>::push(L, codepoint) LB3(.throw_on_error());
3046 luabridge::Stack<
int>::push(L, nextIndex) LB3(.throw_on_error());
3065 const char*
GetEOL()
const;
3077 [[deprecated]]
void Insert(
const char* pszString,
int insertindex = 0);
3099 bool IsDigit(
int index)
const;
3157 bool IsCharacter(
int index, eUniChar32 character)
const;
3173 bool IsCharacters(
int index,
const char *pChars)
const;
3190#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3251#if OPERATING_SYSTEM == WINDOWS
3262 bool LoadResource(
int resourceID, HINSTANCE dllinstance = 0);
3264#if OPERATING_SYSTEM == MAC_OS
3285 const char* pszResourceFileName = NULL,
3286 const char* pszTableName = NULL);
3289#if OPERATING_SYSTEM == WINDOWS
3303 static int LoadIntegerResource(
int resourceID,
int defaultValue, HINSTANCE dllinstance = 0);
3305#if OPERATING_SYSTEM == MAC_OS
3330 const char* pszResourceFileName = NULL,
3331 const char* pszTableName = NULL);
3362#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3400 void SetCString(
const char* pszBuffer,
int maxchars = -1);
3402#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3403#if OPERATING_SYSTEM == WINDOWS
3405 void _SetWCHARString(
const WCHAR* pCharBuffer);
3418#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3420 static int SetLuaString_CFunc(lua_State *L)
3422 return _CFunctionProxySetter<FCString, const char *, &FCString::SetLuaString>(L);
3473 void SetHex(
int number,
int bitwidth);
3479#ifdef PDK_FRAMEWORK_PREFS
3535 time_t now = time(0);
3538 tstruct = *localtime(&now);
3539 strftime(buf,
sizeof(buf),
"%X", &tstruct);
3555 bool Replace(
const char* pszSource,
const char* pszReplacement);
3563 bool EndsWith(
const char* pszString)
const;
3579 bool StartsWith(
const char* pszString)
const;
3593 if (len > maxsize - 1) len = maxsize - 1;
3614#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3625#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3672 if (newlength < 0 || newlength >=
GetLength())
return false;
3673 _length = newlength;
3674 _pStorage[_length] = 0;
3688 if (count < 1)
return false;
3699 if (_length <= maxlength)
return;
3700 if (prefixchars + 3 > maxlength)
return;
3701 if (prefixchars < -1)
return;
3703 for (
int i = 0; i < prefixchars; i++)
3708 int startindex = _length - maxlength + prefixchars + 3;
3709 for (
int i = startindex; i < _length; i++)
3716#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3721 static EVERSION _GetFinPathVersion();
3729 bool MakeSpecFromFilePath(
void *pFinPathSpec, EVERSION convertversion)
const;
3737 bool MakeFullFilePath(
const void* pFinPathSpec, EVERSION convertversion);
3741#ifdef PDK_FRAMEWORK_DEBUG
3746 DebugOutInt(
"Storage length: ", (
int) _storagelength);
3765 const char*
ClassName()
const override {
return "FCSettingsPair"; }
3789#ifdef PDK_FRAMEWORK_DEBUG
3793 DebugOutString(
"Key: ", GetKeyString());
3794 DebugOutString(
"Value: ", GetValueString());
3800#ifdef PDK_FRAMEWORK_ENTRIES
3820 EMeasureMetrics2009a _metrics;
3824 static bool _metricsshouldupdate;
3827 const char*
ClassName()
const override {
return "FCCellMetrics"; }
3836 memset(&_metrics, 0,
sizeof(_metrics));
3860 bool LoadAtCell(
FCCell* pCell);
3862#ifdef PDK_FRAMEWORK_ENTRIES
3879 return _metrics.measMetrics.horzPercent;
3894 return _metrics.measMetrics.fipTopStaffLine;
3909 return _metrics.measMetrics.fipBottom;
3921 return _metrics.measMetrics.fipTop;
3930 return _metrics.measMetrics.lperc;
3939 return _metrics.measMetrics.percent;
3949 return _metrics.attachCount;
3959 return _metrics.measMetrics.meposadj;
3970 return _metrics.leftEdge;
3979 return _metrics.measMetrics.mewidth;
3988 return _metrics.measMetrics.scalewidth;
3997 return _metrics.measMetrics.frontRepWidth;
4006 return _metrics.measMetrics.backRepWidth;
4016 return _metrics.measMetrics.barWidth;
4025 return _metrics.measMetrics.ssys;
4035 return _metrics.measMetrics.ssysTop;
4045 return _metrics.measMetrics.slot;
4064 if (_metrics.attachCount == 0)
return false;
4065 for (
int i = 0; i < _metrics.attachCount; i++)
4067 EAttachment* pTest = &_metrics.pAttach[i];
4068 if (pTest->tag != pBaseDataObject->
Tag())
continue;
4069 if (pTest->id != the_id)
continue;
4072 if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE))
continue;
4074 memcpy(pAttachment, pTest,
sizeof(EAttachment));
4098#ifdef PDK_FRAMEWORK_DEBUG
4102 DebugOutInt(
"Horizontal stretch: ", GetHorizontalStretch());
4108#ifdef PDK_FRAMEWORK_ENTRIES
4120 ENTNUM _directaccess_entnum;
4123 EEntryMetrics2009a _metrics2009a;
4124#if FXT_VERSION >= FINALEVERSION_2014
4125 EEntryMetrics2014 _metrics2014;
4130 static bool _updatemetrics;
4133 EVERSION _VersionToUse()
const;
4138 EEntryMetrics2009a* _GetBasicMetricsPtr()
const
4140#if FXT_VERSION >= FINALEVERSION_2014
4141 if (_VersionToUse() == FINALEVERSION_2014)
4142 return (EEntryMetrics2009a*) &_metrics2014;
4145 return (EEntryMetrics2009a*) &_metrics2009a;
4149 const char*
ClassName()
const override {
return "FCEntryMetrics"; }
4157#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4159 void _EnableDirectAccessMode(EEntryMetrics2014* pMetrics, ENTNUM entrynumber);
4162 ENTNUM _GetConnectedEntryNumber() {
return _directaccess_entnum; }
4194 int CalcLeftmostNotePosition();
4203 return _GetBasicMetricsPtr()->attachCount;
4222 if (_GetBasicMetricsPtr()->attachCount == 0)
return false;
4223 for (
int i = 0; i < _GetBasicMetricsPtr()->attachCount; i++)
4225 EAttachment* pTest = &_GetBasicMetricsPtr()->pAttach[i];
4226 if (pTest->tag != pBaseDataObject->
Tag())
continue;
4227 if (pTest->id != the_id)
continue;
4230 if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE))
continue;
4232 memcpy(pAttachment, pTest,
sizeof(EAttachment));
4245 if (_GetBasicMetricsPtr()->headRect.top > _GetBasicMetricsPtr()->stemRect.top)
return _GetBasicMetricsPtr()->headRect.top;
4246 return _GetBasicMetricsPtr()->stemRect.top;
4255 if (_GetBasicMetricsPtr()->headRect.bottom < _GetBasicMetricsPtr()->stemRect.bottom)
return _GetBasicMetricsPtr()->headRect.bottom;
4256 return _GetBasicMetricsPtr()->stemRect.bottom;
4266 return _GetBasicMetricsPtr()->stemRect.bottom;
4276 return _GetBasicMetricsPtr()->stemRect.top;
4286 return _GetBasicMetricsPtr()->headRect.left;
4296 return _GetBasicMetricsPtr()->headRect.right;
4306 return _GetBasicMetricsPtr()->stemRect.left;
4316 return _GetBasicMetricsPtr()->stemRect.right;
4326 return _GetBasicMetricsPtr()->lastDot;
4337 return _GetBasicMetricsPtr()->firstAcci;
4343 return _GetBasicMetricsPtr()->entryFlags;
4347 ENoteMetrics* FindNoteMetrics(twobyte noteID);
4349#if FXT_VERSION >= FINALEVERSION_2014
4351 ENoteMetrics2014* FindNoteMetrics2014(twobyte noteID);
4361 return _GetBasicMetricsPtr()->numNotes;
4375 int GetNoteLeftPosition(
int index)
const;
4385 int GetNoteWidth(
int index)
const;
4398 int GetNoteCenterVerticalPos(
int index)
const;
4408 eNoteID GetNoteID(
int index)
const;
4416 if (!_loaded)
return NULL;
4417 return &_GetBasicMetricsPtr()->stemRect;
4426 if (!_loaded)
return NULL;
4427 return &_GetBasicMetricsPtr()->headRect;
4448#ifdef PDK_FRAMEWORK_DEBUG
4472#if FXT_VERSION >= FINALEVERSION_25
4473 ETextMetrics _textMetrics;
4522 bool LoadSymbol(eUniChar16 symbolchar,
FCFontInfo* pFont,
float percent);
4542 bool LoadArticulation(
FCArticulationDef* pArticDef,
bool flipped,
float percent);
4567#if FXT_VERSION >= FINALEVERSION_25
4568 return _textMetrics.width;
4586#if FXT_VERSION >= FINALEVERSION_25
4587 return _textMetrics.left;
4605#if FXT_VERSION >= FINALEVERSION_25
4606 return _textMetrics.right;
4624#if FXT_VERSION >= FINALEVERSION_25
4625 return _textMetrics.top;
4643#if FXT_VERSION >= FINALEVERSION_25
4644 return _textMetrics.bottom;
4659#if FXT_VERSION >= FINALEVERSION_25
4660 return _textMetrics.eWidth;
4674#if FXT_VERSION >= FINALEVERSION_25
4675 return _textMetrics.eLeft;
4689#if FXT_VERSION >= FINALEVERSION_25
4690 return _textMetrics.eRight;
4704#if FXT_VERSION >= FINALEVERSION_25
4705 return _textMetrics.eTop;
4719#if FXT_VERSION >= FINALEVERSION_25
4720 return _textMetrics.eBottom;
4738#if FXT_VERSION >= FINALEVERSION_25
4739 return GetTopPoints()-GetBottomPoints();
4757#if FXT_VERSION >= FINALEVERSION_25
4758 return GetRightPoints()-GetLeftPoints();
4772#if FXT_VERSION >= FINALEVERSION_25
4773 return GetTopEVPUs()-GetBottomEVPUs();
4787#if FXT_VERSION >= FINALEVERSION_25
4788 return GetRightEVPUs()-GetLeftEVPUs();
4794 const char*
ClassName()
const override {
return "FCTextMetrics"; }
4796#ifdef PDK_FRAMEWORK_DEBUG
4800 DebugOutFloat(
"Advance Width: ", GetAdvanceWidthPoints());
4801 DebugOutFloat(
"Left: ", GetLeftPoints());
4802 DebugOutFloat(
"Right: ", GetRightPoints());
4803 DebugOutFloat(
"Top: ", GetTopPoints());
4804 DebugOutFloat(
"Bottom: ", GetBottomPoints());
4806 DebugOutFloat(
"Advance Width EVPU: ", GetAdvanceWidthEVPUs());
4807 DebugOutFloat(
"Left EVPU: ", GetLeftEVPUs());
4808 DebugOutFloat(
"Right EVPU: ", GetRightEVPUs());
4809 DebugOutFloat(
"Top EVPU: ", GetTopEVPUs());
4810 DebugOutFloat(
"Bottom EVPU: ", GetBottomEVPUs());
4825 const char*
ClassName()
const override {
return "FCNumber"; }
4837 _intvalue =
static_cast<int>(value);
4838 _floatvalue = value;
4848 _floatvalue =
static_cast<double>(value);
4857 _intvalue =
static_cast<int>(value);
4858 _floatvalue = value;
4874#ifdef PDK_FRAMEWORK_DEBUG
4878 DebugOutFloat(
"Floating value", _floatvalue);
4879 DebugOutInt(
"Integer value: ", _intvalue);
4896 const char*
ClassName()
const override {
return "FCPoint"; }
4904#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
4909 static int FCPoint_tostring(lua_State* L)
4911 FCPoint* pThis = luabridge::Stack<FCPoint*>::get(L, 1) LB3(.value());
4912 FCString strX; strX.SetMeasurement(pThis->GetX(), UNIT_EVPUS);
4913 FCString strY; strY.SetMeasurement(pThis->GetY(), UNIT_EVPUS);
4914 std::
string s = std::
string(pThis->ClassName()) + ": (" + strX.GetLuaString() + ", " + strY.GetLuaString() + ")";
4915 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
4924 void SetX(
double value) { _x = value; }
4930 void SetY(
double value) { _y = value; }
4948 void MoveX(
double value) { _x += value; }
4954 void MoveY(
double value) { _y += value; }
4970 FinPrintSettings _settings;
4972 const char*
ClassName()
const override {
return "FCPrintSettings"; }
4982 PRINTODDEVEN_ALL = 0,
4985 PRINTODDEVEN_ODD = 1,
4988 PRINTODDEVEN_EVEN = 2
4999 _settings.copies = 1;
5000 _settings.startPage = 1;
5001 _settings.endPage = 1000;
5016 bool GetColor()
const {
return _settings.bPrintColor != 0; }
5058 bool GetTile()
const {
return _settings.tile != 0; }
5084#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5097 return _settings.pageRangeString;
5110 if (copies < 0)
return;
5111 if (copies > 100)
return;
5112 _settings.copies = copies;
5119 void SetColor(
bool state) { _settings.bPrintColor = state; }
5127 if (startpage < 1)
return;
5128 _settings.startPage = startpage;
5137 if (endpage < 1)
return;
5138 _settings.endPage = endpage;
5169 void SetTile(
bool state) { _settings.tile = state; }
5184 _settings.nUp = count;
5197 if (value < 0)
return;
5198 _settings.userOverlap = value;
5214#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5224 case PRINTODDEVEN_ALL:
5225 case PRINTODDEVEN_EVEN:
5226 case PRINTODDEVEN_ODD:
5227 _settings.oddEven = value;
5240 if (!pszString)
return;
5241 strncpy(_settings.pageRangeString, pszString,
sizeof(_settings.pageRangeString));
5242 _settings.pageRangeString[
sizeof(_settings.pageRangeString) - 1] = 0;
5255 bool PrintCurrent();
5280 ufourbyte _glyphnumber;
5281 float _height, _width, _left, _bottom;
5282 float _maxascent, _maxdescent;
5288 _height = _width = 0;
5289 _left = _bottom = 0;
5290 _maxascent = _maxdescent = 0;
5302 bool LoadInfo(
FCFontInfo* pFontInfo, ufourbyte glyphno);
5395 float GetTop()
const {
return _bottom+_height; }
5417#ifdef PDK_FRAMEWORK_DEBUG
5421 DebugOutHex(
"Glyph Number: ", GetGlyphNumber());
5422 DebugOutFloat(
"Width: ", GetWidth());
5423 DebugOutFloat(
"Height: ", GetHeight());
5424 DebugOutFloat(
"Left: ", GetLeft());
5425 DebugOutFloat(
"Bottom: ", GetBottom());
5426 DebugOutFloat(
"Max Ascender: ", GetMaxAscent());
5427 DebugOutFloat(
"Max Descender: ", GetMaxDescent());
5454 const char*
ClassName()
const override {
return "FCFontDialog"; }
5468 _pUserFontInfo = pFontInfo;
5509 if (!pString)
return;
5576 const char*
ClassName()
const override {
return "FCRange"; }
5587#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
5589 static FCRange* FCRange_Lua(
void* ptr, lua_State *L)
5591 const int numArgs = lua_gettop(L);
5592 const int start = (numArgs <= 2) ? 0 : luabridge::Stack<int>::get(L, 2) LB3(.value());
5593 const int length = (numArgs <= 3) ? 0 : luabridge::Stack<int>::get(L, 3) LB3(.value());;
5594 return new(ptr)
FCRange(start, length);
5598#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
5603 static int FCRange_tostring(lua_State* L)
5605 FCRange* pThis = luabridge::Stack<FCRange*>::get(L, 1) LB3(.value());
5606 std::
string s = std::
string(pThis->ClassName()) + ": (" + std::to_string(pThis->GetStart()) + ", " + std::to_string(pThis->GetLength()) + ")";
5607 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
5629 int GetEnd()
const {
return _start + _length; }
Base class for all data-related classes (that handles Finale data).
Definition ff_base.h:676
virtual twobyte CalcLastInci()
For internal use only!
Definition ff_base.h:755
virtual void Deallocate()
Definition ff_base.h:725
void ClearData()
Definition finaleframework.cpp:895
EXTAG GetCustomTag() const
Returns the custom Enigma tag, if any.
Definition ff_base.h:870
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:1019
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:883
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:827
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:986
const void * GetDataBlock()
Intended ONLY for the _CloneFrom implementation.
Definition ff_base.h:860
__FCBaseData()
The constructor.
Definition finaleframework.cpp:788
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:930
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition ff_base.h:712
virtual bool LoadPrevious()
Loads the previous element in the database, if any.
Definition ff_base.h:961
EDOCID GetConnectedDocID() const
Returns the document ID that was connected to the last load/save of the data.
Definition ff_base.h:787
bool DataIsLoaded() const
Returns true is any data has been loaded into the object.
Definition ff_base.h:770
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:921
void _CloneFrom(__FCBaseData *pSource)
For internal use only. Copies object data (except data block) from another object.
Definition finaleframework.cpp:828
void SetCustomTag(EXTAG tag)
Sets the custom Enigma tag, for classes that support multiple Enigma tags.
Definition ff_base.h:882
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass.
Definition ff_base.h:695
virtual EVERSION EnigmaVersion() const
The Enigma version for save/load/create/delete operations.
Definition ff_base.h:812
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:916
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:854
__FCBaseData * CreateClone()
Creates an identical copy of an object.
Definition finaleframework.cpp:875
const EDataID * _GetDataID()
Intended ONLY for the _CloneFrom implementation.
Definition ff_base.h:848
virtual bool DeleteData()
Deletes the associated data from Finale's database. Be careful when deleting multiple objects.
Definition finaleframework.cpp:911
virtual bool IsDynamicSize()
Definition ff_base.h:733
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:1006
virtual bool LoadNext()
Loads the next element from the database, if any.
Definition finaleframework.cpp:980
virtual ~__FCBaseData()
Virtual destructor.
Definition finaleframework.cpp:798
bool _heapdatablock
Variable that tells if _datablock is dynamically created on the heap (and should be deleted at object...
Definition ff_base.h:699
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition finaleframework.cpp:838
void _TagDocumentID()
For internal use only.
Definition finaleframework.cpp:808
bool RelinkToCurrentView()
Relinks the contents in the current view so that the score and part(s) match.
Definition finaleframework.cpp:857
virtual bool Save()
Saves the currently loaded to its current location.
Definition finaleframework.cpp:951
EDOCID _connecteddocID
The "connected" document ID., which is the document the where the document was loaded (or last saved)...
Definition ff_base.h:691
void DebugDataDump() override
Outputs a memory dump of the data block in the object for debugging purposes.
Definition ff_base.h:1013
bool RelinkToScore()
Relinks all parts to the contents of the score.
Definition finaleframework.cpp:866
virtual bool LoadLast()
Loads the very last element in the database, if any.
Definition ff_base.h:949
bool VerifyConnectedDocID()
Checks that the stored document ID for the data object matches the current document's ID.
Definition finaleframework.cpp:813
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:939
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition ff_base.h:708
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:749
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:299
void SetUserData2(void *pData)
Sets the additional user data attached to the instance of an object.
Definition ff_base.h:510
bool ReadXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper method to read FCString objects from the XML file.
Definition finaleframework.cpp:721
__FCBase()
The constructor.
Definition ff_base.h:278
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:773
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:436
int GetBitCount(FLAG_32 flag)
Returns the total number of set bits in a 32-bit unsigned int.
Definition finaleframework.cpp:651
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:404
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:765
int DebugOutFormat(const char *fmt,...)
Outputs debug text using C style "printf" syntax.
Definition finaleframework.cpp:593
void StoreXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper function to store FCString objects in the XML file.
Definition finaleframework.cpp:673
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag.
Definition finaleframework.cpp:635
void StoreXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int value)
Helper function to store integer objects in the XML file.
Definition finaleframework.cpp:681
void DebugMsg(const char *pszMsg)
Creates a simple Message Box for debug purposes with just one text string.
Definition finaleframework.cpp:310
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:201
void * GetUserData2() const
Gets the additional user data attached to the instance of an object.
Definition ff_base.h:524
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:350
void SetUserData(void *pData)
Sets the user data attached to the instance of an object.
Definition ff_base.h:503
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:757
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:539
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:711
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:335
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets/resets a 32 bit flag, by using a bit mask.
Definition finaleframework.cpp:643
MEASUREMENTUNITS
Constants for Finale's standard measurement units.
Definition ff_base.h:243
@ MEASUREMENTUNIT_EVPUS
Definition ff_base.h:248
@ MEASUREMENTUNIT_CENTIMETERS
Definition ff_base.h:254
@ MEASUREMENTUNIT_DEFAULT
Definition ff_base.h:245
@ MEASUREMENTUNIT_MILLIMETERS
Definition ff_base.h:266
@ MEASUREMENTUNIT_SPACES
Definition ff_base.h:263
@ MEASUREMENTUNIT_POINTS
Definition ff_base.h:257
@ MEASUREMENTUNIT_PICAS
Definition ff_base.h:260
@ MEASUREMENTUNIT_INCHES
Definition ff_base.h:251
bool ReadXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool *pValue)
Helper method to read boolean objects from the XML file.
Definition finaleframework.cpp:741
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition finaleframework.cpp:526
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:485
void * GetUserData() const
Gets the user data attached to the instance of an object.
Definition ff_base.h:517
void StoreXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool value)
Helper function to store boolean objects in the XML file.
Definition finaleframework.cpp:691
virtual ~__FCBase()
Virtual destructor, so all inherited classes get the virtual destructor.
Definition ff_base.h:292
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:663
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:609
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:277
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:343
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:411
virtual bool ReadFromXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to read object data.
Definition ff_base.h:663
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:319
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:716
virtual void StoreToXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to store an object's data.
Definition ff_base.h:596
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:451
virtual void DebugDataDump()
Outputs a memory dump of the data block in the object for debugging purposes.
Definition finaleframework.cpp:617
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:550
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:288
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:480
bool ReadXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int *pValue)
Helper method to read integer objects from the XML file.
Definition finaleframework.cpp:733
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:228
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:701
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:458
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:706
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:624
An inci subrecord class for multi-inci data.
Definition ff_base.h:1096
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:1098
bool Load(CMPER cmper, twobyte inci)
Loads an object from a specific cmper/inci location.
Definition finaleframework.cpp:1006
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:3817
int GetWidth() const
Returns the total width of the cell, at system scaling.
Definition ff_base.h:3977
int GetMusicStartPos() const
Returns position where the music starts in the cell (after the key/clef/repeats), at system scaling.
Definition ff_base.h:3957
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:4033
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4099
Evpu32 GetReferenceLinePos() const
Returns the position of the reference line of the staff. The coordinate is referenced from the bottom...
Definition ff_base.h:3919
int GetStaffSystem() const
Returns the staff system number for the cell.
Definition ff_base.h:4023
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:4062
Int100 GetStaffScaling() const
Returns the accumulated staff scaling for the staff, in 100th of a percent.
Definition ff_base.h:3928
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:3827
int GetBackRepeatWidth() const
Returns the width of the back repeat for the cell.
Definition ff_base.h:4004
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:3907
int GetAttachmentCount() const
Returns the number of attachments that has info within the metrics data.
Definition ff_base.h:3947
int GetLeftEdge() const
Returns the left position of the cell cell (before the key/clef/repeat), at system scaling.
Definition ff_base.h:3968
Int100 GetSystemScaling() const
Returns the accumulated system scaling, in 100th of a percent.
Definition ff_base.h:3937
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:3892
int GetRightBarlineWidth() const
Returns the combined total width of the right barline, including double or final barlines and the gap...
Definition ff_base.h:4014
int GetFrontRepeatWidth() const
Returns the width of the front repeat for the cell.
Definition ff_base.h:3995
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:4043
static void MarkMetricsForRebuild()
Static method that sets the flag that the metrics should be rebuilt on the next load.
Definition ff_base.h:3850
int GetMusicWidth() const
Returns the width of the music part of the cell, at system percent.
Definition ff_base.h:3986
FCCellMetrics()
The constructor. Defaults to unloaded. Metrics must be loaded with LoadAtCell or LoadAtEntry.
Definition ff_base.h:3834
Int100 GetHorizontalStretch() const
Returns the horizontal stretch of the staff system, in 100th of a percent.
Definition ff_base.h:3877
Class for an opened Finale document. An opened Finale document has a 1-based ID and can be displayed ...
Definition ff_documents.h:28
Class that specifies Enigma text style. This includes font, size, efx, superscript,...
Definition ff_base.h:1757
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:1766
void SetBaselineShift(Evpu32 value)
Returns the baseline shift in evpus. This value does not affect layout.
Definition ff_base.h:1843
void SetSuperscript(Evpu32 value)
Returns the superscript value. This value may affect layout. Negative values are subscripts.
Definition ff_base.h:1849
void SetInterletterSpacing(fourbyte value)
Sets the inter-letter spacing value in 1/1000 of an EM units.
Definition ff_base.h:1837
fourbyte GetInterletterSpacing() const
Returns the inter-letter spacing value in 1/1000 of an EM units.
Definition ff_base.h:1819
FCEnigmaTextStyle()
The constructor.
Definition ff_base.h:1780
Evpu32 GetSuperscript() const
Returns the superscript value. This value may affect layout. Negative values are subscripts.
Definition ff_base.h:1831
Evpu32 GetBaselineShift() const
Returns the baseline shift in evpus. This value does not affect layout.
Definition ff_base.h:1825
FCFontInfo * GetFont()
Returns the font. This is a pointer into the current instance of FCEnigmaTextStyle,...
Definition ff_base.h:1808
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:1765
FCEnigmaTextStyle(const FCFontInfo &font)
Constructor with font info.
Definition ff_base.h:1786
Class that encapsulate the entry metrics data.
Definition ff_base.h:4118
JWERECT * GetStemRect()
Returns a pointer to the stem rectangle in the metrics data.
Definition ff_base.h:4414
int GetTopPosition() const
Returns the highest position for the noteheads or stem.
Definition ff_base.h:4243
JWERECT * GetNoteheadRect()
Returns a pointer to the notehead rectangle in the metrics data.
Definition ff_base.h:4424
int GetLastDotPosition() const
Returns the horizontal position of rightmost augmentation dot.
Definition ff_base.h:4324
int GetRightPosition() const
Returns the right-side position for the noteheads or stem.
Definition ff_base.h:4294
int GetFirstAccidentalPosition() const
Returns the the left most edge of the accidental rectangle for all accidentals on the entry.
Definition ff_base.h:4335
int GetStemTopPosition() const
Returns the bottom position for the stem.
Definition ff_base.h:4274
int GetStemLeftPosition() const
Returns the left-side position for the stem.
Definition ff_base.h:4304
int GetStemBottomPosition() const
Returns the bottom position for the stem.
Definition ff_base.h:4264
int GetStemRightPosition() const
Returns the right-side position for the stem.
Definition ff_base.h:4314
int GetAttachmentCount() const
Returns the number of attachments that have info within the metrics data.
Definition ff_base.h:4201
int GetLeftPosition() const
Returns the left-side position for the noteheads or stem.
Definition ff_base.h:4284
int GetNoteCount() const
Returns the number of notes that the metrics data has information about.
Definition ff_base.h:4359
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4449
static void MarkMetricsForRebuild()
Static method that sets the refresh flag, so the next Load call will rebuild the metrics data.
Definition ff_base.h:4175
FLAG_32 GetEntryFlags()
Return the metrics entry flags.
Definition ff_base.h:4341
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:4149
int GetBottomPosition() const
Returns the lowest position for the noteheads or stem.
Definition ff_base.h:4253
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:4220
Class to display the font selection dialog box to the user.
Definition ff_base.h:5446
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:5454
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:5499
bool GetUseStyles() const
Returns if font styles should be selectable in the dialog box.
Definition ff_base.h:5489
void SetSampleString(FCString *pString)
Sets the sample string, that should be used to demo the apparence of the font selection.
Definition ff_base.h:5550
void GetSampleString(FCString *pString)
Gets the sample string, that is used to demo the apparence of the font selection.
Definition ff_base.h:5507
void SetUseStyles(bool state)
Sets if font styles (such as bold, underline, etc) should be selectable in the dialog box.
Definition ff_base.h:5529
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:5542
void SetUseSizes(bool state)
Sets if font sizes should be selectable in the dialog box.
Definition ff_base.h:5521
bool GetUseSizes() const
Returns if font sizes should be selectable in the dialog box.
Definition ff_base.h:5481
FCFontDialog(FCUI *pUI, FCFontInfo *pFontInfo)
The constructor.
Definition ff_base.h:5465
Class for document-independent font information.
Definition ff_base.h:1138
double CalcAverageRomanCharacterWidthPoints() const
Calculates the average width of the roman characters in the font in points.
Definition ff_base.h:1738
double CalcAverageRomanCharacterWidthEVPUs() const
Calculates the average width of the roman characters in the font in EVPUs.
Definition finaleframework.cpp:3723
void CopyFrom(const FCFontInfo *pInfo)
Copies data from another font info object.
Definition finaleframework.cpp:3394
bool GetBold() const
Returns true if the font style is boldface.
Definition ff_base.h:1640
bool IsName(const char *pszTestName) const
Checks if the font name is a perfect match to the C-string test string.
Definition finaleframework.cpp:3664
bool MakeDefaultMusicFont()
Changes the document's default music font to match this instance of FCFontInfo and modifies this inst...
Definition finaleframework.cpp:3713
void SetAbsolute(bool state)
Sets the absolute (fixed font) size state of the font info.
Definition ff_base.h:1562
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:3423
bool ParseEnigmaCommand(FCString *pString)
Parses a valid Enigma font command and changes the font information accordingly.
Definition finaleframework.cpp:3488
bool SaveFontPrefs(int prefsID)
Saves the font information to any of the preference fonts.
Definition finaleframework.cpp:3413
void ParseEnigmaFont(const EEnigmaFont *pEnigmaFont)
Transfers the info from a Finale-internal font structure to the FCFontInfo object.
Definition ff_base.h:1456
FCString * CreateDescription() const
Definition finaleframework.cpp:3580
double GetSizeFloat() const
Returns the font size as a floating point (with decimal digits).
Definition ff_base.h:1297
bool IsMacSymbolFont() const
returns true i the font is a Mac Symbol font.
Definition finaleframework.cpp:3685
void SetBold(bool state)
Sets the boldface attribute of the font info.
Definition ff_base.h:1578
void SetItalic(bool state)
Sets the italics attribute of the font info.
Definition ff_base.h:1594
FCFontInfo * CreateCopy()
Creates a copy of the font info object on the heap.
Definition ff_base.h:1247
void SetNameByID(EFONTID id)
Sets the font name by using the document's internal Enigma font ID.
Definition finaleframework.cpp:3650
void SetName(const std::string &pszName)
Sets the font name.
Definition finaleframework.cpp:3634
void SetSize(int fontsize)
Sets the font size as an integer value.
Definition ff_base.h:1546
FLAG_16 GetEnigmaStyles() const
Gets the font style as standard Enigma bit storage.
Definition ff_base.h:1358
void SetPlain()
Clears the styles so the font doesn't use any style.
Definition ff_base.h:1608
void SetStrikeOut(bool state)
Sets the strikeout state of the font info.
Definition ff_base.h:1570
void SetUnderline(bool state)
Sets the underline attribute of the font info.
Definition ff_base.h:1602
int GetSize() const
Returns the font size as an integer number.
Definition ff_base.h:1289
EFONTID GetFontID() const
Gets the internal document-specific font ID. It may not yet have been assigned a value,...
Definition ff_base.h:1511
bool GetHidden() const
Returns true if the font style is hidden (don't print).
Definition ff_base.h:1670
FCString * CreateEnigmaString(FCString *pFontTagString=NULL)
Returns a created FCString object that contains the font information as an Enigma string.
Definition finaleframework.cpp:3455
static fourbyte GetSystemTextEncoding()
Returns the internal Engima encoding number for the running Finale version. This value is appended to...
Definition finaleframework.cpp:3389
void SetSizeFloat(double fontsize)
Sets the font size as a floating point (with decimal digits) value.
Definition ff_base.h:1554
void MakeEnigmaStyleString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font style information.
Definition finaleframework.cpp:3465
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:3739
FCFontInfo()
Default constructor. This constructor does not add the font to the current document....
Definition finaleframework.cpp:3341
void SetHidden(bool state)
Sets the hidden state of the font info.
Definition ff_base.h:1586
bool IsPlain()
Returns true if the font has no special style flags.
Definition ff_base.h:1634
void SetFontID(EFONTID fontID)
Sets the internal document-specific font ID.
Definition ff_base.h:1525
bool GetIsSMuFLFont() const
Returns true if the font is a SMuFL font.
Definition ff_base.h:1679
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:1157
bool LoadFontPrefs(int prefsID)
Sets the font information to any of the preference fonts.
Definition finaleframework.cpp:3405
ENIGMASTYLES
Constants for enigma styles. These are bit-sensitve values that can be combined with bitwise-or.
Definition ff_base.h:1165
@ ENIGMASTYLE_STRIKEOUT
Definition ff_base.h:1179
@ ENIGMASTYLE_BOLD
Definition ff_base.h:1170
@ ENIGMASTYLE_HIDDEN
Definition ff_base.h:1185
@ ENIGMASTYLE_PLAIN
Definition ff_base.h:1167
@ ENIGMASTYLE_UNDERLINE
Definition ff_base.h:1176
@ ENIGMASTYLE_ABSOLUTE
Definition ff_base.h:1182
@ ENIGMASTYLE_ITALIC
Definition ff_base.h:1173
bool IsIdenticalTo(const FCFontInfo &compareWith) const
Returns true if all font information is identical to the compared object.
Definition finaleframework.cpp:3694
bool GetAbsolute() const
Returns true if the font size is absolute.
Definition ff_base.h:1664
void SetNameString(const FCString &value)
Sets the font name (FCString version).
Definition finaleframework.cpp:3639
EFONTID GetNameByID() const
Legacy version of GetIDByName with incorrect name.
Definition ff_base.h:1348
bool IsNameString(const FCString &pTestName) const
Checks if the font name is a perfect match to the test string.
Definition finaleframework.cpp:3678
bool GetStrikeOut() const
Returns true if the font style is strikeout.
Definition ff_base.h:1658
std::string GetName() const
Gets the font name (const C-string version).
Definition finaleframework.cpp:3550
bool GetItalic() const
Returns true if the font style is italic.
Definition ff_base.h:1646
bool GetUnderline() const
Returns true if the font style is underline.
Definition ff_base.h:1652
void GetNameString(FCString *pString) const
Gets the font name and puts it in a FCString object.
Definition finaleframework.cpp:3535
FCString * CreateEnigmaStyleString()
Creates a FCString object and creates the Enigma font style info string, based on only the current fo...
Definition finaleframework.cpp:3481
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:1156
void MakeEnigmaSizeString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font size information.
Definition finaleframework.cpp:3473
void SetEnigmaStyles(FLAG_16 fontstyles)
Sets the font style as standard Enigma bit storage.
Definition ff_base.h:1469
EFONTID GetIDByName() const
Gets the internal Enigma font ID for the current document by searching for the font name....
Definition finaleframework.cpp:3558
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:4821
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4875
double GetFloat() const
Returns the integer value version of the number.
Definition ff_base.h:4871
int GetInt() const
Returns the integer value version of the number.
Definition ff_base.h:4865
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:4825
FCNumber(double value)
The constructor.
Definition ff_base.h:4834
void SetInt(int value)
Sets the number as an integer.
Definition ff_base.h:4845
void SetFloat(double value)
Sets the number as a float.
Definition ff_base.h:4855
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:4826
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:4892
void MoveY(double value)
Moves the y position from the current offset.
Definition ff_base.h:4954
double GetY() const
Returns the y position.
Definition ff_base.h:4942
void SetY(double value)
Sets the y position.
Definition ff_base.h:4930
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:4896
void SetX(double value)
Returns the x position.
Definition ff_base.h:4924
void MoveX(double value)
Moves the x position from the current offset.
Definition ff_base.h:4948
FCPoint(double x, double y)
The constructor.
Definition ff_base.h:4902
double GetX() const
Returns the x position.
Definition ff_base.h:4936
Class containing printing settings (and the ability to print documents).
Definition ff_base.h:4969
void SetPageRangeString(const char *pszString)
Returns the page range string as a C-style string.
Definition ff_base.h:5238
bool GetDrawCropMarks() const
Returns if crop marks should be printed.
Definition ff_base.h:5040
bool GetColor() const
Returns true if color printing should be used.
Definition ff_base.h:5016
bool GetReverse() const
Returns if the pages should be printed in reverse order.
Definition ff_base.h:5034
void SetReverse(bool state)
Sets if the pages should be printed in reverse order.
Definition ff_base.h:5145
twobyte GetStartPage() const
Returns the 1-based start page for printing.
Definition ff_base.h:5022
twobyte GetEndPage() const
Returns the 1-based end page for printing.
Definition ff_base.h:5028
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:4972
void SetFitWithinMargins(bool state)
Sets whether to use the printer margins when fitting a page to print.
Definition ff_base.h:5205
void SetStartPage(twobyte startpage)
Sets the 1-based start page.
Definition ff_base.h:5125
bool GetDrawFileName() const
Returns if the file name should be printed.
Definition ff_base.h:5052
bool GetTile() const
Returns if the document should be tited if bigger than specified page.
Definition ff_base.h:5058
PRINTODDEVENMODES GetOddEvenMode() const
Returns the odd/even printing mode.
Definition ff_base.h:5089
void SetTileOverlap(Evpu32 value)
Sets the user overlap for tiled pages.
Definition ff_base.h:5195
bool GetFitWithinMargins() const
Returns whether to use the printer margins when fitting a page to print.
Definition ff_base.h:5076
void SetEndPage(twobyte endpage)
Sets the 1-based end page.
Definition ff_base.h:5135
bool GetDrawRegistrationMarks() const
Returns if registration marks should be printed.
Definition ff_base.h:5046
void SetDrawFileName(bool state)
Sets if the file name should be printed.
Definition ff_base.h:5163
void SetLayoutCount(twobyte count)
Sets the n-Up layout value. Can be 0, 1, 2, 4.
Definition ff_base.h:5177
const char * GetPageRangeString() const
Returns the page range string as a C-style string.
Definition ff_base.h:5095
PRINTODDEVENMODES
Constants used for printing odd/even pages. Used with the GetOddEvenMode() and SetOddEvenMode() metho...
Definition ff_base.h:4980
FCPrintSettings()
The constructor.
Definition ff_base.h:4997
void SetTile(bool state)
Sets if the document should be tited if bigger than specified page.
Definition ff_base.h:5169
void SetOddEvenMode(PRINTODDEVENMODES value)
Sets the odd/even printing mode.
Definition ff_base.h:5213
void SetColor(bool state)
Sets if color printing should be used.
Definition ff_base.h:5119
twobyte GetLayoutCount() const
Returns the n-Up layout value. Can be 0, 1, 2, 4.
Definition ff_base.h:5064
void SetDrawCropMarks(bool state)
Sets if crop marks should be printed.
Definition ff_base.h:5151
twobyte GetCopyCount() const
Returns the number of copies to print.
Definition ff_base.h:5010
void SetDrawRegistrationMarks(twobyte state)
Sets if registration marks should be printed.
Definition ff_base.h:5157
void SetCopyCount(twobyte copies)
Sets the number of copies to print.
Definition ff_base.h:5108
Evpu32 GetTileOverlap() const
Returns the user overlap for tiled pages.
Definition ff_base.h:5070
Class that encapsulates a range (start, length)
Definition ff_base.h:5570
void SetStart(int val)
Sets the start value.
Definition ff_base.h:5635
int GetStart() const
Returns the start value.
Definition ff_base.h:5616
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:5576
int GetLength() const
Returns the length value.
Definition ff_base.h:5622
FCRange(int start=0, int length=0)
The constructor.
Definition ff_base.h:5585
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:5629
void SetLength(int val)
Sets the length value.
Definition ff_base.h:5641
Class for storing a "key"+"value" pair of values.
Definition ff_base.h:3761
void SetValueString(FCString *pString)
Sets the "value" string.
Definition ff_base.h:3788
FCSettingsPair(FCString *pLeftString, FCString *pRightString)
The constructor.
Definition ff_base.h:3773
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:3765
FCString * GetValueString()
Returns the "value" string.
Definition ff_base.h:3785
FCString * GetKeyString()
Returns the "key" string.
Definition ff_base.h:3782
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:3790
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
void AppendEOL()
Appends a system-specific end-of-line string to the to the FCString object.
Definition ff_base.h:2109
int CalcStringPosFrom(const FCString &subString, int startindex) const
Returns the first position where a substring occurs, from a starting point.
Definition ff_base.h:2525
void AppendCharacter(eUniChar32 character)
Appends a character to the string.
Definition finaleframework.cpp:1825
void AppendLuaString(const char *pOtherString)
Appends a Lua string to the string. This method supports UTF-8.
Definition finaleframework.cpp:1869
void SetLuaString(const char *pszBuffer)
Sets the string, using a Lua string version of the string (as UTF-8).
Definition ff_base.h:3416
int CalcStringPos(const FCString &subString) const
Returns the first position where a substring occurs.
Definition ff_base.h:2476
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:2016
void SetTemplateFolderPath()
Sets the path string to Finale's template folder.
Definition ff_base.h:2304
bool EncodeFromMacRoman()
Re-encodes the string to true Unicode from MacRoman.
Definition finaleframework.cpp:1191
bool SplitToPathAndFile(FCString *pPathPart, FCString *pFilePart) const
Splits a fully qualified file path into path part and file part copies.
Definition ff_base.h:2231
FCStrings * CreateParsedStrings(const char *pszSeparators) const
Creates a collection of strings based on the separator characters. C-style string version.
Definition finaleframework.cpp:2774
void ToLowerCase()
Transforms the string to lower case.
Definition finaleframework.cpp:2859
FCStrings * CreateEnigmaComponents() const
Creates a string collection that consists of the components from an Enigma text command (with correct...
Definition finaleframework.cpp:2630
eUniChar16 GetCharacterAt(int index) const
Returns the character at the index position.
Definition finaleframework.cpp:2008
FCString(const _fcStringChar *pszCString)
Constructor version that takes a the platform UTF16 type as argument.
Definition ff_base.h:2000
void ExtractFileExtension()
Removes everything except the file extension part of a file name.
Definition ff_base.h:2739
FCString * CreateCopy()
Creates a copy of the string object on the heap.
Definition finaleframework.cpp:2411
bool IsEnigmaFileInfoComposer() const
Returns true if the string is an "Composer" Enigma command.
Definition finaleframework.cpp:1637
int GetLength() const
Returns the length of the string.
Definition ff_base.h:3055
FCString(const eUniChar16 *pszCString)
Constructor version that takes a Unicode 16 string as argument.
Definition ff_base.h:1993
int CalcCStringPos(const FCString *pSubString, const char *pszSubString) const
Returns the first position where a substring occurs. C-string version.
Definition ff_base.h:2509
bool EndsWithString(const FCString *pString) const
Returns true if the string ends with the parameter string.
Definition finaleframework.cpp:2916
void SetBackupFolderPath()
Sets the path string to Finale's backup folder.
Definition ff_base.h:2288
bool IsEnigmaCommand() const
Returns true if the string is an Enigma command.
Definition ff_base.h:3195
void TrimWhitespace()
Trims whitespace at both ends of the string.
Definition finaleframework.cpp:1543
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:1644
void TrimLinefeed()
Trims linefeed characters at both ends of the string.
Definition finaleframework.cpp:1550
void _SetCFURLRefPath(CFURLRef cfurl)
Definition finaleframework.cpp:1903
FCStrings * CreateEnigmaStrings(bool include_non_commands=false) const
Creates a string collection of every enigma text tag found in the string.
Definition finaleframework.cpp:2703
FCString(const FCString &src)
Copy constructor (required for classes that allocate memory.)
Definition ff_base.h:2026
bool SetCharacterUpperCase(int index)
Sets a specific character to upper case.
Definition finaleframework.cpp:2418
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:3064
const char * GetEOL() const
Returns the platform-specific end-of-line character(s) as a C-string.
Definition finaleframework.cpp:1704
bool EndsWith(const char *pszString) const
Returns true if the string ends with the parameter string.
Definition finaleframework.cpp:2908
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:2181
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:2952
const char * GetUTF8String() const
Returns a C-string UTF-8 version of the string.
Definition finaleframework.cpp:1376
bool LoadResource(int resourceID, HINSTANCE dllinstance=0)
Windows version. Loads the resource string into the string object.
Definition finaleframework.cpp:2992
void InsertString(const FCString *pString, int insertindex=0)
Inserts a string object to the string at a specified index position.
Definition finaleframework.cpp:1724
bool IsEnigmaFileInfoLyricist() const
Returns true if the string is an "Lyricist" Enigma command.
Definition finaleframework.cpp:1651
bool StartsWith(const char *pszString) const
Returns true if the string starts with the parameter string.
Definition finaleframework.cpp:2842
bool IsEqualCString(const char *pszString) const
Returns true if the string is identical with the parameter. (C-style string version....
Definition finaleframework.cpp:1746
bool IsEnigmaFileInfoCopyright() const
Returns true if the string is an "Copyright" Enigma command.
Definition finaleframework.cpp:1658
void SetUserOptionsPath()
Sets the string to the user options path on the running system.
Definition finaleframework.cpp:1931
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:1297
void SetCString(const char *pszBuffer, int maxchars=-1)
Sets the string, using a C-string version of the string.
Definition finaleframework.cpp:1234
double GetMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) unit) const
Converts the string to an EVPU measurement value, based on a specific unit.
Definition finaleframework.cpp:2328
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:2337
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:1986
void AppendFloat(double value)
Appends an floating-point value to the string.
Definition finaleframework.cpp:1884
bool IsEnigmaFont() const
Returns true if the string is an Enigma font command.
Definition finaleframework.cpp:1601
void SetMusicFolderPath()
Sets the path string to Finale's music folder.
Definition ff_base.h:2272
int GetInteger(int index=0) const
Converts the decimal string contents to an integer value.
Definition finaleframework.cpp:2056
void * GetNSString() const
Returns a NSString* version of the string (on Cocoa only).
Definition finaleframework.cpp:2044
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:3742
void SetPreferencesFolderPath()
Sets the path string to Finale's preference folder.
Definition ff_base.h:2350
FCString()
The constructor. Defaults to an empty string.
Definition ff_base.h:1975
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:1961
void SetCurrentTime()
Set the string to the current time in hh:mm:ss format.
Definition ff_base.h:3533
bool ContainsString(const FCString &pSubString) const
Returns true if the substring is found within the string.
Definition finaleframework.cpp:2947
void SetLibFolderPath()
Sets the path string to Finale's library folder.
Definition ff_base.h:2280
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:1960
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:1097
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:2154
const char * GetCString() const
Returns a C-string version of the string.
Definition finaleframework.cpp:1338
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:1998
void SetHex(int number, int bitwidth)
Sets the string to a lower-case hexadecimal number.
Definition finaleframework.cpp:2108
bool IsEnigmaFileInfoTitle() const
Returns true if the string is an "Title" Enigma command.
Definition finaleframework.cpp:1623
void SetNSString(void *pNSString)
Sets the string to a NSString* value.
Definition finaleframework.cpp:2050
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:2463
void AppendString(const FCString *pOtherString)
Appends another string object to the string.
Definition finaleframework.cpp:1849
void SetTempFolderPath()
Sets the path string to Finale's temp folder (for temporary files).
Definition ff_base.h:2312
void SetInteger(int i)
Sets the string to an integer.
Definition finaleframework.cpp:2141
void ToUnicode(eUniChar16 *pBuffer, int maxsize) const
Copies the string to a 16-bit Unicode string buffer.
Definition ff_base.h:3590
void SetDocStylesFolderPath()
Sets the path string to Finale's document styles folder.
Definition ff_base.h:2328
int CompareNoCase(const FCString &value) const
Case insensitive version of Compare.
Definition ff_base.h:2411
void FormatCharacterNumber(eUniChar32 character)
Formats a 16-bit character (symbol) number to a string for presentation purposes.
Definition finaleframework.cpp:1357
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:1763
void ConvertToPascal(Str255 &pascalString)
Converts the string contents to a Str255 pascal string.
Definition finaleframework.cpp:1892
bool IsNumber() const
Returns true if the string is a number.
Definition finaleframework.cpp:1575
bool EncodeToMacRoman()
Re-encodes the string from true Unicode to faux MacRoman.
Definition finaleframework.cpp:1212
void SetAutoSaveFolderPath()
Sets the path string to Finale's auto-save folder.
Definition ff_base.h:2296
double GetFloat(int index=0) const
Converts the decimal string contents to a floating point value.
Definition finaleframework.cpp:2131
void SetString(const FCString *pString)
Copies a string.
Definition finaleframework.cpp:2398
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:1987
void SetUTF8String(const char *pszBuffer)
Sets the string, using a UTF8 C-style string.
Definition finaleframework.cpp:1257
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:2502
bool TruncateAt(int newlength)
Truncates the string at the indicated position.
Definition ff_base.h:3670
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:1088
bool ContainsEnigmaTextInsert(bool only_file_info_inserts=true) const
Returns true if the text block contains a text insert.
Definition finaleframework.cpp:2973
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:1556
void Clear()
Creates an empty string.
Definition ff_base.h:2391
void SetUserPath()
Sets the string to the user path on the running system.
Definition finaleframework.cpp:1916
int Compare(const FCString &value) const
Compares string against another string.
Definition ff_base.h:2401
bool IsAllDigits() const
Returns true if all characters in the string are digits (0 through 9).
Definition finaleframework.cpp:1565
int GetHex() const
Converts the unsigned hexadecimal string to an integer value. The string can only contain valid hexad...
Definition finaleframework.cpp:2063
int FindLast(const char *pszSubStr) const
Returns the 0-based index for the last occurence of the substring.
Definition ff_base.h:2817
void ToUpperCase()
Transforms the string to upper case.
Definition finaleframework.cpp:2885
bool IsEnigmaFileInfoSubtitle() const
Returns true if the string is an "Subtitle" Enigma command.
Definition finaleframework.cpp:1630
int CalcLastStringPos(const FCString &subString) const
Returns the last position where a substring occurs.
Definition ff_base.h:2488
void AppendCString(const char *pOtherString)
Appends a C-style string to the string.
Definition finaleframework.cpp:1861
bool IsWhitespace(int index) const
Returns true if the character position contains a whitespace.
Definition finaleframework.cpp:1775
void SetFontAnnotationFolderPath()
Sets the path string to Finale's font annotation folder.
Definition ff_base.h:2320
bool ContainsCString(const char *pszSubString) const
Returns true if the substring is found within the string. C-string version.
Definition ff_base.h:2440
bool IsEmpty() const
Returns true if the string is empty.
Definition ff_base.h:3179
bool StartsWithString(const FCString *pString) const
Returns true if the string starts with the parameter string.
Definition finaleframework.cpp:2849
void Insert(const char *pszString, int insertindex=0)
Inserts a C string to the string at a specified index position.
Definition finaleframework.cpp:1715
bool DeleteCodePointsAt(int index, int count)
Removes a range of Unicode codepoints, starting at the 0-based index position.
Definition finaleframework.cpp:1507
FCStrings * CreateRows() const
Definition finaleframework.cpp:2798
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:2545
int FindFirst(const char *pszSubStr) const
Returns the 0-based index for the first occurence of the substring.
Definition ff_base.h:2778
bool TrimEnigmaFontTags()
Removes all Enigma font tags from a string, leaving only the actual text and text insert tags,...
Definition finaleframework.cpp:1437
FCFontInfo * CreateLastFontInfo() const
Creates a FCFontInfo object with the last font information (based on the Enigma text tags) found in t...
Definition finaleframework.cpp:2937
bool IsEqualString(const FCString &value) const
Returns true if the string is identical with the parameter. (FCString string version....
Definition ff_base.h:3142
bool IsEqual(const char *pszString) const
Returns true if the string is identical with the parameter.
Definition ff_base.h:3135
bool DeleteCharacterAt(int index)
Removes a character at the 0-based index position.
Definition ff_base.h:2716
bool IsCharacter(int index, eUniChar32 character) const
Returns true if the character at the index matches the supplied character.
Definition finaleframework.cpp:1752
bool DeleteCharactersAt(int index, int count)
Removes a range of characters, starting at the 0-based index position.
Definition finaleframework.cpp:1491
const char * GetLuaString() const
Returns a Lua version of the string in UTF-8 format.
Definition finaleframework.cpp:1371
virtual ~FCString()
The destructor. Deletes the string storage as well as the C-string pointer (if any).
Definition finaleframework.cpp:1023
void TruncateWidth(int maxlength, int prefixchars)
Truncates the string by removing the middle part and inserting '...' instead.
Definition ff_base.h:3697
bool Replace(const char *pszSource, const char *pszReplacement)
Replaces all occurrences of a source pattern with a replacement string.
Definition finaleframework.cpp:1515
bool MakeSubString(int startindex, int substringlength, FCString *pDestinationString)
Creates a substring from the string.
Definition finaleframework.cpp:1806
void SetMeasurement(double value, twobyte unit)
Sets the string to an EVPU measurement value, formatted to a specific unit.
Definition finaleframework.cpp:2168
void SetUnicodeString(const eUniChar16 *pChar, int maxchars=-1)
Sets the string by using a 16-bit Unicode buffer as input parameter.
Definition finaleframework.cpp:1273
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:1665
bool TrimEnigmaTags()
Removes all Enigma tag information from a string, leaving only the actual text.
Definition finaleframework.cpp:1396
bool DeleteCodePointAt(int index)
Removes the Unicode codepoint at the 0-based index position.
Definition ff_base.h:2687
void SetCharacterAt(int index, eUniChar16 newcharacter)
Sets the character at the index position.
Definition finaleframework.cpp:2391
FCString & operator=(const FCString &src)
Assignment operator (required for classes that allocate memory.)
Definition ff_base.h:2034
void SetPluginsFolderPath()
Sets the path string to Finale's root plug-in folder.
Definition ff_base.h:2264
bool TruncateEnd(int count)
Truncates the end of the string by a specific number of characters.
Definition ff_base.h:3686
void AssureEndingPathDelimiter()
Makes sure that the string ends with a path delimiter (backslash or slash, depending on OS)....
Definition ff_base.h:2117
void AppendInteger(int value)
Appends an integer value (decimal) to the string.
Definition finaleframework.cpp:1877
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:5279
float GetBottom() const
Returns the bottom position of the glyph, relative to the baseline.
Definition ff_base.h:5374
void _SetMaxAscent(float b)
For internal use only.
Definition ff_base.h:5332
float GetTop() const
Returns the top position of the glyph, relative to the baseline.
Definition ff_base.h:5395
float GetHeight() const
Returns the height of the glyph, in fractional points.
Definition ff_base.h:5360
float GetMaxDescent()
Returns the maximum descender for the font, relative to the baseline.
Definition ff_base.h:5415
void _SetBottom(float b)
For internal use only.
Definition ff_base.h:5326
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:5418
float GetMaxAscent()
Returns the maximum ascender for the font, relative to the baseline.
Definition ff_base.h:5405
ufourbyte GetGlyphNumber()
Returns the glyph number for the loaded data.
Definition ff_base.h:5348
void _SetLeft(float l)
For internal use only.
Definition ff_base.h:5320
float GetLeft() const
Returns the left-side position of the glyph, in fractional points.
Definition ff_base.h:5366
float GetWidth()
Returns the width of the glyph, in fractional points.
Definition ff_base.h:5354
void _SetWidth(float w)
For internal use only.
Definition ff_base.h:5314
void _SetHeight(float h)
For internal use only.
Definition ff_base.h:5308
void _SetMaxDescent(float b)
For internal use only.
Definition ff_base.h:5338
float GetRight() const
Returns the right-side position of the glyph.
Definition ff_base.h:5384
FCSystemGlyphInfo()
The constructor.
Definition ff_base.h:5285
A class that fetches the metrics for text (for how Finale will render it), such as the boundary boxes...
Definition ff_base.h:4471
double CalcWidthEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition ff_base.h:4786
double CalcHeightEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition ff_base.h:4771
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:4794
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:4797
double GetBottomEVPUs() const
Returns the bottom side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4718
double GetTopEVPUs() const
Returns the top side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4703
double GetAdvanceWidthPoints() const
Returns the advance width of the string (the pen position before and after printing the string),...
Definition ff_base.h:4566
double GetLeftPoints() const
Returns the left side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4585
double GetLeftEVPUs() const
Returns the left side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4673
double GetAdvanceWidthEVPUs() const
Returns the advance width of the string (the pen position before and after printing the string),...
Definition ff_base.h:4658
double GetRightEVPUs() const
Returns the right side of the bounding box, in fractional EVPUs.
Definition ff_base.h:4688
double GetRightPoints() const
Returns the right side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4604
double CalcHeightPoints()
Returns the width of the bounding box, in fractional Points.
Definition ff_base.h:4737
double GetTopPoints() const
Returns the top side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4623
double CalcWidthPoints()
Returns the width of the bounding box, in fractional Points.
Definition ff_base.h:4756
double GetBottomPoints() const
Returns the bottom side of the bounding box, in fractional Points measurements.
Definition ff_base.h:4642
FCTextMetrics()
The constructor. Defaults to unloaded. Metrics must be loaded with LoadString, LoadSymbol,...
Definition ff_base.h:4482
Standard class for basic user interface functionality.
Definition ff_ui.h:29