Finale PDK Framework  0.54
ff_smartshapes.h
1 /*
2  * File: ff_smartshapes.h
3  * Author: Jari Williamsson
4  *
5  * Created on den 16 april 2011, 21:20
6  */
7 
8 #ifndef FF_SMARTSHAPES_H
9 #define FF_SMARTSHAPES_H
10 
11 #include "ff_noteframe.h"
12 #include "ff_text.h"
13 
14 
15 #ifdef PDK_FRAMEWORK_SMARTSHAPES
16 
17 /*****************************************************/
18 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
19 /* Undocumented PDK stuff */
20 
21 #include "pragma_align_begin.h"
22 class __EDTSmartShapeMeasMark
23 {
24 public:
25  CMPER shapeNum;
26  CMPER centerShapeNum;
27 private:
28  twobyte CCCC;
29  twobyte DDDD;
30  twobyte EEEE;
31  twobyte FFFF;
32 public:
33  __EDTSmartShapeMeasMark() : shapeNum(0), centerShapeNum(0),
34  CCCC(0), DDDD(0), EEEE(0), FFFF(0) {}
35 };
36 #include "pragma_align_end.h"
37 
38 #define __ot_SmartShapeMeasMark MAKEEXTAG(edOther,'M','x')
39 
40 #include "pragma_align_begin.h"
41 struct __EDTSmartShapeEntryMark
42 {
43  CMPER shapeNum; // CMPER of the smartshape (unsigned twobyte)
44  twobyte BBBB;
45  twobyte CCCC;
46  twobyte DDDD;
47  twobyte EEEE;
48 };
49 #include "pragma_align_end.h"
50 
51 #define __dt_SmartShapeEntryMark MAKEEXTAG(edEntryDetail,'E','x')
52 
53 #include "pragma_align_begin.h"
54 class __SSENDPT // current size: 8 bytes
55 {
56 public:
57  twobyte inst;
58  twobyte meas;
59  union
60  {
61  TimeEdu32 edu; // for measure-based shapes
62  ENTNUM entryNum; // for entry-based shapes
63  } attachment;
64  __SSENDPT() : inst(0), meas(0)
65  {
66  attachment.entryNum = 0; // initialize the biggest side of the union
67  };
68  ENTNUM GetEntryNum() const { return attachment.entryNum; }
69  TimeEdu32 GetEdu() const { return attachment.edu; }
70  void SetEntryNum(ENTNUM entryNum) { attachment.entryNum=entryNum; }
71  void SetEdu(TimeEdu32 edu) { attachment.edu=edu; }
72 #if OPERATING_SYSTEM == MAC_OS
73  void SwapWords() // necessary adjustment on Macintosh after loading and before saving
74  {
75  attachment.entryNum=attachment.entryNum/0x10000+(attachment.entryNum%0x10000)*0x10000;
76  }
77 #endif
78 };
79 #include "pragma_align_end.h"
80 
81 #include "pragma_align_begin.h"
82 class __SSENDPTADJ // current size: 6 bytes
83 {
84 public:
85  ETOFFSET offset;
86  FLAG_16 flag;
87  __SSENDPTADJ() : flag(0), offset(0,0) {}
88 };
89 #include "pragma_align_end.h"
90 
91 #include "pragma_align_begin.h"
92 class __SSCTLPTADJ // current size: 10 bytes
93 {
94 public:
95  ETOFFSET controlPoint1;
96  ETOFFSET controlPoint2;
97  FLAG_16 flag;
98  __SSCTLPTADJ() : flag(0),controlPoint1(),controlPoint2() { }
99 };
100 #include "pragma_align_end.h"
101 
102 #include "pragma_align_begin.h"
103 class __SSTERMSEG // current size: 8 + 6 + 10 + 6 = 30 bytes
104 {
105 public:
106  __SSENDPT endPt;
107  __SSENDPTADJ endPtAdj;
108  __SSCTLPTADJ ctlPtAdj;
109  __SSENDPTADJ breakAdj;
110  __SSTERMSEG() : endPt(), endPtAdj(), ctlPtAdj(), breakAdj() {}
111 };
112 #include "pragma_align_end.h"
113 
114 #include "pragma_align_begin.h"
115 class __EDTSmartShape
116 {
117  public:
118  twobyte shapeType;
119  FLAG_32 flag;
120  __SSTERMSEG termSeg1; // terminating segments
121  __SSTERMSEG termSeg2; // terminating segments
122  __SSCTLPTADJ fullCtlPtAdj; // used for single-system shapes
123  twobyte noteID[2]; // Note attached smart shapes
124  // use this extra data for noteID.
125  utwobyte ssLineStyleID; //
126  FLAG_16 flag2; // type specific properties. For example, a slur
127  // has a direction property, OVER, UNDER, or AUTO.
128  twobyte lyricNum[2]; // for lyric-based shapes
129  ETAG lyricTag[2];
130  __EDTSmartShape() : shapeType(0), flag(0), fullCtlPtAdj(),
131  ssLineStyleID(0), flag2(0), termSeg1(), termSeg2()
132  {
133  noteID[0] = 0;
134  noteID[1] = 0;
135  lyricNum[0] = 0;
136  lyricNum[1] = 0;
137  lyricTag[0] = 0;
138  lyricTag[1] = 0;
139  }
140 };
141 #include "pragma_align_end.h"
142 
143 #define __edOther8Inci MAKETAG(edMultiInciOther,8) /* 8 other incidences/struct */
144 
145 const EXTAG __ot_SmartShape = MAKEEXTAG(__edOther8Inci,'S','x');
146 
147 #include "pragma_align_begin.h"
148 class __EDTCenterShape
149 {
150 public:
151  __SSENDPTADJ breakAdj1;
152  __SSENDPTADJ breakAdj2;
153  __SSCTLPTADJ ctlPtAdj;
154  __EDTCenterShape() : ctlPtAdj(),breakAdj1(),breakAdj2() {}
155 };
156 #include "pragma_align_end.h"
157 
158 #define __dt_CenterShape MAKEEXTAG(edDetail3Inci,'C','x')
159 
160 const FLAG_32 __SS_FLAG_RESERVED = 0x80000000L; // Reserved for future expansion
161 const FLAG_32 __SS_ENTRYBASED = 0x40000000L; // Entry-based vs measure-based
162 const FLAG_32 __SS_ROTATE = 0x20000000L; // Always set for slurs
163 const FLAG_32 __SS_LYRICBASED = 0x10000000L; // lyric-based smart shape
164 const FLAG_32 __SS_PRESETSHAPE = 0x00008000L; // If set, shapeType field is a predefined
165  // shape (see defines below). In the future,
166  // shapeType could also be user defined
167  // shapes.
168 const FLAG_32 __SS_MAKEHORZ = 0x00000400L; // endpoints are locked together
169  // vertically (so shape stays 'horizontal',
170  // like 8va or dashed line)
171 const FLAG_32 __SS_PUSHENDSTART = 0x00000200L; // Always set nowadays
172 const FLAG_32 __SS_MAKEVERT = 0x00000100L; // "make vertical"
173 const FLAG_32 __SS_ENGRAVER_SLUR_BITS = 0x00000030L;
174 
175 
176 
177 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
178 /*****************************************************/
179 
180 
181 
182 
183 class FCSmartShape;
184 
191 {
192 private:
193 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
194  __EDTSmartShapeMeasMark _smartshapemeasmark;
195 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
196 protected:
197 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
198 
199  virtual EXTAG Tag() { return __ot_SmartShapeMeasMark; }
200  virtual int DataSizeLoad() { return sizeof(__EDTSmartShapeMeasMark); }
201  virtual void* Allocate() { return (void*) &_smartshapemeasmark; }
202 
207  virtual void CloneMemoryFrom(__FCBaseData* pSource)
208  {
209  memcpy(&_smartshapemeasmark, ((FCSmartShapeMeasureMark*)pSource)->_GetSmartShapeMeasureMark(), sizeof(_smartshapemeasmark));
210  _datablock = &_smartshapemeasmark;
211  _loadedsize = sizeof(_smartshapemeasmark);
212  }
213 
214  virtual __FCBaseData* CreateObject()
215  { return new FCSmartShapeMeasureMark(); }
216 
217 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
218 public:
219  virtual const char* ClassName() { return "FCSmartShapeMeasureMark"; }
220  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_SMARTSHAPEMEASUREMARK; }
221 
222 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
223 
229  void* _GetSmartShapeMeasureMark() { return Allocate(); }
230 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
231 
237  {
238  /* The __EDTSmartShapeMeasMark is initialized automatically */
239  _datablock = &_smartshapemeasmark;
240  _loadedsize = sizeof(_smartshapemeasmark);
241  }
242 
247  void SetShapeNumber(CMPER value) { _smartshapemeasmark.shapeNum = value; }
248 
250  void _SetCenterShapeNumber(CMPER value) { _smartshapemeasmark.centerShapeNum = value; }
251 
256  CMPER GetShapeNumber() const { return _smartshapemeasmark.shapeNum; }
257 
260  CMPER _GetCenterShapeNumber() { return _smartshapemeasmark.centerShapeNum; }
261 
266  twobyte GetMeasure() const { return _dataid.other.cmper; }
267 
279  FCSmartShape* CreateSmartShape(bool load_center_shapes = true);
280 
281 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
282 
283  FCSmartShape* CreateSmartShape_GC(bool load_center_shapes = true);
284 #endif
285 
286 #ifdef PDK_FRAMEWORK_DEBUG
287  virtual void DebugDump()
288  {
290  DebugOutDigit("Shape Number: ", GetShapeNumber());
291  DebugOutDigit("Center Shape Number: ", _GetCenterShapeNumber());
292  }
293 #endif
294 };
295 
296 
306 {
307 private:
308 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
309  __EDTSmartShapeEntryMark _smartshapeentrymark;
310 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
311 protected:
312 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
313 
314  virtual EXTAG Tag() { return __dt_SmartShapeEntryMark; }
315  virtual int DataSizeLoad() { return sizeof(__EDTSmartShapeEntryMark); }
316  virtual void* Allocate() { return (void*) &_smartshapeentrymark; }
317 
322  virtual void CloneMemoryFrom(__FCBaseData* pSource)
323  {
324  memcpy(&_smartshapeentrymark, ((FCSmartShapeEntryMark*)pSource)->_GetSmartShapeEntryMark(), sizeof(_smartshapeentrymark));
325  _datablock = &_smartshapeentrymark;
326  _loadedsize = sizeof(_smartshapeentrymark);
327  }
328 
329  virtual __FCBaseData* CreateObject()
330  { return new FCSmartShapeEntryMark(); }
331 
332 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
333 public:
334  virtual const char* ClassName() { return "FCSmartShapeEntryMark"; }
335  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_SMARTSHAPEENTRYMARK; }
336 
337 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
338 
344  void* _GetSmartShapeEntryMark() { return Allocate(); }
345 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
346 
352  {
353  /* __EDTSmartShapeEntryMark is note initialized automatically */
354  memset(&_smartshapeentrymark, 0, sizeof(_smartshapeentrymark));
355  _datablock = &_smartshapeentrymark;
356  _loadedsize = sizeof(_smartshapeentrymark);
357  }
358 
365  FCSmartShape* CreateSmartShape(bool load_center_shapes);
366 
367 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
368  /* \brief GC version of CreateSmartShape for Lua. */
369  FCSmartShape* CreateSmartShape_GC(bool load_center_shapes);
370 #endif
371 
376  bool CalcLeftMark();
377 
382  bool CalcRightMark();
383 
388  void SetShapeNumber(CMPER value) { _smartshapeentrymark.shapeNum = value; }
389 
394  CMPER GetShapeNumber() const { return _smartshapeentrymark.shapeNum; }
395 
396 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
397 
398  virtual twobyte CalcLastInci();
399 
401  virtual void _SetEntryFlag(FCNoteEntry* pNoteEntry, bool state)
402  {
403  pNoteEntry->SetSmartShapeFlag(state);
404  }
405 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
406 
407 #ifdef PDK_FRAMEWORK_DEBUG
408  virtual void DebugDump()
409  {
411  DebugOutDigit("Shape Number: ", GetShapeNumber());
412  }
413 #endif
414 };
415 
419 {
420 private:
421 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
422  __EDTCenterShape _centershape;
423 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
424 protected:
425 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
426 
427  virtual EXTAG Tag() { return __dt_CenterShape; }
428  virtual int DataSizeLoad() { return sizeof(__EDTCenterShape); }
429  virtual void* Allocate() { return (void*) &_centershape; }
430 
435  virtual void CloneMemoryFrom(__FCBaseData* pSource)
436  {
437  memcpy(&_centershape, ((FCCenterSmartShape*)pSource)->_GetCenterSmartShape(), sizeof(_centershape));
438  _datablock = &_centershape;
439  _loadedsize = sizeof(_centershape);
440  }
441 
442  virtual __FCBaseData* CreateObject()
443  { return new FCCenterSmartShape(); }
444 
445 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
446 public:
447  virtual const char* ClassName() { return "FCCenterSmartShape"; }
448  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_CENTERSMARTSHAPE; }
449 
450 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
451 
457  void* _GetCenterSmartShape() { return Allocate(); }
458 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
459 
462  {
463  /* The '_centershape' data member is initialized automatically. */
464  _datablock = &_centershape;
465  _loadedsize = sizeof(_centershape);
466  }
467 
468 
469 #ifdef PDK_FRAMEWORK_DEBUG
470  virtual void DebugDump()
471  {
473  }
474 #endif
475 };
476 
477 
478 
479 
480 class FCSmartShape;
481 
490 {
491  __SSTERMSEG* _pSegment;
492  FCSmartShape* _pRealObject;
493  bool _isleftsidesegment;
494 public:
495  virtual const char* ClassName() { return "FCSmartShapeSegment"; }
496 
498  FCSmartShapeSegment(__SSTERMSEG* pSeg, FCSmartShape* pReference, bool leftsidesegment) : __FCBase()
499  {
500  _pSegment = pSeg;
501  _pRealObject = pReference;
502  _isleftsidesegment = leftsidesegment;
503  }
504 
510  twobyte GetStaff() const { return _pSegment->endPt.inst; }
511 
516  twobyte GetMeasure() const { return _pSegment->endPt.meas; }
517 
522  twobyte GetNoteID() const;
523 
528  TimeEdu32 GetMeasurePos() const { return _pSegment->endPt.attachment.edu; }
529 
534  ENTNUM GetEntryNumber() const { return _pSegment->endPt.attachment.entryNum; }
535 
543  twobyte GetEndpointOffsetX() const { return _pSegment->endPtAdj.offset.x; }
544 
550  twobyte GetEndpointOffsetY() const { return _pSegment->endPtAdj.offset.y; }
551 
556  twobyte GetControlPoint1OffsetX() const { return _pSegment->ctlPtAdj.controlPoint1.x; }
557 
562  twobyte GetControlPoint1OffsetY() const { return _pSegment->ctlPtAdj.controlPoint1.y; }
563 
568  twobyte GetControlPoint2OffsetX() const { return _pSegment->ctlPtAdj.controlPoint2.x; }
569 
574  twobyte GetControlPoint2OffsetY() const { return _pSegment->ctlPtAdj.controlPoint2.y; }
575 
580  twobyte GetBreakOffsetX() const { return _pSegment->breakAdj.offset.x; }
581 
586  twobyte GetBreakOffsetY() const { return _pSegment->breakAdj.offset.y; }
587 
592  void SetStaff(twobyte staff) { _pSegment->endPt.inst = staff; }
593 
598  void SetMeasure(twobyte measureno)
599  {
600  _pSegment->endPt.meas = measureno;
601  }
602 
604  void SetNoteID(twobyte noteID);
605 
610  void SetMeasurePos(TimeEdu32 edupos) { _pSegment->endPt.attachment.edu = edupos; }
611 
621  void SetEndpointOffsetX(twobyte value) { _pSegment->endPtAdj.offset.x = value; }
622 
629  void SetEndpointOffsetY(twobyte value)
630  {
631  _pSegment->endPtAdj.offset.y = value;
632  }
633 
638  void SetControlPoint1OffsetX(twobyte value) { _pSegment->ctlPtAdj.controlPoint1.x = value; }
639 
644  void SetControlPoint1OffsetY(twobyte value) { _pSegment->ctlPtAdj.controlPoint1.y = value; }
645 
650  void SetControlPoint2OffsetX(twobyte value) { _pSegment->ctlPtAdj.controlPoint2.x = value; }
651 
656  void SetControlPoint2OffsetY(twobyte value) { _pSegment->ctlPtAdj.controlPoint2.y = value; }
657 
662  void SetBreakOffsetX(twobyte value) { _pSegment->breakAdj.offset.x = value; }
663 
668  void SetBreakOffsetY(twobyte value) { _pSegment->breakAdj.offset.y = value; }
669 
676  void SetEntryNumber(ENTNUM value) { _pSegment->endPt.attachment.entryNum = value; }
677 
678 #ifdef PDK_FRAMEWORK_ENTRIES
679 
690  void SetEntry(FCNoteEntry* pEntry)
691  {
692  if (!pEntry)
693  {
694  _pSegment->endPt.SetEntryNum(0);
695  return;
696  }
697  _pSegment->endPt.SetEntryNum(pEntry->GetEntryNumber());
698  pEntry->SetSmartShapeFlag(true);
699  }
700 #endif
701 
709  void SetCustomOffset(bool rightside)
710  {
711  _pSegment->endPtAdj.flag = rightside ? 0x400c : 0x400d; /* Don't know what these flags mean... */
712  }
713 
714 #ifdef PDK_FRAMEWORK_DEBUG
715  virtual void DebugDump();
716 #endif
717 
718 };
719 
730 {
731  __SSCTLPTADJ* _pCtrlPointAdjust;
732  FCSmartShape* _pRealObject;
733 public:
734  virtual const char* ClassName() { return "FCSmartShapeCtrlPointAdjust"; }
735 
737  FCSmartShapeCtrlPointAdjust(__SSCTLPTADJ* pCtrlPointAdj, FCSmartShape* pReference) : __FCBase()
738  {
739  _pCtrlPointAdjust = pCtrlPointAdj;
740  _pRealObject = pReference;
741  }
742 
750  twobyte GetControlPoint1OffsetX() const { return _pCtrlPointAdjust->controlPoint1.x; }
751 
756  twobyte GetControlPoint1OffsetY() const { return _pCtrlPointAdjust->controlPoint1.y; }
757 
764  twobyte GetControlPoint2OffsetX() const { return _pCtrlPointAdjust->controlPoint2.x; }
765 
770  twobyte GetControlPoint2OffsetY() const { return _pCtrlPointAdjust->controlPoint2.y; }
771 
777  bool GetCustomShaped() const { return GetBitFlag(_pCtrlPointAdjust->flag, 0x4000); }
778 
779 
786  void SetControlPoint1OffsetX(twobyte value)
787  {
788  _pCtrlPointAdjust->controlPoint1.x = value;
789  }
790 
795  void SetControlPoint1OffsetY(twobyte value)
796  {
797  _pCtrlPointAdjust->controlPoint1.y = value;
798  }
799 
806  void SetControlPoint2OffsetX(twobyte value)
807  {
808  _pCtrlPointAdjust->controlPoint2.x = value;
809  }
810 
815  void SetControlPoint2OffsetY(twobyte value)
816  {
817  _pCtrlPointAdjust->controlPoint2.y = value;
818  }
819 
825  void SetCustomShaped(bool flag)
826  {
827  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x4000, flag);
828  }
829 
838  {
839  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, true);
840  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, false);
841  }
842 
851  {
852  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, false);
853  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, true);
854  }
855 
864  {
865  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, false);
866  Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, false);
867  }
868 
877  {
879  SetCustomShaped(false);
880  }
881 
890  {
891  memset(_pCtrlPointAdjust, 0, sizeof(__SSCTLPTADJ));
892  }
893 
894 #ifdef PDK_FRAMEWORK_DEBUG
895  virtual void DebugDump()
896  {
898  DebugOutDigit("Control point 1 (x)", GetControlPoint1OffsetX());
899  DebugOutDigit("Control point 1 (y)", GetControlPoint1OffsetY());
900  DebugOutDigit("Control point 2 (x)", GetControlPoint2OffsetX());
901  DebugOutDigit("Control point 2 (y)", GetControlPoint2OffsetY());
902  DebugOutHex("Flag (hex): ", _pCtrlPointAdjust->flag);
903  }
904 #endif
905 };
906 
907 
926 {
927 private:
928 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
929  __EDTSmartShape _smartshape;
930  FCSmartShapeSegment* _pTerminateSegmentLeft;
931  FCSmartShapeSegment* _pTerminateSegmentRight;
932  FCSmartShapeCtrlPointAdjust* _pCtrlPointAdjust;
933  __FCCollection _CenterSmartShapes;
934 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
935 
936 protected:
937 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
938 
939  virtual EXTAG Tag() { return __ot_SmartShape; }
940  virtual int DataSizeLoad() { return sizeof(__EDTSmartShape); }
941  virtual void* Allocate() { return (void*) &_smartshape; }
942 
947  virtual void CloneMemoryFrom(__FCBaseData* pSource)
948  {
949  memcpy(&_smartshape, ((FCSmartShape*)pSource)->_GetSmartShape(), sizeof(_smartshape));
950  _datablock = &_smartshape;
951  _loadedsize = sizeof(_smartshape);
952  }
953 
954  virtual __FCBaseData* CreateObject()
955  { return new FCSmartShape(); }
956 
957 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
958 public:
959 
962  {
965 
966  /* Overslur (center humps up) */
967  SMARTSHAPE_SLURUP = 1,
968 
971 
974 
977 
980 
983 
986 
989 
992 
995 
998 
1001 
1004 
1007 
1010 
1013 
1016 
1019 
1022 
1025 
1028 
1031 
1034 
1037 
1043 
1046 
1049 
1052 
1055 
1058 
1061 
1064 
1067 
1070 
1073 
1076 
1079 
1082 
1085 
1088 
1091  };
1092 
1093 
1099  {
1100  SS_OFFSTATE = 0,
1101  SS_ONSTATE,
1102  SS_AUTOSTATE
1103  };
1104 
1105  virtual const char* ClassName() { return "FCSmartShape"; }
1106  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_SMARTSHAPE; }
1107 
1108 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1109 
1115  void* _GetSmartShape() { return Allocate(); }
1116 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1117 
1123  {
1124  _pTerminateSegmentLeft = NULL;
1125  _pTerminateSegmentRight = NULL;
1126  _pCtrlPointAdjust = NULL;
1127 
1128  /* SOME of the _smartshape data is auto-initialized, but not these: */
1129  _smartshape.shapeType = 0;
1130  _smartshape.flag = __SS_PUSHENDSTART;
1131  _smartshape.ssLineStyleID = 0;
1132  _smartshape.flag2 = 0;
1133 
1134  _datablock = &_smartshape;
1135  _loadedsize = sizeof(_smartshape);
1136  }
1137 
1138  virtual ~FCSmartShape()
1139  {
1140  delete _pTerminateSegmentLeft;
1141  delete _pTerminateSegmentRight;
1142  delete _pCtrlPointAdjust;
1143  }
1144 
1149  twobyte _GetLeftSideNoteID() const { return _smartshape.noteID[0]; }
1150 
1155  twobyte _GetRightSideNoteID() const { return _smartshape.noteID[1]; }
1156 
1161  void _SetLeftSideNoteID(twobyte noteID) { _smartshape.noteID[0] = noteID; }
1162 
1167  void _SetRightSideNoteID(twobyte noteID) { _smartshape.noteID[1] = noteID; }
1168 
1170  void _LoadCenterShapes();
1171 
1173  void _ClearCenterShapes() { _CenterSmartShapes.ClearAll(); }
1174 
1180  bool CalcLeftCellMetricPos(FCPoint* pPoint);
1181 
1187  bool CalcRightCellMetricPos(FCPoint* pPoint);
1188 
1195  bool CalcLeftEntryMetricPos(FCNoteEntry* pEntry, FCPoint* pPoint);
1196 
1203  bool CalcRightEntryMetricPos(FCNoteEntry* pEntry, FCPoint* pPoint);
1204 
1210 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1212 #else
1213  int
1214 #endif
1215  GetShapeType() const { return (SMARTSHAPE_TYPES) _smartshape.shapeType; }
1216 
1221  bool GetEntryBased() const { return GetBitFlag(_smartshape.flag, __SS_ENTRYBASED); }
1222 
1227  bool GetPresetShape() const
1228  {
1229  return GetBitFlag(_smartshape.flag, __SS_PRESETSHAPE);
1230  }
1231 
1240  {
1241  if (!_pTerminateSegmentLeft)
1242  _pTerminateSegmentLeft = new FCSmartShapeSegment(&_smartshape.termSeg1, this, true);
1243  return _pTerminateSegmentLeft;
1244  }
1245 
1254  {
1255  if (!_pTerminateSegmentRight)
1256  _pTerminateSegmentRight = new FCSmartShapeSegment(&_smartshape.termSeg2, this, false);
1257  return _pTerminateSegmentRight;
1258  }
1259 
1265  {
1266  if (!_pCtrlPointAdjust)
1267  _pCtrlPointAdjust = new FCSmartShapeCtrlPointAdjust(&_smartshape.fullCtlPtAdj, this);
1268  return _pCtrlPointAdjust;
1269  }
1270 
1275  bool GetMakeHorizontal() const { return GetBitFlag(_smartshape.flag, __SS_MAKEHORZ); }
1276 
1284  bool GetMaintainAngle() const { return GetBitFlag(_smartshape.flag, 0x00000001); }
1285 
1290  bool GetVisible() const { return !GetBitFlag(_smartshape.flag2, 0x0001); }
1291 
1296  twobyte GetLineID() const { return _smartshape.ssLineStyleID; }
1297 
1304 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1306 #else
1307  int
1308 #endif
1310  {
1311  if (GetBitFlag(_smartshape.flag, 0x10))
1312  return SS_ONSTATE;
1313  else if (GetBitFlag(_smartshape.flag, 0x20))
1314  return SS_OFFSTATE;
1315  else
1316  return SS_AUTOSTATE;
1317  }
1318 
1325 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1327 #else
1328  int
1329 #endif
1331  {
1332  if (GetBitFlag(_smartshape.flag, 0x04))
1333  return SS_ONSTATE;
1334  else if (GetBitFlag(_smartshape.flag, 0x08))
1335  return SS_OFFSTATE;
1336  else
1337  return SS_AUTOSTATE;
1338  }
1339 
1345 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1347 #else
1348  int
1349 #endif
1350  shapevalue) { _smartshape.shapeType = shapevalue; }
1351 
1356  void SetPresetShape(bool value)
1357  {
1358  Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, value);
1359  }
1360 
1365  void SetLineID(twobyte identifier) { _smartshape.ssLineStyleID = identifier; }
1366 
1371  void SetMakeHorizontal(bool state) { Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, state); }
1372 
1380  void SetMaintainAngle(bool state) { Set32BitFlag(&_smartshape.flag, 0x00000001, state); }
1381 
1386  void SetVisible(bool visible) { Set16BitFlag(&_smartshape.flag2, 0x0001, !visible); }
1387 
1392  void SetEntryBased(bool value) { Set32BitFlag(&_smartshape.flag, __SS_ENTRYBASED, value); }
1393 
1402  void SetSlurFlags(bool entrybased)
1403  {
1404  SetEntryBased(entrybased);
1405  Set32BitFlag(&_smartshape.flag, __SS_ROTATE, true);
1406  Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, true);
1407  Set32BitFlag(&_smartshape.flag, __SS_PUSHENDSTART, true);
1408  SetMaintainAngle(true);
1409 
1410  Set32BitFlag(&_smartshape.flag, __SS_LYRICBASED, false);
1411  Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, false);
1412  Set32BitFlag(&_smartshape.flag, __SS_MAKEVERT, false);
1413  }
1414 
1423  {
1424  SetMeasureAttachedFlags(true, true);
1425  }
1426 
1433  void SetEntryAttachedFlags(bool presetshape)
1434  {
1435  SetEntryBased(true);
1436  Set32BitFlag(&_smartshape.flag, __SS_ROTATE, true);
1437  Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, presetshape);
1438  Set32BitFlag(&_smartshape.flag, __SS_PUSHENDSTART, true);
1439  SetMaintainAngle(true);
1440 
1441  Set32BitFlag(&_smartshape.flag, __SS_LYRICBASED, false);
1442  Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, false);
1443  Set32BitFlag(&_smartshape.flag, __SS_MAKEVERT, false);
1444  }
1445 
1457  void SetMeasureAttachedFlags(bool presetshape, bool makehorizontal);
1458 
1470  void SetBeatAttached(bool state);
1471 
1479  bool GetBeatAttached() const;
1480 
1488 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1490 #else
1491  int
1492 #endif
1493  state
1494  )
1495  {
1496  switch (state)
1497  {
1498  case SS_AUTOSTATE:
1499  Set32BitFlag(&_smartshape.flag, 0x20, false);
1500  Set32BitFlag(&_smartshape.flag, 0x10, false);
1501  break;
1502  case SS_ONSTATE:
1503  Set32BitFlag(&_smartshape.flag, 0x20, false);
1504  Set32BitFlag(&_smartshape.flag, 0x10, true);
1505  break;
1506  case SS_OFFSTATE:
1507  Set32BitFlag(&_smartshape.flag, 0x20, true);
1508  Set32BitFlag(&_smartshape.flag, 0x10, false);
1509  break;
1510  }
1511  }
1512 
1520 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1522 #else
1523  int
1524 #endif
1525  state
1526  )
1527  {
1528  switch (state)
1529  {
1530  case SS_AUTOSTATE:
1531  Set32BitFlag(&_smartshape.flag, 0x08, false);
1532  Set32BitFlag(&_smartshape.flag, 0x04, false);
1533  break;
1534  case SS_ONSTATE:
1535  Set32BitFlag(&_smartshape.flag, 0x08, false);
1536  Set32BitFlag(&_smartshape.flag, 0x04, true);
1537  break;
1538  case SS_OFFSTATE:
1539  Set32BitFlag(&_smartshape.flag, 0x08, true);
1540  Set32BitFlag(&_smartshape.flag, 0x04, false);
1541  break;
1542  }
1543  }
1544 
1550  || (GetShapeType() == SMARTSHAPE_DIMINUENDO)); }
1551 
1556  bool IsAutoSlur()
1557  {
1558  switch (GetShapeType())
1559  {
1560  case SMARTSHAPE_SLURAUTO:
1562  case SMARTSHAPE_DASHEDSLURAUTO: /* Finale 25 */
1563  return true;
1564  default:
1565  return false;
1566  }
1567  }
1568 
1573  bool IsOverSlur()
1574  {
1575  switch (GetShapeType())
1576  {
1577  case SMARTSHAPE_SLURUP:
1579  case SMARTSHAPE_DASHEDSLURUP: /* Finale 25 */
1580  return true;
1581  default:
1582  return false;
1583  }
1584  }
1585 
1591  {
1592  switch (GetShapeType())
1593  {
1594  case SMARTSHAPE_SLURDOWN:
1596  case SMARTSHAPE_DASHEDSLURDOWN: /* Finale 25 */
1597  return true;
1598  default:
1599  return false;
1600  }
1601  }
1602 
1608  bool IsTwoHooks()
1609  {
1610  switch (GetShapeType())
1611  {
1616  return true;
1617  default:
1618  return false;
1619  }
1620  }
1621 
1626  bool IsSlur()
1627  {
1628  switch (GetShapeType())
1629  {
1630  case SMARTSHAPE_SLURDOWN:
1631  case SMARTSHAPE_SLURUP:
1632  case SMARTSHAPE_SLURAUTO:
1639  return true;
1640  default:
1641  return false;
1642  }
1643  }
1644 
1652  {
1653  switch (GetShapeType())
1654  {
1655  case SMARTSHAPE_SLURDOWN:
1656  case SMARTSHAPE_SLURUP:
1657  case SMARTSHAPE_SLURAUTO:
1658  return true;
1659  default:
1660  return false;
1661  }
1662  }
1663 
1672  {
1673  switch (GetShapeType())
1674  {
1678  return true;
1679  default:
1680  return false;
1681  }
1682  }
1683 
1692  {
1693 #if FXT_VERSION >= FINALEVERSION_25
1694  switch (GetShapeType())
1695  {
1699  return true;
1700  default:
1701  return false;
1702  }
1703 #else
1704  return false;
1705 #endif
1706  }
1707 
1712  bool IsTabSlide()
1713  {
1714  return (GetShapeType() == SMARTSHAPE_TABSLIDE);
1715  }
1716 
1722  {
1723  return (GetShapeType() == SMARTSHAPE_GLISSANDO);
1724  }
1725 
1732  {
1733  return (GetShapeType() == SMARTSHAPE_CUSTOM);
1734  }
1735 
1740  bool IsEntryBased() { return GetBitFlag(_smartshape.flag, __SS_ENTRYBASED); }
1741 
1747  bool IsWithinRegion(FCMusicRegion* pRegion);
1748 
1757  void DeleteEverything();
1758 
1760  void AssignToStaff(int newstaff);
1761 
1768  virtual bool SaveNew();
1769 
1780  bool SaveNewEverything(FCNoteEntry* pFirstEntry = NULL, FCNoteEntry* pLastEntry = NULL);
1781 
1782 #ifdef PDK_FRAMEWORK_DEBUG
1783  virtual void DebugDump()
1784  {
1786  DebugOutDigit("Shape Type: ", GetShapeType());
1787  DebugOutDigit("Line ID: ", GetLineID());
1788 
1789  DebugOut("= Terminate segment 1 =");
1791  pSeg1->DebugDump();
1792 
1793  DebugOut("= Terminate segment 2 =");
1795  pSeg2->DebugDump();
1796 
1797  DebugOut("Ctrl Point adjust:");
1798  FCSmartShapeCtrlPointAdjust* pCtrlPointAdjust = GetCtrlPointAdjust();
1799  pCtrlPointAdjust->DebugDump();
1800  //DebugOutBlock(&_smartshape.fullCtlPtAdj, sizeof(_smartshape.fullCtlPtAdj));
1801 
1802  DebugOut("= Center Smart Shapes =");
1803  _CenterSmartShapes.DebugDump();
1804 
1805  DebugOutHex("flag: ", _smartshape.flag);
1806  DebugOutHex("flag2: ", _smartshape.flag2);
1807  }
1808 #endif
1809 };
1810 
1811 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1812 
1813 #include "pragma_align_begin.h"
1814 struct __EDTCustomLineType_Solid2012
1815 {
1816  Efix16 lineWidth;
1817 };
1818 #include "pragma_align_end.h"
1819 
1820 #include "pragma_align_begin.h"
1821 // for linetype == CUSTOMLINE_DASHED
1822 struct __EDTCustomLineType_Dashed2012
1823 {
1824  Efix16 lineWidth;
1825  Efix16 dashOn;
1826  Efix16 dashOff;
1827 };
1828 #include "pragma_align_end.h"
1829 
1830 
1831 #include "pragma_align_begin.h"
1832 // for linetype == CUSTOMLINE_CHARACTER
1833 struct __EDTCustomLineType_Character2012
1834 {
1835  ufourbyte lineChar;
1836  EFONTID font; // Enigma Font ID
1837  twobyte size; // Font size in points
1838  FLAG_16 efx; // Font efx (FONT_EFX_*)
1839  fourbyte baselineShiftEMs; // in EMs
1840 };
1841 #include "pragma_align_end.h"
1842 
1843 #include "pragma_align_begin.h"
1844 struct __EDTCustomLineDefinition2012
1845 {
1846  twobyte linetype; // CUSTOMLINE_SOLID = solid line
1847  // CUSTOMLINE_DASHED = dashed line
1848  // CUSTOMLINE_CHARACTER = line consisting of characters
1849  union
1850  {
1851  __EDTCustomLineType_Solid2012 solid;
1852  __EDTCustomLineType_Dashed2012 dashed;
1853  __EDTCustomLineType_Character2012 character;
1854  } linedata;
1855  // [xref: LINECAP]
1856  twobyte endpointstylestart; // CLENDPOINT_NONE - None
1857  // CLENDPOINT_PRESET - Preset Arrowhead
1858  // CLENDPOINT_CUSTOM - Custom Arrowhead
1859  // CLENDPOINT_HOOK - Hook
1860  twobyte endpointstyleend; // Same constants as for endpointstylestart.
1861  fourbyte startPointData; // If endpointstylestart is non-zero, this
1862  // contains the preset/custom arrowhead shape ID
1863  // for start point, or the Hook length in Efix32
1864  // for CLENDPOINT_HOOK style
1865  fourbyte endPointData; // If endpointstylestart is non-zero, this
1866  // contains the preset/custom arrowhead shape ID
1867  // for start point, or the Hook length in Efix32
1868  // for CLENDPOINT_HOOK style
1869  // remaining SSLINESTYLE fields
1870  FLAG_16 flag; // Flag bits.
1871  twobyte leftStartTextID; // The smart shape (tx_SmartShape) raw text ID
1872  // for left start text.
1873  twobyte leftContTextID; // The smart shape raw text ID for left
1874  // continuation text.
1875  twobyte rightEndTextID; // The smart shape raw text ID for right end text.
1876  twobyte centerFullTextID; // The smart shape raw text ID for centered full text.
1877  twobyte centerAbbrTextID; // The smart shape raw text ID for centered
1878  // abbreviated text.
1879  Evpu16 leftStartTextHoriz; // Horizontal start text position
1880  Evpu16 leftStartTextVert; // Vertical start text position
1881  Evpu16 leftContTextHoriz; // Horizontal continuation text position
1882  Evpu16 leftContTextVert; // Vertical continuation text position
1883  Evpu16 rightEndTextHoriz; // Horizontal right-end text position
1884  Evpu16 rightEndTextVert; // Vertical right-end text position
1885  Evpu16 centerFullTextHoriz; // Horizontal position for centered full text
1886  Evpu16 centerFullTextVert; // Vertical position for centered full text
1887  Evpu16 centerAbbrTextHoriz; // Horizontal position for abbreviated text
1888  Evpu16 centerAbbrTextVert; // Vertical position for abbreviated text
1889  Evpu16 lineadjustStartHoriz; // Line adjustment for horizontal start point
1890  Evpu16 lineadjustStartVert; // Vertical line adjustment for start point.
1891  // This value should be the same as lineadjustEndVert.
1892  Evpu16 lineadjustEndHoriz; // Horizontal end line adjustment
1893  Evpu16 lineadjustEndVert; // Vertical end line adjustment. This
1894  // value should be the same as lineadjustStartVert.
1895  Evpu16 lineadjustContinueHoriz; // Line adjustments for continue horizontally
1896  twobyte AAAA; // reserved, set to 0
1897 };
1898 #include "pragma_align_end.h"
1899 
1900 #endif
1901 
1902 
1912 {
1913 public:
1920  TEXTREF_LEFTSTART = 0,
1921  TEXTREF_LEFTCONTINUATION,
1922  TEXTREF_RIGHTEND,
1923  TEXTREF_CENTERFULL,
1924  TEXTREF_CENTERABBREVIATED
1925  };
1926 private:
1927 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1928 
1929  EDTCustomLineDefinition _customsmartlinedef;
1930  __EDTCustomLineDefinition2012 _customsmartlinedef2012;
1931  bool _use2012version; /* This is set in constructor, if running version
1932  * is 2012 or above */
1933 
1934 protected:
1935  virtual EXTAG Tag()
1936  {
1937  if (_use2012version)
1938  return MAKEEXTAG(edSpecialOther, 'l', 's');
1939  else
1940  return MAKEEXTAG(MAKETAG(edMultiInciOther, 6), 'l', 's');
1941  }
1942  virtual int DataSizeLoad() {
1943  return _use2012version ? sizeof(_customsmartlinedef2012) : sizeof(_customsmartlinedef);
1944  }
1945  virtual void* Allocate() { return _use2012version ? (void*) &_customsmartlinedef2012 : (void*) &_customsmartlinedef; }
1946  virtual EVERSION EnigmaVersion() { return _use2012version ? FINALEVERSION_2012 : FINALEVERSION_2010; }
1947 
1952  virtual void CloneMemoryFrom(__FCBaseData* pSource)
1953  {
1954  if (_use2012version)
1955  {
1956  memcpy(&_customsmartlinedef2012, ((FCCustomSmartLineDef*)pSource)->_GetCustomSmartLineDef(), sizeof(_customsmartlinedef2012));
1957  _datablock = &_customsmartlinedef2012;
1958  _loadedsize = sizeof(_customsmartlinedef2012);
1959  }
1960  else
1961  {
1962  memcpy(&_customsmartlinedef, ((FCCustomSmartLineDef*)pSource)->_GetCustomSmartLineDef(), sizeof(_customsmartlinedef));
1963  _datablock = &_customsmartlinedef;
1964  _loadedsize = sizeof(_customsmartlinedef);
1965  }
1966  }
1967 
1972  void _SetRawStringNumber
1973  (
1974 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
1976 #else
1977  int
1978 #endif
1979  reference, twobyte value)
1980  {
1981  twobyte* pRawtextnumber = NULL;
1982  switch (reference)
1983  {
1984  case TEXTREF_LEFTSTART:
1985  pRawtextnumber = _use2012version ? &_customsmartlinedef2012.leftStartTextID : &_customsmartlinedef.leftStartTextID;
1986  break;
1987  case TEXTREF_LEFTCONTINUATION:
1988  pRawtextnumber = _use2012version ? &_customsmartlinedef2012.leftContTextID : &_customsmartlinedef.leftContTextID;
1989  break;
1990  case TEXTREF_RIGHTEND:
1991  pRawtextnumber = _use2012version ? &_customsmartlinedef2012.rightEndTextID : &_customsmartlinedef.rightEndTextID;
1992  break;
1993  case TEXTREF_CENTERFULL:
1994  pRawtextnumber = _use2012version ? &_customsmartlinedef2012.centerFullTextID : &_customsmartlinedef.centerFullTextID;
1995  break;
1996  case TEXTREF_CENTERABBREVIATED:
1997  pRawtextnumber = _use2012version ? &_customsmartlinedef2012.centerAbbrTextID : &_customsmartlinedef.centerAbbrTextID;
1998  break;
1999  }
2000  if (pRawtextnumber) *pRawtextnumber = value;
2001  }
2002 
2003  virtual __FCBaseData* CreateObject() { return new FCCustomSmartLineDef(); }
2004 
2005 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2006 public:
2007  virtual const char* ClassName() { return "FCCustomSmartLineDef"; }
2008  virtual const PDKFRAMEWORK_CLASSID GetClassID() { return FCID_CUSTOMSMARTLINEDEF; }
2009 
2010 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2011 
2017  void* _GetCustomSmartLineDef() { return _use2012version ? (void*) &_customsmartlinedef2012 : (void*) &_customsmartlinedef; }
2018 
2019 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2020 
2021 
2027 
2028 
2032  virtual bool DeepDeleteData();
2033 
2042  twobyte GetRawStringNumber
2043  (
2044 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2046 #else
2047  int
2048 #endif
2049  reference)
2050  {
2051  twobyte rawtextnumber = 0;
2052  switch (reference)
2053  {
2054  case TEXTREF_LEFTSTART:
2055  rawtextnumber = _use2012version ? _customsmartlinedef2012.leftStartTextID : _customsmartlinedef.leftStartTextID;
2056  break;
2057  case TEXTREF_LEFTCONTINUATION:
2058  rawtextnumber = _use2012version ? _customsmartlinedef2012.leftContTextID : _customsmartlinedef.leftContTextID;
2059  break;
2060  case TEXTREF_RIGHTEND:
2061  rawtextnumber = _use2012version ? _customsmartlinedef2012.rightEndTextID : _customsmartlinedef.rightEndTextID;
2062  break;
2063  case TEXTREF_CENTERFULL:
2064  rawtextnumber = _use2012version ? _customsmartlinedef2012.centerFullTextID : _customsmartlinedef.centerFullTextID;
2065  break;
2066  case TEXTREF_CENTERABBREVIATED:
2067  rawtextnumber = _use2012version ? _customsmartlinedef2012.centerAbbrTextID : _customsmartlinedef.centerAbbrTextID;
2068  break;
2069  }
2070  return rawtextnumber;
2071  }
2072 
2081  Evpu16 GetHorizontalTextPos
2082  (
2083 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2085 #else
2086  int
2087 #endif
2088  reference)
2089  {
2090  twobyte position = 0;
2091  switch (reference)
2092  {
2093  case TEXTREF_LEFTSTART:
2094  position = _use2012version ? _customsmartlinedef2012.leftStartTextHoriz : _customsmartlinedef.leftStartTextHoriz;
2095  break;
2096  case TEXTREF_LEFTCONTINUATION:
2097  position = _use2012version ? _customsmartlinedef2012.leftContTextHoriz : _customsmartlinedef.leftContTextHoriz;
2098  break;
2099  case TEXTREF_RIGHTEND:
2100  position = _use2012version ? _customsmartlinedef2012.rightEndTextHoriz : _customsmartlinedef.rightEndTextHoriz;
2101  break;
2102  case TEXTREF_CENTERFULL:
2103  position = _use2012version ? _customsmartlinedef2012.centerFullTextHoriz : _customsmartlinedef.centerFullTextHoriz;
2104  break;
2105  case TEXTREF_CENTERABBREVIATED:
2106  position = _use2012version ? _customsmartlinedef2012.centerAbbrTextHoriz : _customsmartlinedef.centerAbbrTextHoriz;
2107  break;
2108  }
2109  return position;
2110  }
2111 
2112 
2121  Evpu16 GetVerticalTextPos
2122  (
2123 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2125 #else
2126  int
2127 #endif
2128  reference)
2129  {
2130  twobyte position = 0;
2131  switch (reference)
2132  {
2133  case TEXTREF_LEFTSTART:
2134  position = _use2012version ? _customsmartlinedef2012.leftStartTextVert : _customsmartlinedef.leftStartTextVert;
2135  break;
2136  case TEXTREF_LEFTCONTINUATION:
2137  position = _use2012version ? _customsmartlinedef2012.leftContTextVert : _customsmartlinedef.leftContTextVert;
2138  break;
2139  case TEXTREF_RIGHTEND:
2140  position = _use2012version ? _customsmartlinedef2012.rightEndTextVert : _customsmartlinedef.rightEndTextVert;
2141  break;
2142  case TEXTREF_CENTERFULL:
2143  position = _use2012version ? _customsmartlinedef2012.centerFullTextVert : _customsmartlinedef.centerFullTextVert;
2144  break;
2145  case TEXTREF_CENTERABBREVIATED:
2146  position = _use2012version ? _customsmartlinedef2012.centerAbbrTextVert : _customsmartlinedef.centerAbbrTextVert;
2147  break;
2148  }
2149  return position;
2150  }
2151 
2152 
2162  (
2163 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2165 #else
2166  int
2167 #endif
2168  reference,
2169  Evpu16 position)
2170  {
2171  Evpu16* pPosition = NULL;
2172  switch (reference)
2173  {
2174  case TEXTREF_LEFTSTART:
2175  pPosition = _use2012version ? &_customsmartlinedef2012.leftStartTextHoriz : &_customsmartlinedef.leftStartTextHoriz;
2176  break;
2177  case TEXTREF_LEFTCONTINUATION:
2178  pPosition = _use2012version ? &_customsmartlinedef2012.leftContTextHoriz : &_customsmartlinedef.leftContTextHoriz;
2179  break;
2180  case TEXTREF_RIGHTEND:
2181  pPosition = _use2012version ? &_customsmartlinedef2012.rightEndTextHoriz : &_customsmartlinedef.rightEndTextHoriz;
2182  break;
2183  case TEXTREF_CENTERFULL:
2184  pPosition = _use2012version ? &_customsmartlinedef2012.centerFullTextHoriz : &_customsmartlinedef.centerFullTextHoriz;
2185  break;
2186  case TEXTREF_CENTERABBREVIATED:
2187  pPosition = _use2012version ? &_customsmartlinedef2012.centerAbbrTextHoriz : &_customsmartlinedef.centerAbbrTextHoriz;
2188  break;
2189  }
2190  if (pPosition) *pPosition = position;
2191  }
2192 
2193 
2202  void SetVerticalTextPos
2203  (
2204 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2206 #else
2207  int
2208 #endif
2209  reference,
2210  Evpu16 position)
2211  {
2212  Evpu16* pPosition = NULL;
2213  switch (reference)
2214  {
2215  case TEXTREF_LEFTSTART:
2216  pPosition = _use2012version ? &_customsmartlinedef2012.leftStartTextVert : &_customsmartlinedef.leftStartTextVert;
2217  break;
2218  case TEXTREF_LEFTCONTINUATION:
2219  pPosition = _use2012version ? &_customsmartlinedef2012.leftContTextVert : &_customsmartlinedef.leftContTextVert;
2220  break;
2221  case TEXTREF_RIGHTEND:
2222  pPosition = _use2012version ? &_customsmartlinedef2012.rightEndTextVert : &_customsmartlinedef.rightEndTextVert;
2223  break;
2224  case TEXTREF_CENTERFULL:
2225  pPosition = _use2012version ? &_customsmartlinedef2012.centerFullTextVert : &_customsmartlinedef.centerFullTextVert;
2226  break;
2227  case TEXTREF_CENTERABBREVIATED:
2228  pPosition = _use2012version ? &_customsmartlinedef2012.centerAbbrTextVert : &_customsmartlinedef.centerAbbrTextVert;
2229  break;
2230  }
2231  if (pPosition) *pPosition = position;
2232  }
2233 
2234 
2235 
2236 
2242  twobyte GetLineStyle() const
2243  {
2244  return _use2012version ? _customsmartlinedef2012.linetype : _customsmartlinedef.linetype;
2245  }
2246 
2252  Efix16 GetLineWidth() const
2253  {
2254  switch (GetLineStyle())
2255  {
2256  case CUSTOMLINE_SOLID:
2257  return _use2012version ? _customsmartlinedef2012.linedata.solid.lineWidth : _customsmartlinedef.linetypeinfo;
2258  case CUSTOMLINE_DASHED:
2259  return _use2012version ? _customsmartlinedef2012.linedata.dashed.lineWidth : _customsmartlinedef.linetypeinfo;
2260  }
2261  return 0;
2262  }
2263 
2271  twobyte GetStartArrowheadStyle() const
2272  {
2273  return _use2012version ? _customsmartlinedef2012.endpointstylestart : _customsmartlinedef.endpointstylestart;
2274  }
2275 
2283  twobyte GetEndArrowheadStyle() const
2284  {
2285  return _use2012version ? _customsmartlinedef2012.endpointstyleend : _customsmartlinedef.endpointstyleend;
2286  }
2287 
2296  {
2297  if (GetStartArrowheadStyle()!= CLENDPOINT_CUSTOM) return 0;
2298  return _use2012version ? _customsmartlinedef2012.startPointData : _customsmartlinedef.startarrowdataLo;
2299  }
2300 
2308  twobyte GetEndArrowheadShapeID() const
2309  {
2310  if (GetEndArrowheadStyle()!= CLENDPOINT_CUSTOM) return 0;
2311  return _use2012version ? _customsmartlinedef2012.endPointData : _customsmartlinedef.endarrowdataLo;
2312  }
2313 
2320  eUniChar32 GetLineCharacter() const
2321  {
2322  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return 0;
2323  return _use2012version ? _customsmartlinedef2012.linedata.character.lineChar : _customsmartlinedef.linetypeinfo;
2324  }
2325 
2336 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2338 #else
2339  int
2340 #endif
2341  reference)
2342  {
2343  twobyte rawtextnumber = GetRawStringNumber(reference);
2344  if (!rawtextnumber) return NULL;
2345  FCRawText rawtext;
2346  rawtext.SetCustomTag(tx_SmartShape);
2347  if (!rawtext.Load(rawtextnumber)) return NULL;
2348  return rawtext.CreateString();
2349  }
2350 
2351 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
2352 
2353  FCString* CreateTextString_GC(int reference);
2354 #endif
2355 
2356 
2368 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2370 #else
2371  int
2372 #endif
2373  reference, FCString* pString)
2374  {
2375  twobyte rawtextnumber = GetRawStringNumber(reference);
2376  if (!rawtextnumber) return false;
2377  FCRawText rawtext;
2378  rawtext.SetCustomTag(tx_SmartShape);
2379  rawtext.SetText(pString);
2380  return rawtext.SaveAs(rawtextnumber);
2381  }
2382 
2394 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2396 #else
2397  int
2398 #endif
2399  reference, FCString* pString)
2400  {
2401  if (!pString) return false;
2402  FCRawText rawtext;
2403  rawtext.SetCustomTag(tx_SmartShape);
2404  rawtext.SetText(pString);
2405  if (rawtext.SaveNew())
2406  {
2407  _SetRawStringNumber(reference, rawtext.GetItemNo());
2408  return true;
2409  }
2410  return false;
2411  }
2412 
2413 
2419  {
2420  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return 0;
2421  if (_use2012version)
2422  {
2423  return _customsmartlinedef2012.linedata.character.baselineShiftEMs;
2424  }
2425  else
2426  {
2427  return 0;
2428  }
2429  }
2430 
2435  void SetLineCharacterBaselineShift(twobyte baseline)
2436  {
2437  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2438  if (_use2012version)
2439  {
2440  _customsmartlinedef2012.linedata.character.baselineShiftEMs = baseline;
2441  }
2442  else
2443  {
2444  /* Nothing yet */
2445  }
2446  }
2447 
2453  {
2454  if (!pFontInfo) return;
2455  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2456  if (_use2012version)
2457  {
2458  pFontInfo->SetNameByID(_customsmartlinedef2012.linedata.character.font);
2459  pFontInfo->SetSize(_customsmartlinedef2012.linedata.character.size);
2460  pFontInfo->SetEnigmaStyles(_customsmartlinedef2012.linedata.character.efx);
2461  }
2462  else
2463  {
2464  pFontInfo->SetNameByID(_customsmartlinedef.fontID_length);
2465  pFontInfo->SetSize(_customsmartlinedef.fontsize_space);
2466  pFontInfo->SetEnigmaStyles(_customsmartlinedef.efx);
2467  }
2468  }
2469 
2475  {
2476  if (!pFontInfo) return;
2477  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2478  if (_use2012version)
2479  {
2480  _customsmartlinedef2012.linedata.character.font = pFontInfo->GetNameByID();
2481  _customsmartlinedef2012.linedata.character.size = pFontInfo->GetSize();
2482  _customsmartlinedef2012.linedata.character.efx = pFontInfo->GetEnigmaStyles();
2483  }
2484  else
2485  {
2486  _customsmartlinedef.fontID_length = pFontInfo->GetNameByID();
2487  _customsmartlinedef.fontsize_space = pFontInfo->GetSize();
2488  _customsmartlinedef.efx = pFontInfo->GetEnigmaStyles();
2489  }
2490  }
2491 
2496  bool GetHorizontal() const
2497  {
2498  if (_use2012version)
2499  {
2500  return GetBitFlag(_customsmartlinedef2012.flag, 0x0001);
2501  }
2502  else
2503  {
2504  /* Nothing yet */
2505  }
2506  return false;
2507  }
2508 
2514  void SetHorizontal(bool state)
2515  {
2516  if (_use2012version)
2517  {
2518  Set16BitFlag(&_customsmartlinedef2012.flag, 0x0001, state);
2519  }
2520  else
2521  {
2522  /* Nothing yet */
2523  }
2524  }
2525 
2528  {
2529  if (_use2012version)
2530  {
2531  Set16BitFlag(&_customsmartlinedef2012.flag, 0x0002, state);
2532  }
2533  else
2534  {
2535  /* Nothing yet */
2536  }
2537  }
2538 
2540  void SetAfterStartTextOffset(Evpu16 value)
2541  {
2542  if (_use2012version)
2543  {
2544  _customsmartlinedef2012.lineadjustStartHoriz = value;
2545  }
2546  else
2547  {
2548  /* Nothing yet */
2549  }
2550  }
2551 
2553  void SetUseBeforeEndTextOffset(bool state)
2554  {
2555  if (_use2012version)
2556  {
2557  Set16BitFlag(&_customsmartlinedef2012.flag, 0x0004, state);
2558  }
2559  else
2560  {
2561  /* Nothing yet */
2562  }
2563  }
2564 
2567  {
2568  if (_use2012version)
2569  {
2570  Set16BitFlag(&_customsmartlinedef2012.flag, 0x0008, state);
2571  }
2572  else
2573  {
2574  /* Nothing yet */
2575  }
2576  }
2577 
2579  void SetAfterContinuedTextOffset(Evpu16 value)
2580  {
2581  if (_use2012version)
2582  {
2583  _customsmartlinedef2012.lineadjustContinueHoriz = value;
2584  }
2585  else
2586  {
2587  /* Nothing yet */
2588  }
2589  }
2590 
2592  void SetLineVerticalOffset(twobyte value)
2593  {
2594  if (_use2012version)
2595  {
2596  /* Since the UI only supports one value, set both. */
2597  _customsmartlinedef2012.lineadjustStartVert = value;
2598  _customsmartlinedef2012.lineadjustEndVert = value;
2599  }
2600  else
2601  {
2602  /* Nothing yet */
2603  }
2604  }
2605 
2606 
2612  void SetLineStyle(twobyte value)
2613  {
2614  switch (value)
2615  {
2616  case CUSTOMLINE_SOLID:
2617  case CUSTOMLINE_DASHED:
2618  case CUSTOMLINE_CHARACTER:
2619  break;
2620  default:
2621  return;
2622  }
2623  if (_use2012version)
2624  _customsmartlinedef2012.linetype = value;
2625  else
2626  _customsmartlinedef.linetype = value;
2627  }
2628 
2634  void SetLineWidth(Efix16 value)
2635  {
2636  switch (GetLineStyle())
2637  {
2638  case CUSTOMLINE_SOLID:
2639  if (_use2012version)
2640  _customsmartlinedef2012.linedata.solid.lineWidth = value;
2641  else
2642  _customsmartlinedef.linetypeinfo = value;
2643  break;
2644  case CUSTOMLINE_DASHED:
2645  if (_use2012version)
2646  _customsmartlinedef2012.linedata.dashed.lineWidth = value;
2647  else
2648  _customsmartlinedef.linetypeinfo = value;
2649  break;
2650  }
2651  }
2652 
2653 
2659  Efix16 GetLineDashLength() const
2660  {
2661  if (GetLineStyle() != CUSTOMLINE_DASHED) return 0;
2662  if (_use2012version)
2663  return _customsmartlinedef2012.linedata.dashed.dashOn;
2664  else
2665  {
2666  /* Nothing yet */
2667  return 0;
2668  }
2669  return 0;
2670  }
2671 
2678  void SetLineDashLength(Efix16 value)
2679  {
2680  if (GetLineStyle() != CUSTOMLINE_DASHED) return;
2681  if (_use2012version)
2682  _customsmartlinedef2012.linedata.dashed.dashOn = value;
2683  else
2684  {
2685  /* Nothing yet */
2686  }
2687  }
2688 
2695  Efix16 GetLineDashSpace() const
2696  {
2697  if (GetLineStyle() != CUSTOMLINE_DASHED) return 0;
2698  if (_use2012version)
2699  return _customsmartlinedef2012.linedata.dashed.dashOff;
2700  else
2701  {
2702  /* Nothing yet */
2703  }
2704  return 0;
2705  }
2706 
2713  void SetLineDashSpace(Efix16 value)
2714  {
2715  if (GetLineStyle() != CUSTOMLINE_DASHED) return;
2716  if (_use2012version)
2717  _customsmartlinedef2012.linedata.dashed.dashOff = value;
2718  else
2719  {
2720  }
2721  }
2722 
2730  void SetStartArrowheadStyle(twobyte value)
2731  {
2732  switch (value)
2733  {
2734  case CLENDPOINT_NONE:
2735  case CLENDPOINT_PRESET:
2736  case CLENDPOINT_CUSTOM:
2737  case CLENDPOINT_HOOK:
2738  break;
2739  default:
2740  return;
2741  }
2742 
2743  if (_use2012version)
2744  _customsmartlinedef2012.endpointstylestart = value;
2745  else
2746  _customsmartlinedef.endpointstylestart = value;
2747  }
2748 
2756  void SetStartArrowheadShapeID(twobyte shapeID)
2757  {
2758  if (_use2012version)
2759  _customsmartlinedef2012.startPointData = shapeID;
2760  else
2761  _customsmartlinedef.startarrowdataLo = shapeID;
2762  }
2763 
2771  void SetEndArrowheadStyle(twobyte value)
2772  {
2773  switch (value)
2774  {
2775  case CLENDPOINT_NONE:
2776  case CLENDPOINT_PRESET:
2777  case CLENDPOINT_CUSTOM:
2778  case CLENDPOINT_HOOK:
2779  break;
2780  default:
2781  return;
2782  }
2783  if (_use2012version)
2784  _customsmartlinedef2012.endpointstyleend = value;
2785  else
2786  _customsmartlinedef.endpointstyleend = value;
2787  }
2788 
2795  Efix16 GetStartHookLength() const
2796  {
2797  if (GetStartArrowheadStyle() != CLENDPOINT_HOOK) return 0;
2798  if (_use2012version)
2799  return _customsmartlinedef2012.startPointData;
2800  else
2801  {
2802  /* Nothing yet */
2803  }
2804  return 0;
2805  }
2806 
2813  void SetStartHookLength(Efix16 value)
2814  {
2815  if (GetStartArrowheadStyle() != CLENDPOINT_HOOK) return;
2816  if (_use2012version)
2817  _customsmartlinedef2012.startPointData = value;
2818  else
2819  {
2820  /* Nothing yet */
2821  }
2822  }
2823 
2830  Efix16 GetEndHookLength() const
2831  {
2832  if (GetEndArrowheadStyle() != CLENDPOINT_HOOK) return 0;
2833  if (_use2012version)
2834  return _customsmartlinedef2012.endPointData;
2835  else
2836  {
2837  /* Nothing yet */
2838  }
2839  return 0;
2840  }
2841 
2847  void SetEndHookLength(Efix16 value)
2848  {
2849  if (GetEndArrowheadStyle() != CLENDPOINT_HOOK) return;
2850  if (_use2012version)
2851  _customsmartlinedef2012.endPointData = value;
2852  else
2853  {
2854  /* Nothing yet */
2855  }
2856  }
2857 
2865  void SetEndArrowheadShapeID(twobyte shapeID)
2866  {
2867  if (_use2012version)
2868  _customsmartlinedef2012.endPointData = shapeID;
2869  else
2870  _customsmartlinedef.endarrowdataLo = shapeID;
2871  }
2872 
2881  void SetLineCharacter(eUniChar32 character)
2882  {
2883  if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2884  if (_use2012version)
2885  _customsmartlinedef2012.linedata.character.lineChar = character;
2886  else
2887  _customsmartlinedef.linetypeinfo = character;
2888  }
2889 
2890 #ifdef PDK_FRAMEWORK_DEBUG
2891  virtual void DebugDump()
2892  {
2894  }
2895 #endif
2896 
2897 };
2898 
2899 
2900 
2907 {
2908 protected:
2909 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2910  virtual __FCBaseData* CreateElement() { return new FCSmartShapeMeasureMark(); }
2911 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2912 public:
2918 
2919  virtual const char* ClassName() { return "FCSmartShapeMeasureMarks"; }
2920 
2926  virtual int LoadAll();
2927 
2939  int LoadAllForRegion(FCMusicRegion* pRegion, bool removeduplicates = true);
2940 
2947  {
2948  for (int i = 0; i < GetCount() - 1; i++)
2949  {
2951 
2952  int j = GetCount() - 1;
2953  while (j > i)
2954  {
2956  if (pShapeMark2->GetShapeNumber() == pShapeMark1->GetShapeNumber())
2957  {
2958  ClearItemAt(j);
2959  }
2960  j--;
2961  }
2962  }
2963  }
2964 
2973  {
2974  int i = GetCount() - 1;
2975  while (i >= 0)
2976  {
2978  FCSmartShape* pSlur = pShapeMark->CreateSmartShape();
2979 
2980  if (pSlur)
2981  {
2982  if (!pSlur->IsSlur()) ClearItemAt(i);
2983  delete pSlur;
2984  }
2985  i--;
2986  }
2987  }
2988 
2997  {
2998  int i = GetCount() - 1;
2999  while (i >= 0)
3000  {
3002  FCSmartShape* pHairpin = pShapeMark->CreateSmartShape();
3003 
3004  if (!pHairpin->IsHairpin()) ClearItemAt(i);
3005  i--;
3006  delete pHairpin;
3007  }
3008  }
3009 
3018  {
3019  int i = GetCount() - 1;
3020  while (i >= 0)
3021  {
3023  FCSmartShape* pSmartshape = pShapeMark->CreateSmartShape();
3024 
3025  if (!pSmartshape->IsCustomLine()) ClearItemAt(i);
3026  i--;
3027  delete pSmartshape;
3028  }
3029  }
3030 
3038  {
3039  int i = GetCount() - 1;
3040  while (i >= 0)
3041  {
3043  FCSmartShape* pSmartShape = pShapeMark->CreateSmartShape();
3044 
3045  if (!pSystemStaves->FindStaff(pSmartShape->GetTerminateSegmentLeft()->GetStaff()) &&
3046  !pSystemStaves->FindStaff(pSmartShape->GetTerminateSegmentRight()->GetStaff()))
3047  {
3048  ClearItemAt(i);
3049  }
3050  i--;
3051  delete pSmartShape;
3052  }
3053  }
3054 
3060  void KeepStaffOnly(twobyte staffno)
3061  {
3062  int i = GetCount() - 1;
3063  while (i >= 0)
3064  {
3066  FCSmartShape* pSmartShape = pShapeMark->CreateSmartShape();
3067 
3068  if ((pSmartShape->GetTerminateSegmentLeft()->GetStaff() != staffno) &&
3069  (pSmartShape->GetTerminateSegmentRight()->GetStaff() != staffno))
3070  {
3071  ClearItemAt(i);
3072  }
3073  i--;
3074  delete pSmartShape;
3075  }
3076  }
3077 
3083  {
3084  for (int i = 0; i < GetCount() - 1; i++)
3085  {
3087  if (pShapeMark->GetShapeNumber() == cmperSmartShape) return pShapeMark;
3088  }
3089  return NULL;
3090  }
3091 
3097 };
3098 
3099 
3100 
3106 {
3107 protected:
3108 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3109  virtual __FCBaseData* CreateElement() { return new FCSmartShapeEntryMark(); }
3110 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3111 public:
3112  virtual const char* ClassName() { return "FCSmartShapeEntryMarks"; }
3113 
3120  FCSmartShapeEntryMarks(FCNoteEntry* pConnectEntry = NULL) :
3121  __FCCollectionEntryDetail(pConnectEntry) {}
3122 
3128 };
3129 
3130 
3131 
3138 {
3139 protected:
3140 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3141  virtual __FCBaseData* CreateElement() { return new FCCustomSmartLineDef(); }
3142 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3143 public:
3149 
3150  virtual const char* ClassName() { return "FCCustomSmartLineDefs"; }
3151 
3158 };
3159 
3160 
3161 
3162 
3168 {
3169 protected:
3170 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3171  virtual __FCBaseData* CreateElement() { return new FCSmartShape(); }
3172 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3173 public:
3174  virtual const char* ClassName() { return "FCSmartShapes"; }
3175 
3182  {
3183  for (int i = 0; i < GetCount(); i++)
3184  {
3185  FCSmartShape* pSmartShape = (FCSmartShape*) GetItemAt(i);
3186  if (!pSmartShape->IsEntryBased()) continue;
3187  if (pSmartShape->GetTerminateSegmentLeft()->GetEntryNumber() == entnum)
3188  {
3189  return pSmartShape;
3190  }
3191  }
3192  return NULL;
3193  }
3194 
3195 };
3196 
3197 #endif /* PDK_FRAMEWORK_SMARTSHAPES */
3198 
3199 #endif /* FF_SMARTSHAPES_H */
3200 
virtual bool SaveNew()
Overridden version of the creation of smart shapes, since the smart shape data has special requiremen...
Definition: finaleframework.cpp:30336
Collection class for FCSmartShapeEntryMark class objects.
Definition: ff_smartshapes.h:3105
Collection class for FCCustomSmartLineDef class objects.
Definition: ff_smartshapes.h:3137
__FCBase * GetItemAt(int index)
Returns the object at the index position. Index is 0-based.
Definition: finaleframework.cpp:12797
void SetControlPoint2OffsetX(twobyte value)
Sets the horizontal offset for the second control point (for slurs).
Definition: ff_smartshapes.h:650
twobyte GetBreakOffsetX() const
Returns the horizontal break offset.
Definition: ff_smartshapes.h:580
FCCustomSmartLineDef()
The constructor. It sets the _use2012version flag.
Definition: finaleframework.cpp:30401
Definition: ff_smartshapes.h:988
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:918
Class for document-independent font information.
Definition: ff_base.h:1024
int LoadAllForRegion(FCMusicRegion *pRegion, bool removeduplicates=true)
Load all smart shape measure marks that are within the region (both start and end points)...
Definition: finaleframework.cpp:30112
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:408
twobyte GetEndArrowheadShapeID() const
Returns the (custom) shape ID for the end arrowhead, if a shape is used.
Definition: ff_smartshapes.h:2308
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_entrydetails.h:171
Definition: ff_smartshapes.h:1000
void SetVerticalTextPos(TEXT_REFERENCE reference, Evpu16 position)
Sets the vertical position for one of the attached text blocks.
Definition: ff_smartshapes.h:2203
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_smartshapes.h:220
FCSmartShape * CreateSmartShape(bool load_center_shapes)
Creates the full FCSmartShape object based of the smart shape measure mark.
Definition: finaleframework.cpp:29999
Simple class for the representation of x, y coordinates.
Definition: ff_base.h:3906
void SetEntryAttachedFlags(bool presetshape)
Configures the smart shape as an entry-attached shape.
Definition: ff_smartshapes.h:1433
void _LoadCenterShapes()
For internal use. Called by FCSmartShapeMeasureMark::CreateSmartShape.
Definition: finaleframework.cpp:30240
void ClearAll()
Destroys all the objects in the collection and empties the collection.
Definition: ff_basecollection.h:130
void SetEndpointOffsetY(twobyte value)
Sets the vertical offset, compared to the measure attachment position.
Definition: ff_smartshapes.h:629
Definition: ff_smartshapes.h:1009
Abstract data class that contains a detail record without using the inci.
Definition: ff_details.h:23
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_smartshapes.h:448
ENTNUM GetEntryNumber() const
Returns the internal entry number (ID) for the note entry.
Definition: ff_noteframe.h:1059
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 IsCustomLine()
Returns true if the shape is a smartshape created with the Custom Line Tool.
Definition: ff_smartshapes.h:1731
void SetShapeNumber(CMPER value)
Sets the shape number.
Definition: ff_smartshapes.h:247
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:470
FCCustomSmartLineDef * GetItemAt(int index)
Overridden GetItemAt() method.
Definition: ff_smartshapes.h:3156
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_basecollection.h:309
void SetStaff(twobyte staff)
Sets the staff of the end point segment.
Definition: ff_smartshapes.h:592
Definition: ff_smartshapes.h:1015
void SetLineID(twobyte identifier)
Returns the line style ID for custom smart shape lines.
Definition: ff_smartshapes.h:1365
twobyte _GetRightSideNoteID() const
Definition: ff_smartshapes.h:1155
Definition: ff_smartshapes.h:1018
Definition: ff_smartshapes.h:991
void SetControlPoint1OffsetX(twobyte value)
Sets the first horizontal control point.
Definition: ff_smartshapes.h:786
Definition: ff_smartshapes.h:1057
bool IsOverSlur()
Returns true if the smart shape is an "over" slur (solid or dashed).
Definition: ff_smartshapes.h:1573
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:287
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:1783
FCString * CreateTextString(TEXT_REFERENCE reference)
Creates a text string object of the indicated position text.
Definition: ff_smartshapes.h:2335
SMARTSHAPE_TYPES
The smart shape types.
Definition: ff_smartshapes.h:961
void SetEntry(FCNoteEntry *pEntry)
Connects the entry number to the smart shape end point and sets the smart shape flag for the entry...
Definition: ff_smartshapes.h:690
void SetLineCharacter(eUniChar32 character)
Sets the character used for character lines.
Definition: ff_smartshapes.h:2881
Class that contains data that appears in the middle of a long smart shape. This class is normally lin...
Definition: ff_smartshapes.h:418
bool ClearItemAt(int index)
Deletes the object at the index position and disposes the object. Index is 0-based.
Definition: finaleframework.cpp:12821
TEXT_REFERENCE
Constant used to reference the different text positions in this class' methods.
Definition: ff_smartshapes.h:1919
Definition: ff_smartshapes.h:1003
Definition: ff_smartshapes.h:994
bool IsUnderSlur()
Returns true if the smart shape is an "under" slur (solid or dashed).
Definition: ff_smartshapes.h:1590
bool IsTwoHooks()
Returns true if the smart shape is an predefined line with hooks on both left and right sides (solid ...
Definition: ff_smartshapes.h:1608
Definition: ff_smartshapes.h:997
void SetControlPoint2OffsetY(twobyte value)
Sets the vertical offset for the second control point (for slurs).
Definition: ff_smartshapes.h:656
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:29969
void DeleteEverything()
Deletes the internal smartshape data, the center shapes and the smartshape marks. ...
Definition: finaleframework.cpp:30273
Definition: ff_smartshapes.h:964
twobyte GetEndpointOffsetX() const
Returns the horizontal offset compared to the measure attachment position.
Definition: ff_smartshapes.h:543
Base class for "other" data with incis of the __FCInciOther class (where it's common to collect all i...
Definition: ff_basecollection.h:606
void _SetCenterShapeNumber(CMPER value)
This method is normally not used directly.
Definition: ff_smartshapes.h:250
bool GetPresetShape() const
Returns if the shape is preset or custom.
Definition: ff_smartshapes.h:1227
Efix16 GetLineDashLength() const
Returns the line dash length for solid and dashed lines, in EFIXes.
Definition: ff_smartshapes.h:2659
void SetSlurShapeUndetermined()
Helper method to mark that the slur shape direction is undetermined.
Definition: ff_smartshapes.h:863
Definition: ff_smartshapes.h:973
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag in the data block.
Definition: finaleframework.cpp:573
void SetLineStyle(twobyte value)
Sets the line style to any of these constants: CUSTOMLINE_SOLID, CUSTOMLINE_DASHED, CUSTOMLINE_CHARACTER.
Definition: ff_smartshapes.h:2612
Definition: ff_smartshapes.h:1081
bool IsDashedSlur()
Returns true if the smart shape is a dashed slur (introduced in Finale 25).
Definition: ff_smartshapes.h:1691
twobyte GetControlPoint2OffsetX() const
Gets the second horizontal control point.
Definition: ff_smartshapes.h:764
void SetDefaultHairpinSize()
Helper method to set the hairpin size to it's unmodified gap size.
Definition: ff_smartshapes.h:876
Definition: ff_smartshapes.h:1069
Definition: ff_smartshapes.h:982
void KeepHairpinsOnly()
Keeps only the hairpins in the collection.
Definition: ff_smartshapes.h:2996
bool Load(twobyte number)
Loads the text with the indicated text number.
Definition: finaleframework.cpp:3865
void SetHorizontal(bool state)
Sets if the shape should only be allowed to be horizontal or not.
Definition: ff_smartshapes.h:2514
bool CalcRightMark()
Returns true if the mark is the end (right-most) of the smart shape.
Definition: finaleframework.cpp:30034
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition: ff_base.h:60
void SetLineCharacterFontInfo(FCFontInfo *pFontInfo)
Sets the font information for a character line.
Definition: ff_smartshapes.h:2474
Helper class for FCSmartShape. This class is only constructed indirectly by the FCSmartShape.GetCtrlPointAdjust method.
Definition: ff_smartshapes.h:729
Evpu16 GetHorizontalTextPos(TEXT_REFERENCE reference)
Returns the horizontal position for one of the attached text blocks.
Definition: ff_smartshapes.h:2082
Definition: ff_smartshapes.h:1087
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition: finaleframework.cpp:753
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_smartshapes.h:335
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
FCSmartShape * FindLeftEntryNumber(ENTNUM entnum)
Tries to find a smart shape that is attached to the indicated entry number.
Definition: ff_smartshapes.h:3181
FCCustomSmartLineDefs()
The constructor.
Definition: ff_smartshapes.h:3148
void _ClearCenterShapes()
For internal use.
Definition: ff_smartshapes.h:1173
FCSmartShapeMeasureMark * FindSmartShapeMarkByID(CMPER cmperSmartShape)
Returns the smart shape mark that references the smart shape ID.
Definition: ff_smartshapes.h:3082
void SetLineWidth(Efix16 value)
Sets the line width for solid and dashed lines.
Definition: ff_smartshapes.h:2634
Definition: ff_smartshapes.h:1036
void SetUseAfterContinuedTextOffset(bool state)
Sets if the shape line should use the horizontal "after contined" text adjustment setting...
Definition: ff_smartshapes.h:2566
Base class for the "Other" (ot_*) Enigma structures that don't use the inci parameter.
Definition: ff_other.h:212
The class for raw text objects. All other text classes are based on this class, but it can also be us...
Definition: ff_text.h:16
TimeEdu32 GetMeasurePos() const
Returns the measure position, for measure-attached data.
Definition: ff_smartshapes.h:528
bool IsTabSlide()
Returns true if the shape is a tab slide.
Definition: ff_smartshapes.h:1712
FCSmartShapeEntryMark * GetItemAt(int index)
Overloaded GetItemAt() method.
Definition: ff_smartshapes.h:3127
twobyte GetLineStyle() const
Returns any of these constants: CUSTOMLINE_SOLID, CUSTOMLINE_DASHED, CUSTOMLINE_CHARACTER.
Definition: ff_smartshapes.h:2242
SMARTSHAPE_3STATE GetAvoidAccidentals() const
Gets the 'avoid accidentals' setting to any of the auto/on/off states.
Definition: ff_smartshapes.h:1330
FCSmartShapeSegment(__SSTERMSEG *pSeg, FCSmartShape *pReference, bool leftsidesegment)
The constructor. Called by the FCSmartShape class.
Definition: ff_smartshapes.h:498
bool SaveAs(twobyte number)
Saves the text by a new text number.
Definition: finaleframework.cpp:3902
void SetEntryNumber(ENTNUM value)
Sets the note entry reference number for the end connection point.
Definition: ff_smartshapes.h:676
void SetShapeNumber(CMPER value)
Sets the connected smart shape number/ID.
Definition: ff_smartshapes.h:388
twobyte GetControlPoint2OffsetY() const
Gets the second vertical control point.
Definition: ff_smartshapes.h:770
void SetPresetShape(bool value)
Returns if the shape is preset or custom.
Definition: ff_smartshapes.h:1356
void SetLineDashLength(Efix16 value)
Sets the line dash length for dashed lines, in EFIXes.
Definition: ff_smartshapes.h:2678
void SetLineVerticalOffset(twobyte value)
Sets the vertical position adjustment for lines.
Definition: ff_smartshapes.h:2592
twobyte GetStartArrowheadShapeID() const
Returns the (custom) shape ID for the start arrowhead, if a shape is used.
Definition: ff_smartshapes.h:2295
void SetVisible(bool visible)
Sets the visibility state of the smart shape.
Definition: ff_smartshapes.h:1386
void SetMeasurePos(TimeEdu32 edupos)
Sets the measure position, for measure-attached data.
Definition: ff_smartshapes.h:610
Class for smartshape assignments/connections to an entry.
Definition: ff_smartshapes.h:305
void SetSize(twobyte fontsize)
Sets the font size as an integer value.
Definition: ff_base.h:1306
twobyte GetStartArrowheadStyle() const
Returns the style of the start arrowhead.
Definition: ff_smartshapes.h:2271
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets a 32 bit flag in the data block.
Definition: finaleframework.cpp:581
Definition: ff_smartshapes.h:1066
twobyte GetControlPoint1OffsetY() const
Sets the first vertical control point.
Definition: ff_smartshapes.h:756
void SetHairpinFlags()
Configures the basic smart shape flags required for a hairpin.
Definition: ff_smartshapes.h:1422
ENTNUM GetEntryNumber() const
Returns the note entry number, for entry-attached data.
Definition: ff_smartshapes.h:534
Base class for "other" data without incis (inci always 0.)
Definition: ff_basecollection.h:681
Definition: ff_smartshapes.h:1030
SMARTSHAPE_3STATE GetEngraverSlur() const
Returns the engraver slur state for the slur.
Definition: ff_smartshapes.h:1309
void SetCustomTag(EXTAG tag)
Sets the custom Enigma tag, for classes that support multiple Enigma tags.
Definition: ff_base.h:827
Definition: ff_smartshapes.h:1078
SMARTSHAPE_TYPES GetShapeType() const
Returns the smart shape style (any of the SMARTSHAPE_TYPES constants).
Definition: ff_smartshapes.h:1215
bool IsEntryBased()
Returns true if the smart shape is entry-based.
Definition: ff_smartshapes.h:1740
Base class specially designed for collections of entry detail classes.
Definition: ff_basecollection.h:537
void SetAfterStartTextOffset(Evpu16 value)
Sets the horizontal "after start" text adjustment setting.
Definition: ff_smartshapes.h:2540
void _SetLeftSideNoteID(twobyte noteID)
Definition: ff_smartshapes.h:1161
int GetCount() const
Returns the number of elements of the collection.
Definition: ff_basecollection.h:86
virtual bool DeepDeleteData()
Overridden version of DeepDeleteData(). It deletes the text strings as well as the data...
Definition: finaleframework.cpp:30417
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
bool CalcLeftEntryMetricPos(FCNoteEntry *pEntry, FCPoint *pPoint)
Calculates the left-side metrics position for a note-attached smart shape.
Definition: finaleframework.cpp:30214
twobyte GetNameByID()
Gets the internal Enigma font ID. This value is document-specific.
Definition: finaleframework.cpp:3297
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:734
bool IsGlissando()
Returns true if the shape is a glissando.
Definition: ff_smartshapes.h:1721
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:219
FCString * CreateString()
Creates a string object with the loaded text. If the string doesn't exist (or if it's empty)...
Definition: finaleframework.cpp:3949
virtual void * Allocate()=0
twobyte GetRawStringNumber(TEXT_REFERENCE reference)
Returns the raw string number for one of the attached text blocks.
Definition: ff_smartshapes.h:2043
void SetMakeHorizontal(bool state)
Sets the state of the "make horizontal" flag.
Definition: ff_smartshapes.h:1371
bool GetBeatAttached() const
On Finale 2014 and above, returns if the end points are beat-attached or not.
Definition: finaleframework.cpp:30179
Definition: ff_smartshapes.h:1051
void SetAvoidAccidentals(SMARTSHAPE_3STATE state)
Sets the 'avoid accidentals' setting to any of the auto/on/off states.
Definition: ff_smartshapes.h:1519
FCSmartShapeEntryMark()
The constructor.
Definition: ff_smartshapes.h:351
virtual twobyte GetItemNo() const
Gets the item number for the text.
Definition: ff_text.h:97
void SetDefaultSlurShape()
Helper method to set the slur arc to it's default shape.
Definition: ff_smartshapes.h:889
bool SaveNewTextString(TEXT_REFERENCE reference, FCString *pString)
Saves a text string to a new text position block.
Definition: ff_smartshapes.h:2393
void SetAfterContinuedTextOffset(Evpu16 value)
Sets the horizontal "after continued" text adjustment setting.
Definition: ff_smartshapes.h:2579
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:3174
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_details.h:43
void SetUseAfterStartTextOffset(bool state)
Sets if the shape line should use the horizontal "after start" text adjustment setting.
Definition: ff_smartshapes.h:2527
bool CalcLeftCellMetricPos(FCPoint *pPoint)
Calculates the left-side metrics position for measure-attached smart shape.
Definition: finaleframework.cpp:30188
twobyte GetControlPoint1OffsetX() const
Returns the horizontal offset for the first control point (for slurs).
Definition: ff_smartshapes.h:556
FCSmartShapeMeasureMark()
The constructor.
Definition: ff_smartshapes.h:236
void SetStartArrowheadStyle(twobyte value)
Sets the style of the start arrowhead.
Definition: ff_smartshapes.h:2730
void SetCustomOffset(bool rightside)
Sets the required flags for a custom positioned end segment position.
Definition: ff_smartshapes.h:709
FCSmartShapeMeasureMark * GetItemAt(int index)
Overloaded GetItemAt() method.
Definition: ff_smartshapes.h:3096
CMPER GetShapeNumber() const
Gets the smart shape number/ID.
Definition: ff_smartshapes.h:394
void SetStartHookLength(Efix16 value)
Sets the start hook length if the end arrowhead styles has been set to hook. The value is in EFIXes...
Definition: ff_smartshapes.h:2813
bool GetHorizontal() const
Returns if the shape should only be allowed to be horizontal or not.
Definition: ff_smartshapes.h:2496
Definition: ff_smartshapes.h:1012
Evpu16 GetVerticalTextPos(TEXT_REFERENCE reference)
Returns the vertical position for one of the attached text blocks.
Definition: ff_smartshapes.h:2122
FCSmartShape()
The constructor.
Definition: ff_smartshapes.h:1122
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_other.h:331
void SetBreakOffsetY(twobyte value)
Sets the vertical break offset.
Definition: ff_smartshapes.h:668
void SetBreakOffsetX(twobyte value)
Sets the horizontal break offset.
Definition: ff_smartshapes.h:662
twobyte GetLineID() const
Returns the line style ID for custom smart shapes.
Definition: ff_smartshapes.h:1296
Efix16 GetLineDashSpace() const
Returns the line dash length for dashed lines, in EFIXes.
Definition: ff_smartshapes.h:2695
void SetCustomShaped(bool flag)
Sets that the shape is custom adjusted, such as if the hairpin should use a custom opening size...
Definition: ff_smartshapes.h:825
Efix16 GetLineWidth() const
Returns the line width for solid and dashed lines.
Definition: ff_smartshapes.h:2252
Base class for the Finale Framework classes.
Definition: ff_base.h:47
CMPER GetShapeNumber() const
Gets the smart shape number.
Definition: ff_smartshapes.h:256
bool GetCustomShaped() const
Returns true if the shape is custom adjusted, for example if a hairpin use a custom opening size...
Definition: ff_smartshapes.h:777
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_smartshapes.h:1106
void KeepStaffOnly(twobyte staffno)
Keeps only the smartshapes that are referenced within one specific staff.
Definition: ff_smartshapes.h:3060
Definition: ff_smartshapes.h:1063
twobyte GetMeasure() const
Returns the attached measure.
Definition: ff_smartshapes.h:266
void GetLineCharacterFontInfo(FCFontInfo *pFontInfo)
Gets the font information for a character line.
Definition: ff_smartshapes.h:2452
void SetEndArrowheadShapeID(twobyte shapeID)
Sets the (custom) shape ID for the end arrowhead.
Definition: ff_smartshapes.h:2865
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:2007
twobyte GetNoteID() const
Returns the note ID for the smart shape segment.
Definition: finaleframework.cpp:29949
FCCenterSmartShape()
The constructor.
Definition: ff_smartshapes.h:461
Definition: ff_smartshapes.h:1048
Collection class for FCSystemStaff class objects, which contains the list of staves available within ...
Definition: ff_othercollection.h:511
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
FCSmartShapeCtrlPointAdjust * GetCtrlPointAdjust()
Returns the object that controls the shape of the smart shape.
Definition: ff_smartshapes.h:1264
FCSmartShapeSegment * GetTerminateSegmentRight()
Returns the object pointer for the terminating right-side end segment.
Definition: ff_smartshapes.h:1253
twobyte GetControlPoint1OffsetX() const
Gets the first horizontal control point.
Definition: ff_smartshapes.h:750
Definition: ff_smartshapes.h:1075
void SetNoteID(twobyte noteID)
Sets the note ID for the segment.
Definition: finaleframework.cpp:29958
void SetStartArrowheadShapeID(twobyte shapeID)
Sets the (custom) shape ID for the start arrowhead.
Definition: ff_smartshapes.h:2756
Base class for all data-related classes (that handles Finale data).
Definition: ff_base.h:628
twobyte GetSize() const
Returns the font size as an integer number.
Definition: ff_base.h:1115
twobyte GetBreakOffsetY() const
Returns the vertical break offset.
Definition: ff_smartshapes.h:586
twobyte GetControlPoint1OffsetY() const
Returns the vertical offset for the first control point (for slurs).
Definition: ff_smartshapes.h:562
bool IsSolidSlur()
Returns true if the smart shape is a solid (non-dashed) slur.
Definition: ff_smartshapes.h:1651
bool IsAutoSlur()
Returns true if the smart shape is an "auto" slur (solid or dashed).
Definition: ff_smartshapes.h:1556
void SetHorizontalTextPos(TEXT_REFERENCE reference, Evpu16 position)
Sets the horizontal position for one of the attached text blocks.
Definition: ff_smartshapes.h:2162
void SetControlPoint2OffsetX(twobyte value)
Sets the second horizontal control point.
Definition: ff_smartshapes.h:806
bool GetMaintainAngle() const
Returns the flag that determines how the how the y value is interpreted on SmartShape system breaks...
Definition: ff_smartshapes.h:1284
Definition: ff_smartshapes.h:1027
Definition: ff_smartshapes.h:979
void SetNameByID(twobyte id)
Sets the font name by using the document's internal Enigma font ID.
Definition: finaleframework.cpp:3330
void SetBeatAttached(bool state)
On Finale 2014 and above, it will define if the end points should be beat-attached. If the end point is beat-attached, the horizontal offset will be relative to the anchor point.
Definition: finaleframework.cpp:30170
twobyte GetEndpointOffsetY() const
Returns the vertical offset compared to the measure attachment position.
Definition: ff_smartshapes.h:550
Definition: ff_smartshapes.h:1060
eUniChar32 GetLineCharacter() const
Returns the character used for character lines.
Definition: ff_smartshapes.h:2320
void SetMeasure(twobyte measureno)
Sets the measure number for the smart shape end point.
Definition: ff_smartshapes.h:598
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.
Definition: ff_smartshapes.h:985
Definition: ff_smartshapes.h:1072
Base class for "other" (ot_*) data with incis.
Definition: ff_other.h:59
bool CalcRightCellMetricPos(FCPoint *pPoint)
Calculates the right-side metrics position for measure-attached smart shape.
Definition: finaleframework.cpp:30201
void SetMeasureAttachedFlags(bool presetshape, bool makehorizontal)
Configures the smart shape flags as a measure-attached shape.
Definition: finaleframework.cpp:30154
bool SaveTextString(TEXT_REFERENCE reference, FCString *pString)
Resaves a text string to an already existing text position block.
Definition: ff_smartshapes.h:2367
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:2891
void SetShapeType(SMARTSHAPE_TYPES shapevalue)
Sets the smart shape style.
Definition: ff_smartshapes.h:1344
void SetMaintainAngle(bool state)
Sets the flag that determines how the how the y value is interpreted on SmartShape system breaks...
Definition: ff_smartshapes.h:1380
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition: ff_base.h:657
void SetControlPoint1OffsetY(twobyte value)
Sets the vertical offset for the first control point (for slurs).
Definition: ff_smartshapes.h:644
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
virtual twobyte CalcLastInci()
For internal use only!
Definition: ff_base.h:700
void SetControlPoint2OffsetY(twobyte value)
Sets the second vertical control point.
Definition: ff_smartshapes.h:815
Encapsulates a note entry from an owner class (for example FCNoteEntryCell, FCNoteEntryLayer) class...
Definition: ff_noteframe.h:808
void SetEndArrowheadStyle(twobyte value)
Returns the style of the end arrowhead.
Definition: ff_smartshapes.h:2771
Definition: ff_smartshapes.h:1033
Definition: ff_smartshapes.h:1042
Definition: ff_smartshapes.h:970
void SetEntryBased(bool value)
Sets if the smart shape is a note entry-connected shape or not.
Definition: ff_smartshapes.h:1392
Base class that provides the basic functionality for entry detail data (such as Special Tools modific...
Definition: ff_entrydetails.h:25
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:495
A record that represents a smart shape in the score. It's connected to a score through FCSmartShapeMe...
Definition: ff_smartshapes.h:925
twobyte GetMeasure() const
Returns the measure of the end point segment.
Definition: ff_smartshapes.h:516
bool GetEntryBased() const
Returns true if the smart shape is a note entry-connected shape.
Definition: ff_smartshapes.h:1221
void SetControlPoint1OffsetX(twobyte value)
Sets the horizontal offset for the first control point (for slurs).
Definition: ff_smartshapes.h:638
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:1105
bool IsHairpin()
Returns true if the smart shape is a hairpin.
Definition: ff_smartshapes.h:1549
The class for a custom smart shape lines.
Definition: ff_smartshapes.h:1911
void SetUseBeforeEndTextOffset(bool state)
Sets if the shape line should use the horizontal "before end" text adjustment setting.
Definition: ff_smartshapes.h:2553
bool IsWithinRegion(FCMusicRegion *pRegion)
Returns true if the full smart shape is within the region (both vertically and horizontally.)
Definition: finaleframework.cpp:30262
Class that encapsulates EREGION and provides additional functionality to region handling.
Definition: ff_region.h:24
twobyte GetControlPoint2OffsetX() const
Returns the horizontal offset for the second control point (for slurs).
Definition: ff_smartshapes.h:568
void SetControlPoint1OffsetY(twobyte value)
Sets the first vertical control point.
Definition: ff_smartshapes.h:795
Collection class for FCSmartShapeMeasureMark class objects.
Definition: ff_smartshapes.h:2906
virtual EXTAG Tag()=0
The Enigma tag for the derived class.
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:3150
Definition: ff_smartshapes.h:1054
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_smartshapes.h:895
void SetSmartShapeFlag(bool state)
Sets the flag that marks that a smart shape is attached to the entry.
Definition: ff_noteframe.h:1312
Definition: ff_smartshapes.h:976
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_smartshapes.h:2008
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:447
FCSmartShapeMeasureMarks()
The constructor.
Definition: ff_smartshapes.h:2917
CMPER _GetCenterShapeNumber()
Returns the CMPER for the middle measures of a smart shape. This method is normally not used directly...
Definition: ff_smartshapes.h:260
void SetEndpointOffsetX(twobyte value)
Sets the horizontal offset, compared to the measure attachment position.
Definition: ff_smartshapes.h:621
bool GetVisible() const
Returns the visibility state of the smart shape.
Definition: ff_smartshapes.h:1290
Class for smartshape assignments to a measure.
Definition: ff_smartshapes.h:190
void RemoveDuplicateReferences()
Removes any duplicate measure marks that reference the same smartshape.
Definition: ff_smartshapes.h:2946
Definition: ff_smartshapes.h:1045
FLAG_16 GetEnigmaStyles() const
Gets the font style as standard Enigma bit storage.
Definition: ff_base.h:1164
void KeepCustomLinesOnly()
Keeps only the custom lines in the collection.
Definition: ff_smartshapes.h:3017
bool IsDashedCurve()
Returns true if the smart shape is a dashed curve. (This does not include the new dashed slur type in...
Definition: ff_smartshapes.h:1671
bool CalcRightEntryMetricPos(FCNoteEntry *pEntry, FCPoint *pPoint)
Calculates the right-side metrics position for a note-attached smart shape.
Definition: finaleframework.cpp:30227
Efix16 GetStartHookLength() const
Returns the start hook length if the end arrowhead styles has been set to hook. The value is in EFIXe...
Definition: ff_smartshapes.h:2795
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:334
void _SetRightSideNoteID(twobyte noteID)
Definition: ff_smartshapes.h:1167
Collection class for FCSmartShape class objects.
Definition: ff_smartshapes.h:3167
FCSmartShape * CreateSmartShape(bool load_center_shapes=true)
Creates a full smart shape object, including the middle sections.
Definition: finaleframework.cpp:30069
bool SaveNewEverything(FCNoteEntry *pFirstEntry=NULL, FCNoteEntry *pLastEntry=NULL)
Saves all structures required for smart shapes.
Definition: finaleframework.cpp:30344
twobyte GetStaff() const
Returns the staff of the end point segment.
Definition: ff_smartshapes.h:510
void SetLineDashSpace(Efix16 value)
Sets the line dash length for dashed lines, in EFIXes.
Definition: ff_smartshapes.h:2713
bool SaveNew()
Saves the text at the first empty spot.
Definition: finaleframework.cpp:3909
Definition: ff_smartshapes.h:1024
void SetEngraverSlur(SMARTSHAPE_3STATE state)
Sets the engraver slur setting to any of the auto/on/off states.
Definition: ff_smartshapes.h:1487
FCSmartShapeEntryMarks(FCNoteEntry *pConnectEntry=NULL)
The constructor.
Definition: ff_smartshapes.h:3120
void SetSlurShapeUnder()
Helper method to mark that the slur shape goes down.
Definition: ff_smartshapes.h:850
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:2919
virtual int LoadAll()
Overloaded method that loads the smart shapes measure marks for the whole document.
Definition: finaleframework.cpp:30098
void SetText(FCString *pString)
Sets the text for the object. (The object needs to be saved to Finale to take effect.)
Definition: finaleframework.cpp:3916
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_smartshapes.h:3112
virtual int DataSizeLoad()=0
Returns the data size for the data structure that should be loaded.
bool IsSlur()
Returns true if the smart shape is a slur (solid or dashed).
Definition: ff_smartshapes.h:1626
void SetEndHookLength(Efix16 value)
Sets the end hook length if the end arrowhead styles has been set to hook. The value is in EFIXes...
Definition: ff_smartshapes.h:2847
void SetSlurFlags(bool entrybased)
Configures the basic smart shape flags required for a slur.
Definition: ff_smartshapes.h:1402
twobyte GetLineCharacterBaselineShift() const
Returns the vertical adjustment value for characters on a character line. In EMs. ...
Definition: ff_smartshapes.h:2418
void AssignToStaff(int newstaff)
Assigns the end points of a smart shape to a staff.
Definition: finaleframework.cpp:30330
twobyte _GetLeftSideNoteID() const
Definition: ff_smartshapes.h:1149
Definition: ff_smartshapes.h:1090
void KeepSystemStavesOnly(FCSystemStaves *pSystemStaves)
Keeps only the smartshapes within the supplied system staves.
Definition: ff_smartshapes.h:3037
Definition: ff_smartshapes.h:1021
bool CalcLeftMark()
Returns true if the mark is the start (left-most) of the smart shape.
Definition: finaleframework.cpp:30026
FCSmartShapeCtrlPointAdjust(__SSCTLPTADJ *pCtrlPointAdj, FCSmartShape *pReference)
The constructor. Set up by FCSmartShape.
Definition: ff_smartshapes.h:737
twobyte GetEndArrowheadStyle() const
Returns the style of the end arrowhead.
Definition: ff_smartshapes.h:2283
twobyte GetControlPoint2OffsetY() const
Returns the vertical offset for the second control point (for slurs).
Definition: ff_smartshapes.h:574
void SetLineCharacterBaselineShift(twobyte baseline)
Sets the vertical adjustment value for characters on a character line. In EMs.
Definition: ff_smartshapes.h:2435
Helper class for FCSmartShape, controlling the end points of a smart shape. This class is only constr...
Definition: ff_smartshapes.h:489
SMARTSHAPE_3STATE
An enum used for the methods that need a 3-state auto/on/off.
Definition: ff_smartshapes.h:1098
Definition: ff_smartshapes.h:1006
virtual EVERSION EnigmaVersion()
The Enigma version for save/load/create/delete operations.
Definition: ff_base.h:757
void KeepSlursOnly()
Keeps only the slurs in the collection.
Definition: ff_smartshapes.h:2972
FCSmartShapeSegment * GetTerminateSegmentLeft()
Returns the object pointer for the terminating left-side end segment.
Definition: ff_smartshapes.h:1239
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition: ff_basecollection.h:24
Definition: ff_smartshapes.h:1084
FCSystemStaff * FindStaff(twobyte staffno)
Finds a specific staff in the collection and returns the pointer to it.
Definition: ff_othercollection.h:539
Efix16 GetEndHookLength() const
Sets the end hook length if the end arrowhead styles has been set to hook. The value is in EFIXes...
Definition: ff_smartshapes.h:2830
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:547
bool GetMakeHorizontal() const
Returns the state of the "make horizontal" flag.
Definition: ff_smartshapes.h:1275
void SetEnigmaStyles(FLAG_16 fontstyles)
Sets the font style as standard Enigma bit storage.
Definition: ff_base.h:1261
void SetSlurShapeOver()
Helper method to mark that the slur shape goes up.
Definition: ff_smartshapes.h:837