Finale PDK Framework  0.54
ff_details.h
1 /*
2  * File: ff_details.h
3  * Author: Jari Williamsson
4  *
5  * Created on den 17 april 2011, 12:17
6  */
7 
8 #ifndef FF_DETAILS_H
9 #define FF_DETAILS_H
10 
12 class __FCDetail : public __FCBaseData
13 {
14 public:
15  __FCDetail() : __FCBaseData() {}
16 
17 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
18  CMPER _GetCmper2() { return _dataid.detail.cmper2; }
19 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
20 };
21 
24 {
25  virtual bool LoadFirst() { return false; }
26 public:
28 
33  bool Load(CMPER cmper1, CMPER cmper2);
34 
40  bool SaveNew(CMPER cmper1);
41 
42 #ifdef PDK_FRAMEWORK_DEBUG
43  virtual void DebugDump()
44  {
46  DebugOutDigit("cmper1: ", _dataid.detail.cmper1);
47  DebugOutDigit("cmper2: ", _dataid.detail.cmper2);
48  }
49 #endif
50 };
51 
52 
69 class FCGroup : public __FCNoInciDetail
70 {
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72  EDTGroupSpec _groupspec;
73 protected:
74 
75  virtual EVERSION EnigmaVersion();
76 
77  virtual bool LoadFirst()
78  {
79  _dataid.detail.cmper1 = 0;
80  _dataid.detail.cmper2 = 0;
81  _dataid.detail.inci = 0;
82  return LoadNext();
83  }
84 
85  virtual EXTAG Tag()
86  {
87  return dt_GroupSpec;
88  }
89 
90  virtual int DataSizeLoad()
91  {
92  return sizeof (EDTGroupSpec);
93  }
94 
95  virtual void* Allocate()
96  {
97  return (void*) &_groupspec;
98  }
99 
104  virtual void CloneMemoryFrom(__FCBaseData* pSource)
105  {
106  memcpy(&_groupspec, ((FCGroup*) pSource)->_GetGroupSpec(), sizeof (_groupspec));
107  _datablock = &_groupspec;
108  _loadedsize = sizeof (_groupspec);
109  }
110 
111  virtual __FCBaseData* CreateObject()
112  {
113  return new FCGroup();
114  }
115 
116  void _SetAbbreviatedNameID(CMPER value)
117  {
118  _groupspec.abrvNameID = value;
119  }
120 
121  void _SetFullNameID(CMPER value)
122  {
123  _groupspec.fullNameID = value;
124  }
125 
126 #endif
127 
128 public:
129 
135  {
137  GRBRAC_NONE = BRACKET_NONE,
138 
140  GRBRAC_PLAIN = BRACKET_PLAINBRAC,
141 
143  GRBRAC_CHORUS = BRACKET_CHORUSBRAC,
144 
146  GRBRAC_PIANO = BRACKET_PIANOBRAC,
147 
149  GRBRAC_REVERSECHORUS = BRACKET_REVCHORUSBRAC,
150 
152  GRBRAC_REVERSEPIANO = BRACKET_REVPIANOBRAC,
153 
155  GRBRAC_CURVEDCHORUS = BRACKET_CURVECHORUSBRAC,
156 
158  GRBRAC_REVERSECURVEDCHORUS = BRACKET_REVCURVECHORUSBRAC,
159 
161  GRBRAC_DESK = BRACKET_DESKBRAC,
162 
164  GRBRAC_REVERSEDESK = BRACKET_REVDESKBRAC
165  };
166 
167 
168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
169  EDTGroupSpec* _GetGroupSpec()
170  {
171  return &_groupspec;
172  }
173 #endif
174 
180  {
183 
186 
189  };
190 
197  {
200 
203 
206  };
207 
208 
209  virtual const char* ClassName() { return "FCGroup"; }
210  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_GROUP; }
211 
218  {
219  memset(&_groupspec, 0, sizeof (_groupspec));
220  _datablock = &_groupspec;
221  _loadedsize = sizeof (_groupspec);
222  }
223 
235  int CalcStaffIndex(twobyte staff);
236 
242  int CalcStaffSpan();
243 
248  bool ContainsStaff(twobyte staff);
249 
259 
260 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
261 
262  FCString* CreateAbbreviatedNameString_GC();
263 #endif
264 
274 
275 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
276 
277  FCString* CreateFullNameString_GC();
278 #endif
279 
280 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
281 
289 
290 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
291 
292  FCString* CreateTrimmedFullNameString_GC();
293 #endif
294 #endif
295 
296 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
297 
311 
312 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
313 
314  FCString* CreateDisplayFullNameString_GC();
315 #endif
316 #endif
317 
322  CMPER GetAbbreviatedNameID() { return _groupspec.abrvNameID; }
323 
329  {
330  return GetBitFlag(_groupspec.auxflag, GROUP_AUX_EXPAND_FULL);
331  }
332 
338  {
339  return GetBitFlag(_groupspec.auxflag, GROUP_AUX_EXPAND_ABRV);
340  }
341 
347 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
349 #else
350  twobyte
351 #endif
353  {
354 #if FXT_VERSION >= FINALEVERSION_2014
355  return (FCGROUP_BRACKETS)_groupspec.bracket.bracID;
356 #else
357 #ifdef __OBJC__
358  return (FCGROUP_BRACKETS)_groupspec.bracket.bracID;
359 #else
360  return (FCGROUP_BRACKETS)_groupspec.bracket.id;
361 #endif
362 #endif
363  }
364 
370  Evpu16 GetBracketHorizontalPos() const
371  {
372  return _groupspec.bracket.bracpos;
373  }
374 
380  {
381  return _groupspec.bracket.bractop;
382  }
383 
389  {
390  return _groupspec.bracket.bracbot;
391  }
392 
398  {
399  return GetBitFlag(_groupspec.bracket.flag, BRACKET_BRACKET_ON_SINGLE);
400  }
401 
406  twobyte GetEndStaff() const { return _groupspec.endInst; }
407 
412  CMPER GetFullNameID() { return _groupspec.fullNameID; }
413 
419  bool GetUseFullNamePositioning() const { return GetBitFlag(_groupspec.flag, GROUP_FULLNAME_INDIVPOS); }
420 
426  bool GetUseAbbreviatedNamePositioning() const { return GetBitFlag(_groupspec.flag, GROUP_ABRVNAME_INDIVPOS); }
427 
435  Evpu16 GetFullNameHorizontalOffset() const { return _groupspec.fullNameXadj; }
436 
444  Evpu16 GetAbbreviatedNameHorizontalOffset() const { return _groupspec.abrvNameXadj; }
445 
453  Evpu16 GetFullNameVerticalOffset() const { return _groupspec.fullNameYadj; }
454 
462  Evpu16 GetAbbreviatedNameVerticalOffset() const { return _groupspec.abrvNameYadj; }
463 
468  twobyte GetStartStaff() const { return _groupspec.startInst; }
469 
474  twobyte GetItemID() { return _dataid.detail.cmper2; }
475 
482  twobyte GetBarlineStyle() const
483  {
484  return (_groupspec.flag & GROUP_BARLINEBITS) >> 6;
485  }
486 
491  bool GetBarlineUse() const
492  {
493  return GetBitFlag(_groupspec.flag, GROUP_OWN_BARLINE);
494  }
495 
503  twobyte GetBarlineShapeID() const {
504  if (GetBarlineStyle() != BARLINE_CUSTOM) return 0;
505  return _groupspec.custombarshape;
506  }
507 
508 
515 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
517 #else
518  int
519 #endif
521  {
522  if (GetBitFlag(_groupspec.auxflag, GROUP_AUX_OPT_REMOVEWHENALLEMPTY))
524  if (GetBitFlag(_groupspec.auxflag, GROUP_AUX_OPT_REMOVENEVER))
525  return GROUPSTAFFHIDE_NEVER;
526  return GROUPSTAFFHIDE_NORMAL;
527  }
528 
533  bool GetShowGroupName() const
534  {
535  return !GetBitFlag(_groupspec.flag, GROUP_HIDE_NAME);
536  }
537 
544 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
546 #else
547  int
548 #endif
550  {
551  switch (_groupspec.flag & GROUP_BARLINE_STYLE)
552  {
553  case GROUP_GROUP_BARLINES:
555  break;
556  case GROUP_MENSURSTRICHE:
558  default:
560  }
561  }
562 
568  FLAG_16 GetFullNameJustify() const
569  {
570  return (_groupspec.flag & GROUP_JUSTIFY_FULL);
571  }
572 
579  {
580  return ((_groupspec.flag & GROUP_JUSTIFY_ABRV) >> 3);
581  }
582 
588  FLAG_16 GetFullNameAlign() const
589  {
590  return (_groupspec.auxflag & GROUP_AUX_HALIGN_FULL);
591  }
592 
598  FLAG_16 GetAbbreviatedNameAlign() const
599  {
600  return (_groupspec.auxflag & GROUP_AUX_HALIGN_ABRV) >> 2;
601  }
602 
607  bool HasFullName() { return (GetFullNameID() != 0); }
608 
613  bool HasAbbreviatedName() { return (GetAbbreviatedNameID() != 0); }
614 
615 
616 #if FXT_VERSION >= FINALEVERSION_2011
617 
624  twobyte GetEndMeasure() const { return _groupspec.endMeas; }
625 
633  twobyte GetStartMeasure() const { return _groupspec.startMeas; }
634 
643  void SetEndMeasure(twobyte value) { _groupspec.endMeas = value; }
644 
652  void SetStartMeasure(twobyte value) { _groupspec.startMeas = value; }
653 #endif
654 
659  void SetStartStaff(twobyte staffno) { _groupspec.startInst = staffno; }
660 
665  void SetEndStaff(twobyte staffno) { _groupspec.endInst = staffno; }
666 
675  bool SaveNewAbbreviatedNameBlock(FCString *pString);
676 
685  bool SaveNewFullNameBlock(FCString *pString);
686 
692  void SetUseFullNamePositioning(bool state) { Set16BitFlag(&_groupspec.flag, GROUP_FULLNAME_INDIVPOS, state); }
693 
699  void SetUseAbbreviatedNamePositioning(bool state) { Set16BitFlag(&_groupspec.flag, GROUP_ABRVNAME_INDIVPOS, state); }
700 
708  void SetFullNameHorizontalOffset(Evpu16 value) { _groupspec.fullNameXadj = value; }
709 
717  void SetAbbreviatedNameHorizontalOffset(Evpu16 value) { _groupspec.abrvNameXadj = value; }
718 
726  void SetFullNameVerticalOffset(Evpu16 value) { _groupspec.fullNameYadj = value; }
727 
735  void SetAbbreviatedNameVerticalOffset(Evpu16 value) { _groupspec.abrvNameYadj = value; }
736 
743  void SetBarlineStyle(twobyte barline)
744  {
745  _groupspec.flag &= ~GROUP_BARLINEBITS;
746  _groupspec.flag |= (barline << 6);
747  }
748 
753  void SetBarlineUse(bool value)
754  {
755  Set16BitFlag(&_groupspec.flag, GROUP_OWN_BARLINE, value);
756  }
757 
763  void SetBarlineShapeID(twobyte shapeID) {
764  _groupspec.custombarshape = shapeID;
765  }
766 
774 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
776 #else
777  int
778 #endif
779  value
780  )
781  {
782  switch (value)
783  {
785  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVEWHENALLEMPTY, true);
786  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVENEVER, false);
787  break;
789  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVEWHENALLEMPTY, false);
790  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVENEVER, true);
791  break;
792  default:
793  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVEWHENALLEMPTY, false);
794  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_OPT_REMOVENEVER, false);
795  break;
796  }
797  }
798 
803  void SetShowGroupName(bool state)
804  {
805  Set16BitFlag(&_groupspec.flag, GROUP_HIDE_NAME, !state);
806  }
807 
815 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
817 #else
818  int
819 #endif
820  value)
821  {
822  switch (value)
823  {
825  _groupspec.flag &= ~GROUP_BARLINE_STYLE;
826  _groupspec.flag |= GROUP_GROUP_BARLINES;
827  break;
829  _groupspec.flag &= ~GROUP_BARLINE_STYLE;
830  _groupspec.flag |= GROUP_NORMAL_BARLINES;
831  break;
833  _groupspec.flag &= ~GROUP_BARLINE_STYLE;
834  _groupspec.flag |= GROUP_MENSURSTRICHE;
835  break;
836  }
837  }
838 
844  void SetFullNameJustify(FLAG_16 value)
845  {
846  value &= 0x07;
847  _groupspec.flag &= ~GROUP_JUSTIFY_FULL;
848  _groupspec.flag |= value;
849  }
850 
856  void SetAbbreviatedNameJustify(FLAG_16 value)
857  {
858  value &= 0x07;
859  _groupspec.flag &= ~GROUP_JUSTIFY_ABRV;
860  _groupspec.flag |= (value << 3);
861  }
862 
863 
869  void SetFullNameAlign(FLAG_16 value)
870  {
871  value &= 0x03;
872  _groupspec.flag &= ~GROUP_AUX_HALIGN_FULL;
873  _groupspec.flag |= value;
874  }
875 
881  void SetAbbreviatedNameAlign(FLAG_16 value)
882  {
883  value &= 0x03;
884  _groupspec.flag &= ~GROUP_AUX_HALIGN_ABRV;
885  _groupspec.flag |= (value << 2);
886  }
887 
892  void SetFullNameExpandSingle(bool state)
893  {
894  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_EXPAND_FULL, state);
895  }
896 
902  {
903  Set16BitFlag(&_groupspec.auxflag, GROUP_AUX_EXPAND_ABRV, state);
904  }
905 
912 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
914 #else
915  twobyte
916 #endif
917  bracketid
918  )
919  {
920 #if FXT_VERSION >= FINALEVERSION_2014
921  _groupspec.bracket.bracID = bracketid;
922 #else
923 #ifdef __OBJC__
924  _groupspec.bracket.bracID = bracketid;
925 #else
926  _groupspec.bracket.id = bracketid;
927 #endif
928 #endif
929  }
930 
935  void SetBracketHorizontalPos(Evpu16 value)
936  {
937  _groupspec.bracket.bracpos = value;
938  }
939 
944  void SetBracketVerticalTopPos(Evpu16 value)
945  {
946  _groupspec.bracket.bractop = value;
947  }
948 
954  void SetBracketVerticalBottomPos(Evpu16 value)
955  {
956  _groupspec.bracket.bracbot = value;
957  }
958 
964  void SetBracketSingleStaff(bool state)
965  {
966  Set16BitFlag(&_groupspec.bracket.flag, BRACKET_BRACKET_ON_SINGLE, state);
967  }
968 
969 #ifdef PDK_FRAMEWORK_DEBUG
970  virtual void DebugDump()
971  {
973 #ifdef PDK_FRAMEWORK_ENIGMASTRINGS
975  DebugOutString("Full Name: ", pString);
976  delete pString;
977 #endif
978  DebugOutDigit("Start staff: ", GetStartStaff());
979  DebugOutDigit("End staff: ", GetEndStaff());
980 #if FXT_VERSION >= FINALEVERSION_2011
981  DebugOutDigit("Start measure: ", GetStartMeasure());
982  DebugOutDigit("End measure: ", GetEndMeasure());
983 #endif
984  }
985 #endif
986 };
987 
988 
989 
990 #ifndef DOXYGEN_SHOULD_SKIP_THIS
991 #include "pragma_align_begin.h"
992 struct __EDTCellClefInfo
993 {
994  twobyte clefinfoID;
995  twobyte eduvalue;
996  twobyte percent;
997  twobyte unknown;
998  twobyte AAAA;
999  twobyte BBBB;
1000  twobyte CCCC;
1001  twobyte DDDD;
1002  twobyte EEEE;
1003  twobyte FFFF;
1004 };
1005 #include "pragma_align_end.h"
1006 
1007 const EXTAG __dt_CellClefInfo = MAKEEXTAG(edDetail,'G','F');
1008 
1009 #endif
1010 
1011 
1012 
1013 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1014 #include "pragma_align_begin.h"
1015 struct __EDTBaseline
1016 {
1017  fourbyte offset; /* In Evpu32 */
1018  twobyte lyricNumber; /* Not 1-1 with tag like pre-2006 */
1019  twobyte AAAA;
1020  twobyte BBBB;
1021 };
1022 #include "pragma_align_end.h"
1023 
1024 const EXTAG __dt_ExprBaselineAboveAdjust2007 = MAKEEXTAG(edDetail,'X','a');
1025 const EXTAG __dt_ExprBaselineBelowAdjust2007 = MAKEEXTAG(edDetail,'X','b');
1026 const EXTAG __dt_ChordBaselineAdjust2007 = MAKEEXTAG(edDetail,'C','l');
1027 const EXTAG __dt_FretboardBaselineAdjust2007 = MAKEEXTAG(edDetail,'G','l');
1028 const EXTAG __dt_VerseBaselineAdjust2007 = MAKEEXTAG(edDetail,'b','v');
1029 const EXTAG __dt_ChorusBaselineAdjust2007 = MAKEEXTAG(edDetail,'b','c');
1030 const EXTAG __dt_SectionBaselineAdjust2007 = MAKEEXTAG(edDetail,'B','S');
1031 
1032 const EXTAG __dt_ExprBaselineAbove = MAKEEXTAG(edDetail,'X','A');
1033 const EXTAG __dt_ExprBaselineBelow = MAKEEXTAG(edDetail,'X','B');
1034 const EXTAG __dt_ChordBaseline = MAKEEXTAG(edDetail,'C','L');
1035 const EXTAG __dt_FretboardBaseline = MAKEEXTAG(edDetail,'G','L');
1036 const EXTAG __dt_VerseBaseline2006 = MAKEEXTAG(edDetail,'B','v');
1037 const EXTAG __dt_ChorusBaseline2006 = MAKEEXTAG(edDetail,'B','c');
1038 const EXTAG __dt_SectionBaseline2006 = MAKEEXTAG(edDetail,'B','s');
1039 #endif
1040 
1069 class FCBaseline : public __FCDetail
1070 {
1071 public:
1079  {
1082 
1085 
1088 
1091 
1094 
1097 
1100 
1103  };
1104 
1105 
1106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1107 private:
1108  __EDTBaseline _baseline;
1109  BASELINEMODES _mode;
1110  bool _globalscope; /* Internal flag to indicate which type of tag that
1111  * should be used. */
1112 
1113 
1114  virtual EVERSION EnigmaVersion() { return FINALEVERSION_2010; }
1115 
1116  virtual EXTAG Tag();
1117 
1118  virtual int DataSizeLoad() { return sizeof (_baseline); }
1119 
1120  virtual void* Allocate() { return (void*) &_baseline; }
1121 
1126  virtual void CloneMemoryFrom(__FCBaseData* pSource)
1127  {
1128  FCBaseline* pSourceObject = (FCBaseline*) pSource;
1129  memcpy(&_baseline, pSourceObject->_GetBaseline(), sizeof (_baseline));
1130  _datablock = &_baseline;
1131  _loadedsize = sizeof (_baseline);
1132  _globalscope = pSourceObject->GetGlobalScope();
1133  _mode = (BASELINEMODES) pSourceObject->GetMode();
1134  }
1135 
1136  virtual __FCBaseData* CreateObject()
1137  {
1138  return new FCBaseline();
1139  }
1140 #endif
1141 
1142 public:
1143 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1144  __EDTBaseline* _GetBaseline() { return &_baseline; }
1145 
1146  virtual bool LoadFirst() { return false; }
1147 #endif
1148 
1149  virtual const char* ClassName() { return "FCBaseline"; }
1150  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_BASELINE; }
1151 
1152 
1158  {
1159  memset(&_baseline, 0, sizeof (_baseline));
1160  _datablock = &_baseline;
1161  _loadedsize = sizeof (_baseline);
1162  _mode = BASELINEMODE_UNDEFINED;
1163  _globalscope = false;
1164  }
1165 
1173  Evpu16 GetVerticalOffset() const { return _baseline.offset; }
1174 
1182  twobyte GetLyricNumber() const;
1183 
1190 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1192 #else
1193  int
1194 #endif
1195  GetMode() const { return _mode; }
1196 
1205  eSsys GetSystem() const
1206  {
1207  if (GetGlobalScope()) return 0;
1208  return _dataid.detail.cmper1;
1209  }
1210 
1219  bool GetGlobalScope() const { return _globalscope; }
1220 
1225  eStaff GetStaff() const
1226  {
1227  return _dataid.detail.cmper2;
1228  }
1229 
1237  void SetVerticalOffset(Evpu16 value) { _baseline.offset = value; }
1238 
1245  void SetLyricNumber(twobyte number)
1246  {
1247  if (number < 1) return;
1248  _baseline.lyricNumber = number;
1249  }
1250 
1251 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1252 
1254  void _SetFullMode(BASELINEMODES mode, bool globalscope)
1255  {
1256  _mode = mode;
1257  _globalscope = globalscope;
1258  }
1259 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
1260 
1271  void SetMode(
1272 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1274 #else
1275  int
1276 #endif
1277  mode
1278  )
1279  {
1280  switch (mode)
1281  {
1285  case BASELINEMODE_CHORD:
1290  _mode = (BASELINEMODES) mode;
1291  break;
1292  }
1293  }
1294 
1302  bool Load(eSsys systemno, eStaff staffno, twobyte inci);
1303 
1310  bool SaveNew(eSsys systemno, eStaff staffno);
1311 
1317  bool SaveAs(eSsys systemno, eStaff staffno, twobyte inci);
1318 
1326  bool LoadForStaff(eSsys systemno, eStaff staffno);
1327 
1339 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1341 #else
1342  int
1343 #endif
1344  mode)
1345  {
1346  switch (mode)
1347  {
1351  return false;
1352  default:
1353  break;
1354  }
1355  _SetFullMode((BASELINEMODES) mode, true);
1356  return Load(0, 0, 0);
1357  }
1358 
1371 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1373 #else
1374  int
1375 #endif
1376  mode,
1377  twobyte lyricno
1378  )
1379  {
1380  if (lyricno < 1) return false;
1381  switch (mode)
1382  {
1386  break;
1387  default:
1388  return false;
1389  }
1390  _SetFullMode((BASELINEMODES) mode, true);
1391  twobyte tryinci = 0;
1392  while (Load(0, 0, tryinci))
1393  {
1394  if (GetLyricNumber() == lyricno) return true;
1395  tryinci ++;
1396  }
1397  return false;
1398  }
1399 
1405  virtual bool Save()
1406  {
1407  if (_mode == BASELINEMODE_UNDEFINED) return false;
1408  return __FCDetail::Save();
1409  }
1410 
1427  static Evpu16 CalcTotalOffset(
1428 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1430 #else
1431  int
1432 #endif
1433  mode,
1434  eSsys system,
1435  eStaff staff
1436  );
1437 
1457  static Evpu16 CalcTotalOffsetForLyricNumber(
1458 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1460 #else
1461  int
1462 #endif
1463  mode,
1464  eSsys system,
1465  eStaff staff,
1466  int lyricno
1467  );
1468 };
1469 
1470 
1471 #endif /* FF_DETAILS_H */
1472 
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:918
bool Load(eSsys systemno, eStaff staffno, twobyte inci)
Loads a baseline data structure. Normally, this isn't called directly.
Definition: finaleframework.cpp:31415
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
void SetShowGroupName(bool state)
Sets the "Show Group Name" state.
Definition: ff_details.h:803
bool SaveNew(eSsys systemno, eStaff staffno)
Saves a new baseline data structure. Normally, this isn't called directly.
Definition: finaleframework.cpp:31424
Definition: ff_details.h:1084
Evpu16 GetFullNameVerticalOffset() const
Returns the vertical adjustment offset for the full group name (compared to the default position)...
Definition: ff_details.h:453
twobyte GetStartStaff() const
Returns the start staff number for the group.
Definition: ff_details.h:468
Definition: ff_details.h:140
Abstract data class that contains a detail record without using the inci.
Definition: ff_details.h:23
Definition: ff_details.h:182
Encapsulates baselines offset values for lyrics, expressions, fretboards and chords.
Definition: ff_details.h:1069
void SetLyricNumber(twobyte number)
Sets the connected lyric number that the baseline should be connected to.
Definition: ff_details.h:1245
virtual bool LoadFirst()=0
Loads the very first element in the database, if any.
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass...
Definition: ff_base.h:640
Definition: ff_details.h:188
void SetEndStaff(twobyte staffno)
Sets the end staff number for the group.
Definition: ff_details.h:665
Definition: ff_details.h:1090
Definition: ff_details.h:164
bool LoadDefaultForLyricNumber(BASELINEMODES mode, twobyte lyricno)
Loads the default baseline value for a specific lyric number in the whole piece.
Definition: ff_details.h:1370
void SetFullNameVerticalOffset(Evpu16 value)
Sets the vertical adjustment offset for the full group name (compared to the default position)...
Definition: ff_details.h:726
Evpu16 GetBracketHorizontalPos() const
Returns the horizontal position/offset for the bracket.
Definition: ff_details.h:370
Definition: ff_details.h:185
void SetAbbreviatedNameHorizontalOffset(Evpu16 value)
Sets the horizontal adjustment offset for the abbreviated group name (compared to the default positio...
Definition: ff_details.h:717
FLAG_16 GetAbbreviatedNameAlign() const
Returns the alignment for the group's abbreviated name text.
Definition: ff_details.h:598
GROUPBARLINESTYLES GetDrawBarlineMode() const
Returns how barlines are drawn for the group.
Definition: ff_details.h:549
Evpu16 GetBracketVerticalTopPos() const
Returns the vertical top position/offset for the bracket.
Definition: ff_details.h:379
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag in the data block.
Definition: finaleframework.cpp:573
void SetAbbreviatedNameAlign(FLAG_16 value)
Returns the alignment for the group's abbreviated name text.
Definition: ff_details.h:881
FCGROUP_BRACKETS GetBracketStyle() const
Returns the bracket style (any of the GRBRAC_* constants, such as GRBRAC_PIANO).
Definition: ff_details.h:352
int CalcStaffSpan()
Returns the number of staves contained in the group, based on the global list of staves.
Definition: finaleframework.cpp:31245
GROUPBARLINESTYLES
The group barline styles, used by FCGroup::GetDrawBarlineMode() and FCGroup::SetDrawBarlineMode().
Definition: ff_details.h:196
FCString * CreateAbbreviatedNameString()
Creates a string object of the abbreviated group name (including the Enigma text tags).
Definition: finaleframework.cpp:31102
twobyte GetBarlineStyle() const
Returns the barline style for the group.
Definition: ff_details.h:482
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition: ff_base.h:60
FLAG_16 GetAbbreviatedNameJustify() const
Returns the justification for the group's abbreviated name text.
Definition: ff_details.h:578
BASELINEMODES
The mode constants of the object, used for both loading and saving objects.
Definition: ff_details.h:1078
FLAG_16 GetFullNameAlign() const
Returns the alignment for the group's full name text.
Definition: ff_details.h:588
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition: finaleframework.cpp:753
void SetStartStaff(twobyte staffno)
Sets the start staff number for the group.
Definition: ff_details.h:659
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_details.h:1150
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
twobyte GetBarlineShapeID() const
Returns the custom barline shape ID, it any.
Definition: ff_details.h:503
CMPER GetFullNameID()
Returns the raw text ID for the full group name.
Definition: ff_details.h:412
Definition: ff_details.h:146
Definition: ff_details.h:152
CMPER GetAbbreviatedNameID()
Returns the raw text ID for the abbreviated group name.
Definition: ff_details.h:322
Definition: ff_details.h:155
void SetFullNameHorizontalOffset(Evpu16 value)
Sets the horizontal adjustment offset for the full group name (compared to the default position)...
Definition: ff_details.h:708
bool LoadForStaff(eSsys systemno, eStaff staffno)
Load a record for a staff.
Definition: finaleframework.cpp:31454
bool HasAbbreviatedName()
Returns true if an abbreivated name is available.
Definition: ff_details.h:613
BASELINEMODES GetMode() const
Returns the mode for the object.
Definition: ff_details.h:1195
FCGROUP_BRACKETS
Constants for group bracket styles, for use with GetBracketStyle() and SetBracketStyle().
Definition: ff_details.h:134
virtual bool Save()
Overridden method for saving the existing record.
Definition: ff_details.h:1405
Definition: ff_details.h:161
void SetEmptyStaffHide(GROUPSTAFFHIDES value)
Sets the optimization setting for the group.
Definition: ff_details.h:773
twobyte GetItemID()
Returns the saved ID for the group.
Definition: ff_details.h:474
Definition: ff_details.h:1102
twobyte GetStartMeasure() const
Returns the start measure for the group (for Finale 2011 and later)
Definition: ff_details.h:633
Definition: ff_details.h:1081
bool LoadDefaultForMode(BASELINEMODES mode)
Loads the (non-lyrics) default baseline value for the whole piece.
Definition: ff_details.h:1338
Definition: ff_details.h:158
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 SetBarlineStyle(twobyte barline)
Sets the barline style for the group.
Definition: ff_details.h:743
void SetMode(BASELINEMODES mode)
Sets the mode for the object. If an automatic loader (such as LoadDefaultForMode or any of the loader...
Definition: ff_details.h:1271
bool SaveAs(eSsys systemno, eStaff staffno, twobyte inci)
Saves baseline data at a specific position. Normally, this isn't called directly. ...
Definition: finaleframework.cpp:31443
virtual void * Allocate()=0
static Evpu16 CalcTotalOffsetForLyricNumber(BASELINEMODES mode, eSsys system, eStaff staff, int lyricno)
Static method that calculates the resulting baseline offset for a specific lyric number in a system/s...
Definition: finaleframework.cpp:31343
twobyte GetEndStaff() const
Returns the end staff number for the group.
Definition: ff_details.h:406
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_details.h:43
bool GetAbbreviatedNameExpandSingle() const
Definition: ff_details.h:337
void SetAbbreviatedNameJustify(FLAG_16 value)
Sets the justification for the group's abbreviated name text.
Definition: ff_details.h:856
void SetEndMeasure(twobyte value)
Sets the end measure for the group (for Finale 2011 and later).
Definition: ff_details.h:643
FLAG_16 GetFullNameJustify() const
Returns the justification for the group's full name text.
Definition: ff_details.h:568
bool GetUseAbbreviatedNamePositioning() const
Returns if the individual positioning information should be used for abbreviated names in the group...
Definition: ff_details.h:426
bool GetFullNameExpandSingle() const
Definition: ff_details.h:328
bool SaveNew(CMPER cmper1)
Saves a new record at cmper1.
Definition: finaleframework.cpp:30482
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_details.h:1149
Definition: ff_details.h:149
void SetBracketSingleStaff(bool state)
Sets the "Bracket on single staves" state for the bracket.
Definition: ff_details.h:964
void SetFullNameExpandSingle(bool state)
Definition: ff_details.h:892
GROUPSTAFFHIDES
The constants for "optimization" of staves in a group.
Definition: ff_details.h:179
void SetBarlineUse(bool value)
Sets the "Use Alternating Barline" state for the group.
Definition: ff_details.h:753
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 HasFullName()
Returns true if a full name is available.
Definition: ff_details.h:607
bool GetBracketSingleStaff() const
Returns the "Bracket on single staves" state for the bracket.
Definition: ff_details.h:397
FCString * CreateFullNameString()
Creates a string object of the full group name (including the Enigma text tags).
Definition: finaleframework.cpp:31118
Evpu16 GetFullNameHorizontalOffset() const
Returns the horizontal adjustment offset for the full group name (compared to the default position)...
Definition: ff_details.h:435
void SetUseAbbreviatedNamePositioning(bool state)
Sets if the individual positioning information should be used for abbreviated names in the group...
Definition: ff_details.h:699
void SetDrawBarlineMode(GROUPBARLINESTYLES value)
Sets how barlines are drawn for the group.
Definition: ff_details.h:814
Definition: ff_details.h:1099
Base class for all data-related classes (that handles Finale data).
Definition: ff_base.h:628
static Evpu16 CalcTotalOffset(BASELINEMODES mode, eSsys system, eStaff staff)
Static method for non-lyric modes that calculates the resulting offset for a system/staff.
Definition: finaleframework.cpp:31299
bool GetBarlineUse() const
Returns true if "Use Alternating Barline" is set for the group.
Definition: ff_details.h:491
void SetBracketStyle(FCGROUP_BRACKETS bracketid)
Sets the bracket style (any of the GRBRAC_* defines, such as GRBRAC_PIANO).
Definition: ff_details.h:911
Base class for all classes that access Finale's detail records.
Definition: ff_details.h:12
virtual bool Save()
Saves the currently loaded to its current location.
Definition: finaleframework.cpp:848
eSsys GetSystem() const
Returns the system number for the baseline.
Definition: ff_details.h:1205
eStaff GetStaff() const
Returns the staff number ID for the baseline.
Definition: ff_details.h:1225
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
FCGroup()
The constructor.
Definition: ff_details.h:217
Definition: ff_details.h:1093
Definition: ff_details.h:1087
Definition: ff_details.h:143
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition: ff_base.h:657
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
bool SaveNewAbbreviatedNameBlock(FCString *pString)
Saves a new raw text block (both a raw text and the connected text block) and assigns it to the full ...
Definition: finaleframework.cpp:31198
void SetAbbreviatedNameExpandSingle(bool state)
Definition: ff_details.h:901
twobyte GetEndMeasure() const
Returns the end measure for the group (for Finale 2011 and later).
Definition: ff_details.h:624
bool GetGlobalScope() const
Returns true if the object is referencing data that affects the whole piece.
Definition: ff_details.h:1219
Definition: ff_details.h:199
bool GetShowGroupName() const
Returns the "Show Group Name" state.
Definition: ff_details.h:533
void SetFullNameJustify(FLAG_16 value)
Sets the justification for the group's full name text.
Definition: ff_details.h:844
Evpu16 GetBracketVerticalBottomPos() const
Returns the vertical bottom position/offset for the bracket.
Definition: ff_details.h:388
Evpu16 GetVerticalOffset() const
Returns the vertical offset of the baseline. This is the value that affects the baseline position...
Definition: ff_details.h:1173
virtual EXTAG Tag()=0
The Enigma tag for the derived class.
bool GetUseFullNamePositioning() const
Returns if the individual positioning information should be used for full names in the group...
Definition: ff_details.h:419
void SetBarlineShapeID(twobyte shapeID)
Sets the custom barline shape ID.
Definition: ff_details.h:763
Evpu16 GetAbbreviatedNameVerticalOffset() const
Returns the vertical adjustment offset for the abbreviated group name (compared to the default positi...
Definition: ff_details.h:462
Definition: ff_details.h:202
void SetBracketHorizontalPos(Evpu16 value)
Sets the horizontal position/offset for the bracket.
Definition: ff_details.h:935
FCString * CreateDisplayFullNameString()
Creates a group name for display purposes.
Definition: finaleframework.cpp:31155
void SetBracketVerticalBottomPos(Evpu16 value)
Sets the vertical bottom position/offset for the bracket.
Definition: ff_details.h:954
void SetVerticalOffset(Evpu16 value)
Sets the vertical offset of the baseline. This is the value that affects the baseline position...
Definition: ff_details.h:1237
void SetUseFullNamePositioning(bool state)
Sets if the individual positioning information should be used for full names in the group...
Definition: ff_details.h:692
twobyte GetLyricNumber() const
Returns the connected lyric number for the baseline.
Definition: finaleframework.cpp:31459
void SetAbbreviatedNameVerticalOffset(Evpu16 value)
Sets the vertical adjustment offset for the abbreviated group name (compared to the default position)...
Definition: ff_details.h:735
Definition: ff_details.h:137
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_details.h:209
virtual bool LoadNext()
Loads the next element from the database, if any.
Definition: finaleframework.cpp:877
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_details.h:970
__FCBaseData()
The constructor.
Definition: finaleframework.cpp:705
Definition: ff_details.h:1096
void SetBracketVerticalTopPos(Evpu16 value)
Sets the vertical top position/offset for the bracket.
Definition: ff_details.h:944
int CalcStaffIndex(twobyte staff)
Returns the 0-based index within the group for a staff.
Definition: finaleframework.cpp:31224
bool SaveNewFullNameBlock(FCString *pString)
Saves a new raw text block (both a raw text and the connected text block) and assigns it to the full ...
Definition: finaleframework.cpp:31211
Encapsulates a staff group.
Definition: ff_details.h:69
void SetFullNameAlign(FLAG_16 value)
Returns the alignment for the group's full name text.
Definition: ff_details.h:869
bool Load(CMPER cmper1, CMPER cmper2)
Loads a record with cmper1 and cmper2.
Definition: finaleframework.cpp:30474
virtual int DataSizeLoad()=0
Returns the data size for the data structure that should be loaded.
Definition: ff_details.h:205
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_details.h:210
void SetStartMeasure(twobyte value)
Sets the start measure for the group (for Finale 2011 and later).
Definition: ff_details.h:652
GROUPSTAFFHIDES GetEmptyStaffHide() const
Returns the optimization setting for the group.
Definition: ff_details.h:520
virtual EVERSION EnigmaVersion()
The Enigma version for save/load/create/delete operations.
Definition: ff_base.h:757
bool ContainsStaff(twobyte staff)
Returns true if the staff belongs to the group.
Definition: finaleframework.cpp:31262
Evpu16 GetAbbreviatedNameHorizontalOffset() const
Returns the horizontal adjustment offset for the abbreviated group name (compared to the default posi...
Definition: ff_details.h:444
FCString * CreateTrimmedFullNameString()
Creates a string object of the trimmed full group name.
Definition: finaleframework.cpp:31135
FCBaseline()
The constructor.
Definition: ff_details.h:1157