Finale PDK Framework 0.77
Power Up Your Finale Music Software
Loading...
Searching...
No Matches
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"
22class __EDTSmartShapeMeasMark
23{
24public:
25 CMPER shapeNum;
26 CMPER centerShapeNum;
27private:
28 twobyte CCCC;
29 twobyte DDDD;
30 twobyte EEEE;
31 twobyte FFFF;
32public:
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"
41struct __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"
54class __SSENDPT // current size: 8 bytes
55{
56public:
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"
82class __SSENDPTADJ // current size: 6 bytes
83{
84public:
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"
92class __SSCTLPTADJ // current size: 10 bytes
93{
94public:
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"
103class __SSTERMSEG // current size: 8 + 6 + 10 + 6 = 30 bytes
104{
105public:
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"
115class __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
145const EXTAG __ot_SmartShape = MAKEEXTAG(__edOther8Inci,'S','x');
146
147#include "pragma_align_begin.h"
148class __EDTCenterShape
149{
150public:
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
160const FLAG_32 __SS_FLAG_RESERVED = 0x80000000L; // Reserved for future expansion
161const FLAG_32 __SS_ENTRYBASED = 0x40000000L; // Entry-based vs measure-based
162const FLAG_32 __SS_ROTATE = 0x20000000L; // Always set for slurs
163const FLAG_32 __SS_LYRICBASED = 0x10000000L; // lyric-based smart shape
164const 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.
168const FLAG_32 __SS_MAKEHORZ = 0x00000400L; // endpoints are locked together
169 // vertically (so shape stays 'horizontal',
170 // like 8va or dashed line)
171const FLAG_32 __SS_PUSHENDSTART = 0x00000200L; // Always set nowadays
172const FLAG_32 __SS_MAKEVERT = 0x00000100L; // "make vertical"
173const FLAG_32 __SS_ENGRAVER_SLUR_BITS = 0x00000030L;
174
175
176
177#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
178/*****************************************************/
179
180
181
182
183class FCSmartShape;
184
194{
195private:
196#ifndef DOXYGEN_SHOULD_IGNORE_THIS
197 __EDTSmartShapeMeasMark _smartshapemeasmark;
198#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
199protected:
200#ifndef DOXYGEN_SHOULD_IGNORE_THIS
201
202 EXTAG Tag() const override { return __ot_SmartShapeMeasMark; }
203 int DataSizeLoad() const override { return sizeof(__EDTSmartShapeMeasMark); }
204 void* Allocate() override { return (void*) &_smartshapemeasmark; }
205
210 void CloneMemoryFrom(__FCBaseData* pSource) override
211 {
212 memcpy(&_smartshapemeasmark, ((FCSmartShapeMeasureMark*)pSource)->_GetSmartShapeMeasureMark(), sizeof(_smartshapemeasmark));
213 _datablock = &_smartshapemeasmark;
214 _loadedsize = sizeof(_smartshapemeasmark);
215 }
216
217 __FCBaseData* CreateObject() override
218 { return new FCSmartShapeMeasureMark(); }
219
220#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
221public:
222 const char* ClassName() const override { return "FCSmartShapeMeasureMark"; }
223 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SMARTSHAPEMEASUREMARK; }
224
225#ifndef DOXYGEN_SHOULD_IGNORE_THIS
232 void* _GetSmartShapeMeasureMark() { return Allocate(); }
233#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
234
240 {
241 /* The __EDTSmartShapeMeasMark is initialized automatically */
242 _datablock = &_smartshapemeasmark;
243 _loadedsize = sizeof(_smartshapemeasmark);
244 }
245
250 void SetShapeNumber(CMPER value) { _smartshapemeasmark.shapeNum = value; }
251
253 void _SetCenterShapeNumber(CMPER value) { _smartshapemeasmark.centerShapeNum = value; }
254
259 CMPER GetShapeNumber() const { return _smartshapemeasmark.shapeNum; }
260
263 CMPER _GetCenterShapeNumber() { return _smartshapemeasmark.centerShapeNum; }
264
269 twobyte GetMeasure() const override { return _dataid.other.cmper; }
270
282 FCSmartShape* CreateSmartShape(bool load_center_shapes = true);
283
284#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
286 luabridge::RefCountedPtr<FCSmartShape> CreateSmartShape_GC(bool load_center_shapes = true)
287 { return makeLuaSharedPtr(CreateSmartShape(load_center_shapes)); }
288#endif
289
290#ifdef PDK_FRAMEWORK_DEBUG
291 void DebugDump() override
292 {
294 DebugOutInt("Shape Number: ", GetShapeNumber());
295 DebugOutInt("Center Shape Number: ", _GetCenterShapeNumber());
296 }
297#endif
298};
299
300#ifdef PDK_FRAMEWORK_ENTRIES
310{
311private:
312#ifndef DOXYGEN_SHOULD_IGNORE_THIS
313 __EDTSmartShapeEntryMark _smartshapeentrymark;
314#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
315protected:
316#ifndef DOXYGEN_SHOULD_IGNORE_THIS
317
318 EXTAG Tag() const override { return __dt_SmartShapeEntryMark; }
319 int DataSizeLoad() const override { return sizeof(__EDTSmartShapeEntryMark); }
320 void* Allocate() override { return (void*) &_smartshapeentrymark; }
321
326 void CloneMemoryFrom(__FCBaseData* pSource) override
327 {
328 memcpy(&_smartshapeentrymark, ((FCSmartShapeEntryMark*)pSource)->_GetSmartShapeEntryMark(), sizeof(_smartshapeentrymark));
329 _datablock = &_smartshapeentrymark;
330 _loadedsize = sizeof(_smartshapeentrymark);
331 }
332
333 __FCBaseData* CreateObject() override
334 { return new FCSmartShapeEntryMark(); }
335
336#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
337public:
338 const char* ClassName() const override { return "FCSmartShapeEntryMark"; }
339 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SMARTSHAPEENTRYMARK; }
340
341#ifndef DOXYGEN_SHOULD_IGNORE_THIS
348 void* _GetSmartShapeEntryMark() { return Allocate(); }
349#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
350
356 {
357 /* __EDTSmartShapeEntryMark is note initialized automatically */
358 memset(&_smartshapeentrymark, 0, sizeof(_smartshapeentrymark));
359 _datablock = &_smartshapeentrymark;
360 _loadedsize = sizeof(_smartshapeentrymark);
361 }
362
369 FCSmartShape* CreateSmartShape(bool load_center_shapes);
370
371#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
372 /* \brief GC version of CreateSmartShape for Lua. */
373 luabridge::RefCountedPtr<FCSmartShape> CreateSmartShape_GC(bool load_center_shapes)
374 { return makeLuaSharedPtr(CreateSmartShape(load_center_shapes)); }
375#endif
376
381 bool CalcLeftMark();
382
387 bool CalcRightMark();
388
393 void SetShapeNumber(CMPER value) { _smartshapeentrymark.shapeNum = value; }
394
399 CMPER GetShapeNumber() const { return _smartshapeentrymark.shapeNum; }
400
401#ifndef DOXYGEN_SHOULD_IGNORE_THIS
403 twobyte CalcLastInci() override;
404
406 void _SetEntryFlag(FCNoteEntry* pNoteEntry, bool state) override
407 {
408 pNoteEntry->SetSmartShapeFlag(state);
409 }
410#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
411
412#ifdef PDK_FRAMEWORK_DEBUG
413 void DebugDump() override
414 {
416 DebugOutInt("Shape Number: ", GetShapeNumber());
417 }
418#endif
419};
420#endif //PDK_FRAMEWORK_ENTRIES
421
425{
426private:
427#ifndef DOXYGEN_SHOULD_IGNORE_THIS
428 __EDTCenterShape _centershape;
429#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
430protected:
431#ifndef DOXYGEN_SHOULD_IGNORE_THIS
432
433 EXTAG Tag() const override { return __dt_CenterShape; }
434 int DataSizeLoad() const override { return sizeof(__EDTCenterShape); }
435 void* Allocate() override { return (void*) &_centershape; }
436
441 void CloneMemoryFrom(__FCBaseData* pSource) override
442 {
443 memcpy(&_centershape, ((FCCenterSmartShape*)pSource)->_GetCenterSmartShape(), sizeof(_centershape));
444 _datablock = &_centershape;
445 _loadedsize = sizeof(_centershape);
446 }
447
448 __FCBaseData* CreateObject() override
449 { return new FCCenterSmartShape(); }
450
451#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
452public:
453 const char* ClassName() const override { return "FCCenterSmartShape"; }
454 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_CENTERSMARTSHAPE; }
455
456#ifndef DOXYGEN_SHOULD_IGNORE_THIS
463 void* _GetCenterSmartShape() { return Allocate(); }
464#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
465
468 {
469 /* The '_centershape' data member is initialized automatically. */
470 _datablock = &_centershape;
471 _loadedsize = sizeof(_centershape);
472 }
473
474
475#ifdef PDK_FRAMEWORK_DEBUG
476 void DebugDump() override
477 {
479 }
480#endif
481};
482
483
484
485
486class FCSmartShape;
487
496{
497 __SSTERMSEG* _pSegment;
498 FCSmartShape* _pRealObject;
499 bool _isleftsidesegment;
500public:
501 const char* ClassName() const override { return "FCSmartShapeSegment"; }
502
504 FCSmartShapeSegment(__SSTERMSEG* pSeg, FCSmartShape* pReference, bool leftsidesegment) : __FCBase()
505 {
506 _pSegment = pSeg;
507 _pRealObject = pReference;
508 _isleftsidesegment = leftsidesegment;
509 }
510
516 twobyte GetStaff() const { return _pSegment->endPt.inst; }
517
522 twobyte GetMeasure() const { return _pSegment->endPt.meas; }
523
528 twobyte GetNoteID() const;
529
540 TimeEdu32 GetMeasurePos() const { return _pSegment->endPt.attachment.edu; }
541
549 ENTNUM GetEntryNumber() const { return _pSegment->endPt.attachment.entryNum; }
550
558 twobyte GetEndpointOffsetX() const { return _pSegment->endPtAdj.offset.x; }
559
565 twobyte GetEndpointOffsetY() const { return _pSegment->endPtAdj.offset.y; }
566
571 twobyte GetControlPoint1OffsetX() const { return _pSegment->ctlPtAdj.controlPoint1.x; }
572
577 twobyte GetControlPoint1OffsetY() const { return _pSegment->ctlPtAdj.controlPoint1.y; }
578
583 twobyte GetControlPoint2OffsetX() const { return _pSegment->ctlPtAdj.controlPoint2.x; }
584
589 twobyte GetControlPoint2OffsetY() const { return _pSegment->ctlPtAdj.controlPoint2.y; }
590
595 twobyte GetBreakOffsetX() const { return _pSegment->breakAdj.offset.x; }
596
601 twobyte GetBreakOffsetY() const { return _pSegment->breakAdj.offset.y; }
602
607 void SetStaff(twobyte staff) { _pSegment->endPt.inst = staff; }
608
613 void SetMeasure(twobyte measureno)
614 {
615 _pSegment->endPt.meas = measureno;
616 }
617
619 void SetNoteID(twobyte noteID);
620
627 void SetMeasurePos(TimeEdu32 edupos) { _pSegment->endPt.attachment.edu = edupos; }
628
638 void SetEndpointOffsetX(twobyte value) { _pSegment->endPtAdj.offset.x = value; }
639
646 void SetEndpointOffsetY(twobyte value)
647 {
648 _pSegment->endPtAdj.offset.y = value;
649 }
650
655 void SetControlPoint1OffsetX(twobyte value) { _pSegment->ctlPtAdj.controlPoint1.x = value; }
656
661 void SetControlPoint1OffsetY(twobyte value) { _pSegment->ctlPtAdj.controlPoint1.y = value; }
662
667 void SetControlPoint2OffsetX(twobyte value) { _pSegment->ctlPtAdj.controlPoint2.x = value; }
668
673 void SetControlPoint2OffsetY(twobyte value) { _pSegment->ctlPtAdj.controlPoint2.y = value; }
674
679 void SetBreakOffsetX(twobyte value) { _pSegment->breakAdj.offset.x = value; }
680
685 void SetBreakOffsetY(twobyte value) { _pSegment->breakAdj.offset.y = value; }
686
694 void SetEntryNumber(ENTNUM value) { _pSegment->endPt.attachment.entryNum = value; }
695
696#ifdef PDK_FRAMEWORK_ENTRIES
708 void SetEntry(FCNoteEntry* pEntry)
709 {
710 if (!pEntry)
711 {
712 _pSegment->endPt.SetEntryNum(0);
713 return;
714 }
715 _pSegment->endPt.SetEntryNum(pEntry->GetEntryNumber());
716 pEntry->SetSmartShapeFlag(true);
717 }
718#endif
719
727 void SetCustomOffset(bool rightside)
728 {
729 _pSegment->endPtAdj.flag = rightside ? 0x400c : 0x400d; /* Don't know what these flags mean... */
730 }
731
740 TimeEdu32 CalcMeasurePos() const;
741
742#ifdef PDK_FRAMEWORK_DEBUG
743 void DebugDump() override;
744#endif
745
746};
747
758{
759 __SSCTLPTADJ* _pCtrlPointAdjust;
760 FCSmartShape* _pRealObject;
761public:
762 const char* ClassName() const override { return "FCSmartShapeCtrlPointAdjust"; }
763
765 FCSmartShapeCtrlPointAdjust(__SSCTLPTADJ* pCtrlPointAdj, FCSmartShape* pReference) : __FCBase()
766 {
767 _pCtrlPointAdjust = pCtrlPointAdj;
768 _pRealObject = pReference;
769 }
770
778 twobyte GetControlPoint1OffsetX() const { return _pCtrlPointAdjust->controlPoint1.x; }
779
784 twobyte GetControlPoint1OffsetY() const { return _pCtrlPointAdjust->controlPoint1.y; }
785
792 twobyte GetControlPoint2OffsetX() const { return _pCtrlPointAdjust->controlPoint2.x; }
793
798 twobyte GetControlPoint2OffsetY() const { return _pCtrlPointAdjust->controlPoint2.y; }
799
805 bool GetCustomShaped() const { return GetBitFlag(_pCtrlPointAdjust->flag, 0x4000); }
806
807
814 void SetControlPoint1OffsetX(twobyte value)
815 {
816 _pCtrlPointAdjust->controlPoint1.x = value;
817 }
818
823 void SetControlPoint1OffsetY(twobyte value)
824 {
825 _pCtrlPointAdjust->controlPoint1.y = value;
826 }
827
834 void SetControlPoint2OffsetX(twobyte value)
835 {
836 _pCtrlPointAdjust->controlPoint2.x = value;
837 }
838
843 void SetControlPoint2OffsetY(twobyte value)
844 {
845 _pCtrlPointAdjust->controlPoint2.y = value;
846 }
847
853 void SetCustomShaped(bool flag)
854 {
855 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x4000, flag);
856 }
857
866 {
867 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, true);
868 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, false);
869 }
870
879 {
880 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, false);
881 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, true);
882 }
883
892 {
893 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0200, false);
894 Set16BitFlag(&_pCtrlPointAdjust->flag, 0x0100, false);
895 }
896
905 {
907 SetCustomShaped(false);
908 }
909
918 {
919 memset(_pCtrlPointAdjust, 0, sizeof(__SSCTLPTADJ));
920 }
921
922#ifdef PDK_FRAMEWORK_DEBUG
923 void DebugDump() override
924 {
926 DebugOutInt("Control point 1 (x)", GetControlPoint1OffsetX());
927 DebugOutInt("Control point 1 (y)", GetControlPoint1OffsetY());
928 DebugOutInt("Control point 2 (x)", GetControlPoint2OffsetX());
929 DebugOutInt("Control point 2 (y)", GetControlPoint2OffsetY());
930 DebugOutHex("Flag (hex): ", _pCtrlPointAdjust->flag);
931 }
932#endif
933};
934
958{
959private:
960#ifndef DOXYGEN_SHOULD_IGNORE_THIS
961 __EDTSmartShape _smartshape;
962 FCSmartShapeSegment* _pTerminateSegmentLeft;
963 FCSmartShapeSegment* _pTerminateSegmentRight;
964 FCSmartShapeCtrlPointAdjust* _pCtrlPointAdjust;
965 __FCCollection _CenterSmartShapes;
966
967#ifdef PDK_FRAMEWORK_ENTRIES
968 bool _RawRelink() override;
969#endif //
970#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
971
972protected:
973#ifndef DOXYGEN_SHOULD_IGNORE_THIS
974
975 EXTAG Tag() const override { return __ot_SmartShape; }
976 int DataSizeLoad() const override { return sizeof(__EDTSmartShape); }
977 void* Allocate() override { return (void*) &_smartshape; }
978
983 void CloneMemoryFrom(__FCBaseData* pSource) override
984 {
985 memcpy(&_smartshape, ((FCSmartShape*)pSource)->_GetSmartShape(), sizeof(_smartshape));
986 _datablock = &_smartshape;
987 _loadedsize = sizeof(_smartshape);
988 }
989
990 __FCBaseData* CreateObject() override
991 { return new FCSmartShape(); }
992
993#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
994public:
995
1001 {
1004
1005 /* Overslur (center humps up) */
1006 SMARTSHAPE_SLURUP = 1,
1007
1010
1013
1016
1019
1022
1025
1028
1031
1034
1037
1040
1043
1046
1049
1052
1055
1058
1061
1064
1067
1070
1073
1076
1082
1085
1088
1091
1094
1097
1100
1103
1106
1109
1112
1115
1118
1121
1124
1127
1131
1132
1156
1157 const char* ClassName() const override { return "FCSmartShape"; }
1158 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SMARTSHAPE; }
1159
1160#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1167 void* _GetSmartShape() { return Allocate(); }
1168#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1169
1175 {
1176 _pTerminateSegmentLeft = NULL;
1177 _pTerminateSegmentRight = NULL;
1178 _pCtrlPointAdjust = NULL;
1179
1180 /* SOME of the _smartshape data is auto-initialized, but not these: */
1181 _smartshape.shapeType = 0;
1182 _smartshape.flag = __SS_PUSHENDSTART;
1183 _smartshape.ssLineStyleID = 0;
1184 _smartshape.flag2 = 0;
1185
1186 _datablock = &_smartshape;
1187 _loadedsize = sizeof(_smartshape);
1188 }
1189
1190 virtual ~FCSmartShape()
1191 {
1192 delete _pTerminateSegmentLeft;
1193 delete _pTerminateSegmentRight;
1194 delete _pCtrlPointAdjust;
1195 }
1196
1201 twobyte _GetLeftSideNoteID() const { return _smartshape.noteID[0]; }
1202
1207 twobyte _GetRightSideNoteID() const { return _smartshape.noteID[1]; }
1208
1213 void _SetLeftSideNoteID(twobyte noteID) { _smartshape.noteID[0] = noteID; }
1214
1219 void _SetRightSideNoteID(twobyte noteID) { _smartshape.noteID[1] = noteID; }
1220
1222 void _LoadCenterShapes();
1223
1225 void _ClearCenterShapes() { _CenterSmartShapes.ClearAll(); }
1226
1232 bool CalcLeftCellMetricPos(FCPoint* pPoint);
1233
1239 bool CalcRightCellMetricPos(FCPoint* pPoint);
1240
1241#ifdef PDK_FRAMEWORK_ENTRIES
1248 bool CalcLeftEntryMetricPos(FCNoteEntry* pEntry, FCPoint* pPoint);
1249#endif //PDK_FRAMEWORK_ENTRIES
1250
1251#ifdef PDK_FRAMEWORK_ENTRIES
1258 bool CalcRightEntryMetricPos(FCNoteEntry* pEntry, FCPoint* pPoint);
1259#endif
1260
1266#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1268#else
1269 int
1270#endif
1271 GetShapeType() const { return (SMARTSHAPE_TYPES) _smartshape.shapeType; }
1272
1277 bool GetEntryBased() const { return GetBitFlag(_smartshape.flag, __SS_ENTRYBASED); }
1278
1285 bool CalcLyricBased() const;
1286
1291 bool GetPresetShape() const
1292 {
1293 return GetBitFlag(_smartshape.flag, __SS_PRESETSHAPE);
1294 }
1295
1304 {
1305 if (!_pTerminateSegmentLeft)
1306 _pTerminateSegmentLeft = new FCSmartShapeSegment(&_smartshape.termSeg1, this, true);
1307 return _pTerminateSegmentLeft;
1308 }
1309
1318 {
1319 if (!_pTerminateSegmentRight)
1320 _pTerminateSegmentRight = new FCSmartShapeSegment(&_smartshape.termSeg2, this, false);
1321 return _pTerminateSegmentRight;
1322 }
1323
1329 {
1330 if (!_pCtrlPointAdjust)
1331 _pCtrlPointAdjust = new FCSmartShapeCtrlPointAdjust(&_smartshape.fullCtlPtAdj, this);
1332 return _pCtrlPointAdjust;
1333 }
1334
1339 bool GetMakeHorizontal() const { return GetBitFlag(_smartshape.flag, __SS_MAKEHORZ); }
1340
1348 bool GetMaintainAngle() const { return GetBitFlag(_smartshape.flag, 0x00000001); }
1349
1354 bool GetVisible() const { return !GetBitFlag(_smartshape.flag2, 0x0001); }
1355
1360 twobyte GetLineID() const { return _smartshape.ssLineStyleID; }
1361
1368#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1370#else
1371 int
1372#endif
1374 {
1375 if (GetBitFlag(_smartshape.flag, 0x10))
1376 return SS_ONSTATE;
1377 else if (GetBitFlag(_smartshape.flag, 0x20))
1378 return SS_OFFSTATE;
1379 else
1380 return SS_AUTOSTATE;
1381 }
1382
1389#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1391#else
1392 int
1393#endif
1395 {
1396 if (GetBitFlag(_smartshape.flag, 0x04))
1397 return SS_ONSTATE;
1398 else if (GetBitFlag(_smartshape.flag, 0x08))
1399 return SS_OFFSTATE;
1400 else
1401 return SS_AUTOSTATE;
1402 }
1403
1409#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1411#else
1412 int
1413#endif
1414 shapevalue) { _smartshape.shapeType = shapevalue; }
1415
1420 void SetPresetShape(bool value)
1421 {
1422 Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, value);
1423 }
1424
1429 void SetLineID(twobyte identifier) { _smartshape.ssLineStyleID = identifier; }
1430
1435 void SetMakeHorizontal(bool state) { Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, state); }
1436
1444 void SetMaintainAngle(bool state) { Set32BitFlag(&_smartshape.flag, 0x00000001, state); }
1445
1450 void SetVisible(bool visible) { Set16BitFlag(&_smartshape.flag2, 0x0001, !visible); }
1451
1456 void SetEntryBased(bool value) { Set32BitFlag(&_smartshape.flag, __SS_ENTRYBASED, value); }
1457
1466 void SetSlurFlags(bool entrybased)
1467 {
1468 SetEntryBased(entrybased);
1469 Set32BitFlag(&_smartshape.flag, __SS_ROTATE, true);
1470 Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, true);
1471 Set32BitFlag(&_smartshape.flag, __SS_PUSHENDSTART, true);
1472 SetMaintainAngle(true);
1473
1474 Set32BitFlag(&_smartshape.flag, __SS_LYRICBASED, false);
1475 Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, false);
1476 Set32BitFlag(&_smartshape.flag, __SS_MAKEVERT, false);
1477 }
1478
1487 {
1488 SetMeasureAttachedFlags(true, true);
1489 }
1490
1497 void SetEntryAttachedFlags(bool presetshape)
1498 {
1499 SetEntryBased(true);
1500 Set32BitFlag(&_smartshape.flag, __SS_ROTATE, true);
1501 Set32BitFlag(&_smartshape.flag, __SS_PRESETSHAPE, presetshape);
1502 Set32BitFlag(&_smartshape.flag, __SS_PUSHENDSTART, true);
1503 SetMaintainAngle(true);
1504
1505 Set32BitFlag(&_smartshape.flag, __SS_LYRICBASED, false);
1506 Set32BitFlag(&_smartshape.flag, __SS_MAKEHORZ, false);
1507 Set32BitFlag(&_smartshape.flag, __SS_MAKEVERT, false);
1508 }
1509
1521 void SetMeasureAttachedFlags(bool presetshape, bool makehorizontal);
1522
1534 void SetBeatAttached(bool state);
1535
1543 bool GetBeatAttached() const;
1544
1552#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1554#else
1555 int
1556#endif
1557 state
1558 )
1559 {
1560 switch (state)
1561 {
1562 case SS_AUTOSTATE:
1563 Set32BitFlag(&_smartshape.flag, 0x20, false);
1564 Set32BitFlag(&_smartshape.flag, 0x10, false);
1565 break;
1566 case SS_ONSTATE:
1567 Set32BitFlag(&_smartshape.flag, 0x20, false);
1568 Set32BitFlag(&_smartshape.flag, 0x10, true);
1569 break;
1570 case SS_OFFSTATE:
1571 Set32BitFlag(&_smartshape.flag, 0x20, true);
1572 Set32BitFlag(&_smartshape.flag, 0x10, false);
1573 break;
1574 }
1575 }
1576
1584#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1586#else
1587 int
1588#endif
1589 state
1590 )
1591 {
1592 switch (state)
1593 {
1594 case SS_AUTOSTATE:
1595 Set32BitFlag(&_smartshape.flag, 0x08, false);
1596 Set32BitFlag(&_smartshape.flag, 0x04, false);
1597 break;
1598 case SS_ONSTATE:
1599 Set32BitFlag(&_smartshape.flag, 0x08, false);
1600 Set32BitFlag(&_smartshape.flag, 0x04, true);
1601 break;
1602 case SS_OFFSTATE:
1603 Set32BitFlag(&_smartshape.flag, 0x08, true);
1604 Set32BitFlag(&_smartshape.flag, 0x04, false);
1605 break;
1606 }
1607 }
1608
1615
1621 {
1622 switch (GetShapeType())
1623 {
1626 case SMARTSHAPE_DASHEDSLURAUTO: /* Finale 25 */
1627 return true;
1628 default:
1629 return false;
1630 }
1631 }
1632
1638 {
1639 switch (GetShapeType())
1640 {
1641 case SMARTSHAPE_SLURUP:
1643 case SMARTSHAPE_DASHEDSLURUP: /* Finale 25 */
1644 return true;
1645 default:
1646 return false;
1647 }
1648 }
1649
1655 {
1656 switch (GetShapeType())
1657 {
1660 case SMARTSHAPE_DASHEDSLURDOWN: /* Finale 25 */
1661 return true;
1662 default:
1663 return false;
1664 }
1665 }
1666
1673 {
1674 switch (GetShapeType())
1675 {
1680 return true;
1681 default:
1682 return false;
1683 }
1684 }
1685
1690 bool IsSlur()
1691 {
1692 switch (GetShapeType())
1693 {
1695 case SMARTSHAPE_SLURUP:
1703 return true;
1704 default:
1705 return false;
1706 }
1707 }
1708
1716 {
1717 switch (GetShapeType())
1718 {
1720 case SMARTSHAPE_SLURUP:
1722 return true;
1723 default:
1724 return false;
1725 }
1726 }
1727
1736 {
1737 switch (GetShapeType())
1738 {
1742 return true;
1743 default:
1744 return false;
1745 }
1746 }
1747
1756 {
1757#if FXT_VERSION >= FINALEVERSION_25
1758 switch (GetShapeType())
1759 {
1763 return true;
1764 default:
1765 return false;
1766 }
1767#else
1768 return false;
1769#endif
1770 }
1771
1777 {
1778 return (GetShapeType() == SMARTSHAPE_TABSLIDE);
1779 }
1780
1786 {
1787 return (GetShapeType() == SMARTSHAPE_GLISSANDO);
1788 }
1789
1796 {
1797 return (GetShapeType() == SMARTSHAPE_CUSTOM);
1798 }
1799
1804 bool IsEntryBased() { return GetBitFlag(_smartshape.flag, __SS_ENTRYBASED); }
1805
1811 bool IsWithinRegion(FCMusicRegion* pRegion);
1812
1813#ifdef PDK_FRAMEWORK_ENTRIES
1822 void DeleteEverything();
1823#endif //PDK_FRAMEWORK_ENTRIES
1824
1826 void AssignToStaff(int newstaff);
1827
1834 bool SaveNew() override;
1835
1836#ifdef PDK_FRAMEWORK_ENTRIES
1847 bool SaveNewEverything(FCNoteEntry* pFirstEntry = NULL, FCNoteEntry* pLastEntry = NULL);
1848#endif //#ifdef PDK_FRAMEWORK_ENTRIES
1849
1850#ifdef PDK_FRAMEWORK_DEBUG
1851 void DebugDump() override
1852 {
1854 DebugOutInt("Shape Type: ", GetShapeType());
1855 DebugOutInt("Line ID: ", GetLineID());
1856
1857 DebugOut("= Terminate segment 1 =");
1859 pSeg1->DebugDump();
1860
1861 DebugOut("= Terminate segment 2 =");
1863 pSeg2->DebugDump();
1864
1865 DebugOut("Ctrl Point adjust:");
1866 FCSmartShapeCtrlPointAdjust* pCtrlPointAdjust = GetCtrlPointAdjust();
1867 pCtrlPointAdjust->DebugDump();
1868 //DebugOutBlock(&_smartshape.fullCtlPtAdj, sizeof(_smartshape.fullCtlPtAdj));
1869
1870 DebugOut("= Center Smart Shapes =");
1871 _CenterSmartShapes.DebugDump();
1872
1873 DebugOutHex("flag: ", _smartshape.flag);
1874 DebugOutHex("flag2: ", _smartshape.flag2);
1875 }
1876#endif
1877};
1878
1879
1889{
1890public:
1897 TEXTREF_LEFTSTART = 0,
1898 TEXTREF_LEFTCONTINUATION,
1899 TEXTREF_RIGHTEND,
1900 TEXTREF_CENTERFULL,
1901 TEXTREF_CENTERABBREVIATED
1902 };
1903private:
1904#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1906 EDTCustomLineDefinition _customsmartlinedef;
1907 EDTCustomLineDefinition2012 _customsmartlinedef2012;
1908 bool _use2012version; /* This is set in constructor, if running version
1909 * is 2012 or above */
1910
1911protected:
1912 EXTAG Tag() const override
1913 {
1914 if (_use2012version)
1915 return ot_CustomLineDefinition2012;
1916 else
1917 return ot_CustomLineDefinition;
1918 }
1919 int DataSizeLoad() const override {
1920 return _use2012version ? sizeof(_customsmartlinedef2012) : sizeof(_customsmartlinedef);
1921 }
1922 void* Allocate() override { return _GetCustomSmartLineDef(); }
1923 EVERSION EnigmaVersion() const override { return _use2012version ? FINALEVERSION_2012 : FINALEVERSION_2010; }
1924
1929 void CloneMemoryFrom(__FCBaseData* pSource) override
1930 {
1931 memcpy(_GetCustomSmartLineDef(), ((FCCustomSmartLineDef*)pSource)->_GetCustomSmartLineDef(), DataSizeLoad());
1932 _datablock = _GetCustomSmartLineDef();
1934 }
1935
1940 void _SetRawStringNumber
1941 (
1942#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1944#else
1945 int
1946#endif
1947 reference, twobyte value)
1948 {
1949 twobyte* pRawtextnumber = NULL;
1950 switch (reference)
1951 {
1952 case TEXTREF_LEFTSTART:
1953 pRawtextnumber = _use2012version ? &_customsmartlinedef2012.leftStartTextID : &_customsmartlinedef.leftStartTextID;
1954 break;
1955 case TEXTREF_LEFTCONTINUATION:
1956 pRawtextnumber = _use2012version ? &_customsmartlinedef2012.leftContTextID : &_customsmartlinedef.leftContTextID;
1957 break;
1958 case TEXTREF_RIGHTEND:
1959 pRawtextnumber = _use2012version ? &_customsmartlinedef2012.rightEndTextID : &_customsmartlinedef.rightEndTextID;
1960 break;
1961 case TEXTREF_CENTERFULL:
1962 pRawtextnumber = _use2012version ? &_customsmartlinedef2012.centerFullTextID : &_customsmartlinedef.centerFullTextID;
1963 break;
1964 case TEXTREF_CENTERABBREVIATED:
1965 pRawtextnumber = _use2012version ? &_customsmartlinedef2012.centerAbbrTextID : &_customsmartlinedef.centerAbbrTextID;
1966 break;
1967 }
1968 if (pRawtextnumber) *pRawtextnumber = value;
1969 }
1970
1971 __FCBaseData* CreateObject() override { return new FCCustomSmartLineDef(); }
1972
1973#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1974public:
1975 const char* ClassName() const override { return "FCCustomSmartLineDef"; }
1976 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_CUSTOMSMARTLINEDEF; }
1977
1978#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1985 void* _GetCustomSmartLineDef() { return _use2012version ? (void*) &_customsmartlinedef2012 : (void*) &_customsmartlinedef; }
1986
1987#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1988
1989
1995
1996
2000 bool DeepDeleteData() override;
2001
2011 (
2012#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2014#else
2015 int
2016#endif
2017 reference)
2018 {
2019 twobyte rawtextnumber = 0;
2020 switch (reference)
2021 {
2022 case TEXTREF_LEFTSTART:
2023 rawtextnumber = _use2012version ? _customsmartlinedef2012.leftStartTextID : _customsmartlinedef.leftStartTextID;
2024 break;
2025 case TEXTREF_LEFTCONTINUATION:
2026 rawtextnumber = _use2012version ? _customsmartlinedef2012.leftContTextID : _customsmartlinedef.leftContTextID;
2027 break;
2028 case TEXTREF_RIGHTEND:
2029 rawtextnumber = _use2012version ? _customsmartlinedef2012.rightEndTextID : _customsmartlinedef.rightEndTextID;
2030 break;
2031 case TEXTREF_CENTERFULL:
2032 rawtextnumber = _use2012version ? _customsmartlinedef2012.centerFullTextID : _customsmartlinedef.centerFullTextID;
2033 break;
2034 case TEXTREF_CENTERABBREVIATED:
2035 rawtextnumber = _use2012version ? _customsmartlinedef2012.centerAbbrTextID : _customsmartlinedef.centerAbbrTextID;
2036 break;
2037 }
2038 return rawtextnumber;
2039 }
2040
2050 (
2051#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2053#else
2054 int
2055#endif
2056 reference)
2057 {
2058 twobyte position = 0;
2059 switch (reference)
2060 {
2061 case TEXTREF_LEFTSTART:
2062 position = _use2012version ? _customsmartlinedef2012.leftStartTextHoriz : _customsmartlinedef.leftStartTextHoriz;
2063 break;
2064 case TEXTREF_LEFTCONTINUATION:
2065 position = _use2012version ? _customsmartlinedef2012.leftContTextHoriz : _customsmartlinedef.leftContTextHoriz;
2066 break;
2067 case TEXTREF_RIGHTEND:
2068 position = _use2012version ? _customsmartlinedef2012.rightEndTextHoriz : _customsmartlinedef.rightEndTextHoriz;
2069 break;
2070 case TEXTREF_CENTERFULL:
2071 position = _use2012version ? _customsmartlinedef2012.centerFullTextHoriz : _customsmartlinedef.centerFullTextHoriz;
2072 break;
2073 case TEXTREF_CENTERABBREVIATED:
2074 position = _use2012version ? _customsmartlinedef2012.centerAbbrTextHoriz : _customsmartlinedef.centerAbbrTextHoriz;
2075 break;
2076 }
2077 return position;
2078 }
2079
2080
2090 (
2091#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2093#else
2094 int
2095#endif
2096 reference)
2097 {
2098 twobyte position = 0;
2099 switch (reference)
2100 {
2101 case TEXTREF_LEFTSTART:
2102 position = _use2012version ? _customsmartlinedef2012.leftStartTextVert : _customsmartlinedef.leftStartTextVert;
2103 break;
2104 case TEXTREF_LEFTCONTINUATION:
2105 position = _use2012version ? _customsmartlinedef2012.leftContTextVert : _customsmartlinedef.leftContTextVert;
2106 break;
2107 case TEXTREF_RIGHTEND:
2108 position = _use2012version ? _customsmartlinedef2012.rightEndTextVert : _customsmartlinedef.rightEndTextVert;
2109 break;
2110 case TEXTREF_CENTERFULL:
2111 position = _use2012version ? _customsmartlinedef2012.centerFullTextVert : _customsmartlinedef.centerFullTextVert;
2112 break;
2113 case TEXTREF_CENTERABBREVIATED:
2114 position = _use2012version ? _customsmartlinedef2012.centerAbbrTextVert : _customsmartlinedef.centerAbbrTextVert;
2115 break;
2116 }
2117 return position;
2118 }
2119
2120
2130 (
2131#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2133#else
2134 int
2135#endif
2136 reference,
2137 Evpu16 position)
2138 {
2139 Evpu16* pPosition = NULL;
2140 switch (reference)
2141 {
2142 case TEXTREF_LEFTSTART:
2143 pPosition = _use2012version ? &_customsmartlinedef2012.leftStartTextHoriz : &_customsmartlinedef.leftStartTextHoriz;
2144 break;
2145 case TEXTREF_LEFTCONTINUATION:
2146 pPosition = _use2012version ? &_customsmartlinedef2012.leftContTextHoriz : &_customsmartlinedef.leftContTextHoriz;
2147 break;
2148 case TEXTREF_RIGHTEND:
2149 pPosition = _use2012version ? &_customsmartlinedef2012.rightEndTextHoriz : &_customsmartlinedef.rightEndTextHoriz;
2150 break;
2151 case TEXTREF_CENTERFULL:
2152 pPosition = _use2012version ? &_customsmartlinedef2012.centerFullTextHoriz : &_customsmartlinedef.centerFullTextHoriz;
2153 break;
2154 case TEXTREF_CENTERABBREVIATED:
2155 pPosition = _use2012version ? &_customsmartlinedef2012.centerAbbrTextHoriz : &_customsmartlinedef.centerAbbrTextHoriz;
2156 break;
2157 }
2158 if (pPosition) *pPosition = position;
2159 }
2160
2170 (
2171#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2173#else
2174 int
2175#endif
2176 reference,
2177 Evpu16 position)
2178 {
2179 Evpu16* pPosition = NULL;
2180 switch (reference)
2181 {
2182 case TEXTREF_LEFTSTART:
2183 pPosition = _use2012version ? &_customsmartlinedef2012.leftStartTextVert : &_customsmartlinedef.leftStartTextVert;
2184 break;
2185 case TEXTREF_LEFTCONTINUATION:
2186 pPosition = _use2012version ? &_customsmartlinedef2012.leftContTextVert : &_customsmartlinedef.leftContTextVert;
2187 break;
2188 case TEXTREF_RIGHTEND:
2189 pPosition = _use2012version ? &_customsmartlinedef2012.rightEndTextVert : &_customsmartlinedef.rightEndTextVert;
2190 break;
2191 case TEXTREF_CENTERFULL:
2192 pPosition = _use2012version ? &_customsmartlinedef2012.centerFullTextVert : &_customsmartlinedef.centerFullTextVert;
2193 break;
2194 case TEXTREF_CENTERABBREVIATED:
2195 pPosition = _use2012version ? &_customsmartlinedef2012.centerAbbrTextVert : &_customsmartlinedef.centerAbbrTextVert;
2196 break;
2197 }
2198 if (pPosition) *pPosition = position;
2199 }
2200
2206 twobyte GetLineStyle() const
2207 {
2208 return _use2012version ? _customsmartlinedef2012.linetype : _customsmartlinedef.linetype;
2209 }
2210
2215 Efix16 GetLineWidth() const
2216 {
2217 switch (GetLineStyle())
2218 {
2219 case CUSTOMLINE_SOLID:
2220 return _use2012version ? _customsmartlinedef2012.linedata.solid.lineWidth : _customsmartlinedef.linetypeinfo;
2221 case CUSTOMLINE_DASHED:
2222 return _use2012version ? _customsmartlinedef2012.linedata.dashed.lineWidth : _customsmartlinedef.linetypeinfo;
2223 }
2224 return 0;
2225 }
2226
2235 {
2236 return _use2012version ? _customsmartlinedef2012.endpointstylestart : _customsmartlinedef.endpointstylestart;
2237 }
2238
2246 twobyte GetEndArrowheadStyle() const
2247 {
2248 return _use2012version ? _customsmartlinedef2012.endpointstyleend : _customsmartlinedef.endpointstyleend;
2249 }
2250
2259 {
2260 if (GetStartArrowheadStyle()!= CLENDPOINT_CUSTOM) return 0;
2261 return _use2012version ? _customsmartlinedef2012.startPointData : _customsmartlinedef.startarrowdataLo;
2262 }
2263
2272 {
2273 if (GetEndArrowheadStyle()!= CLENDPOINT_CUSTOM) return 0;
2274 return _use2012version ? _customsmartlinedef2012.endPointData : _customsmartlinedef.endarrowdataLo;
2275 }
2276
2283 eUniChar32 GetLineCharacter() const
2284 {
2285 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return 0;
2286 return _use2012version ? _customsmartlinedef2012.linedata.character.lineChar : _customsmartlinedef.linetypeinfo;
2287 }
2288
2299#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2301#else
2302 int
2303#endif
2304 reference)
2305 {
2306 twobyte rawtextnumber = GetRawStringNumber(reference);
2307 if (!rawtextnumber) return NULL;
2308 FCRawText rawtext;
2309 rawtext.SetCustomTag(tx_SmartShape);
2310 if (!rawtext.Load(rawtextnumber)) return NULL;
2311 return rawtext.CreateString();
2312 }
2313
2314#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2316 luabridge::RefCountedPtr<FCString> CreateTextString_GC(int reference)
2317 { return makeLuaSharedPtr(CreateTextString(reference)); }
2318#endif
2319
2331#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2333#else
2334 int
2335#endif
2336 reference, FCString* pString)
2337 {
2338 twobyte rawtextnumber = GetRawStringNumber(reference);
2339 if (!rawtextnumber) return false;
2340 FCRawText rawtext;
2341 rawtext.SetCustomTag(tx_SmartShape);
2342 rawtext.SetText(pString);
2343 return rawtext.SaveAs(rawtextnumber);
2344 }
2345
2357#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2359#else
2360 int
2361#endif
2362 reference, FCString* pString)
2363 {
2364 if (!pString) return false;
2365 FCRawText rawtext;
2366 rawtext.SetCustomTag(tx_SmartShape);
2367 rawtext.SetText(pString);
2368 if (rawtext.SaveNew())
2369 {
2370 _SetRawStringNumber(reference, rawtext.GetItemNo());
2371 return true;
2372 }
2373 return false;
2374 }
2375
2376
2382 {
2383 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return 0;
2384 if (_use2012version)
2385 {
2386 return _customsmartlinedef2012.linedata.character.baselineShiftEMs;
2387 }
2388 else
2389 {
2390 return 0;
2391 }
2392 }
2393
2398 void SetLineCharacterBaselineShift(twobyte baseline)
2399 {
2400 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2401 if (_use2012version)
2402 {
2403 _customsmartlinedef2012.linedata.character.baselineShiftEMs = baseline;
2404 }
2405 else
2406 {
2407 /* Nothing yet */
2408 }
2409 }
2410
2416 {
2417 if (!pFontInfo) return;
2418 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2419 if (_use2012version)
2420 {
2421 pFontInfo->SetNameByID(_customsmartlinedef2012.linedata.character.font);
2422 pFontInfo->SetSize(_customsmartlinedef2012.linedata.character.size);
2423 pFontInfo->SetEnigmaStyles(_customsmartlinedef2012.linedata.character.efx);
2424 }
2425 else
2426 {
2427 pFontInfo->SetNameByID(_customsmartlinedef.fontID_length);
2428 pFontInfo->SetSize(_customsmartlinedef.fontsize_space);
2429 pFontInfo->SetEnigmaStyles(_customsmartlinedef.efx);
2430 }
2431 }
2432
2438 {
2439 if (!pFontInfo) return;
2440 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2441 if (_use2012version)
2442 {
2443 _customsmartlinedef2012.linedata.character.font = pFontInfo->GetIDByName();
2444 _customsmartlinedef2012.linedata.character.size = pFontInfo->GetSize();
2445 _customsmartlinedef2012.linedata.character.efx = pFontInfo->GetEnigmaStyles();
2446 }
2447 else
2448 {
2449 _customsmartlinedef.fontID_length = pFontInfo->GetIDByName();
2450 _customsmartlinedef.fontsize_space = pFontInfo->GetSize();
2451 _customsmartlinedef.efx = pFontInfo->GetEnigmaStyles();
2452 }
2453 }
2454
2459 bool GetHorizontal() const
2460 {
2461 if (_use2012version)
2462 return GetBitFlag(_customsmartlinedef2012.flag, SL_HORIZONTAL);
2463 else
2464 return GetBitFlag(_customsmartlinedef.efx, SL_HORIZONTAL);
2465 }
2466
2471 void SetHorizontal(bool state)
2472 {
2473 if (_use2012version)
2474 Set16BitFlag(&_customsmartlinedef2012.flag, SL_HORIZONTAL, state);
2475 else
2476 Set16BitFlag(&_customsmartlinedef.efx, SL_HORIZONTAL, state);
2477 }
2478
2484 {
2485 if (_use2012version)
2486 return GetBitFlag(_customsmartlinedef2012.flag, SL_LINEADJUST_STARTHORIZ);
2487 else
2488 return GetBitFlag(_customsmartlinedef.efx, SL_LINEADJUST_STARTHORIZ);
2489 }
2490
2496 {
2497 if (_use2012version)
2498 Set16BitFlag(&_customsmartlinedef2012.flag, SL_LINEADJUST_STARTHORIZ, state);
2499 else
2500 Set16BitFlag(&_customsmartlinedef.efx, SL_LINEADJUST_STARTHORIZ, state);
2501 }
2502
2510 {
2511 return _use2012version ? _customsmartlinedef2012.lineadjustStartHoriz : _customsmartlinedef.lineadjustStartHoriz;
2512 }
2513
2522 {
2523 if (_use2012version)
2524 _customsmartlinedef2012.lineadjustStartHoriz = value;
2525 else
2526 _customsmartlinedef.lineadjustStartHoriz = value;
2527 }
2528
2534 {
2535 if (_use2012version)
2536 return GetBitFlag(_customsmartlinedef2012.flag, SL_LINEADJUST_ENDHORIZ);
2537 else
2538 return GetBitFlag(_customsmartlinedef.efx, SL_LINEADJUST_ENDHORIZ);
2539 }
2540
2546 {
2547 if (_use2012version)
2548 Set16BitFlag(&_customsmartlinedef2012.flag, SL_LINEADJUST_ENDHORIZ, state);
2549 else
2550 Set16BitFlag(&_customsmartlinedef.efx, SL_LINEADJUST_ENDHORIZ, state);
2551 }
2552
2560 {
2561 return _use2012version ? _customsmartlinedef2012.lineadjustEndHoriz : _customsmartlinedef.lineadjustEndHoriz;
2562 }
2563
2572 {
2573 if (_use2012version)
2574 _customsmartlinedef2012.lineadjustEndHoriz = value;
2575 else
2576 _customsmartlinedef.lineadjustEndHoriz = value;
2577 }
2578
2584 {
2585 if (_use2012version)
2586 return GetBitFlag(_customsmartlinedef2012.flag, SL_LINEADJUST_CONTHORIZ);
2587 else
2588 return GetBitFlag(_customsmartlinedef.efx, SL_LINEADJUST_CONTHORIZ);
2589 }
2590
2596 {
2597 if (_use2012version)
2598 Set16BitFlag(&_customsmartlinedef2012.flag, SL_LINEADJUST_CONTHORIZ, state);
2599 else
2600 Set16BitFlag(&_customsmartlinedef.efx, SL_LINEADJUST_CONTHORIZ, state);
2601 }
2602
2610 {
2611 return _use2012version ? _customsmartlinedef2012.lineadjustContinueHoriz : _customsmartlinedef.lineadjustContinueHoriz;
2612 }
2613
2622 {
2623 if (_use2012version)
2624 _customsmartlinedef2012.lineadjustContinueHoriz = value;
2625 else
2626 _customsmartlinedef.lineadjustContinueHoriz = value;
2627 }
2628
2634 {
2635 /* start and end are always the same, so return the start. */
2636 return _use2012version ? _customsmartlinedef2012.lineadjustStartVert : _customsmartlinedef.lineadjustStartVert;
2637 }
2638
2643 void SetLineVerticalOffset(Evpu16 value)
2644 {
2645 /* Since the UI only supports one value, set both. */
2646 if (_use2012version)
2647 {
2648 _customsmartlinedef2012.lineadjustStartVert = value;
2649 _customsmartlinedef2012.lineadjustEndVert = value;
2650 }
2651 else
2652 {
2653 _customsmartlinedef.lineadjustStartVert = value;
2654 _customsmartlinedef.lineadjustEndVert = value;
2655 }
2656 }
2657
2663 void SetLineStyle(twobyte value)
2664 {
2665 switch (value)
2666 {
2667 case CUSTOMLINE_SOLID:
2668 case CUSTOMLINE_DASHED:
2669 case CUSTOMLINE_CHARACTER:
2670 break;
2671 default:
2672 return;
2673 }
2674 if (_use2012version)
2675 _customsmartlinedef2012.linetype = value;
2676 else
2677 _customsmartlinedef.linetype = value;
2678 }
2679
2685 void SetLineWidth(Efix16 value)
2686 {
2687 switch (GetLineStyle())
2688 {
2689 case CUSTOMLINE_SOLID:
2690 if (_use2012version)
2691 _customsmartlinedef2012.linedata.solid.lineWidth = value;
2692 else
2693 _customsmartlinedef.linetypeinfo = value;
2694 break;
2695 case CUSTOMLINE_DASHED:
2696 if (_use2012version)
2697 _customsmartlinedef2012.linedata.dashed.lineWidth = value;
2698 else
2699 _customsmartlinedef.linetypeinfo = value;
2700 break;
2701 }
2702 }
2703
2704
2710 Efix16 GetLineDashLength() const
2711 {
2712 if (GetLineStyle() != CUSTOMLINE_DASHED) return 0;
2713 if (_use2012version)
2714 return _customsmartlinedef2012.linedata.dashed.dashOn;
2715 else
2716 {
2717 /* Nothing yet */
2718 return 0;
2719 }
2720 return 0;
2721 }
2722
2729 void SetLineDashLength(Efix16 value)
2730 {
2731 if (GetLineStyle() != CUSTOMLINE_DASHED) return;
2732 if (_use2012version)
2733 _customsmartlinedef2012.linedata.dashed.dashOn = value;
2734 else
2735 {
2736 /* Nothing yet */
2737 }
2738 }
2739
2746 Efix16 GetLineDashSpace() const
2747 {
2748 if (GetLineStyle() != CUSTOMLINE_DASHED) return 0;
2749 if (_use2012version)
2750 return _customsmartlinedef2012.linedata.dashed.dashOff;
2751 else
2752 {
2753 /* Nothing yet */
2754 }
2755 return 0;
2756 }
2757
2764 void SetLineDashSpace(Efix16 value)
2765 {
2766 if (GetLineStyle() != CUSTOMLINE_DASHED) return;
2767 if (_use2012version)
2768 _customsmartlinedef2012.linedata.dashed.dashOff = value;
2769 else
2770 {
2771 }
2772 }
2773
2781 void SetStartArrowheadStyle(twobyte value)
2782 {
2783 switch (value)
2784 {
2785 case CLENDPOINT_NONE:
2786 case CLENDPOINT_PRESET:
2787 case CLENDPOINT_CUSTOM:
2788 case CLENDPOINT_HOOK:
2789 break;
2790 default:
2791 return;
2792 }
2793
2794 if (_use2012version)
2795 _customsmartlinedef2012.endpointstylestart = value;
2796 else
2797 _customsmartlinedef.endpointstylestart = value;
2798 }
2799
2807 void SetStartArrowheadShapeID(twobyte shapeID)
2808 {
2809 if (_use2012version)
2810 _customsmartlinedef2012.startPointData = shapeID;
2811 else
2812 _customsmartlinedef.startarrowdataLo = shapeID;
2813 }
2814
2822 void SetEndArrowheadStyle(twobyte value)
2823 {
2824 switch (value)
2825 {
2826 case CLENDPOINT_NONE:
2827 case CLENDPOINT_PRESET:
2828 case CLENDPOINT_CUSTOM:
2829 case CLENDPOINT_HOOK:
2830 break;
2831 default:
2832 return;
2833 }
2834 if (_use2012version)
2835 _customsmartlinedef2012.endpointstyleend = value;
2836 else
2837 _customsmartlinedef.endpointstyleend = value;
2838 }
2839
2846 Efix16 GetStartHookLength() const
2847 {
2848 if (GetStartArrowheadStyle() != CLENDPOINT_HOOK) return 0;
2849 if (_use2012version)
2850 return _customsmartlinedef2012.startPointData;
2851 else
2852 {
2853 /* Nothing yet */
2854 }
2855 return 0;
2856 }
2857
2864 void SetStartHookLength(Efix16 value)
2865 {
2866 if (GetStartArrowheadStyle() != CLENDPOINT_HOOK) return;
2867 if (_use2012version)
2868 _customsmartlinedef2012.startPointData = value;
2869 else
2870 {
2871 /* Nothing yet */
2872 }
2873 }
2874
2881 Efix16 GetEndHookLength() const
2882 {
2883 if (GetEndArrowheadStyle() != CLENDPOINT_HOOK) return 0;
2884 if (_use2012version)
2885 return _customsmartlinedef2012.endPointData;
2886 else
2887 {
2888 /* Nothing yet */
2889 }
2890 return 0;
2891 }
2892
2898 void SetEndHookLength(Efix16 value)
2899 {
2900 if (GetEndArrowheadStyle() != CLENDPOINT_HOOK) return;
2901 if (_use2012version)
2902 _customsmartlinedef2012.endPointData = value;
2903 else
2904 {
2905 /* Nothing yet */
2906 }
2907 }
2908
2916 void SetEndArrowheadShapeID(twobyte shapeID)
2917 {
2918 if (_use2012version)
2919 _customsmartlinedef2012.endPointData = shapeID;
2920 else
2921 _customsmartlinedef.endarrowdataLo = shapeID;
2922 }
2923
2932 void SetLineCharacter(eUniChar32 character)
2933 {
2934 if (GetLineStyle() != CUSTOMLINE_CHARACTER) return;
2935 if (_use2012version)
2936 _customsmartlinedef2012.linedata.character.lineChar = character;
2937 else
2938 _customsmartlinedef.linetypeinfo = character;
2939 }
2940
2941#ifdef PDK_FRAMEWORK_DEBUG
2942 void DebugDump() override
2943 {
2945 }
2946#endif
2947
2948};
2949
2950
2951
2964{
2965protected:
2966#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2967 __FCBaseData* CreateElement() override { return new FCSmartShapeMeasureMark(); }
2968#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2969public:
2975
2976 const char* ClassName() const override { return "FCSmartShapeMeasureMarks"; }
2977
2983 int LoadAll() override;
2984
2996 int LoadAllForRegion(FCMusicRegion* pRegion, bool removeduplicates = true);
2997
3004 {
3005 for (int i = 0; i < GetCount() - 1; i++)
3006 {
3008
3009 int j = GetCount() - 1;
3010 while (j > i)
3011 {
3013 if (pShapeMark2->GetShapeNumber() == pShapeMark1->GetShapeNumber())
3014 {
3015 ClearItemAt(j);
3016 }
3017 j--;
3018 }
3019 }
3020 }
3021
3030 {
3031 int i = GetCount() - 1;
3032 while (i >= 0)
3033 {
3035 FCSmartShape* pSlur = pShapeMark->CreateSmartShape(false);
3036
3037 if (pSlur)
3038 {
3039 if (!pSlur->IsSlur()) ClearItemAt(i);
3040 delete pSlur;
3041 }
3042 i--;
3043 }
3044 }
3045
3054 {
3055 int i = GetCount() - 1;
3056 while (i >= 0)
3057 {
3059 FCSmartShape* pHairpin = pShapeMark->CreateSmartShape(false);
3060
3061 if (pHairpin && (!pHairpin->IsHairpin())) ClearItemAt(i);
3062 i--;
3063 delete pHairpin;
3064 }
3065 }
3066
3075 {
3076 int i = GetCount() - 1;
3077 while (i >= 0)
3078 {
3080 FCSmartShape* pSmartshape = pShapeMark->CreateSmartShape(false);
3081
3082 if (pSmartshape && (!pSmartshape->IsCustomLine())) ClearItemAt(i);
3083 i--;
3084 delete pSmartshape;
3085 }
3086 }
3087
3095 {
3096 int i = GetCount() - 1;
3097 while (i >= 0)
3098 {
3100 FCSmartShape* pSmartShape = pShapeMark->CreateSmartShape(false);
3101
3102 if (pSmartShape)
3103 {
3104 if (!pSystemStaves->FindStaff(pSmartShape->GetTerminateSegmentLeft()->GetStaff()) &&
3105 !pSystemStaves->FindStaff(pSmartShape->GetTerminateSegmentRight()->GetStaff()))
3106 {
3107 ClearItemAt(i);
3108 }
3109 }
3110 i--;
3111 delete pSmartShape;
3112 }
3113 }
3114
3120 void KeepStaffOnly(twobyte staffno)
3121 {
3122 int i = GetCount() - 1;
3123 while (i >= 0)
3124 {
3126 FCSmartShape* pSmartShape = pShapeMark->CreateSmartShape(false);
3127
3128 if (pSmartShape)
3129 {
3130 if ((pSmartShape->GetTerminateSegmentLeft()->GetStaff() != staffno) &&
3131 (pSmartShape->GetTerminateSegmentRight()->GetStaff() != staffno))
3132 {
3133 ClearItemAt(i);
3134 }
3135 }
3136 i--;
3137 delete pSmartShape;
3138 }
3139 }
3140
3146 {
3147 for (int i = 0; i < GetCount() - 1; i++)
3148 {
3150 if (pShapeMark->GetShapeNumber() == cmperSmartShape) return pShapeMark;
3151 }
3152 return NULL;
3153 }
3154
3160};
3161
3162
3163#ifdef PDK_FRAMEWORK_ENTRIES
3171{
3172protected:
3173#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3174 __FCBaseData* CreateElement() override { return new FCSmartShapeEntryMark(); }
3175#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3176public:
3177 const char* ClassName() const override { return "FCSmartShapeEntryMarks"; }
3178
3185 FCSmartShapeEntryMarks(FCNoteEntry* pConnectEntry = NULL) :
3186 __FCCollectionEntryDetail(pConnectEntry) {}
3187
3193};
3194
3195
3196
3205{
3206protected:
3207#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3208 __FCBaseData* CreateElement() override { return new FCCustomSmartLineDef(); }
3209#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3210public:
3216
3217 const char* ClassName() const override { return "FCCustomSmartLineDefs"; }
3218
3225};
3226#endif //PDK_FRAMEWORK_ENTRIES
3227
3228
3229
3235{
3236protected:
3237#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3238 __FCBaseData* CreateElement() override { return new FCSmartShape(); }
3239#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3240public:
3241 const char* ClassName() const override { return "FCSmartShapes"; }
3242
3249 {
3250 for (int i = 0; i < GetCount(); i++)
3251 {
3252 FCSmartShape* pSmartShape = (FCSmartShape*) GetItemAt(i);
3253 if (!pSmartShape->IsEntryBased()) continue;
3254 if (pSmartShape->GetTerminateSegmentLeft()->GetEntryNumber() == entnum)
3255 {
3256 return pSmartShape;
3257 }
3258 }
3259 return NULL;
3260 }
3261
3262};
3263
3264#endif /* PDK_FRAMEWORK_SMARTSHAPES */
3265
3266#endif /* FF_SMARTSHAPES_H */
3267
Base class for all data-related classes (that handles Finale data).
Definition ff_base.h:676
virtual twobyte CalcLastInci()
For internal use only!
Definition ff_base.h:755
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition ff_base.h:712
void SetCustomTag(EXTAG tag)
Sets the custom Enigma tag, for classes that support multiple Enigma tags.
Definition ff_base.h:882
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass.
Definition ff_base.h:695
virtual EVERSION EnigmaVersion() const
The Enigma version for save/load/create/delete operations.
Definition ff_base.h:812
virtual int DataSizeLoad() const =0
Returns the data size for the data structure that should be loaded.
virtual EXTAG Tag() const =0
The Enigma tag for the derived class.
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition finaleframework.cpp:838
virtual void * Allocate()=0
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition ff_base.h:708
Base class for the Finale Framework classes.
Definition ff_base.h:71
static void DebugOutHex(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in h...
Definition finaleframework.cpp:404
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag.
Definition finaleframework.cpp:635
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition ff_base.h:84
static void DebugOutInt(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in d...
Definition finaleframework.cpp:335
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets/resets a 32 bit flag, by using a bit mask.
Definition finaleframework.cpp:643
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition finaleframework.cpp:526
bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits) const
Gets a state from flag bits. Returns true if any bit in the mask is set.
Definition ff_base.h:485
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:609
Base class specially designed for collections of entry detail classes.
Definition ff_basecollection.h:679
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition ff_basecollection.h:26
bool ClearItemAt(int index)
Deletes the object at the index position and disposes the object. Index is 0-based.
Definition finaleframework.cpp:13791
void ClearAll()
Destroys all the objects in the collection and empties the collection.
Definition ff_basecollection.h:151
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_basecollection.h:334
int GetCount() const
Returns the number of elements of the collection.
Definition ff_basecollection.h:102
__FCBase * GetItemAt(int index) const
Returns the object at the index position. Index is 0-based.
Definition finaleframework.cpp:13767
Base class for "other" data with incis of the __FCInciOther class (where it's common to collect all i...
Definition ff_basecollection.h:754
Base class for "other" data without incis (inci always 0.)
Definition ff_basecollection.h:843
Base class that provides the basic functionality for entry detail data (such as Special Tools modific...
Definition ff_entrydetails.h:27
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_entrydetails.h:186
Base class for "other" (ot_*) data with incis.
Definition ff_other.h:63
Abstract data class that contains a detail record without using the inci.
Definition ff_details.h:30
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_details.h:49
Base class for the "Other" (ot_*) Enigma structures that don't use the inci parameter.
Definition ff_other.h:231
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_other.h:349
Class that contains data that appears in the middle of a long smart shape. This class is normally lin...
Definition ff_smartshapes.h:425
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:476
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_smartshapes.h:454
FCCenterSmartShape()
The constructor.
Definition ff_smartshapes.h:467
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:453
The class for a custom smart shape lines.
Definition ff_smartshapes.h:1889
void SetLineCharacterBaselineShift(twobyte baseline)
Sets the vertical adjustment value for characters on a character line. In EMs.
Definition ff_smartshapes.h:2398
bool GetUseAfterStartTextOffset() const
Gets whether the shape line should use the horizontal start "after text" adjustment setting.
Definition ff_smartshapes.h:2483
void SetLineCharacterFontInfo(FCFontInfo *pFontInfo)
Sets the font information for a character line.
Definition ff_smartshapes.h:2437
void SetStartArrowheadShapeID(twobyte shapeID)
Sets the (custom) shape ID for the start arrowhead.
Definition ff_smartshapes.h:2807
Evpu16 GetContinuationLineHorizontalOffset() const
Gets the horizontal continuation line adjustment setting.
Definition ff_smartshapes.h:2609
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:1975
bool DeepDeleteData() override
Overridden version of DeepDeleteData(). It deletes the text strings as well as the data.
Definition finaleframework.cpp:36402
bool SaveNewTextString(TEXT_REFERENCE reference, FCString *pString)
Saves a text string to a new text position block.
Definition ff_smartshapes.h:2356
void SetEndArrowheadStyle(twobyte value)
Returns the style of the end arrowhead.
Definition ff_smartshapes.h:2822
Evpu16 GetStartLineHorizontalOffset() const
Gets the horizontal start line adjustment setting.
Definition ff_smartshapes.h:2509
void SetHorizontalTextPos(TEXT_REFERENCE reference, Evpu16 position)
Sets the horizontal position for one of the attached text blocks.
Definition ff_smartshapes.h:2130
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_smartshapes.h:1976
twobyte GetLineCharacterBaselineShift() const
Returns the vertical adjustment value for characters on a character line. In EMs.
Definition ff_smartshapes.h:2381
Efix16 GetLineDashSpace() const
Returns the line dash length for dashed lines, in EFIXes.
Definition ff_smartshapes.h:2746
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:2898
TEXT_REFERENCE
Constant used to reference the different text positions in this class' methods.
Definition ff_smartshapes.h:1896
void SetLineWidth(Efix16 value)
Sets the line width for solid and dashed lines.
Definition ff_smartshapes.h:2685
twobyte GetLineStyle() const
Returns any of these constants: CUSTOMLINE_SOLID, CUSTOMLINE_DASHED, CUSTOMLINE_CHARACTER.
Definition ff_smartshapes.h:2206
bool GetUseAfterContinuationTextOffset() const
Gets whether the shape line should use the horizontal continuation "after text" adjustment setting.
Definition ff_smartshapes.h:2583
void SetLineDashLength(Efix16 value)
Sets the line dash length for dashed lines, in EFIXes.
Definition ff_smartshapes.h:2729
void SetEndLineHorizontalOffset(Evpu16 value)
Sets the horizontal end line adjustment setting.
Definition ff_smartshapes.h:2571
twobyte GetRawStringNumber(TEXT_REFERENCE reference)
Returns the raw string number for one of the attached text blocks.
Definition ff_smartshapes.h:2011
Evpu16 GetVerticalTextPos(TEXT_REFERENCE reference)
Returns the vertical position for one of the attached text blocks.
Definition ff_smartshapes.h:2090
bool GetHorizontal() const
Returns if the shape should only be allowed to be horizontal or not.
Definition ff_smartshapes.h:2459
twobyte GetEndArrowheadShapeID() const
Returns the (custom) shape ID for the end arrowhead, if a shape is used.
Definition ff_smartshapes.h:2271
twobyte GetStartArrowheadShapeID() const
Returns the (custom) shape ID for the start arrowhead, if a shape is used.
Definition ff_smartshapes.h:2258
void SetLineDashSpace(Efix16 value)
Sets the line dash length for dashed lines, in EFIXes.
Definition ff_smartshapes.h:2764
void SetUseBeforeEndTextOffset(bool state)
Sets if the shape line should use the horizontal end "before text" adjustment setting.
Definition ff_smartshapes.h:2545
Evpu16 GetEndLineHorizontalOffset() const
Gets the horizontal end line adjustment setting.
Definition ff_smartshapes.h:2559
Efix16 GetLineDashLength() const
Returns the line dash length for solid and dashed lines, in EFIXes.
Definition ff_smartshapes.h:2710
bool GetUseBeforeEndTextOffset() const
Gets whether the shape line should use the horizontal end "before text" adjustment setting.
Definition ff_smartshapes.h:2533
void SetHorizontal(bool state)
Sets if the shape should only be allowed to be horizontal or not.
Definition ff_smartshapes.h:2471
void SetLineStyle(twobyte value)
Sets the line style to any of these constants: CUSTOMLINE_SOLID, CUSTOMLINE_DASHED,...
Definition ff_smartshapes.h:2663
FCCustomSmartLineDef()
The constructor. It sets the _use2012version flag.
Definition finaleframework.cpp:36386
void SetStartLineHorizontalOffset(Evpu16 value)
Sets the horizontal start line adjustment setting.
Definition ff_smartshapes.h:2521
void SetStartArrowheadStyle(twobyte value)
Sets the style of the start arrowhead.
Definition ff_smartshapes.h:2781
void SetLineVerticalOffset(Evpu16 value)
Sets the vertical position adjustment for lines.
Definition ff_smartshapes.h:2643
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:2846
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:2881
void SetUseAfterStartTextOffset(bool state)
Sets if the shape line should use the horizontal start "after text" adjustment setting.
Definition ff_smartshapes.h:2495
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:2942
void SetUseAfterContinuationTextOffset(bool state)
Sets if the shape line should use the horizontal continuation "after text" adjustment setting.
Definition ff_smartshapes.h:2595
Evpu16 GetLineVerticalOffset() const
Gets the vertical position adjustment for lines.
Definition ff_smartshapes.h:2633
twobyte GetEndArrowheadStyle() const
Returns the style of the end arrowhead.
Definition ff_smartshapes.h:2246
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:2864
void GetLineCharacterFontInfo(FCFontInfo *pFontInfo)
Gets the font information for a character line.
Definition ff_smartshapes.h:2415
eUniChar32 GetLineCharacter() const
Returns the character used for character lines.
Definition ff_smartshapes.h:2283
void SetVerticalTextPos(TEXT_REFERENCE reference, Evpu16 position)
Sets the vertical position for one of the attached text blocks.
Definition ff_smartshapes.h:2170
void SetContinuationLineHorizontalOffset(Evpu16 value)
Sets the horizontal continuation line adjustment setting.
Definition ff_smartshapes.h:2621
void SetLineCharacter(eUniChar32 character)
Sets the character used for character lines.
Definition ff_smartshapes.h:2932
void SetEndArrowheadShapeID(twobyte shapeID)
Sets the (custom) shape ID for the end arrowhead.
Definition ff_smartshapes.h:2916
bool SaveTextString(TEXT_REFERENCE reference, FCString *pString)
Resaves a text string to an already existing text position block.
Definition ff_smartshapes.h:2330
FCString * CreateTextString(TEXT_REFERENCE reference)
Creates a text string object of the indicated position text.
Definition ff_smartshapes.h:2298
Efix16 GetLineWidth() const
Returns the line width for solid and dashed lines.
Definition ff_smartshapes.h:2215
twobyte GetStartArrowheadStyle() const
Returns the style of the start arrowhead.
Definition ff_smartshapes.h:2234
Evpu16 GetHorizontalTextPos(TEXT_REFERENCE reference)
Returns the horizontal position for one of the attached text blocks.
Definition ff_smartshapes.h:2050
Collection class for FCCustomSmartLineDef class objects.
Definition ff_smartshapes.h:3205
FCCustomSmartLineDef * GetItemAt(int index) const
Overridden GetItemAt() method.
Definition ff_smartshapes.h:3223
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:3217
FCCustomSmartLineDefs()
The constructor.
Definition ff_smartshapes.h:3215
Class for document-independent font information.
Definition ff_base.h:1138
void SetNameByID(EFONTID id)
Sets the font name by using the document's internal Enigma font ID.
Definition finaleframework.cpp:3650
void SetSize(int fontsize)
Sets the font size as an integer value.
Definition ff_base.h:1546
FLAG_16 GetEnigmaStyles() const
Gets the font style as standard Enigma bit storage.
Definition ff_base.h:1358
int GetSize() const
Returns the font size as an integer number.
Definition ff_base.h:1289
void SetEnigmaStyles(FLAG_16 fontstyles)
Sets the font style as standard Enigma bit storage.
Definition ff_base.h:1469
EFONTID GetIDByName() const
Gets the internal Enigma font ID for the current document by searching for the font name....
Definition finaleframework.cpp:3558
Class that encapsulates EREGION and provides additional functionality to region handling.
Definition ff_region.h:25
Encapsulates a note entry from an owner class (for example FCNoteEntryCell, FCNoteEntryLayer) class.
Definition ff_noteframe.h:940
void SetSmartShapeFlag(bool state)
Sets the flag that marks that a smart shape is attached to the entry.
Definition ff_noteframe.h:1650
ENTNUM GetEntryNumber() const
Returns the internal entry number (ID) for the note entry.
Definition ff_noteframe.h:1319
Simple class for the representation of x, y coordinates.
Definition ff_base.h:4892
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:17
bool Load(twobyte number)
Loads the text with the indicated text number.
Definition finaleframework.cpp:4386
bool SaveNew()
Saves the text at the first empty spot.
Definition finaleframework.cpp:4430
FCString * CreateString() const
Creates a string object with the loaded text. If the string doesn't exist (or if it's empty),...
Definition finaleframework.cpp:4470
bool SaveAs(twobyte number)
Saves the text by a new text number.
Definition finaleframework.cpp:4423
void SetText(const FCString *pString)
Sets the text for the object. (The object needs to be saved to Finale to take effect....
Definition finaleframework.cpp:4437
virtual twobyte GetItemNo() const
Gets the item number for the text.
Definition ff_text.h:216
Helper class for FCSmartShape. This class is only constructed indirectly by the FCSmartShape....
Definition ff_smartshapes.h:758
void SetDefaultHairpinSize()
Helper method to set the hairpin size to it's unmodified gap size.
Definition ff_smartshapes.h:904
FCSmartShapeCtrlPointAdjust(__SSCTLPTADJ *pCtrlPointAdj, FCSmartShape *pReference)
The constructor. Set up by FCSmartShape.
Definition ff_smartshapes.h:765
twobyte GetControlPoint1OffsetY() const
Sets the first vertical control point.
Definition ff_smartshapes.h:784
void SetSlurShapeUnder()
Helper method to mark that the slur shape goes down.
Definition ff_smartshapes.h:878
twobyte GetControlPoint2OffsetX() const
Gets the second horizontal control point.
Definition ff_smartshapes.h:792
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:853
void SetControlPoint2OffsetX(twobyte value)
Sets the second horizontal control point.
Definition ff_smartshapes.h:834
void SetControlPoint2OffsetY(twobyte value)
Sets the second vertical control point.
Definition ff_smartshapes.h:843
void SetControlPoint1OffsetX(twobyte value)
Sets the first horizontal control point.
Definition ff_smartshapes.h:814
void SetSlurShapeOver()
Helper method to mark that the slur shape goes up.
Definition ff_smartshapes.h:865
void SetDefaultSlurShape()
Helper method to set the slur arc to it's default shape.
Definition ff_smartshapes.h:917
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:923
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:762
void SetSlurShapeUndetermined()
Helper method to mark that the slur shape direction is undetermined.
Definition ff_smartshapes.h:891
void SetControlPoint1OffsetY(twobyte value)
Sets the first vertical control point.
Definition ff_smartshapes.h:823
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:805
twobyte GetControlPoint1OffsetX() const
Gets the first horizontal control point.
Definition ff_smartshapes.h:778
twobyte GetControlPoint2OffsetY() const
Gets the second vertical control point.
Definition ff_smartshapes.h:798
Class for smartshape assignments/connections to an entry.
Definition ff_smartshapes.h:310
void SetShapeNumber(CMPER value)
Sets the connected smart shape number/ID.
Definition ff_smartshapes.h:393
bool CalcRightMark()
Returns true if the mark is the end (right-most) of the smart shape.
Definition finaleframework.cpp:35972
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:413
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_smartshapes.h:339
CMPER GetShapeNumber() const
Gets the smart shape number/ID.
Definition ff_smartshapes.h:399
bool CalcLeftMark()
Returns true if the mark is the start (left-most) of the smart shape.
Definition finaleframework.cpp:35962
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:338
FCSmartShapeEntryMark()
The constructor.
Definition ff_smartshapes.h:355
FCSmartShape * CreateSmartShape(bool load_center_shapes)
Creates the full FCSmartShape object based of the smart shape measure mark.
Definition finaleframework.cpp:35944
Collection class for FCSmartShapeEntryMark class objects.
Definition ff_smartshapes.h:3171
FCSmartShapeEntryMark * GetItemAt(int index) const
Overloaded GetItemAt() method.
Definition ff_smartshapes.h:3192
FCSmartShapeEntryMarks(FCNoteEntry *pConnectEntry=NULL)
The constructor.
Definition ff_smartshapes.h:3185
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:3177
A record that represents a smart shape in the score. It is connected to the score through FCSmartShap...
Definition ff_smartshapes.h:958
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_smartshapes.h:1158
bool GetEntryBased() const
Returns true if the smart shape is a note entry-connected shape.
Definition ff_smartshapes.h:1277
bool CalcLyricBased() const
Returns true if the smart shape is a lyric-connected shape. This is dependent on a number of factors....
Definition finaleframework.cpp:36091
bool IsTabSlide()
Returns true if the shape is a tab slide.
Definition ff_smartshapes.h:1776
bool GetPresetShape() const
Returns if the shape is preset or custom.
Definition ff_smartshapes.h:1291
FCSmartShapeCtrlPointAdjust * GetCtrlPointAdjust()
Returns the object that controls the shape of the smart shape.
Definition ff_smartshapes.h:1328
void _ClearCenterShapes()
For internal use.
Definition ff_smartshapes.h:1225
bool GetMakeHorizontal() const
Returns the state of the "make horizontal" flag.
Definition ff_smartshapes.h:1339
SMARTSHAPE_TYPES
The smart shape types.
Definition ff_smartshapes.h:1001
@ SMARTSHAPE_SOLIDLINEDOWNUP
Definition ff_smartshapes.h:1108
@ SMARTSHAPE_SOLIDLINEDOWNLEFT
Definition ff_smartshapes.h:1096
@ SMARTSHAPE_SLURDOWN
Definition ff_smartshapes.h:1003
@ SMARTSHAPE_DASHEDSLURAUTO
Definition ff_smartshapes.h:1129
@ SMARTSHAPE_HYPHEN
Definition ff_smartshapes.h:1117
@ SMARTSHAPE_TWOOCTAVEDOWN
Definition ff_smartshapes.h:1063
@ SMARTSHAPE_SOLIDLINEUPLEFT
Definition ff_smartshapes.h:1093
@ SMARTSHAPE_DASHLINEDOWN
Definition ff_smartshapes.h:1024
@ SMARTSHAPE_TWOOCTAVEUP
Definition ff_smartshapes.h:1066
@ SMARTSHAPE_DASHLINEUPDOWN
Definition ff_smartshapes.h:1111
@ SMARTSHAPE_OCTAVEUP
Definition ff_smartshapes.h:1018
@ SMARTSHAPE_DASHEDSLURDOWN
Definition ff_smartshapes.h:1123
@ SMARTSHAPE_CRESCENDO
Definition ff_smartshapes.h:1012
@ SMARTSHAPE_SLURAUTO
Definition ff_smartshapes.h:1048
@ SMARTSHAPE_DASHCURVEAUTO
Definition ff_smartshapes.h:1051
@ SMARTSHAPE_OCTAVEDOWN
Definition ff_smartshapes.h:1015
@ SMARTSHAPE_WORD_EXT
Definition ff_smartshapes.h:1120
@ SMARTSHAPE_SOLIDLINEUP
Definition ff_smartshapes.h:1042
@ SMARTSHAPE_DASHLINEUPLEFT
Definition ff_smartshapes.h:1099
@ SMARTSHAPE_DASHLINEUP
Definition ff_smartshapes.h:1021
@ SMARTSHAPE_SOLIDLINE
Definition ff_smartshapes.h:1036
@ SMARTSHAPE_CUSTOM
Definition ff_smartshapes.h:1090
@ SMARTSHAPE_DASHLINEDOWNLEFT
Definition ff_smartshapes.h:1102
@ SMARTSHAPE_BEND_CURVE
Definition ff_smartshapes.h:1087
@ SMARTSHAPE_DASHCURVEUP
Definition ff_smartshapes.h:1030
@ SMARTSHAPE_SOLIDLINEUPDOWN
Definition ff_smartshapes.h:1105
@ SMARTSHAPE_DASHLINEDOWN2
Definition ff_smartshapes.h:1069
@ SMARTSHAPE_TABSLIDE
Definition ff_smartshapes.h:1081
@ SMARTSHAPE_DIMINUENDO
Definition ff_smartshapes.h:1009
@ SMARTSHAPE_DASHLINEUP2
Definition ff_smartshapes.h:1072
@ SMARTSHAPE_TRILL
Definition ff_smartshapes.h:1045
@ SMARTSHAPE_DASHEDSLURUP
Definition ff_smartshapes.h:1126
@ SMARTSHAPE_TRILLEXT
Definition ff_smartshapes.h:1054
@ SMARTSHAPE_SOLIDLINEDOWN2
Definition ff_smartshapes.h:1057
@ SMARTSHAPE_SOLIDLINEUP2
Definition ff_smartshapes.h:1060
@ SMARTSHAPE_SOLIDLINEDOWN
Definition ff_smartshapes.h:1039
@ SMARTSHAPE_DASHLINE
Definition ff_smartshapes.h:1033
@ SMARTSHAPE_GLISSANDO
Definition ff_smartshapes.h:1075
@ SMARTSHAPE_BEND_HAT
Definition ff_smartshapes.h:1084
@ SMARTSHAPE_DASHLINEDOWNUP
Definition ff_smartshapes.h:1114
@ SMARTSHAPE_DASHCURVEDOWN
Definition ff_smartshapes.h:1027
bool IsOverSlur()
Returns true if the smart shape is an "over" slur (solid or dashed).
Definition ff_smartshapes.h:1637
bool CalcLeftCellMetricPos(FCPoint *pPoint)
Calculates the left-side metrics position for measure-attached smart shape.
Definition finaleframework.cpp:36122
bool SaveNewEverything(FCNoteEntry *pFirstEntry=NULL, FCNoteEntry *pLastEntry=NULL)
Saves all structures required for smart shapes.
Definition finaleframework.cpp:36285
bool IsSolidSlur()
Returns true if the smart shape is a solid (non-dashed) slur.
Definition ff_smartshapes.h:1715
void SetMakeHorizontal(bool state)
Sets the state of the "make horizontal" flag.
Definition ff_smartshapes.h:1435
bool IsWithinRegion(FCMusicRegion *pRegion)
Returns true if the full smart shape is within the region (both vertically and horizontally....
Definition finaleframework.cpp:36200
void SetSlurFlags(bool entrybased)
Configures the basic smart shape flags required for a slur.
Definition ff_smartshapes.h:1466
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:1444
bool IsAutoSlur()
Returns true if the smart shape is an "auto" slur (solid or dashed).
Definition ff_smartshapes.h:1620
bool CalcRightCellMetricPos(FCPoint *pPoint)
Calculates the right-side metrics position for measure-attached smart shape.
Definition finaleframework.cpp:36135
void SetEntryAttachedFlags(bool presetshape)
Configures the smart shape as an entry-attached shape.
Definition ff_smartshapes.h:1497
void SetMeasureAttachedFlags(bool presetshape, bool makehorizontal)
Configures the smart shape flags as a measure-attached shape.
Definition finaleframework.cpp:36075
SMARTSHAPE_3STATE
An enum used for the methods that need a 3-state auto/on/off. Currently used by the GetAvoidAccidenta...
Definition ff_smartshapes.h:1146
@ SS_AUTOSTATE
Definition ff_smartshapes.h:1154
@ SS_OFFSTATE
Definition ff_smartshapes.h:1148
@ SS_ONSTATE
Definition ff_smartshapes.h:1151
void SetBeatAttached(bool state)
On Finale 2014 and above, it will define if the end points should be beat-attached....
Definition finaleframework.cpp:36104
void SetLineID(twobyte identifier)
Returns the line style ID for custom smart shape lines.
Definition ff_smartshapes.h:1429
bool SaveNew() override
Overridden version of the creation of smart shapes, since the smart shape data has special requiremen...
Definition finaleframework.cpp:36276
FCSmartShapeSegment * GetTerminateSegmentLeft()
Returns the object pointer for the terminating left-side end segment.
Definition ff_smartshapes.h:1303
FCSmartShape()
The constructor.
Definition ff_smartshapes.h:1174
void SetEngraverSlur(SMARTSHAPE_3STATE state)
Sets the engraver slur setting to any of the auto/on/off states.
Definition ff_smartshapes.h:1551
void SetVisible(bool visible)
Sets the visibility state of the smart shape.
Definition ff_smartshapes.h:1450
bool GetBeatAttached() const
On Finale 2014 and above, returns if the end points are beat-attached or not.
Definition finaleframework.cpp:36113
void SetHairpinFlags()
Configures the basic smart shape flags required for a hairpin.
Definition ff_smartshapes.h:1486
void SetShapeType(SMARTSHAPE_TYPES shapevalue)
Sets the smart shape style.
Definition ff_smartshapes.h:1408
bool GetVisible() const
Returns the visibility state of the smart shape.
Definition ff_smartshapes.h:1354
twobyte _GetRightSideNoteID() const
Definition ff_smartshapes.h:1207
void _SetRightSideNoteID(twobyte noteID)
Definition ff_smartshapes.h:1219
bool IsUnderSlur()
Returns true if the smart shape is an "under" slur (solid or dashed).
Definition ff_smartshapes.h:1654
twobyte _GetLeftSideNoteID() const
Definition ff_smartshapes.h:1201
bool CalcRightEntryMetricPos(FCNoteEntry *pEntry, FCPoint *pPoint)
Calculates the right-side metrics position for a note-attached smart shape.
Definition finaleframework.cpp:36164
bool GetMaintainAngle() const
Returns the flag that determines how the how the y value is interpreted on SmartShape system breaks.
Definition ff_smartshapes.h:1348
bool IsCustomLine()
Returns true if the shape is a smartshape created with the Custom Line Tool.
Definition ff_smartshapes.h:1795
SMARTSHAPE_TYPES GetShapeType() const
Returns the smart shape style (any of the SMARTSHAPE_TYPES constants).
Definition ff_smartshapes.h:1271
void SetEntryBased(bool value)
Sets if the smart shape is a note entry-connected shape or not.
Definition ff_smartshapes.h:1456
void DeleteEverything()
Deletes the internal smartshape data, the center shapes and the smartshape marks.
Definition finaleframework.cpp:36212
bool IsEntryBased()
Returns true if the smart shape is entry-based.
Definition ff_smartshapes.h:1804
SMARTSHAPE_3STATE GetAvoidAccidentals() const
Gets the 'avoid accidentals' setting to any of the auto/on/off states.
Definition ff_smartshapes.h:1394
void AssignToStaff(int newstaff)
Assigns the end points of a smart shape to a staff.
Definition finaleframework.cpp:36270
void _LoadCenterShapes()
For internal use. Called by FCSmartShapeMeasureMark::CreateSmartShape.
Definition finaleframework.cpp:36178
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:1157
void SetAvoidAccidentals(SMARTSHAPE_3STATE state)
Sets the 'avoid accidentals' setting to any of the auto/on/off states.
Definition ff_smartshapes.h:1583
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:1851
SMARTSHAPE_3STATE GetEngraverSlur() const
Returns the engraver slur state for the slur.
Definition ff_smartshapes.h:1373
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:1672
void SetPresetShape(bool value)
Returns if the shape is preset or custom.
Definition ff_smartshapes.h:1420
bool IsSlur()
Returns true if the smart shape is a slur (solid or dashed).
Definition ff_smartshapes.h:1690
bool IsDashedSlur()
Returns true if the smart shape is a dashed slur (introduced in Finale 25).
Definition ff_smartshapes.h:1755
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:1735
bool IsHairpin()
Returns true if the smart shape is a hairpin.
Definition ff_smartshapes.h:1613
bool IsGlissando()
Returns true if the shape is a glissando.
Definition ff_smartshapes.h:1785
FCSmartShapeSegment * GetTerminateSegmentRight()
Returns the object pointer for the terminating right-side end segment.
Definition ff_smartshapes.h:1317
bool CalcLeftEntryMetricPos(FCNoteEntry *pEntry, FCPoint *pPoint)
Calculates the left-side metrics position for a note-attached smart shape.
Definition finaleframework.cpp:36149
void _SetLeftSideNoteID(twobyte noteID)
Definition ff_smartshapes.h:1213
twobyte GetLineID() const
Returns the line style ID for custom smart shapes.
Definition ff_smartshapes.h:1360
Class for smartshape assignments to a measure.
Definition ff_smartshapes.h:194
CMPER _GetCenterShapeNumber()
Returns the CMPER for the middle measures of a smart shape. This method is normally not used directly...
Definition ff_smartshapes.h:263
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_smartshapes.h:223
CMPER GetShapeNumber() const
Gets the smart shape number.
Definition ff_smartshapes.h:259
void _SetCenterShapeNumber(CMPER value)
This method is normally not used directly.
Definition ff_smartshapes.h:253
twobyte GetMeasure() const override
Returns the attached measure.
Definition ff_smartshapes.h:269
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:222
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_smartshapes.h:291
FCSmartShapeMeasureMark()
The constructor.
Definition ff_smartshapes.h:239
void SetShapeNumber(CMPER value)
Sets the shape number.
Definition ff_smartshapes.h:250
FCSmartShape * CreateSmartShape(bool load_center_shapes=true)
Creates a full smart shape object, including the middle sections.
Definition finaleframework.cpp:36012
Collection class for FCSmartShapeMeasureMark class objects.
Definition ff_smartshapes.h:2964
void KeepSlursOnly()
Keeps only the slurs in the collection.
Definition ff_smartshapes.h:3029
void KeepHairpinsOnly()
Keeps only the hairpins in the collection.
Definition ff_smartshapes.h:3053
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:2976
void KeepSystemStavesOnly(FCSystemStaves *pSystemStaves)
Keeps only the smartshapes within the supplied system staves.
Definition ff_smartshapes.h:3094
FCSmartShapeMeasureMarks()
The constructor.
Definition ff_smartshapes.h:2974
void RemoveDuplicateReferences()
Removes any duplicate measure marks that reference the same smartshape.
Definition ff_smartshapes.h:3003
void KeepStaffOnly(twobyte staffno)
Keeps only the smartshapes that are referenced within one specific staff.
Definition ff_smartshapes.h:3120
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:36046
int LoadAll() override
Overloaded method that loads the smart shapes measure marks for the whole document.
Definition finaleframework.cpp:36032
FCSmartShapeMeasureMark * FindSmartShapeMarkByID(CMPER cmperSmartShape)
Returns the smart shape mark that references the smart shape ID.
Definition ff_smartshapes.h:3145
void KeepCustomLinesOnly()
Keeps only the custom lines in the collection.
Definition ff_smartshapes.h:3074
FCSmartShapeMeasureMark * GetItemAt(int index) const
Overloaded GetItemAt() method.
Definition ff_smartshapes.h:3159
Helper class for FCSmartShape, controlling the end points of a smart shape. This class is only constr...
Definition ff_smartshapes.h:496
twobyte GetEndpointOffsetX() const
Returns the horizontal offset compared to the measure attachment position.
Definition ff_smartshapes.h:558
void SetBreakOffsetY(twobyte value)
Sets the vertical break offset.
Definition ff_smartshapes.h:685
TimeEdu32 CalcMeasurePos() const
Calculates the measure position of the endpoint. Works with both measure- and entry-attached smart sh...
Definition finaleframework.cpp:35896
twobyte GetControlPoint1OffsetY() const
Returns the vertical offset for the first control point (for slurs).
Definition ff_smartshapes.h:577
twobyte GetNoteID() const
Returns the note ID for the smart shape segment.
Definition finaleframework.cpp:35877
TimeEdu32 GetMeasurePos() const
Returns the measure position for measure-attached shapes.
Definition ff_smartshapes.h:540
twobyte GetBreakOffsetX() const
Returns the horizontal break offset.
Definition ff_smartshapes.h:595
void SetNoteID(twobyte noteID)
Sets the note ID for the segment.
Definition finaleframework.cpp:35886
twobyte GetControlPoint2OffsetX() const
Returns the horizontal offset for the second control point (for slurs).
Definition ff_smartshapes.h:583
void SetControlPoint1OffsetY(twobyte value)
Sets the vertical offset for the first control point (for slurs).
Definition ff_smartshapes.h:661
twobyte GetControlPoint2OffsetY() const
Returns the vertical offset for the second control point (for slurs).
Definition ff_smartshapes.h:589
twobyte GetStaff() const
Returns the staff of the end point segment.
Definition ff_smartshapes.h:516
void SetMeasurePos(TimeEdu32 edupos)
Sets the measure position for measure-attached shapes.
Definition ff_smartshapes.h:627
twobyte GetBreakOffsetY() const
Returns the vertical break offset.
Definition ff_smartshapes.h:601
void SetEndpointOffsetY(twobyte value)
Sets the vertical offset, compared to the measure attachment position.
Definition ff_smartshapes.h:646
void SetMeasure(twobyte measureno)
Sets the measure number for the smart shape end point.
Definition ff_smartshapes.h:613
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:501
twobyte GetControlPoint1OffsetX() const
Returns the horizontal offset for the first control point (for slurs).
Definition ff_smartshapes.h:571
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:708
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:35913
void SetEndpointOffsetX(twobyte value)
Sets the horizontal offset, compared to the measure attachment position.
Definition ff_smartshapes.h:638
twobyte GetEndpointOffsetY() const
Returns the vertical offset compared to the measure attachment position.
Definition ff_smartshapes.h:565
void SetBreakOffsetX(twobyte value)
Sets the horizontal break offset.
Definition ff_smartshapes.h:679
void SetControlPoint2OffsetX(twobyte value)
Sets the horizontal offset for the second control point (for slurs).
Definition ff_smartshapes.h:667
void SetControlPoint1OffsetX(twobyte value)
Sets the horizontal offset for the first control point (for slurs).
Definition ff_smartshapes.h:655
void SetStaff(twobyte staff)
Sets the staff of the end point segment.
Definition ff_smartshapes.h:607
twobyte GetMeasure() const
Returns the measure of the end point segment.
Definition ff_smartshapes.h:522
FCSmartShapeSegment(__SSTERMSEG *pSeg, FCSmartShape *pReference, bool leftsidesegment)
The constructor. Called by the FCSmartShape class.
Definition ff_smartshapes.h:504
void SetCustomOffset(bool rightside)
Sets the required flags for a custom positioned end segment position.
Definition ff_smartshapes.h:727
void SetControlPoint2OffsetY(twobyte value)
Sets the vertical offset for the second control point (for slurs).
Definition ff_smartshapes.h:673
void SetEntryNumber(ENTNUM value)
Sets the note entry reference number for the end connection point.
Definition ff_smartshapes.h:694
ENTNUM GetEntryNumber() const
Returns the note entry number for entry-attached shapes.
Definition ff_smartshapes.h:549
Collection class for FCSmartShape class objects.
Definition ff_smartshapes.h:3235
FCSmartShape * FindLeftEntryNumber(ENTNUM entnum)
Tries to find a smart shape that is attached to the indicated entry number.
Definition ff_smartshapes.h:3248
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_smartshapes.h:3241
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
Collection class for FCSystemStaff class objects, which contains the list of staves available within ...
Definition ff_othercollection.h:544
FCSystemStaff * FindStaff(twobyte staffno)
Finds a specific staff in the collection and returns the pointer to it.
Definition ff_othercollection.h:571