Finale PDK Framework  0.54
ff_base.h
1 /*
2  * File: ff_base.h
3  * Author: Jari Williamsson
4  *
5  * Created on den 26 december 2009, 14:03
6  *
7  * Important! Don't use size_t in general, since it's crashes Lua on 64-bit Windows if used in method prototypes.
8  */
9 
10 #ifndef _FF_BASE_H
11 #define _FF_BASE_H
12 
13 #include <finalepdk.h>
14 #include <ctype.h>
15 #ifdef PDK_FRAMEWORK_TINYXML
16 #include <tinyxml2.h>
17 #endif
18 #include <ctime> /* strftime */
19 
20 #ifdef PDK_FRAMEWORK_DEBUG
21 #if OPERATING_SYSTEM == WINDOWS
22 #include <stdio.h> /* sprintf */
23 #endif
24 #endif
25 
26 
27 /* Define macros to simplify Lua/non-Lua types */
28 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
29 #define _LUACODE(x) x
30 #define _ENUMCODE(x)
31 #endif
32 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
33 #define _LUACODE(x)
34 #define _ENUMCODE(x) x
35 #endif
36 
37 
38 /* Forward declararations of some required classes. */
39 class FCString;
40 class FCUI;
41 class FCNumbers;
42 
47 class __FCBase
48 {
49 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
50 
51  void *_UserData;
53  void *_UserData2;
54 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
55 public:
61  {
62  FCID_UNKNOWN = 0,
63  FCID_ACCIDENTALMOD,
64  FCID_ALLOTMENT,
65  FCID_ARTICULATION,
66  FCID_ARTICULATIONDEF,
67  FCID_BACKWARDREPEAT,
68  FCID_BASELINE,
69  FCID_BEAMMOD,
70  FCID_BEATCHARTELEMENT,
71  FCID_BROKENBEAMMOD,
72  FCID_CATEGORYDEF,
73  FCID_CELLCLEFCHANGE,
74  FCID_CELLFRAMEHOLD,
75  FCID_CELLGRAPHIC,
76  FCID_CELLTEXT,
77  FCID_CENTERSMARTSHAPE,
78  FCID_CHORD,
79  FCID_CHORDPREFS,
80  FCID_CHORDSUFFIXELEMENT,
81  FCID_CHORUSSYLLABLE,
82  FCID_CLEFDEF,
83  FCID_COMPOSITETIMESIGBOTTOMELEMENT,
84  FCID_COMPOSITETIMESIGTOPELEMENT,
85  FCID_CROSSSTAFFMOD,
86  FCID_CUSTOMSMARTLINEDEF,
87  FCID_CUSTOMSTEMMOD,
88  FCID_DISTANCEPREFS,
89  FCID_DOTMOD,
90  FCID_ENCLOSURE,
91  FCID_ENDINGREPEAT,
92  FCID_ENTRYALTERMOD,
93  FCID_EXECUTABLESHAPEDEF,
94  FCID_EXPRESSION,
95 
98 
99  FCID_FONTPREFS,
100  FCID_FREEZESYSTEM,
101  FCID_FRETBOARDSTYLEDEF,
102  FCID_FRETBOARDSTYLEDEFS,
103  FCID_FRETBOARDGROUPDEF,
104  FCID_FRETBOARDGROUPDEFS,
105  FCID_FRETINSTRUMENTDEF,
106  FCID_GENERALPREFS,
107  FCID_GRIDSGUIDESPREFS,
108  FCID_GROUP,
109  FCID_GROUPNAMEPOSITIONPREFS,
110  FCID_HUMANPLAYBACKPREFS,
111  FCID_INDEPENDENTCELLDETAIL,
112  FCID_INSTRUMENTDEF,
113  FCID_INSTRUMENTPLAYBACKDATA,
114  FCID_KEYSIGNATURE,
115  FCID_LAYERPREFS,
116  FCID_LYRICSPREFS,
117  FCID_MEASURE,
118  FCID_MEASURENUMBERREGION,
119  FCID_METATOOLASSIGNMENT,
120  FCID_MIDIEXPRESSION,
121  FCID_MISCDOCPREFS,
122  FCID_MULTIMEASUREREST,
123  FCID_MULTIMEASURERESTPREFS,
124  FCID_MULTISTAFFINSTRUMENT,
125  FCID_MULTISTAFFINSTRUMENTS,
126  FCID_MUSICCHARACTERPREFS,
127  FCID_MUSICSPACINGPREFS,
128 
131  FCID_NOTEHEADMOD,
132  FCID_OTHERINCI,
133  FCID_PERCUSSIONLAYOUTNOTE,
134  FCID_PERCUSSIONSTAFF,
135  FCID_PERFORMANCEMOD,
136  FCID_PAGE,
137  FCID_PAGEFORMATPREFS,
138  FCID_PAGEGRAPHIC,
139  FCID_PAGETEXT,
140  FCID_PART,
141  FCID_PARTEXTRACTPREFS,
142  FCID_PARTSCOPEPREFS,
143  FCID_PERCUSSIONNOTEMOD,
144  FCID_PIANOBRACEPREFS,
145  FCID_PLAYBACKPREFS,
146  FCID_RAWTEXT,
147  FCID_REPEATPREFS,
148  FCID_SECONDARYBEAMBREAKMOD,
149  FCID_SECTIONSYLLABLE,
150  FCID_SEPARATEMEASURENUMBER,
151  FCID_SEPARATEPLACEMENT,
152  FCID_SHAPEDEF,
153  FCID_SHAPEEXPRESSIONDEF,
154  FCID_SLURCONTOURPREFS,
155  FCID_SIZEPREFS,
156  FCID_SMARTSHAPE,
157  FCID_SMARTSHAPEENTRYMARK,
158  FCID_SMARTSHAPEMEASUREMARK,
159  FCID_SMARTSHAPEPREFS,
160  FCID_STAFF,
161  FCID_STAFFLIST,
162  FCID_STAFFNAMEPOSITION,
163  FCID_STAFFNAMEPOSITIONPREFS,
164  FCID_STAFFSTYLEASSIGN,
165  FCID_STAFFSTYLEDEF,
166  FCID_STAFFSYSTEM,
167  FCID_STEMCONNECTIONTABLE,
168  FCID_STEMMOD,
169 
172 
173  FCID_SYLLABLEENTRYMOD,
174  FCID_SYSTEMSTAFF,
175  FCID_TABLATURENOTEMOD,
176  FCID_TEMPOELEMENT,
177  FCID_TEXTBLOCK,
178  FCID_TEXTEXPRESSIONDEF,
179  FCID_TEXTREPEAT,
180  FCID_TEXTREPEATDEF,
181  FCID_TIEMOD,
182  FCID_TIEPREFS,
183  FCID_TIECONTOURPREFS,
184  FCID_TIEPLACEMENTPREFS,
185  FCID_TIMESIGNATURE,
186  FCID_TUPLET,
187  FCID_TUPLETPREFS,
188  FCID_VERSESYLLABLE
189  };
190 
198  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_UNKNOWN; }
199 
200 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
201 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
202 
204  int _Lua_GetClassID() { return (int) GetClassID(); }
205 #endif
206 #endif
207 
213  {
215  MEASUREMENTUNIT_DEFAULT = UNIT_DEFAULT,
216 
218  MEASUREMENTUNIT_EVPUS = UNIT_EVPUS,
219 
221  MEASUREMENTUNIT_INCHES = UNIT_INCHES,
222 
225 
227  MEASUREMENTUNIT_POINTS = UNIT_POINTS,
228 
230  MEASUREMENTUNIT_PICAS = UNIT_PICAS,
231 
233  MEASUREMENTUNIT_SPACES = UNIT_SPACES,
234 
237  };
238 
244  virtual const char* ClassName() { return "__FCBase"; }
245 
248  {
249  _UserData = NULL;
250  _UserData2 = NULL;
251  }
252 
257  /* NOTE: This was a bug that wasn't discovered until April 04 2013, so all
258  * plug-ins that use primitive collections (such as string collections)
259  * should be rebuilt. */
260  virtual ~__FCBase()
261  {
262  }
263 
264 #ifdef PDK_FRAMEWORK_DEBUG
265 
270  void DebugMsgDigit(const char* pszPrefixText, int i);
271 
277  void DebugMsgHex(const char* pszPrefixText, int i);
278 
284  void DebugMsgString(const char* pszPrefixText, const char * thestring);
285 
290  void DebugMsg(const char* pszMsg);
291 
299  static void DebugOutPtr(const char* pszPrefixText, void* ptr);
300 
306  static void DebugOutDigit(const char* pszPrefixText, int i);
307 
313  static void DebugOutFloat(const char* pszPrefixText, float f);
314 
320  static void DebugOutTag(const char* pszPrefixText, EXTAG extag);
321 
327  static void DebugOutHex(const char* pszPrefixText, int i);
328 
334  static void DebugOutBin(const char* pszPrefixText, int i);
335 
341  static void DebugOutString(const char* pszPrefixText, const char * thestring);
342 
348  static void DebugOutString(const char* pszPrefixText, FCString* pString);
349 
355  static void DebugOutBool(const char* pszPrefixText, bool state);
356 
362  static void DebugOutBlock(const void * pBuffer, int startoffset, int size);
363 
370  static void DebugOutByteArrayBlock(const void * pBuffer, int startoffset, int size);
371 
376  static void DebugOut(const char* pszLine);
377 
382  void DebugOutMenuInfo(FCUI* pUI, int menuixd_horiz, int menuixd_vert) const;
383 
384 #ifdef PDK_FRAMEWORK_FORMAT
385 
390  int DebugOutFormat(const char *fmt, ...);
391 #endif
392 
401  virtual void DebugDump();
402 
411  virtual void DebugDataDump();
412 
422  virtual void DebugDataByteArrayDump();
423 #endif
424 
431  void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state);
432 
439  void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state);
440 
449  bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits) const { return (flag & flagbits) != 0; }
450 
456  void SetUserData(void* pData) { _UserData = pData; }
457 
463  void SetUserData2(void* pData) { _UserData2 = pData; }
464 
470  void* GetUserData() const { return _UserData; }
471 
477  void* GetUserData2() const { return _UserData2; }
478 
492  virtual bool IsIdentical(__FCBase* pCompareObject)
493  {
494  if (!pCompareObject) return false;
495  if (ClassName() != pCompareObject->ClassName()) return false; /* Should point to same const string */
496  return true;
497  }
498 
499 
500 #ifdef PDK_FRAMEWORK_TINYXML
501 
505  void StoreXML_String(tinyxml2::XMLElement* pParentNode, const char* pszElementName, FCString* pStringValue);
506 
511  void StoreXML_Integer(tinyxml2::XMLElement* pParentNode, const char* pszElementName, int value);
512 
517  void StoreXML_Bool(tinyxml2::XMLElement* pParentNode, const char* pszElementName, bool value);
518 
523  void StoreXML_StringAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, FCString* pStringValue);
524 
529  void StoreXML_IntegerAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, int value);
530 
535  void StoreXML_BoolAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, bool value);
536 
541  void StoreXML_FloatAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, float value);
542 
549  virtual void StoreToXML(tinyxml2::XMLElement* pParentNode) {}
550 
551 
558  bool ReadXML_String(tinyxml2::XMLElement* pParentNode, const char* pszElementName, FCString* pStringValue);
559 
566  bool ReadXML_Integer(tinyxml2::XMLElement* pParentNode, const char* pszElementName, int* pValue);
567 
574  bool ReadXML_Bool(tinyxml2::XMLElement* pParentNode, const char* pszElementName, bool *pValue);
575 
582  bool ReadXML_StringAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, FCString* pStringValue);
583 
590  bool ReadXML_IntegerAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, int* pValue);
591 
598  bool ReadXML_BoolAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, bool *pValue);
599 
606  bool ReadXML_FloatAttribute(tinyxml2::XMLElement* pNode, const char* pszAttributeName, float *pValue);
607 
616  virtual bool ReadFromXML(tinyxml2::XMLElement* pParentNode) { return false; }
617 #endif
618 };
619 
628 class __FCBaseData : public __FCBase {
629 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
630  EXTAG _customtag;
631 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
632 protected:
637 
640  void *_datablock;
641 
645 
654 
655 
657  EDataID _dataid;
658 
659 
665  virtual void* Allocate() = 0;
666 
670  virtual void Deallocate() {
671  }
672 
678  virtual bool IsDynamicSize() {
679  return false;
680  }
681 
685  bool LoadDataBlock();
686 
691  void ClearData();
692 
700  virtual twobyte CalcLastInci() { return kNewInci; }
701 
710  virtual __FCBaseData* CreateObject() = 0;
711 
715  bool DataIsLoaded() const {
716  return (_loadedsize > 0);
717  }
718 
723  void _TagDocumentID();
724 public:
725 
726  virtual const PDKFRAMEWORK_CLASSID GetClassID() = 0; /* Force all inherited class to have this method implementation */
727 
732  EDOCID GetConnectedDocID() const
733  {
734  return _connecteddocID;
735  }
736 
743  bool VerifyConnectedDocID();
744 
749  virtual EXTAG Tag() = 0;
750 
757  virtual EVERSION EnigmaVersion() { return FXT_VERSION; }
758 
764  virtual int DataSizeLoad() = 0;
765 
769  virtual int DataSizeSave();
770 
771 
772  virtual const char* ClassName() { return "__FCBaseData"; }
773 
778  void _CloneFrom(__FCBaseData* pSource);
779 
787  virtual void CloneMemoryFrom(__FCBaseData* pSource);
788 
793  const EDataID* _GetDataID() { return &_dataid; }
794 
799  int _GetLoadedSize() const { return _loadedsize; }
800 
805  const void* GetDataBlock() { return _datablock; }
806 
815  EXTAG GetCustomTag() { return _customtag; }
816 
827  void SetCustomTag(EXTAG tag) { _customtag = tag; }
828 
830  __FCBaseData();
831 
833  virtual ~__FCBaseData();
834 
841  virtual bool Save();
842 
857  virtual bool Reload();
858 
867  virtual bool DeleteData();
868 
875  virtual bool DeepDeleteData()
876  {
877  return DeleteData();
878  }
879 
888  virtual bool LoadFirst() = 0;
889 
894  virtual bool LoadLast() { return false; }
895 
900  virtual bool LoadNext();
901 
906  virtual bool LoadPrevious() { return false; }
907 
916 
917 #ifdef PDK_FRAMEWORK_DEBUG
918  virtual void DebugDump()
919  {
921  DebugOutPtr("Data block: ", _datablock);
922  DebugOutDigit("Loaded size: ", (int) _GetLoadedSize());
923  }
924 
925  virtual void DebugDataDump()
926  {
928  if (_datablock) DebugOutBlock(_datablock, 0, _GetLoadedSize());
929  }
930 
931  virtual void DebugDataByteArrayDump()
932  {
934  if (_datablock) DebugOutByteArrayBlock(_datablock, 0, _GetLoadedSize());
935  }
936 
937 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
938  virtual void DebugDataCompare(__FCBaseData *pCompareObject)
939  {
940  if (!pCompareObject)
941  {
942  DebugOut("DebugDataCompare(): Compare object is nil.");
943  return;
944  }
945  if (_GetLoadedSize() != pCompareObject->_GetLoadedSize())
946  {
947  char szBuffer[200];
948  sprintf(szBuffer, "DebugDataCompare(): Compare size differs. %d compared to %d byte(s)", (int) _GetLoadedSize(), (int) pCompareObject->_GetLoadedSize());
949  DebugOut(szBuffer);
950  return;
951  }
952  unsigned char* pDataBlock = (unsigned char*) GetDataBlock();
953  unsigned char* pCompareBlock = (unsigned char*) pCompareObject->GetDataBlock();
954  int diffcount = 0;
955  for (int i = 0; i < _GetLoadedSize(); i++)
956  {
957  if (pDataBlock[i] != pCompareBlock[i])
958  {
959  diffcount ++;
960  char szBuffer[200];
961  sprintf(szBuffer, "DebugDataCompare() DIFF at 0-based byte offset %d: 0x%02x - 0x%02x ", i, pDataBlock[i], pCompareBlock[i]);
962  DebugOut(szBuffer);
963  }
964  }
965  if (diffcount == 0)
966  {
967  DebugOut("DebugDataCompare(): Data blocks are identical");
968  }
969  }
970 #endif
971 
974  void DebugDataOffsetDump(int offset, int size);
975 
976 #endif
977 
993 
994 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
995 
996  FCNumbers* CreateRawDataDump_GC();
997 #endif
998 
999 };
1000 
1001 
1005 class __FCInci : public __FCBaseData
1006 {
1007 public:
1008  virtual const char* ClassName() { return "__FCInci"; }
1009 
1011  bool Load(CMPER cmper, twobyte inci);
1012 };
1013 
1014 
1015 class FCString;
1016 
1024 class FCFontInfo : public __FCBase
1025 {
1026 #if FXT_VERSION >= FINALEVERSION_25
1027  EnigmaFontName _nameUTF16; /* 64-bit version of the data. */
1028 #else
1029  EFONTNAME _name; /* Should NOT be used on Finale 25 or later. */
1030 #endif
1031  EFONTID _fontid; /* The internal font ID. This is not
1032  document independent, but can be used for
1033  some cases when the exact font ID is
1034  required within the document. */
1035  float _size; /* Although Finale itself doesn't support fractional points,
1036  support it here. The FCCtrlCanvas supports it. */
1037  FLAG_16 _styles;
1038 private:
1039  const static FCString DefaultFontName;
1040 public:
1041  virtual const char* ClassName() { return "FCFontInfo"; }
1042  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_FONTINFO; }
1043 
1051  FCFontInfo();
1052 
1058  static fourbyte GetSystemTextEncoding();
1059 
1060 
1065  void CopyFrom(FCFontInfo* pInfo);
1066 
1074  {
1075  FCFontInfo* pCopy = new FCFontInfo();
1076  pCopy->CopyFrom(this);
1077  return pCopy;
1078  }
1079 
1080 #ifdef PDK_FRAMEWORK_PREFS
1081  /* NOTE! These 2 declarations are not type safe, since this declaration is in ff_base.h */
1082 
1093  bool LoadFontPrefs(int prefsID);
1094 
1105  bool SaveFontPrefs(int prefsID);
1106 
1107 #endif /* PDK_FRAMEWORK_PREFS*/
1108 
1115  twobyte GetSize() const { return (twobyte) _size; }
1116 
1123  float GetSizeFloat() const
1124  {
1125  return _size;
1126  }
1127 
1128 #if FXT_VERSION < FINALEVERSION_25
1129 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1130 
1131  void GetNameParam(const EFONTNAME* pName) { strcpy((char*)pName, (const char*)_name); }
1132 #endif
1133 #endif
1134 
1143  void GetNameString(FCString* pString) const;
1144 
1152  const char* GetName() const;
1153 
1158  twobyte GetNameByID();
1159 
1164  FLAG_16 GetEnigmaStyles() const { return _styles; }
1165 
1166 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
1167 
1182  bool MakeEnigmaString(FCString* pString, FCString* pFontTagString = NULL);
1183 
1193  FCString* CreateEnigmaString(FCString* pFontTagString = NULL);
1194 
1195 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1196 
1197  FCString* CreateEnigmaString_GC(FCString* pFontTagString = NULL);
1198 #endif
1199 
1209  void MakeEnigmaStyleString(FCString* pString);
1210 
1220  void MakeEnigmaSizeString(FCString* pString);
1221 
1230 
1231 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1232 
1233  FCString* CreateEnigmaStyleString_GC();
1234 #endif
1235 
1245  bool ParseEnigmaCommand(FCString* pString);
1246 
1247 #endif /* PDK_FRAMEWORK_ENIGMASTRINGS */
1248 
1250  void ParseEnigmaFont(const EEnigmaFont* pEnigmaFont)
1251  {
1252  SetEnigmaStyles(pEnigmaFont->efx);
1253  SetSize(pEnigmaFont->size);
1254  SetNameByID(pEnigmaFont->font);
1255  }
1256 
1261  void SetEnigmaStyles(FLAG_16 fontstyles) { _styles = fontstyles; }
1262 
1263 #if FXT_VERSION < FINALEVERSION_25
1264 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1265 
1266  void SetName( const EFONTNAME* pName) { strcpy((char*)_name, (const char*)pName); }
1267 #endif
1268 #endif
1269 
1276  void SetName( const char* pszName);
1277 
1285  void SetFontID(EFONTID fontID);
1286 
1291  void SetNameString( FCString* pString );
1292 
1298  void SetNameByID(twobyte id);
1299 
1306  void SetSize(twobyte fontsize) { _size = (twobyte) fontsize; }
1307 
1314  void SetSizeFloat(float fontsize) { _size = fontsize; }
1315 
1322  void SetAbsolute(bool state) { Set16BitFlag(&_styles, FONT_EFX_ABSOLUTE, state); }
1323 
1330  void SetStrikeOut(bool state) { Set16BitFlag(&_styles, FONT_EFX_STRIKEOUT, state); }
1331 
1338  void SetBold(bool state) { Set16BitFlag(&_styles, FONT_EFX_BOLD, state); }
1339 
1346  void SetHidden(bool state) { Set16BitFlag(&_styles, FONT_EFX_HIDDEN, state); }
1347 
1354  void SetItalic(bool state) { Set16BitFlag(&_styles, FONT_EFX_ITALIC, state); }
1355 
1362  void SetUnderline(bool state) { Set16BitFlag(&_styles, FONT_EFX_UNDERLINE, state); }
1363 
1368  void SetPlain() { _styles = 0; }
1369 
1378  bool IsName(const char* pszTestName);
1379 
1388  bool IsNameString(FCString* pTestName);
1389 
1394  bool IsPlain() { return (_styles == 0); }
1395 
1400  bool GetBold() const { return GetBitFlag(_styles, FONT_EFX_BOLD); }
1401 
1406  bool GetItalic() const { return GetBitFlag(_styles, FONT_EFX_ITALIC); }
1407 
1412  bool GetUnderline() const { return GetBitFlag(_styles, FONT_EFX_UNDERLINE); }
1413 
1418  bool GetStrikeOut() const { return GetBitFlag(_styles, FONT_EFX_STRIKEOUT); }
1419 
1425  bool GetAbsolute() const { return GetBitFlag(_styles, FONT_EFX_ABSOLUTE); }
1426 
1431  bool GetHidden() const { return GetBitFlag(_styles, FONT_EFX_HIDDEN); }
1432 
1438  bool IsIdenticalTo(FCFontInfo* pCompareWith);
1439 
1444  void MakeDefaultMusicFont();
1445 
1446 #ifdef PDK_FRAMEWORK_DEBUG
1447  virtual void DebugDump();
1448 #endif
1449 };
1450 
1451 
1452 
1453 
1454 class FCStrings;
1455 class FCCategoryDef;
1456 
1473 class FCString : public __FCBase
1474 {
1475 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1476  int _length;
1477  int _storagelength; // Maximum characters that can fit in the storage
1478  eUniChar16* _pStorage; /* The main string buffer (UTF16) for Unicode.
1479  * The contents MUST be 0-terminated (since
1480  * some APIs require it)! */
1481  mutable char* _pTempCBuffer; // Used for GetCString
1482  mutable char* _pTempCUTF8Buffer; // Used for GetCStringUTF8
1483 
1484 #if OPERATING_SYSTEM == MAC_OS
1485  void* _nsstringobject; /* A retained NSString* object for GetNSString() */
1486 #endif
1487 
1489  void _DeleteStorage();
1490 
1492  void _ExpandStorageIfNecessary(int minimumlength);
1493 
1495  bool _SetFinalePath(FinPath pathconstant);
1496 
1497 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1498 
1499 
1500 #ifdef PDK_FRAMEWORK_TINYXML
1501 
1507  virtual void StoreToXML(tinyxml2::XMLElement* pParentNode) {
1508  StoreXML_StringAttribute(pParentNode, "FCString", this);
1509  }
1510 
1511  /* \brief Virtual method that reads the string object data. This method is
1512  * only called passively by the collection load feature.
1513  *
1514  * This method requires the <b>PDK_FRAMEWORK_TINYXML</b> define. */
1515  virtual bool ReadFromXML(tinyxml2::XMLElement* pParentNode)
1516  {
1517  return ReadXML_StringAttribute(pParentNode, "FCString", this);
1518  }
1519 #endif
1520 
1521 public:
1522  virtual const char* ClassName() { return "FCString"; }
1523  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_STRING; }
1524 
1525 
1531  {
1532  _length = 0;
1533  _storagelength = 0;
1534  _pStorage = NULL;
1535  _pTempCBuffer = NULL;
1536  _pTempCUTF8Buffer = NULL;
1537 #if OPERATING_SYSTEM == MAC_OS
1538  /* Mac - Cocoa */
1539  _nsstringobject = 0;
1540 #endif
1541  Clear();
1542  }
1543 
1545  FCString(const char* pszCString) : __FCBase()
1546  {
1547  _length = 0;
1548  _storagelength = 0;
1549  _pStorage = NULL;
1550  _pTempCBuffer = NULL;
1551  _pTempCUTF8Buffer = NULL;
1552 #if OPERATING_SYSTEM == MAC_OS
1553  /* Mac - Cocoa */
1554  _nsstringobject = 0;
1555 #endif
1556  Clear();
1557  SetCString(pszCString);
1558  }
1559 
1560  FCString(const eUniChar16* pszCString) : __FCBase()
1561  {
1562  _length = 0;
1563  _storagelength = 0;
1564  _pStorage = NULL;
1565  _pTempCBuffer = NULL;
1566  _pTempCUTF8Buffer = NULL;
1567 #ifdef PDK_FRAMEWORK_COCOA
1568  _nsstringobject = 0;
1569 #endif
1570  Clear();
1571  SetUnicodeString(pszCString);
1572  }
1573 
1574 
1577  virtual ~FCString();
1578 
1579  static const eUniChar16 emptyUniCharStr[];
1580 
1586  void AppendCharacter(eUniChar16 character);
1587 
1592  void AppendString(FCString* pOtherString);
1593 
1598  void AppendCString(const char* pOtherString);
1599 
1600 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1601 
1608  void AppendLuaString(const char* pOtherString);
1609 #endif
1610 
1615  void AppendInteger(int value);
1616 
1621  void AppendFloat(float value);
1622 
1628 
1636  {
1637  if (IsEmpty()) return;
1638 #if OPERATING_SYSTEM == WINDOWS
1639  if (!EndsWith("\\")) AppendCString("\\");
1640 #else
1641  if (!EndsWith("/")) AppendCString("/");
1642 #endif
1643  }
1644 
1668  bool SplitAt(int splitpointindex, FCString* pFirstString, FCString* pSecondString, bool includesplitposchar)
1669  {
1670  /* Make sure the 0-based index position is valid */
1671  if (splitpointindex < 0) return false;
1672  if (splitpointindex >= GetLength()) return false;
1673  if ((pFirstString) && (pFirstString == pSecondString))
1674  {
1675  /* Reference to same destination object is not allowed */
1676  return false;
1677  }
1678  if (pFirstString && pSecondString)
1679  {
1680  /* Don't allow copying to "this" if both substrings are used */
1681  if (pFirstString == this) return false;
1682  if (pSecondString == this) return false;
1683  }
1684  if (pFirstString)
1685  {
1686  pFirstString->SetString(this);
1687  /* Check state of includesplitposchar, to decide if the
1688  split point should be included or not. */
1689  int splitoffset = 0;
1690  if (includesplitposchar) splitoffset = 1;
1691  pFirstString->TruncateAt(splitpointindex + splitoffset);
1692  }
1693  if (pSecondString)
1694  {
1695  pSecondString->SetString(this);
1696  pSecondString->DeleteCharactersAt(0, splitpointindex + 1);
1697  }
1698  return true;
1699  }
1700 
1715  bool SplitToPathAndFile(FCString* pPathPart, FCString* pFilePart)
1716  {
1717 #if OPERATING_SYSTEM == WINDOWS
1718  int pos = FindLast("\\");
1719 #else
1720  int pos = FindLast("/");
1721 #endif
1722  return SplitAt(pos, pPathPart, pFilePart, true);
1723  }
1724 
1733  void SetUserOptionsPath();
1734 
1739  void SetPluginsFolderPath() { _SetFinalePath(FinPath_PluginDir); }
1740 
1745  void SetMusicFolderPath() { _SetFinalePath(FinPath_MusicDir); }
1746 
1751  void SetLibFolderPath() { _SetFinalePath(FinPath_LibDir); }
1752 
1757  void SetBackupFolderPath() { _SetFinalePath(FinPath_BackupDir); }
1758 
1763  void SetAutoSaveFolderPath() { _SetFinalePath(FinPath_AutoSaveDir); }
1764 
1769  void SetTemplateFolderPath() { _SetFinalePath(FinPath_TemplateDir); }
1770 
1775  void SetTempFolderPath() { _SetFinalePath(FinPath_TempFilesDir); }
1776 
1781  void SetFontAnnotationFolderPath() { _SetFinalePath(FinPath_FontAnnotationDir); }
1782 
1787  void SetDocStylesFolderPath() { _SetFinalePath(FinPath_DocStylesDir); }
1788 
1795  {
1796  _SetFinalePath(FinPath_PercNoteTypesFile);
1797  Replace("\\\\", "\\");
1798  }
1799 
1800 #if FXT_VERSION >= FINALEVERSION_2012
1801 
1805  void SetPreferencesFolderPath() { _SetFinalePath(FinPath_PreferencesDir); }
1806 #endif
1807 
1808 
1814  void SetRunningLuaFolderPath();
1815 
1824  void SetRunningLuaFilePath();
1825 
1826 
1831  void Clear() { SetCString(""); }
1832 
1841  int Compare(FCString* pString2)
1842  {
1843  return strcmp(this->GetCString(), pString2->GetCString());
1844  }
1845 
1850  int CompareNoCase(FCString* pString2)
1851  {
1852  /* Please note!!! For some reason, _stricmp/strcasecmp don't
1853  * work correctly. It seems to hang under certain circumstances
1854  * on both platforms. */
1855  if (!pString2) return 1;
1856  FCString string1, string2;
1857  string1.SetString(this);
1858  string2.SetString(pString2);
1859  string1.ToLowerCase();
1860  string2.ToLowerCase();
1861  return strcmp(string1.GetCString(), string2.GetCString());
1862  }
1863 
1869  bool ContainsString(FCString* pSubString);
1870 
1876  bool ContainsCString(const char* pszSubString)
1877  {
1878  FCString substring;
1879  substring.SetCString(pszSubString);
1880  return ContainsString(&substring);
1881  }
1882 
1889  bool ContainsStringFrom(FCString* pSubString, int startindex);
1890 
1897  bool ContainsCStringFrom(const char* pszSubString, int startindex)
1898  {
1899  FCString substring;
1900  substring.SetCString(pszSubString);
1901  return ContainsStringFrom(&substring, startindex);
1902  }
1903 
1910  int CalcStringPos(FCString* pSubString)
1911  {
1912  /* This method can't be size_t, since it must be able to return -1! */
1913  return CalcStringPosFrom(pSubString, 0);
1914  }
1915 
1922  int CalcCStringPos(FCString* pSubString, const char* pszSubString)
1923  {
1924  /* This method can't be size_t, since it must be able to return -1! */
1925  FCString substring;
1926  substring.SetCString(pszSubString);
1927  return CalcStringPos(&substring);
1928  }
1929 
1936  int CalcStringPosFrom(FCString* pSubString, int startindex);
1937 
1945  int CalcCStringPosFrom(const char* pszSubString, int startindex)
1946  {
1947  /* This method can't be size_t, since it must be able to return -1! */
1948  FCString substring;
1949  substring.SetCString(pszSubString);
1950  return CalcStringPosFrom(&substring, startindex);
1951  }
1952 
1953 #if OPERATING_SYSTEM == MAC_OS
1954 
1955  void ConvertToPascal(Str255& pascalString);
1956 
1958  void _SetCFURLRefPath(void* cfurl);
1959 
1960  /* For internal use only. Converts a file path to CFURLRef */
1961  void* _GetPathCFURLRef();
1962 #endif
1963 
1964 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
1965 
1972  bool ContainsEnigmaTextInsert(bool only_file_info_inserts = true);
1973 
1989 
1990 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1991 
1992  FCStrings* CreateEnigmaComponents_GC();
1993 #endif
1994 
2008  FCStrings* CreateEnigmaStrings(bool include_non_commands = false);
2009 
2010 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2011 
2012  FCStrings* CreateEnigmaStrings_GC(bool include_non_commands);
2013 #endif
2014 #endif
2015 
2025 
2026 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2027 
2028  FCFontInfo* CreateLastFontInfo_GC();
2029 #endif
2030 
2044  FCStrings* CreateParsedStrings(const char* pszSeparators);
2045 
2046 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2047 
2048  FCStrings* CreateParsedStrings_GC(const char* pszSeparators);
2049 #endif
2050 
2061  FCStrings* CreateRows();
2062 
2063 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2064 
2065  FCStrings* CreateRows_GC();
2066 #endif
2067 
2077  bool DeleteCharacterAt(int index);
2078 
2088  bool DeleteCharactersAt(int index, int count);
2089 
2098  {
2099  int index = (int) GetLength() - 1;
2100  int count = 0;
2101  while (index >= 0)
2102  {
2103  eUniChar16 currentchar = GetCharacterAt(index);
2104  if (currentchar == '.')
2105  {
2106  FCString newstring;
2107  index ++;
2108  while (index < GetLength())
2109  {
2110  newstring.AppendCharacter(GetCharacterAt(index));
2111  index ++;
2112  }
2113  SetString(&newstring);
2114  return;
2115  }
2116  if (currentchar == '/') break;
2117  if (currentchar == '\\') break;
2118  index --;
2119  count ++;
2120  if (count > 7) break;
2121  }
2122  Clear();
2123  }
2124 
2135  int FindFirst(const char* pszSubStr)
2136  {
2137  twobyte firstchar = *pszSubStr;
2138  if (!firstchar) return -1;
2139  for (int i = 0; i < GetLength(); i++)
2140  {
2141  twobyte character = this->GetCharacterAt(i);
2142  if (character == firstchar)
2143  {
2144  int j = 1;
2145  bool identical = true;
2146  while (pszSubStr[j])
2147  {
2148  twobyte testchar = pszSubStr[j];
2149  if (this->GetCharacterAt(i + j) != testchar)
2150  {
2151  identical = false;
2152  break;
2153  }
2154  j++;
2155  }
2156  if (identical) return i;
2157  }
2158  }
2159  return -1;
2160  }
2161 
2172  int FindLast(const char* pszSubStr)
2173  {
2174  twobyte firstchar = *pszSubStr;
2175  if (!firstchar) return -1;
2176  int substrlength = (int) strlen(pszSubStr);
2177 
2178  for (int i = (int) (GetLength() - substrlength); i >= 0; i--)
2179  {
2180  twobyte character = this->GetCharacterAt(i);
2181  if (character == firstchar)
2182  {
2183  int j = 1;
2184  bool identical = true;
2185  while (pszSubStr[j])
2186  {
2187  twobyte testchar = pszSubStr[j];
2188  if (this->GetCharacterAt(i + j) != testchar)
2189  {
2190  identical = false;
2191  break;
2192  }
2193  j++;
2194  }
2195  if (identical) return i;
2196  }
2197  }
2198  return -1;
2199  }
2200 
2201 
2202 #ifdef PDK_FRAMEWORK_FORMAT
2203 
2212  int FormatCString(const char *fmt, ...);
2213 
2223  int FormatString(FCString *fmt, ...);
2224 #endif
2225 
2235  void FormatCharacterNumber(eUniChar16 character);
2236 
2243  const char* GetCString() const;
2244 
2245 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2246 
2254  const char* GetLuaString() const;
2255 #endif
2256 
2258  const char* GetUTF8String() const;
2259 
2270  bool CopyToUnicodeBuffer(eUniChar16 *pBuffer, int maxbufferlen = 0) const;
2271 
2272 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2273 
2274  UTRANSID _StartFinaleEdit();
2275 
2276  /* \brief For internal use only! Returns the internal UTF-16 buffer for the string. */
2277  eUniChar16* _GetUnicodeBuffer() const;
2278 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
2279 
2280 #if OPERATING_SYSTEM == MAC_OS
2281 
2288  void* GetNSString();
2289 
2291  void SetNSString(void* pNSString);
2292 #endif
2293 
2303  int GetInteger(int index = 0);
2304 
2312  int GetHex();
2313 
2325  float GetFloat(int index = 0);
2326 
2337  eUniChar16 GetCharacterAt(int index);
2338 
2344  int GetLength() const { return _length; }
2345 
2354  const char* GetEOL() const;
2355 
2364  void Insert(const char* pszString, int insertindex = 0);
2365 
2372  void InsertString(FCString* pString, int insertindex = 0);
2373 
2382  bool IsDigit(int index);
2383 
2389  bool IsAllDigits();
2390 
2403  bool IsNumber();
2404 
2408  bool IsEqualCString(const char* pszString);
2409 
2417  bool IsEqual(const char* pszString) { return IsEqualCString(pszString); }
2418 
2424  bool IsEqualString(FCString* pString);
2425 
2439  bool IsCharacter(int index, eUniChar16 character);
2440 
2455  bool IsCharacters(int index, const char *pChars);
2456 
2461  bool IsEmpty() { return (GetLength() == 0); }
2462 
2470  bool IsWhitespace(int index);
2471 
2472 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2473 
2478  {
2479  if (!IsCharacters(0, "^")) return false;
2480  if (IsCharacters(1, "^")) return false;
2481  return true;
2482  }
2483 
2488  bool IsEnigmaFont();
2489 
2494  bool IsEnigmaFileInfoTitle();
2495 
2500  bool IsEnigmaFileInfoSubtitle();
2501 
2506  bool IsEnigmaFileInfoComposer();
2507 
2512  bool IsEnigmaFileInfoArranger();
2513 
2518  bool IsEnigmaFileInfoLyricist();
2519 
2525 
2530  bool IsEnigmaTextInsert(bool only_file_info_inserts = true);
2531 #endif
2532 
2559 #if OPERATING_SYSTEM == WINDOWS
2560  bool LoadResource(int resourceID, HINSTANCE dllinstance = 0);
2561 #else
2562  bool LoadResource(const char* resourceID,
2563  const char* pszResourceFileName = NULL,
2564  const char* pszTableName = NULL);
2565 #endif
2566 
2581  bool MakeSubString(int startindex, int substringlength, FCString* pDestinationString);
2582 
2583 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2584 
2610  bool ReplaceCategoryFonts(FCCategoryDef* pCategoryDef, int fontmode, bool replacefonttag);
2611 #endif
2612 
2613 
2619  void SetCString(const char* pszBuffer, int maxchars = -1);
2620 
2621 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2622 #if OPERATING_SYSTEM == WINDOWS
2623 
2624  void _SetWCHARString(WCHAR* pCharBuffer);
2625 #endif
2626 #endif
2627 
2628 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2629 
2636  void SetLuaString(const char* pszBuffer) { SetUTF8String(pszBuffer); }
2637 #endif
2638 
2640  void SetUTF8String(const char* pszBuffer);
2641 
2650  void SetCharacterAt(int index, eUniChar16 newcharacter);
2651 
2659  void SetUnicodeString(const eUniChar16 *pChar, int maxchars = -1);
2660 
2665  void SetInteger(int i);
2666 
2676  void SetHex(int number, int bitwidth);
2677 
2681  void SetFloat(float f);
2682 
2683 #ifdef PDK_FRAMEWORK_PREFS
2684 
2695  void SetMeasurement(float value, twobyte unit);
2696 
2707  float GetMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte)
2708  unit);
2709 #endif /* #ifdef PDK_FRAMEWORK_PREFS */
2710 
2717  void SetString(FCString* pString);
2718 
2723  FCString* CreateCopy();
2724 
2733  bool SetCharacterUpperCase(int index);
2734 
2740  {
2741  time_t now = time(0);
2742  struct tm tstruct;
2743  char buf[80];
2744  tstruct = *localtime(&now);
2745  strftime(buf, sizeof(buf), "%X", &tstruct);
2746  SetCString(buf);
2747  }
2748 
2759  bool Replace(const char* pszSource, const char* pszReplacement);
2760 
2765  bool EndsWith(const char* pszString);
2766 
2773  bool StartsWith(const char* pszString);
2774 
2782  bool StartsWithString(FCString* pString);
2783 
2785  void ToUnicode(eUniChar16* pBuffer, int maxsize)
2786  {
2787  int len = GetLength();
2788  if (len > maxsize - 1) len = maxsize - 1;
2789  for (int i = 0; i < len; i++) pBuffer[i] = GetCharacterAt(i);
2790  pBuffer[len] = 0;
2791  }
2792 
2799  void ToLowerCase();
2800 
2807  void ToUpperCase();
2808 
2809 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2810 
2817  bool TrimEnigmaTags();
2818 #endif
2819 
2820 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
2821 
2837  bool TrimEnigmaFontTags();
2838 #endif
2839 
2846  void TrimWhitespace();
2847 
2854  void TrimLinefeed();
2855 
2856 
2865  bool TruncateAt(int newlength)
2866  {
2867  if (newlength >= GetLength()) return false;
2868  _length = newlength;
2869  _pStorage[_length] = 0; /* Make sure there's a NULL termination in the unicode buffer */
2870  return true;
2871  }
2872 
2881  bool TruncateEnd(int count)
2882  {
2883  if (count < 1) return false;
2884  return TruncateAt(GetLength() - count);
2885  }
2886 
2892  void TruncateWidth(int maxlength, int prefixchars)
2893  {
2894  if (_length <= maxlength) return;
2895  if (prefixchars + 3 > maxlength) return;
2896  if (prefixchars < -1) return;
2897  FCString resultstring;
2898  for (int i = 0; i < prefixchars; i++)
2899  {
2900  resultstring.AppendCharacter(this->GetCharacterAt(i));
2901  }
2902  resultstring.AppendCString("...");
2903  int startindex = _length - maxlength + prefixchars + 3;
2904  for (int i = startindex; i < _length; i++)
2905  {
2906  resultstring.AppendCharacter(this->GetCharacterAt((int) i));
2907  }
2908  this->SetString(&resultstring);
2909  }
2910 
2911 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2912 
2916  static EVERSION _GetFinPathVersion();
2917 
2924  bool MakeSpecFromFilePath(void *pFinPathSpec, EVERSION convertversion);
2925 
2932  bool MakeFullFilePath(const void* pFinPathSpec, EVERSION convertversion);
2933 
2934 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
2935 
2936 #ifdef PDK_FRAMEWORK_DEBUG
2937  virtual void DebugDump()
2938  {
2940  DebugOutDigit("Length: ", (int) _length);
2941  DebugOutDigit("Storage length: ", (int) _storagelength);
2942  DebugOutPtr("_pStorage: ", _pStorage);
2943  DebugOutString("String contents: ", GetCString());
2944  }
2945 #endif
2946 
2947 };
2948 
2949 
2950 
2955 class FCSettingsPair : public __FCBase
2956 {
2957  FCString _keystring;
2958  FCString _valuestring;
2959 public:
2966  FCSettingsPair(FCString* pLeftString, FCString* pRightString) : __FCBase()
2967  {
2968  _keystring.SetString(pLeftString);
2969  _keystring.TrimWhitespace();
2970  _valuestring.SetString(pRightString);
2971  _valuestring.TrimWhitespace();
2972  }
2973 
2975  FCString* GetKeyString() { return &_keystring; }
2976 
2978  FCString* GetValueString() { return &_valuestring; }
2979 
2981  void SetValueString(FCString* pString) { _valuestring.SetString(pString); }
2982 #ifdef PDK_FRAMEWORK_DEBUG
2983  virtual void DebugDump()
2984  {
2986  DebugOutString("Key: ", GetKeyString());
2987  DebugOutString("Value: ", GetValueString());
2988  }
2989 #endif
2990 };
2991 
2992 
2993 #ifdef PDK_FRAMEWORK_ENTRIES
2994 class FCNoteEntry;
2995 #endif
2996 
2997 class FCCell;
2998 
3007 class FCCellMetrics : public __FCBase
3008 {
3009  bool _loaded;
3010 
3011  EMeasureMetrics2009a _metrics;
3012 
3013  static bool _metricsshouldupdate;
3014 public:
3015  virtual const char* ClassName() { return "FCCellMetrics"; }
3016 
3017  FCCellMetrics() : __FCBase()
3018  {
3019  memset(&_metrics, 0, sizeof(_metrics));
3020  _loaded = false;
3021  }
3022 
3023  virtual ~FCCellMetrics()
3024  {
3025  FreeMetrics();
3026  }
3027 
3030  static void MarkMetricsForRebuild() { _metricsshouldupdate = true; }
3031 
3038  bool LoadAtCell(FCCell* pCell);
3039 
3040 #ifdef PDK_FRAMEWORK_ENTRIES
3041 
3045  bool LoadAtEntry(FCNoteEntry* pEntry);
3046 #endif
3047 
3054  Int100 GetHorizontalStretch() const
3055  {
3056  return _metrics.measMetrics.horzPercent;
3057  }
3058 
3069  Evpu32 GetTopStafflinePos() const
3070  {
3071  return _metrics.measMetrics.fipTopStaffLine;
3072  }
3073 
3084  Evpu32 GetBottomStafflinePos() const
3085  {
3086  return _metrics.measMetrics.fipBottom;
3087  }
3088 
3096  Evpu32 GetReferenceLinePos() const
3097  {
3098  return _metrics.measMetrics.fipTop;
3099  }
3100 
3105  Int100 GetStaffScaling() const
3106  {
3107  return _metrics.measMetrics.lperc;
3108  }
3109 
3114  Int100 GetSystemScaling() const
3115  {
3116  return _metrics.measMetrics.percent;
3117  }
3118 
3125  {
3126  return _metrics.attachCount;
3127  }
3128 
3134  int GetMusicStartPos() const
3135  {
3136  return _metrics.measMetrics.meposadj;
3137  }
3138 
3145  int GetLeftEdge() const
3146  {
3147  return _metrics.leftEdge;
3148  }
3149 
3154  int GetWidth() const
3155  {
3156  return _metrics.measMetrics.mewidth;
3157  }
3158 
3163  int GetMusicWidth() const
3164  {
3165  return _metrics.measMetrics.scalewidth;
3166  }
3167 
3173  {
3174  return _metrics.measMetrics.frontRepWidth;
3175  }
3176 
3182  {
3183  return _metrics.measMetrics.backRepWidth;
3184  }
3185 
3200  bool GetAttachment(__FCBaseData* pBaseDataObject, fourbyte the_id, EAttachment* pAttachment, bool stop = false)
3201  {
3202  if (_metrics.attachCount == 0) return false;
3203  for (int i = 0; i < _metrics.attachCount; i++)
3204  {
3205  EAttachment* pTest = &_metrics.pAttach[i];
3206  if (pTest->tag != pBaseDataObject->Tag()) continue;
3207  if (pTest->id != the_id) continue;
3208  if (stop)
3209  {
3210  if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE)) continue;
3211  }
3212  memcpy(pAttachment, pTest, sizeof(EAttachment));
3213  return true;
3214  }
3215  return false;
3216  }
3217 
3226  void FreeMetrics();
3227 
3228 #ifdef PDK_FRAMEWORK_DEBUG
3229  virtual void DebugDump()
3230  {
3232  DebugOutDigit("Horizontal stretch: ", GetHorizontalStretch());
3233  }
3234 #endif
3235 };
3236 
3237 
3238 #ifdef PDK_FRAMEWORK_ENTRIES
3239 
3245 class FCEntryMetrics : public __FCBase
3246 {
3247  bool _loaded;
3248  EEntryMetrics2009a _metrics2009a;
3249 #if FXT_VERSION >= FINALEVERSION_2014
3250  EEntryMetrics2014 _metrics2014;
3251 #endif
3252 
3253  static bool _updatemetrics;
3254 
3256  EVERSION _VersionToUse() const;
3257 
3261  EEntryMetrics2009a* _GetBasicMetricsPtr() const
3262  {
3263 #if FXT_VERSION >= FINALEVERSION_2014
3264  if (_VersionToUse() == FINALEVERSION_2014)
3265  return (EEntryMetrics2009a*) &_metrics2014;
3266  else
3267 #endif
3268  return (EEntryMetrics2009a*) &_metrics2009a;
3269 
3270  }
3271 public:
3272  virtual const char* ClassName() { return "FCEntryMetrics"; }
3273 
3278  FCEntryMetrics();
3279 
3280  virtual ~FCEntryMetrics()
3281  {
3282  FreeMetrics();
3283  }
3284 
3290  static void MarkMetricsForRebuild() { _updatemetrics = true; }
3291 
3299  bool Load(FCNoteEntry* pEntry);
3300 
3310 
3317  {
3318  return _GetBasicMetricsPtr()->attachCount;
3319  }
3320 
3335  bool GetAttachment(__FCBaseData* pBaseDataObject, fourbyte the_id, EAttachment* pAttachment, bool stop = false)
3336  {
3337  if (_GetBasicMetricsPtr()->attachCount == 0) return false;
3338  for (int i = 0; i < _GetBasicMetricsPtr()->attachCount; i++)
3339  {
3340  EAttachment* pTest = &_GetBasicMetricsPtr()->pAttach[i];
3341  if (pTest->tag != pBaseDataObject->Tag()) continue;
3342  if (pTest->id != the_id) continue;
3343  if (stop)
3344  {
3345  if (!GetBitFlag(pTest->flags, EATTACH_STOP_SHAPE)) continue;
3346  }
3347  memcpy(pAttachment, pTest, sizeof(EAttachment));
3348  return true;
3349  }
3350  return false;
3351  }
3352 
3353 
3358  int GetTopPosition() const
3359  {
3360  if (_GetBasicMetricsPtr()->headRect.top > _GetBasicMetricsPtr()->stemRect.top) return _GetBasicMetricsPtr()->headRect.top;
3361  return _GetBasicMetricsPtr()->stemRect.top;
3362  }
3363 
3368  int GetBottomPosition() const
3369  {
3370  if (_GetBasicMetricsPtr()->headRect.bottom < _GetBasicMetricsPtr()->stemRect.bottom) return _GetBasicMetricsPtr()->headRect.bottom;
3371  return _GetBasicMetricsPtr()->stemRect.bottom;
3372  }
3373 
3380  {
3381  return _GetBasicMetricsPtr()->stemRect.bottom;
3382  }
3383 
3390  {
3391  return _GetBasicMetricsPtr()->stemRect.top;
3392  }
3393 
3400  {
3401  return _GetBasicMetricsPtr()->stemRect.left;
3402  }
3403 
3410  {
3411  return _GetBasicMetricsPtr()->stemRect.right;
3412  }
3413 
3420  {
3421  return _GetBasicMetricsPtr()->lastDot;
3422  }
3423 
3431  {
3432  return _GetBasicMetricsPtr()->firstAcci;
3433  }
3434 
3436  FLAG_32 GetEntryFlags()
3437  {
3438  return _GetBasicMetricsPtr()->entryFlags;
3439  }
3440 
3442  ENoteMetrics* FindNoteMetrics(twobyte noteID);
3443 
3444 #if FXT_VERSION >= FINALEVERSION_2014
3445 
3446  ENoteMetrics2014* FindNoteMetrics2014(twobyte noteID);
3447 #endif
3448 
3454  int GetNoteCount() const
3455  {
3456  return _GetBasicMetricsPtr()->numNotes;
3457  }
3458 
3468  int GetNoteLeftPosition(int index);
3469 
3478  int GetNoteWidth(int index);
3479 
3484  ERECT* GetStemRect()
3485  {
3486  if (!_loaded) return NULL;
3487  return &_GetBasicMetricsPtr()->stemRect;
3488  }
3489 
3495  {
3496  if (!_loaded) return NULL;
3497  return &_GetBasicMetricsPtr()->headRect;
3498  }
3499 
3508  void FreeMetrics();
3509 
3510 #ifdef PDK_FRAMEWORK_DEBUG
3511  virtual void DebugDump()
3512  {
3514  }
3515 #endif
3516 };
3517 #endif
3518 
3519 
3520 class FCArticulationDef;
3521 
3531 class FCTextMetrics : public __FCBase
3532 {
3533 #if FXT_VERSION >= FINALEVERSION_25
3534  ETextMetrics _textMetrics;
3535 #endif
3536 public:
3537  FCTextMetrics() : __FCBase() {}
3538 
3554  bool LoadString(FCString* pText, FCFontInfo* pFont, float percent);
3555 
3570  bool LoadSymbol(eUniChar16 symbolchar, FCFontInfo* pFont, float percent);
3571 
3590  bool LoadArticulation(FCArticulationDef* pArticDef, bool flipped, float percent);
3591 
3598  void CopyFrom(FCTextMetrics* pTextMetrics);
3599 
3610  float GetAdvanceWidthPoints() const {
3611 #if FXT_VERSION >= FINALEVERSION_25
3612  return _textMetrics.width;
3613 #else
3614  return 0;
3615 #endif
3616  }
3617 
3625  float GetLeftPoints() const {
3626 #if FXT_VERSION >= FINALEVERSION_25
3627  return _textMetrics.left;
3628 #else
3629  return 0;
3630 #endif
3631  }
3632 
3640  float GetRightPoints() const {
3641 #if FXT_VERSION >= FINALEVERSION_25
3642  return _textMetrics.right;
3643 #else
3644  return 0;
3645 #endif
3646  }
3647 
3655  float GetTopPoints() const {
3656 #if FXT_VERSION >= FINALEVERSION_25
3657  return _textMetrics.top;
3658 #else
3659  return 0;
3660 #endif
3661  }
3662 
3670  float GetBottomPoints() const {
3671 #if FXT_VERSION >= FINALEVERSION_25
3672  return _textMetrics.bottom;
3673 #else
3674  return 0;
3675 #endif
3676  }
3677 
3686  float GetAdvanceWidthEVPUs() const {
3687 #if FXT_VERSION >= FINALEVERSION_25
3688  return _textMetrics.eWidth;
3689 #else
3690  return 0;
3691 #endif
3692  }
3693 
3701  float GetLeftEVPUs() const {
3702 #if FXT_VERSION >= FINALEVERSION_25
3703  return _textMetrics.eLeft;
3704 #else
3705  return 0;
3706 #endif
3707  }
3708 
3716  float GetRightEVPUs() const {
3717 #if FXT_VERSION >= FINALEVERSION_25
3718  return _textMetrics.eRight;
3719 #else
3720  return 0;
3721 #endif
3722  }
3723 
3731  float GetTopEVPUs() const {
3732 #if FXT_VERSION >= FINALEVERSION_25
3733  return _textMetrics.eTop;
3734 #else
3735  return 0;
3736 #endif
3737  }
3738 
3746  float GetBottomEVPUs() const {
3747 #if FXT_VERSION >= FINALEVERSION_25
3748  return _textMetrics.eBottom;
3749 #else
3750  return 0;
3751 #endif
3752  }
3753 
3762 #if FXT_VERSION >= FINALEVERSION_25
3763  return GetTopPoints()-GetBottomPoints();
3764 #else
3765  return 0;
3766 #endif
3767  }
3768 
3777 #if FXT_VERSION >= FINALEVERSION_25
3778  return GetRightPoints()-GetLeftPoints();
3779 #else
3780  return 0;
3781 #endif
3782  }
3783 
3792 #if FXT_VERSION >= FINALEVERSION_25
3793  return GetTopEVPUs()-GetBottomEVPUs();
3794 #else
3795  return 0;
3796 #endif
3797  }
3798 
3806  float CalcWidthEVPUs() {
3807 #if FXT_VERSION >= FINALEVERSION_25
3808  return GetRightEVPUs()-GetLeftEVPUs();
3809 #else
3810  return 0;
3811 #endif
3812  }
3813 
3814  virtual const char* ClassName() { return "FCTextMetrics"; }
3815 
3816 #ifdef PDK_FRAMEWORK_DEBUG
3817  virtual void DebugDump()
3818  {
3820  DebugOutFloat("Advance Width: ", GetAdvanceWidthPoints());
3821  DebugOutFloat("Left: ", GetLeftPoints());
3822  DebugOutFloat("Right: ", GetRightPoints());
3823  DebugOutFloat("Top: ", GetTopPoints());
3824  DebugOutFloat("Bottom: ", GetBottomPoints());
3825 
3826  DebugOutFloat("Advance Width EVPU: ", GetAdvanceWidthEVPUs());
3827  DebugOutFloat("Left EVPU: ", GetLeftEVPUs());
3828  DebugOutFloat("Right EVPU: ", GetRightEVPUs());
3829  DebugOutFloat("Top EVPU: ", GetTopEVPUs());
3830  DebugOutFloat("Bottom EVPU: ", GetBottomEVPUs());
3831  }
3832 #endif
3833 };
3834 
3835 
3840 class FCNumber : public __FCBase
3841 {
3842  int _intvalue;
3843  float _floatvalue;
3844  public:
3845  virtual const char* ClassName() { return "FCNumber"; }
3846  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_NUMBER; }
3847 
3854  FCNumber(float value) : __FCBase()
3855  {
3856  /* Better to have this float, since that would support both float and int. */
3857  _intvalue = (int) value;
3858  _floatvalue = value;
3859  }
3860 
3865  void SetInt(int value)
3866  {
3867  _intvalue = value;
3868  _floatvalue = (float) value;
3869  }
3870 
3873  void SetFloat(float value)
3874  {
3875  _intvalue = (int) value;
3876  _floatvalue = value;
3877  }
3878 
3883  int GetInt() const { return _intvalue; }
3884 
3887  float GetFloat() const { return _floatvalue; }
3888 
3889 
3890 #ifdef PDK_FRAMEWORK_DEBUG
3891  virtual void DebugDump()
3892  {
3894  DebugOutDigit("Integer value: ", _intvalue);
3895  }
3896 #endif
3897 };
3898 
3899 
3906 class FCPoint : public __FCBase
3907 {
3908  float _x;
3909  float _y;
3910 public:
3915  FCPoint(float x, float y) : __FCBase()
3916  {
3917  _x = x;
3918  _y = y;
3919  }
3920 
3925  void SetX(float value) { _x = value; }
3926 
3931  void SetY(float value) { _y = value; }
3932 
3937  float GetX() const { return _x; }
3938 
3943  float GetY() const { return _y; }
3944 
3949  void MoveX(float value) { _x += value; }
3950 
3955  void MoveY(float value) { _y += value; }
3956 };
3957 
3958 
3959 
3960 class FCDocument;
3961 
3970 {
3971  FinPrintSettings _settings;
3972 public:
3973 
3980  {
3983 
3986 
3989  };
3990 
3998  {
3999  _settings.copies = 1;
4000  _settings.startPage = 1;
4001  _settings.endPage = 1000;
4002  }
4003 
4004  /* Getters */
4005 
4010  twobyte GetCopyCount() const { return _settings.copies; }
4011 
4016  bool GetColor() const { return _settings.bPrintColor != 0; }
4017 
4022  twobyte GetStartPage() const { return _settings.startPage; }
4023 
4028  twobyte GetEndPage() const { return _settings.endPage; }
4029 
4034  bool GetReverse() const { return _settings.reverse != 0; }
4035 
4040  bool GetDrawCropMarks() const { return _settings.cropMarks != 0; }
4041 
4046  bool GetDrawRegistrationMarks() const { return _settings.regMarks != 0; }
4047 
4052  bool GetDrawFileName() const { return _settings.regFileName != 0; }
4053 
4058  bool GetTile() const { return _settings.tile != 0; }
4059 
4064  twobyte GetLayoutCount() const { return _settings.nUp; }
4065 
4070  Evpu32 GetTileOverlap() const { return _settings.userOverlap; }
4071 
4076  bool GetFitWithinMargins() const { return _settings.bFitWithinMargins != 0; }
4077 
4084 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
4086 #else
4087  twobyte
4088 #endif
4089  GetOddEvenMode() const { return (PRINTODDEVENMODES) _settings.oddEven; }
4090 
4095  const char* GetPageRangeString() const
4096  {
4097  return _settings.pageRangeString;
4098  }
4099 
4100  /* Setters */
4101 
4108  void SetCopyCount(twobyte copies)
4109  {
4110  if (copies < 0) return;
4111  if (copies > 100) return;
4112  _settings.copies = copies;
4113  }
4114 
4119  void SetColor(bool state) { _settings.bPrintColor = state; }
4120 
4125  void SetStartPage(twobyte startpage)
4126  {
4127  if (startpage < 1) return;
4128  _settings.startPage = startpage;
4129  }
4130 
4135  void SetEndPage(twobyte endpage)
4136  {
4137  if (endpage < 1) return;
4138  _settings.endPage = endpage;
4139  }
4140 
4145  void SetReverse(bool state) { _settings.reverse = state; }
4146 
4151  void SetDrawCropMarks(bool state) { _settings.cropMarks = state; }
4152 
4157  void SetDrawRegistrationMarks(twobyte state) { _settings.regMarks = state; }
4158 
4163  void SetDrawFileName(bool state) { _settings.regFileName = state; }
4164 
4169  void SetTile(bool state) { _settings.tile = state; }
4170 
4177  void SetLayoutCount(twobyte count)
4178  {
4179  switch (count) {
4180  case 0:
4181  case 1:
4182  case 2:
4183  case 4:
4184  _settings.nUp = count;
4185  break;
4186  default:
4187  break;
4188  }
4189  }
4190 
4195  void SetTileOverlap(Evpu32 value)
4196  {
4197  if (value < 0) return;
4198  _settings.userOverlap = value;
4199  }
4200 
4205  void SetFitWithinMargins(bool state) { _settings.bFitWithinMargins = state; }
4206 
4214 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
4216 #else
4217  twobyte
4218 #endif
4219  value
4220  )
4221  {
4222  switch (value)
4223  {
4224  case PRINTODDEVEN_ALL:
4225  case PRINTODDEVEN_EVEN:
4226  case PRINTODDEVEN_ODD:
4227  _settings.oddEven = value;
4228  break;
4229  default:
4230  break;
4231  }
4232  }
4233 
4238  void SetPageRangeString(const char* pszString)
4239  {
4240  if (!pszString) return;
4241  strncpy(_settings.pageRangeString, pszString, sizeof(_settings.pageRangeString));
4242  _settings.pageRangeString[sizeof(_settings.pageRangeString) - 1] = 0;
4243  }
4244 
4245 
4246  /* Misc methods */
4247 
4255  bool PrintCurrent();
4256 
4266  bool PrintDocument(FCDocument* pDocument);
4267 };
4268 
4269 
4270 
4271 
4279 {
4280  ufourbyte _glyphnumber; /* The glyph number that should be loaded. */
4281  float _height, _width, _left, _bottom;
4282  float _maxascent, _maxdescent;
4283 public:
4286  {
4287  _glyphnumber = 0;
4288  _height = _width = 0;
4289  _left = _bottom = 0;
4290  _maxascent = _maxdescent = 0;
4291  };
4292 
4302  bool LoadInfo(FCFontInfo* pFontInfo, ufourbyte glyphno);
4303 
4308  void _SetHeight(float h) { _height = h; }
4309 
4314  void _SetWidth(float w) { _width = w; }
4315 
4320  void _SetLeft(float l) { _left = l; }
4321 
4326  void _SetBottom(float b) { _bottom = b; }
4327 
4332  void _SetMaxAscent(float b) { _maxascent = b; }
4333 
4338  void _SetMaxDescent(float b) { _maxdescent = b; }
4339 
4340  /***********/
4341  /* GETTERS */
4342  /***********/
4343 
4348  ufourbyte GetGlyphNumber() { return _glyphnumber; }
4349 
4354  float GetWidth() { return _width; }
4355 
4360  float GetHeight() const { return _height; }
4361 
4366  float GetLeft() const { return _left; }
4367 
4374  float GetBottom() const { return _bottom; }
4375 
4384  float GetRight() const { return _left+_width; }
4385 
4395  float GetTop() const { return _bottom+_height; }
4396 
4405  float GetMaxAscent() { return _maxascent; }
4406 
4415  float GetMaxDescent() { return _maxdescent; }
4416 
4417 #ifdef PDK_FRAMEWORK_DEBUG
4418  virtual void DebugDump()
4419  {
4421  DebugOutHex("Glyph Number: ", GetGlyphNumber());
4422  DebugOutFloat("Width: ", GetWidth());
4423  DebugOutFloat("Height: ", GetHeight());
4424  DebugOutFloat("Left: ", GetLeft());
4425  DebugOutFloat("Bottom: ", GetBottom());
4426  DebugOutFloat("Max Ascender: ", GetMaxAscent());
4427  DebugOutFloat("Max Descender: ", GetMaxDescent());
4428  }
4429 #endif
4430 };
4431 
4432 
4445 class FCFontDialog : public __FCBase
4446 {
4447  FCUI* _pUI;
4448  FCFontInfo* _pUserFontInfo;
4449  FCString _samplestring;
4450  bool _usesizes;
4451  bool _usestyles;
4452 
4453 public:
4463  FCFontDialog(FCUI* pUI, FCFontInfo* pFontInfo) : __FCBase()
4464  {
4465  _pUI = pUI;
4466  _pUserFontInfo = pFontInfo;
4467  _usesizes = true;
4468  _usestyles = true;
4469  }
4470 
4471  /* GETTERS */
4472 
4479  bool GetUseSizes() const { return _usesizes; }
4480 
4487  bool GetUseStyles() const { return _usestyles; }
4488 
4497  FCFontInfo* GetFontInfo() const { return _pUserFontInfo; }
4498 
4505  void GetSampleString(FCString* pString)
4506  {
4507  if (!pString) return;
4508  pString->SetString(&_samplestring);
4509  }
4510 
4511  /* SETTERS */
4512 
4519  void SetUseSizes(bool state) { _usesizes = state; }
4520 
4527  void SetUseStyles(bool state) { _usestyles = state; }
4528 
4540  void SetFontInfo(FCFontInfo* pFontInfo) { _pUserFontInfo = pFontInfo; }
4541 
4548  void SetSampleString(FCString* pString) { _samplestring.SetString(pString); }
4549 
4560  bool Execute();
4561 };
4562 
4563 
4564 
4565 #endif /* _FF_BASE_H */
4566 
void SetStartPage(twobyte startpage)
Sets the 1-based start page.
Definition: ff_base.h:4125
const char * GetCString() const
Returns a C-string version of the string.
Definition: finaleframework.cpp:1159
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:918
virtual bool DeleteData()
Deletes the associated data from Finale's database. Be careful when deleting multiple objects...
Definition: finaleframework.cpp:808
void _TagDocumentID()
For internal use only.
Definition: finaleframework.cpp:725
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:375
int GetInteger(int index=0)
Converts the decimal string contents to an integer value.
Definition: finaleframework.cpp:1792
Class for document-independent font information.
Definition: ff_base.h:1024
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:772
int GetBottomPosition() const
Returns the lowest position for the noteheads or stem.
Definition: ff_base.h:3368
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:3144
void CopyFrom(FCFontInfo *pInfo)
Copies data from another font info object.
Definition: finaleframework.cpp:3115
virtual bool Reload()
Refreshes the data for the object, to synch the data with Finale's current data.
Definition: finaleframework.cpp:836
float GetAdvanceWidthEVPUs() const
Returns the advance width of the string (the pen position before and after printing the string)...
Definition: ff_base.h:3686
int GetInt() const
Returns the integer value version of the number.
Definition: ff_base.h:3883
bool VerifyConnectedDocID()
Checks that the stored document ID for the data object matches the current document's ID...
Definition: finaleframework.cpp:730
virtual void DebugDataDump()
Outputs a memory dump of the data block in the object for debugging purposes.
Definition: finaleframework.cpp:555
void _SetBottom(float b)
For internal use only.
Definition: ff_base.h:4326
void GetNameString(FCString *pString) const
Gets the font name and puts it in a FCString object.
Definition: finaleframework.cpp:3274
void TruncateWidth(int maxlength, int prefixchars)
Truncates the string by removing the middle part and inserting '...' instead.
Definition: ff_base.h:2892
bool ContainsStringFrom(FCString *pSubString, int startindex)
Returns true if the substring is found within the string from a certain position. ...
Definition: finaleframework.cpp:2712
virtual void StoreToXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to store an object's data.
Definition: ff_base.h:549
void DebugMsg(const char *pszMsg)
Creates a simple Message Box for debug purposes with just one text string.
Definition: finaleframework.cpp:249
void SetUserData(void *pData)
Sets the user data attached to the instance of an object.
Definition: ff_base.h:456
Simple class for the representation of x, y coordinates.
Definition: ff_base.h:3906
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:3272
void SetTemplateFolderPath()
Sets the path string to Finale's template folder.
Definition: ff_base.h:1769
float GetLeftPoints() const
Returns the left side of the bounding box, in fractional Points measurements.
Definition: ff_base.h:3625
void FormatCharacterNumber(eUniChar16 character)
Formats a 16-bit character (symbol) number to a string for presentation purposes. ...
Definition: finaleframework.cpp:1171
FCString * CreateEnigmaStyleString()
Creates a FCString object and creates the Enigma font style info string, based on only the current fo...
Definition: finaleframework.cpp:3211
bool GetFitWithinMargins() const
Returns whether to use the printer margins when fitting a page to print.
Definition: ff_base.h:4076
void AppendEOL()
Appends a system-specific end-of-line string to the to the FCString object.
Definition: ff_base.h:1627
virtual int DataSizeSave()
Returns the data size for the data structure that should be saved or created.
Definition: finaleframework.cpp:813
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:618
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:2937
An object to handle glyph information returned by the system.
Definition: ff_base.h:4278
int FindLast(const char *pszSubStr)
Returns the 0-based index for the first occurence of the substring.
Definition: ff_base.h:2172
bool TruncateEnd(int count)
Truncates the end of the string by a specific number of characters.
Definition: ff_base.h:2881
void SetTileOverlap(Evpu32 value)
Sets the user overlap for tiled pages.
Definition: ff_base.h:4195
EXTAG GetCustomTag()
Returns the custom Enigma tag, if any.
Definition: ff_base.h:815
bool StartsWith(const char *pszString)
Returns true if the string starts with the parameter string.
Definition: finaleframework.cpp:2613
bool GetDrawCropMarks() const
Returns if crop marks should be printed.
Definition: ff_base.h:4040
virtual bool ReadFromXML(tinyxml2::XMLElement *pParentNode)
Virtual method that is used to read object data.
Definition: ff_base.h:616
virtual bool LoadFirst()=0
Loads the very first element in the database, if any.
void _SetHeight(float h)
For internal use only.
Definition: ff_base.h:4308
void _SetMaxDescent(float b)
For internal use only.
Definition: ff_base.h:4338
float GetFloat() const
Returns the integer value version of the number.
Definition: ff_base.h:3887
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition: finaleframework.cpp:465
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass...
Definition: ff_base.h:640
bool ReadXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool *pValue)
Helper method to read boolean objects from the XML file.
Definition: finaleframework.cpp:658
static void MarkMetricsForRebuild()
Static method that sets the refresh flag, so the next Load call will rebuild the metrics data...
Definition: ff_base.h:3290
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:289
void _CloneFrom(__FCBaseData *pSource)
For internal use only. Copies object data (except data block) from another object.
Definition: finaleframework.cpp:743
void AppendString(FCString *pOtherString)
Appends another string object to the string.
Definition: finaleframework.cpp:1625
FCSettingsPair(FCString *pLeftString, FCString *pRightString)
The constructor.
Definition: ff_base.h:2966
void TrimWhitespace()
Trims whitespace at both ends of the string.
Definition: finaleframework.cpp:1369
Definition: ff_base.h:3985
bool IsCharacter(int index, eUniChar16 character)
Returns true if the character at the index matches the supplied character.
Definition: finaleframework.cpp:1576
void SetUserData2(void *pData)
Sets the additional user data attached to the instance of an object.
Definition: ff_base.h:463
Class for a category definition.
Definition: ff_other.h:12571
bool _heapdatablock
Variable that tells if _datablock is dynamically created on the heap (and should be deleted at object...
Definition: ff_base.h:644
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:238
float GetRightEVPUs() const
Returns the right side of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3716
FCString(const char *pszCString)
Constructor version that takes a C string as argument.
Definition: ff_base.h:1545
void SetCString(const char *pszBuffer, int maxchars=-1)
Sets the string, using a C-string version of the string.
Definition: finaleframework.cpp:1030
void AppendInteger(int value)
Appends an integer value (decimal) to the string.
Definition: finaleframework.cpp:1659
__FCBaseData * CreateClone()
Creates an identical copy of an object.
Definition: finaleframework.cpp:772
FCEntryMetrics()
The constructor.
Definition: finaleframework.cpp:3454
ufourbyte GetGlyphNumber()
Returns the glyph number for the loaded data.
Definition: ff_base.h:4348
bool ReadXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int *pValue)
Helper method to read integer objects from the XML file.
Definition: finaleframework.cpp:650
const char * GetEOL() const
Returns the platform-specific end-of-line character(s) as a C-string.
Definition: finaleframework.cpp:1529
Definition: ff_base.h:218
bool ContainsEnigmaTextInsert(bool only_file_info_inserts=true)
Returns true if the text block contains a text insert.
Definition: finaleframework.cpp:2756
PRINTODDEVENMODES
Constants used for printing odd/even pages. Used with the GetOddEvenMode() and SetOddEvenMode() metho...
Definition: ff_base.h:3979
float GetY() const
Returns the y position.
Definition: ff_base.h:3943
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:350
void SetTile(bool state)
Sets if the document should be tited if bigger than specified page.
Definition: ff_base.h:4169
FCNumbers * CreateRawDataDump()
Creates a byte collection with the raw loaded data block for the object (if the object type supports ...
Definition: finaleframework.cpp:883
bool Load(FCNoteEntry *pEntry)
Loads the entry metrics data.
Definition: finaleframework.cpp:3493
void SetHex(int number, int bitwidth)
Sets the string to a lower-case hexadecimal number.
Definition: finaleframework.cpp:1843
const char * GetName() const
Gets the font name (const C-string version).
Definition: finaleframework.cpp:3289
bool IsDigit(int index)
Returns true if the character at the specified 0-based index position is a digit (0 through 9)...
Definition: finaleframework.cpp:1381
bool GetColor() const
Returns true if color printing should be used.
Definition: ff_base.h:4016
The class for an articulation definition. On Finale 2012 and above, this class supports the Unicode c...
Definition: ff_other.h:11535
bool IsEnigmaFont()
Returns true if the string is an Enigma font command.
Definition: finaleframework.cpp:1426
void SetUseSizes(bool state)
Sets if font sizes should be selectable in the dialog box.
Definition: ff_base.h:4519
void SetDrawRegistrationMarks(twobyte state)
Sets if registration marks should be printed.
Definition: ff_base.h:4157
bool GetUseStyles() const
Returns if font styles should be selectable in the dialog box.
Definition: ff_base.h:4487
void Clear()
Creates an empty string.
Definition: ff_base.h:1831
ENoteMetrics2014 * FindNoteMetrics2014(twobyte noteID)
Returns the Finale 2014-specific metrics for a note.
Definition: finaleframework.cpp:3560
bool IsEnigmaFileInfoCopyright()
Returns true if the string is an "Copyright" Enigma command.
Definition: finaleframework.cpp:1483
FCFontDialog(FCUI *pUI, FCFontInfo *pFontInfo)
The constructor.
Definition: ff_base.h:4463
static void DebugOutFloat(const char *pszPrefixText, float f)
Static method that outputs a line for debugging purposes. The text appears with the extra float value...
Definition: finaleframework.cpp:282
int GetHex()
Converts the unsigned hexadecimal string to an integer value. The string can only contain valid hexad...
Definition: finaleframework.cpp:1798
bool GetDrawRegistrationMarks() const
Returns if registration marks should be printed.
Definition: ff_base.h:4046
Int100 GetSystemScaling() const
Returns the accumulated system scaling, in 100th of a percent.
Definition: ff_base.h:3114
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:3845
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag in the data block.
Definition: finaleframework.cpp:573
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:623
virtual void DebugDataByteArrayDump()
Outputs a memory dump of the data block in the object for debugging purposes, as a C++ byte array...
Definition: ff_base.h:931
void SetColor(bool state)
Sets if color printing should be used.
Definition: ff_base.h:4119
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:244
__FCBase()
The constructor.
Definition: ff_base.h:247
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:562
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:633
void SetUnderline(bool state)
Sets the underline attribute of the font info.
Definition: ff_base.h:1362
int GetStemRightPosition() const
Returns the right-side position for the stem.
Definition: ff_base.h:3409
void _SetMaxAscent(float b)
For internal use only.
Definition: ff_base.h:4332
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition: ff_base.h:60
float GetBottomEVPUs() const
Returns the bottom side of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3746
bool LoadArticulation(FCArticulationDef *pArticDef, bool flipped, float percent)
Loads the metrics for a specific articulation glyph.
Definition: finaleframework.cpp:3639
int GetLength() const
Returns the length of the string.
Definition: ff_base.h:2344
bool StartsWithString(FCString *pString)
Returns true if the string starts with the parameter string.
Definition: finaleframework.cpp:2620
An inci subrecord class for multi-inci data.
Definition: ff_base.h:1005
void InsertString(FCString *pString, int insertindex=0)
Inserts a string object to the string at a specified index position.
Definition: finaleframework.cpp:1549
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition: finaleframework.cpp:753
void SetFontID(EFONTID fontID)
Sets the internal font ID.
Definition: finaleframework.cpp:3314
void MakeDefaultMusicFont()
Changes the document's default music font.
Definition: finaleframework.cpp:3386
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_base.h:198
Definition: ff_base.h:233
void ToLowerCase()
Transforms the string to lower case.
Definition: finaleframework.cpp:2630
int GetStemLeftPosition() const
Returns the left-side position for the stem.
Definition: ff_base.h:3399
void SetInt(int value)
Sets the number as an integer.
Definition: ff_base.h:3865
void * GetUserData() const
Gets the user data attached to the instance of an object.
Definition: ff_base.h:470
static void DebugOutDigit(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:274
bool IsCharacters(int index, const char *pChars)
Returns true if the character at the index matches any of the supplied character. ...
Definition: finaleframework.cpp:1582
Class for an opened Finale document. An opened Finale document has a 1-based ID and can be displayed ...
Definition: ff_documents.h:26
void SetBold(bool state)
Sets the boldface attribute of the font info.
Definition: ff_base.h:1338
virtual ~__FCBase()
Virtual destructor, so all inherited classes get the virtual destructor.
Definition: ff_base.h:260
void SetLayoutCount(twobyte count)
Sets the n-Up layout value. Can be 0, 1, 2, 4.
Definition: ff_base.h:4177
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:3814
Class to display the font selection dialog box to the user.
Definition: ff_base.h:4445
const EDataID * _GetDataID()
Intended ONLY for the _CloneFrom implementation.
Definition: ff_base.h:793
bool IsEnigmaFileInfoTitle()
Returns true if the string is an "Title" Enigma command.
Definition: finaleframework.cpp:1448
void _SetCFURLRefPath(void *cfurl)
Definition: finaleframework.cpp:1685
float GetHeight() const
Returns the height of the glyph, in fractional points.
Definition: ff_base.h:4360
float GetX() const
Returns the x position.
Definition: ff_base.h:3937
void ParseEnigmaFont(const EEnigmaFont *pEnigmaFont)
Transfers the info from a Finale-internal font structure to the FCFontInfo object.
Definition: ff_base.h:1250
bool IsEqualCString(const char *pszString)
Returns true if the string is identical with the parameter. (C-style string version.)
Definition: finaleframework.cpp:1558
float GetWidth()
Returns the width of the glyph, in fractional points.
Definition: ff_base.h:4354
const void * GetDataBlock()
Intended ONLY for the _CloneFrom implementation.
Definition: ff_base.h:805
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:1008
bool GetHidden() const
Returns true if the font style is hidden (don't print).
Definition: ff_base.h:1431
Simple collection class for FCNumber class objects.
Definition: ff_basecollection.h:329
float GetSizeFloat() const
Returns the font size as a floating point (with decimal digits).
Definition: ff_base.h:1123
FCNumber(float value)
The constructor.
Definition: ff_base.h:3854
twobyte GetLayoutCount() const
Returns the n-Up layout value. Can be 0, 1, 2, 4.
Definition: ff_base.h:4064
void SetSize(twobyte fontsize)
Sets the font size as an integer value.
Definition: ff_base.h:1306
eUniChar16 GetCharacterAt(int index)
Returns the character at the index position.
Definition: finaleframework.cpp:1771
void Insert(const char *pszString, int insertindex=0)
Inserts a C string to the string at a specified index position.
Definition: finaleframework.cpp:1540
void SetTempFolderPath()
Sets the path string to Finale's temp folder (for temporary files).
Definition: ff_base.h:1775
void SetUnicodeString(const eUniChar16 *pChar, int maxchars=-1)
Sets the string by using a 16-bit Unicode buffer as input parameter.
Definition: finaleframework.cpp:1087
void SetName(const char *pszName)
Sets the font name.
Definition: finaleframework.cpp:3307
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets a 32 bit flag in the data block.
Definition: finaleframework.cpp:581
twobyte GetCopyCount() const
Returns the number of copies to print.
Definition: ff_base.h:4010
int GetStemBottomPosition() const
Returns the bottom position for the stem.
Definition: ff_base.h:3379
bool ContainsCStringFrom(const char *pszSubString, int startindex)
Returns true if the substring is found from a certain position within the string. C-string version...
Definition: ff_base.h:1897
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:227
void SetCustomTag(EXTAG tag)
Sets the custom Enigma tag, for classes that support multiple Enigma tags.
Definition: ff_base.h:827
bool GetDrawFileName() const
Returns if the file name should be printed.
Definition: ff_base.h:4052
static fourbyte GetSystemTextEncoding()
Returns the internal Engima encoding number for the running Finale version. This value is appended to...
Definition: finaleframework.cpp:3110
void SetMusicFolderPath()
Sets the path string to Finale's music folder.
Definition: ff_base.h:1745
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_base.h:1042
float GetLeftEVPUs() const
Returns the left side of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3701
FCPrintSettings()
The constructor.
Definition: ff_base.h:3997
Definition: ff_base.h:171
virtual void DebugDataDump()
Outputs a memory dump of the data block in the object for debugging purposes.
Definition: ff_base.h:925
virtual bool IsIdentical(__FCBase *pCompareObject)
Returns true if the data in the passed object is considered to be identical to the current object...
Definition: ff_base.h:492
void SetValueString(FCString *pString)
Sets the "value" string.
Definition: ff_base.h:2981
static void MarkMetricsForRebuild()
Static method that sets the flag that the metrics should be rebuilt on the next load.
Definition: ff_base.h:3030
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:674
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:1522
bool IsWhitespace(int index)
Returns true if the character position contains a whitespace.
Definition: finaleframework.cpp:1594
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:3069
int DebugOutFormat(const char *fmt,...)
Outputs debug text using C style "printf" syntax.
Definition: finaleframework.cpp:532
bool IsEnigmaCommand()
Returns true if the string is an Enigma command.
Definition: ff_base.h:2477
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_base.h:1523
void SetBackupFolderPath()
Sets the path string to Finale's backup folder.
Definition: ff_base.h:1757
bool LoadResource(int resourceID, HINSTANCE dllinstance=0)
Loads the resource string into the string object.
Definition: finaleframework.cpp:2775
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:449
void SetY(float value)
Sets the y position.
Definition: ff_base.h:3931
Class for storing a "key"+"value" pair of values.
Definition: ff_base.h:2955
twobyte GetNameByID()
Gets the internal Enigma font ID. This value is document-specific.
Definition: finaleframework.cpp:3297
int CalcLeftmostNotePosition()
Calculates the left-most note start position, in page coordinates (from the left border of the page)...
Definition: finaleframework.cpp:3528
bool IsNameString(FCString *pTestName)
Checks if the font name is a perfect match to the test string.
Definition: finaleframework.cpp:3358
void SetString(FCString *pString)
Copies a string.
Definition: finaleframework.cpp:2132
void SetStrikeOut(bool state)
Sets the strikeout state of the font info.
Definition: ff_base.h:1330
int GetStemTopPosition() const
Returns the bottom position for the stem.
Definition: ff_base.h:3389
const char * GetPageRangeString() const
Returns the page range string as a C-style string.
Definition: ff_base.h:4095
bool IsIdenticalTo(FCFontInfo *pCompareWith)
Returns true if all font information is identical to the compared object.
Definition: finaleframework.cpp:3366
Definition: ff_base.h:221
bool GetUnderline() const
Returns true if the font style is underline.
Definition: ff_base.h:1412
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:1041
virtual void * Allocate()=0
void AppendFloat(float value)
Appends an floating-point value to the string.
Definition: finaleframework.cpp:1666
float GetMaxAscent()
Returns the maximum ascender for the font, relative to the baseline.
Definition: ff_base.h:4405
bool SplitToPathAndFile(FCString *pPathPart, FCString *pFilePart)
Splits a fully qualified file path into path part and file part copies.
Definition: ff_base.h:1715
void SetUTF8String(const char *pszBuffer)
Sets the string, using a UTF8 C-style string.
Definition: finaleframework.cpp:1067
void ClearData()
Definition: finaleframework.cpp:792
void SetPlain()
Clears the styles so the font doesn't use any style.
Definition: ff_base.h:1368
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:1752
int GetBackRepeatWidth() const
Returns the width of the back repeat for the cell.
Definition: ff_base.h:3181
void ToUnicode(eUniChar16 *pBuffer, int maxsize)
Copies the string to a 16-bit Unicode string buffer.
Definition: ff_base.h:2785
bool ContainsString(FCString *pSubString)
Returns true if the substring is found within the string.
Definition: finaleframework.cpp:2707
void AssureEndingPathDelimiter()
Makes sure that the string ends with a path delimiter (backslash or slash, depending on OS)...
Definition: ff_base.h:1635
Standard class for basic user interface functionality.
Definition: ff_ui.h:25
float CalcHeightEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3791
void StoreXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper function to store FCString objects in the XML file.
Definition: finaleframework.cpp:590
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:974
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:3817
FCStrings * CreateRows()
Definition: finaleframework.cpp:2560
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:1794
FCStrings * CreateEnigmaComponents()
Creates a string collection that consists of the components from an Enigma text command (with correct...
Definition: finaleframework.cpp:2364
ERECT * GetNoteheadRect()
Returns a pointer to the notehead rectangle in the metrics data.
Definition: ff_base.h:3494
Class that encapsulate the measure metrics info data.
Definition: ff_base.h:3007
bool GetAbsolute() const
Returns true if the font size is absolute.
Definition: ff_base.h:1425
bool IsEnigmaFileInfoLyricist()
Returns true if the string is an "Lyricist" Enigma command.
Definition: finaleframework.cpp:1476
bool TruncateAt(int newlength)
Truncates the string at the indicated position.
Definition: ff_base.h:2865
bool IsEnigmaFileInfoComposer()
Returns true if the string is an "Composer" Enigma command.
Definition: finaleframework.cpp:1462
bool ContainsCString(const char *pszSubString)
Returns true if the substring is found within the string. C-string version.
Definition: ff_base.h:1876
The class that reference a cell (one measure on one staff) in the musical "grid". ...
Definition: ff_cell.h:17
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_base.h:3846
void SetAutoSaveFolderPath()
Sets the path string to Finale's auto-save folder.
Definition: ff_base.h:1763
int GetAttachmentCount() const
Returns the number of attachments that has info within the metrics data.
Definition: ff_base.h:3124
Class that encapsulate the entry metrics data.
Definition: ff_base.h:3245
bool PrintDocument(FCDocument *pDocument)
Prints a specific document. The current printer will be used. The document's current list of selected...
Definition: finaleframework.cpp:3779
void SetPageRangeString(const char *pszString)
Returns the page range string as a C-style string.
Definition: ff_base.h:4238
void SetFloat(float value)
Sets the number as a float.
Definition: ff_base.h:3873
Definition: ff_base.h:215
void ConvertToPascal(Str255 &pascalString)
Converts the string contents to a Str255 pascal string.
Definition: finaleframework.cpp:1674
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:4418
Base class for the Finale Framework classes.
Definition: ff_base.h:47
FLAG_32 GetEntryFlags()
Return the metrics entry flags.
Definition: ff_base.h:3436
bool TrimEnigmaFontTags()
Removes all Enigma font tags from a string, leaving only the actual text and text insert tags...
Definition: finaleframework.cpp:1262
int CalcStringPosFrom(FCString *pSubString, int startindex)
Returns the first position where a substring occurs, from a starting point.
Definition: finaleframework.cpp:2734
bool GetItalic() const
Returns true if the font style is italic.
Definition: ff_base.h:1406
FCString * GetKeyString()
Returns the "key" string.
Definition: ff_base.h:2975
void MoveY(float value)
Moves the y position from the current offset.
Definition: ff_base.h:3955
bool Execute()
Displays the dialog box to the user.
Definition: finaleframework.cpp:3695
bool MakeSubString(int startindex, int substringlength, FCString *pDestinationString)
Creates a substring from the string.
Definition: finaleframework.cpp:1600
void SetDrawCropMarks(bool state)
Sets if crop marks should be printed.
Definition: ff_base.h:4151
virtual void Deallocate()
Definition: ff_base.h:670
bool Load(CMPER cmper, twobyte inci)
Loads an object from a specific cmper/inci location.
Definition: finaleframework.cpp:912
void SetFitWithinMargins(bool state)
Sets whether to use the printer margins when fitting a page to print.
Definition: ff_base.h:4205
int CalcStringPos(FCString *pSubString)
Returns the first position where a substring occurs.
Definition: ff_base.h:1910
bool LoadFontPrefs(int prefsID)
Sets the font information to any of the preference fonts.
Definition: finaleframework.cpp:3126
void * GetUserData2() const
Gets the additional user data attached to the instance of an object.
Definition: ff_base.h:477
bool TrimEnigmaTags()
Removes all Enigma tag information from a string, leaving only the actual text.
Definition: finaleframework.cpp:1221
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:780
int CompareNoCase(FCString *pString2)
Case insensitive version of Compare.
Definition: ff_base.h:1850
void SetCurrentTime()
Set the string to the current time in hh:mm:ss format.
Definition: ff_base.h:2739
Definition: ff_base.h:3982
bool IsEqualString(FCString *pString)
Returns true if the string is identical with the parameter. (FCString string version.)
Definition: finaleframework.cpp:1564
int FindFirst(const char *pszSubStr)
Returns the 0-based index for the first occurence of the substring.
Definition: ff_base.h:2135
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition: ff_base.h:653
bool SplitAt(int splitpointindex, FCString *pFirstString, FCString *pSecondString, bool includesplitposchar)
Splits a string into 2 substrings at a specific split point character position.
Definition: ff_base.h:1668
float GetLeft() const
Returns the left-side position of the glyph, in fractional points.
Definition: ff_base.h:4366
EDOCID _connecteddocID
The "connected" document ID., which is the document the where the document was loaded (or last saved)...
Definition: ff_base.h:636
FCString()
The constructor. Defauls to an empty string.
Definition: ff_base.h:1530
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:682
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:2983
void SetPreferencesFolderPath()
Sets the path string to Finale's preference folder.
Definition: ff_base.h:1805
void SetAbsolute(bool state)
Sets the absolute (fixed font) size state of the font info.
Definition: ff_base.h:1322
void SetCopyCount(twobyte copies)
Sets the number of copies to print.
Definition: ff_base.h:4108
int GetNoteLeftPosition(int index)
Returns the note left position (from the left border of the page) for a note in the metrics note arra...
Definition: finaleframework.cpp:3573
Base class for all data-related classes (that handles Finale data).
Definition: ff_base.h:628
MEASUREMENTUNITS
Constants for Finale's standard measurement units.
Definition: ff_base.h:212
bool GetBold() const
Returns true if the font style is boldface.
Definition: ff_base.h:1400
twobyte GetSize() const
Returns the font size as an integer number.
Definition: ff_base.h:1115
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:4540
virtual bool Save()
Saves the currently loaded to its current location.
Definition: finaleframework.cpp:848
int _GetLoadedSize() const
Intended ONLY for the _CloneFrom implementation.
Definition: ff_base.h:799
Definition: ff_base.h:227
void GetSampleString(FCString *pString)
Gets the sample string, that is used to demo the apparence of the font selection. ...
Definition: ff_base.h:4505
int GetFirstAccidentalPosition() const
Returns the the left most edge of the accidental rectangle for all accidentals on the entry...
Definition: ff_base.h:3430
void SetSampleString(FCString *pString)
Sets the sample string, that should be used to demo the apparence of the font selection.
Definition: ff_base.h:4548
void ToUpperCase()
Transforms the string to upper case.
Definition: finaleframework.cpp:2656
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:390
FCSystemGlyphInfo()
The constructor.
Definition: ff_base.h:4285
void SetOddEvenMode(PRINTODDEVENMODES value)
Sets the odd/even printing mode.
Definition: ff_base.h:4213
bool IsPlain()
Returns true if the font has no special style flags.
Definition: ff_base.h:1394
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:397
FCStrings * CreateParsedStrings(const char *pszSeparators)
Creates a collection of strings based on the separator characters. C-style string version...
Definition: finaleframework.cpp:2526
PRINTODDEVENMODES GetOddEvenMode() const
Returns the odd/even printing mode.
Definition: ff_base.h:4089
bool Replace(const char *pszSource, const char *pszReplacement)
Replaces a source pattern with a replacement string.
Definition: finaleframework.cpp:1345
void SetDrawFileName(bool state)
Sets if the file name should be printed.
Definition: ff_base.h:4163
Definition: ff_base.h:97
void SetMeasurement(float value, twobyte unit)
Sets the string to an EVPU measurement value, formatted to a specific unit.
Definition: finaleframework.cpp:1902
void SetNameByID(twobyte id)
Sets the font name by using the document's internal Enigma font ID.
Definition: finaleframework.cpp:3330
Simple class to put numbers into collections.
Definition: ff_base.h:3840
Definition: ff_base.h:236
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:3200
bool IsEnigmaTextInsert(bool only_file_info_inserts=true)
Returns true if the string is an Enigma text command with a text insert.
Definition: finaleframework.cpp:1490
EDOCID GetConnectedDocID() const
Returns the document ID that was connected to the last load/save of the data.
Definition: ff_base.h:732
FCStrings * CreateEnigmaStrings(bool include_non_commands=false)
Creates a string collection of every enigma text tag found in the string.
Definition: finaleframework.cpp:2446
float GetRightPoints() const
Returns the right side of the bounding box, in fractional Points measurements.
Definition: ff_base.h:3640
int GetMusicWidth() const
Returns the width of the music part of the cell, at system percent.
Definition: ff_base.h:3163
bool SaveFontPrefs(int prefsID)
Saves the font information to any of the preference fonts.
Definition: finaleframework.cpp:3134
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:343
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
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:2236
int GetNoteWidth(int index)
Returns the note width for a note in the metrics note array.
Definition: finaleframework.cpp:3584
void FreeMetrics()
Tells Finale to clear the metrics data. This can be of use for Lua scripting, where the GC doesn't pr...
Definition: finaleframework.cpp:3475
FCString * CreateCopy()
Creates a copy of the string object on the heap.
Definition: finaleframework.cpp:2145
void SetX(float value)
Returns the x position.
Definition: ff_base.h:3925
void AppendCharacter(eUniChar16 character)
Appends a character to the string.
Definition: finaleframework.cpp:1617
float GetMaxDescent()
Returns the maximum descender for the font, relative to the baseline.
Definition: ff_base.h:4415
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:3891
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:3229
virtual const PDKFRAMEWORK_CLASSID GetClassID()=0
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
bool GetStrikeOut() const
Returns true if the font style is strikeout.
Definition: ff_base.h:1418
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition: ff_base.h:657
Class containing printing settings (and the ability to print documents).
Definition: ff_base.h:3969
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:1762
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
int Compare(FCString *pString2)
Compares string against another string.
Definition: ff_base.h:1841
bool IsEnigmaFileInfoSubtitle()
Returns true if the string is an "Subtitle" Enigma command.
Definition: finaleframework.cpp:1455
virtual twobyte CalcLastInci()
For internal use only!
Definition: ff_base.h:700
Encapsulates a note entry from an owner class (for example FCNoteEntryCell, FCNoteEntryLayer) class...
Definition: ff_noteframe.h:808
Definition: ff_base.h:224
int CalcCStringPosFrom(const char *pszSubString, int startindex)
Returns the first position where a substring occurs, from a starting point. C-string version...
Definition: ff_base.h:1945
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:818
void SetReverse(bool state)
Sets if the pages should be printed in reverse order.
Definition: ff_base.h:4145
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:666
Definition: ff_base.h:230
void DebugMsgDigit(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:216
float CalcHeightPoints()
Returns the width of the bounding box, in fractional Points.
Definition: ff_base.h:3761
bool PrintCurrent()
Prints the current document. The current printer will be used. The document's current list of selecte...
Definition: finaleframework.cpp:3774
void MoveX(float value)
Moves the x position from the current offset.
Definition: ff_base.h:3949
bool IsNumber()
Returns true if the string is a number.
Definition: finaleframework.cpp:1400
int GetLeftEdge() const
Returns the left position of the cell cell (before the key/clef/repeat), at system scaling...
Definition: ff_base.h:3145
Evpu32 GetReferenceLinePos() const
Returns the position of the reference line of the staff. The coordinate is referenced from the bottom...
Definition: ff_base.h:3096
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:3335
Definition: ff_base.h:3988
FCFontInfo()
The constructor.
Definition: finaleframework.cpp:3101
void SetPluginsFolderPath()
Sets the path string to Finale's root plug-in folder.
Definition: ff_base.h:1739
bool IsEnigmaFileInfoArranger()
Returns true if the string is an "Arranger" Enigma command.
Definition: finaleframework.cpp:1469
int GetMusicStartPos() const
Returns position where the music starts in the cell (after the key/clef/repeats), at system scaling...
Definition: ff_base.h:3134
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:3511
Int100 GetStaffScaling() const
Returns the accumulated staff scaling for the staff, in 100th of a percent.
Definition: ff_base.h:3105
bool DeleteCharactersAt(int index, int count)
Removes a range of characters, starting at the 0-based index position.
Definition: finaleframework.cpp:1331
Evpu32 GetTileOverlap() const
Returns the user overlap for tiled pages.
Definition: ff_base.h:4070
void SetLibFolderPath()
Sets the path string to Finale's library folder.
Definition: ff_base.h:1751
void FreeMetrics()
Tells Finale to clear the metrics data. This can be of use for Lua scripting, where the GC doesn't pr...
Definition: finaleframework.cpp:3412
virtual EXTAG Tag()=0
The Enigma tag for the derived class.
void MakeEnigmaStyleString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font style information...
Definition: finaleframework.cpp:3195
void SetUseStyles(bool state)
Sets if font styles (such as bold, underline, etc) should be selectable in the dialog box...
Definition: ff_base.h:4527
void SetCharacterAt(int index, eUniChar16 newcharacter)
Sets the character at the index position.
Definition: finaleframework.cpp:2119
void SetSizeFloat(float fontsize)
Sets the font size as a floating point (with decimal digits) value.
Definition: ff_base.h:1314
bool GetReverse() const
Returns if the pages should be printed in reverse order.
Definition: ff_base.h:4034
Collection class for FCString class objects.
Definition: ff_basecollection.h:924
virtual bool DeepDeleteData()
Deletes data and all data that's connected to the object.
Definition: ff_base.h:875
FCPoint(float x, float y)
The constructor.
Definition: ff_base.h:3915
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:628
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:419
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_base.h:3015
FCFontInfo * CreateLastFontInfo()
Creates a FCFontInfo object with the last font information (based on the Enigma text tags) found in t...
Definition: finaleframework.cpp:2688
bool GetUseSizes() const
Returns if font sizes should be selectable in the dialog box.
Definition: ff_base.h:4479
bool ReadXML_String(tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
Helper method to read FCString objects from the XML file.
Definition: finaleframework.cpp:638
virtual ~__FCBaseData()
Virtual destructor.
Definition: finaleframework.cpp:715
void MakeEnigmaSizeString(FCString *pString)
Makes an Enigma string (for use in raw strings) based on only the current font size information...
Definition: finaleframework.cpp:3203
virtual bool IsDynamicSize()
Definition: ff_base.h:678
int GetLastDotPosition() const
Returns the horizontal position of rightmost augmentation dot.
Definition: ff_base.h:3419
void TrimLinefeed()
Trims linefeed characters at both ends of the string.
Definition: finaleframework.cpp:1375
FLAG_16 GetEnigmaStyles() const
Gets the font style as standard Enigma bit storage.
Definition: ff_base.h:1164
int CalcCStringPos(FCString *pSubString, const char *pszSubString)
Returns the first position where a substring occurs. C-string version.
Definition: ff_base.h:1922
bool IsAllDigits()
Returns true if all characters in the string are digits (0 through 9).
Definition: finaleframework.cpp:1390
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:258
void AppendCString(const char *pOtherString)
Appends a C-style string to the string.
Definition: finaleframework.cpp:1636
virtual bool LoadNext()
Loads the next element from the database, if any.
Definition: finaleframework.cpp:877
FCFontInfo * CreateCopy()
Creates a copy of the font info object on the heap.
Definition: ff_base.h:1073
bool LoadSymbol(eUniChar16 symbolchar, FCFontInfo *pFont, float percent)
Loads the text metrics for a specific character in a font.
Definition: finaleframework.cpp:3620
float CalcWidthPoints()
Returns the width of the bounding box, in fractional Points.
Definition: ff_base.h:3776
float GetFloat(int index=0)
Converts the decimal string contents to a float value.
Definition: finaleframework.cpp:1866
__FCBaseData()
The constructor.
Definition: finaleframework.cpp:705
int GetWidth() const
Returns the total width of the cell, at system scaling.
Definition: ff_base.h:3154
const char * GetUTF8String() const
Returns a C-string UTF-8 version of the string.
Definition: finaleframework.cpp:1192
float GetBottom() const
Returns the bottom position of the glyph, relative to the baseline.
Definition: ff_base.h:4374
bool IsEqual(const char *pszString)
Returns true if the string is identical with the parameter.
Definition: ff_base.h:2417
bool LoadString(FCString *pText, FCFontInfo *pFont, float percent)
Loads the metrics for the string and font.
Definition: finaleframework.cpp:3602
float GetTopEVPUs() const
Returns the top side of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3731
float GetAdvanceWidthPoints() const
Returns the advance width of the string (the pen position before and after printing the string)...
Definition: ff_base.h:3610
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:690
void _SetWidth(float w)
For internal use only.
Definition: ff_base.h:4314
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:988
float GetTop() const
Returns the top position of the glyph, relative to the baseline.
Definition: ff_base.h:4395
void SetEndPage(twobyte endpage)
Sets the 1-based end page.
Definition: ff_base.h:4135
void SetItalic(bool state)
Sets the italics attribute of the font info.
Definition: ff_base.h:1354
twobyte GetEndPage() const
Returns the 1-based end page for printing.
Definition: ff_base.h:4028
bool LoadAtEntry(FCNoteEntry *pEntry)
Loads the measure metrics for a cell where the entry belongs.
Definition: finaleframework.cpp:3432
float GetTopPoints() const
Returns the top side of the bounding box, in fractional Points measurements.
Definition: ff_base.h:3655
ENoteMetrics * FindNoteMetrics(twobyte noteID)
Finds the note metrics for a specific note.
Definition: finaleframework.cpp:3541
bool IsName(const char *pszTestName)
Checks if the font name is a perfect match to the C-string test string.
Definition: finaleframework.cpp:3344
bool LoadInfo(FCFontInfo *pFontInfo, ufourbyte glyphno)
Loads the information about the glyph.
Definition: finaleframework.cpp:3789
A class that fetches the metrics for text (for how Finale will render it), such as the boundary boxes...
Definition: ff_base.h:3531
void ExtractFileExtension()
Removes everything except the file extension part of a file name.
Definition: ff_base.h:2097
bool ParseEnigmaCommand(FCString *pString)
Parses a valid Enigma font command and changes the font information accordingly.
Definition: finaleframework.cpp:3228
Int100 GetHorizontalStretch() const
Returns the horizontal stretch of the staff system, in 100th of a percent.
Definition: ff_base.h:3054
void DebugOutMenuInfo(FCUI *pUI, int menuixd_horiz, int menuixd_vert) const
Outputs the menu command info for debugging purposes.
Definition: finaleframework.cpp:489
float GetBottomPoints() const
Returns the bottom side of the bounding box, in fractional Points measurements.
Definition: ff_base.h:3670
twobyte GetStartPage() const
Returns the 1-based start page for printing.
Definition: ff_base.h:4022
int GetAttachmentCount() const
Returns the number of attachments that have info within the metrics data.
Definition: ff_base.h:3316
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:4497
void SetHidden(bool state)
Sets the hidden state of the font info.
Definition: ff_base.h:1346
ERECT * GetStemRect()
Returns a pointer to the stem rectangle in the metrics data.
Definition: ff_base.h:3484
virtual int DataSizeLoad()=0
Returns the data size for the data structure that should be loaded.
virtual bool LoadPrevious()
Loads the previous element in the database, if any.
Definition: ff_base.h:906
int GetNoteCount() const
Returns the number of notes that the metrics data has information about.
Definition: ff_base.h:3454
void * GetNSString()
Returns a NSString* version of the string (on Cocoa only).
Definition: finaleframework.cpp:1780
Definition: ff_base.h:130
void _SetLeft(float l)
For internal use only.
Definition: ff_base.h:4320
bool DeleteCharacterAt(int index)
Removes a character at the 0-based index position.
Definition: finaleframework.cpp:1316
bool DataIsLoaded() const
Returns true is any data has been loaded into the object.
Definition: ff_base.h:715
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:1111
void SetNSString(void *pNSString)
Sets the string to a NSString* value.
Definition: finaleframework.cpp:1786
int GetFrontRepeatWidth() const
Returns the width of the front repeat for the cell.
Definition: ff_base.h:3172
void StoreXML_Bool(tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool value)
Helper function to store boolean objects in the XML file.
Definition: finaleframework.cpp:608
void CopyFrom(FCTextMetrics *pTextMetrics)
Copies all metrics data from another object.
Definition: finaleframework.cpp:3673
virtual bool LoadLast()
Loads the very last element in the database, if any.
Definition: ff_base.h:894
void StoreXML_Integer(tinyxml2::XMLElement *pParentNode, const char *pszElementName, int value)
Helper function to store integer objects in the XML file.
Definition: finaleframework.cpp:598
void SetDocStylesFolderPath()
Sets the path string to Finale's document styles folder.
Definition: ff_base.h:1787
int GetTopPosition() const
Returns the highest position for the noteheads or stem.
Definition: ff_base.h:3358
void SetUserOptionsPath()
Sets the string to the user options path on the running system.
Definition: finaleframework.cpp:1696
void SetInteger(int i)
Sets the string to an integer.
Definition: finaleframework.cpp:1875
void SetFloat(float f)
Sets the string to a float.
Definition: finaleframework.cpp:1888
void SetNameString(FCString *pString)
Sets the font name (FCString version).
Definition: finaleframework.cpp:3319
float CalcWidthEVPUs()
Returns the width of the bounding box, in fractional EVPUs.
Definition: ff_base.h:3806
float GetRight() const
Returns the right-side position of the glyph.
Definition: ff_base.h:4384
bool LoadAtCell(FCCell *pCell)
Loads the measure metrics for a cell.
Definition: finaleframework.cpp:3419
virtual EVERSION EnigmaVersion()
The Enigma version for save/load/create/delete operations.
Definition: ff_base.h:757
FCString * GetValueString()
Returns the "value" string.
Definition: ff_base.h:2978
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:3392
float GetMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) unit)
Converts the string to an EVPU measurement value, based on a specific unit.
Definition: finaleframework.cpp:2062
virtual ~FCString()
The destructor. Deletes the string storage as well as the C-string pointer (if any).
Definition: finaleframework.cpp:927
bool GetTile() const
Returns if the document should be tited if bigger than specified page.
Definition: ff_base.h:4058
bool SetCharacterUpperCase(int index)
Sets a specific character to upper case.
Definition: finaleframework.cpp:2152
void SetFontAnnotationFolderPath()
Sets the path string to Finale's font annotation folder.
Definition: ff_base.h:1781
bool IsEmpty()
Returns true if the string is empty.
Definition: ff_base.h:2461
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:3084
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:547
FCString * CreateEnigmaString(FCString *pFontTagString=NULL)
Returns a created FCString object that contains the font information as an Enigma string...
Definition: finaleframework.cpp:3176
void SetEnigmaStyles(FLAG_16 fontstyles)
Sets the font style as standard Enigma bit storage.
Definition: ff_base.h:1261
bool EndsWith(const char *pszString)
Returns true if the string ends with the parameter string.
Definition: finaleframework.cpp:2679