Finale PDK Framework 0.77
Power Up Your Finale Music Software
Loading...
Searching...
No Matches
ff_prefs.h
1/*
2 * File: ff_prefs.h
3 * Author: Jari Williamsson
4 *
5 * Created on 26 Mars 2011, 19:58
6 */
7
8#ifndef FF_PREFS_H
9#define FF_PREFS_H
10
11#include <stddef.h>
12#include <algorithm>
13
14#include "ff_base.h"
15#include "ff_playback.h"
16
17#ifdef PDK_FRAMEWORK_PREFS
18
19#ifndef DOXYGEN_SHOULD_IGNORE_THIS
20
21/* ************************************************************************************************************
22 JW October 10, 2015:
23 The PDK Framework handles all non-Finale-supported preference structures internally, instead of relying on the
24 code in finalepdk.cpp.
25
26 The PDK Framework tag versions are prefixed _fcpf_
27
28 The PDK Framework structures are prefixed _FCEDT
29
30 As of Finale 26.2, most preferences were rewritten to use new internal structures. But Finale still
31 contains a compatibility layer that emulates the old locations at kPreferencesCmper (65534). There appear
32 to be minor bugs in the emulation that impact a few scattered fields, but as of October 20, 2021, this
33 seems to be the cleanest approach for supporting old and new versions of Finale with a single binary.
34 To add direct support for the post-26.2 preference structs, make new FC classes that are only available
35 to Finale 26.2 or higher. This could be controlled at runtime in the Lua connector for JW Lua. --RGP
36***************************************************************************************************************/
37#define kPreferencesCmper ((CMPER)65534)
38
39#if FXT_VERSION >= FINALEVERSION_26_2
40#define _GET_PREFDATA2(MEMBEROLD, MEMBERNEW) _GET_OLD_NEW_MEMBER_SELECT(MEMBEROLD, MEMBERNEW, _prefsdata._old, _prefsdata._new, _use26)
41#define _SET_PREFDATA2(MEMBEROLD, MEMBERNEW) _SET_OLD_NEW_MEMBER_SELECT(MEMBEROLD, MEMBERNEW, _prefsdata._old, _prefsdata._new, _use26)
42#define _SET_PREFDATA2_VALUE(MEMBEROLD, MEMBERNEW, VALUE) \
43{ \
44 if (_use26) _prefsdata._new.MEMBERNEW = VALUE; \
45 else _prefsdata._old.MEMBEROLD = static_cast<decltype(_prefsdata._old.MEMBEROLD)>(VALUE); \
46}
47#else
48#define _GET_PREFDATA2(MEMBEROLD, MEMBERNEW) _prefsdata._old.MEMBEROLD
49#define _SET_PREFDATA2(MEMBEROLD, MEMBERNEW) _prefsdata._old.MEMBEROLD
50#define _SET_PREFDATA2_VALUE(MEMBEROLD, MEMBERNEW, VALUE) _prefsdata._old.MEMBEROLD = VALUE
51#endif
52#define _GET_PREFDATA1(MEMBER) _GET_PREFDATA2(MEMBER, MEMBER)
53#define _SET_PREFDATA1(MEMBER) _SET_PREFDATA2(MEMBER, MEMBER)
54#define _SET_PREFDATA1_VALUE(MEMBER, VALUE) _SET_PREFDATA2_VALUE(MEMBER, MEMBER, VALUE)
55
56#include "pragma_align_begin.h"
57struct _FCEDTPlaybackPrefs
58{
59 twobyte metronomeBeat; // EDU beat of the playback metronome (quarter note = 1024 EDUs etc).
60 // Setting this value will not automatically update the playback
61 // control visually.
62
63 twobyte metronomeSpeed; // Metronome speed number. Setting this value will not automatically
64 // update the playback control visually.
65
66 twobyte swing; // Swing value. swing = swing_value_for_display * 1024 / 100
67
68 twobyte baseKeyVelocity; // Base key velocity value
69
70 eMeas startAtMeas; // Always start at measure #, used when startAtMode is 0
71 TimeEdu32 startEdu;
72
73 twobyte startAtMode; // "Always start at:"
74 // 0 - Measure (startAtMeas is used)
75 // 1 - Leftmost measure
76 // 2 - Current Counter Setting
77
78 eMeas stopAtMeas; // Stop at measure #
79 // If stopAtMeas is EMEAS_MAX ==> End of Piece
80 // Otherwise, stopAtMeas should be 1 higher than the
81 // actual stop measure.
82 // For example: to stop at measure 5, stopAtMeas should be 6
83 TimeEdu32 stopEdu;
84
85 twobyte startPass; /* Tbd: determine if writeable */
86 twobyte endPass; /* Tbd: determine if writeable */
87 tbool doPlaybackRepeats;
88
89 FLAG_16 playbackRecordFlags; /* Flags from the Playback/Recording Options dialog box. */
90 twobyte exprMode; /* Chase = 0, Reset = 1, Current = 2 */
91
92 // From Sync and Video Options dialog
93 twobyte smpteTimeType;
94 TimeRtu32 smpteStartTime;
95
96 // From Click and Countoff dialog
97 twobyte countOffBars;
98 tbool countOffWhenRecording;
99 tbool countOffWhenPlaying;
100 tbool clickWhenRecording;
101 tbool clickWhenPlaying;
102 twobyte clickSourceType; /* Finale = 1; Midi = 0 */
103 tbool sendClickOff; /* Tbd ??? */
104 twobyte hyperClickDataType; /* Midi Note = 0; Midi Data = 1 */
105 EDTHyperClick hyperClickBarNote;
106 EDTHyperClick hyperClickBarData;
107 EDTHyperClick hyperClickBeatNote;
108 EDTHyperClick hyperClickBeatData;
109};
110#include "pragma_align_end.h"
111
112// NOTE:
113//
114// _FCEDTPDRecord_26 is a record that contains playback prefs that aren't in EDTPlaybackPrefs26_2.
115// It exists in versions of Finale before 26.2 but has a different format. Pre-26.2 prefs use
116// the fragment struct approach for these fields instead of _FCEDTPDRecord_26.
117//
118#include "pragma_align_begin.h"
119struct _FCEDTPDRecord_26
120{
121 twobyte exprMode; /* Chase = 0, Reset = 1, Current = 2 */
122 FLAG_16 playbackRecordFlags; /* Flags from the Playback/Recording Options dialog box. */
123private:
124 twobyte filler[4];
125public:
126 _FCEDTPDRecord_26() : exprMode(0), playbackRecordFlags(0)
127 { memset(filler, 0, sizeof(filler)); }
128};
129#include "pragma_align_end.h"
130
131#define _ot_PDRecord MAKEEXTAG(edOther,'p','d')
132
133#include "pragma_align_begin.h"
134struct _FCEDTDistancePrefs
135{
136 twobyte acciVertSpace; // Vertical spacing between accidentals (in Spaces)
137 Evpu16 acciMultCharSpace; // Space within multi-character accidentals
138 Evpu16 acciNoteSpace; // Space between accidental and note
139 Evpu16 acciMultiSpaces; // Space between accidentals on note
140
141 twobyte alterHalfDiamondBaseline; // Alternate Notation: Rhythmic Notation Vertical
142 // Positioning - Half Note Diamond Baseline Adjust
143 twobyte alterWholeDiamondBaseline; // Alternate Notation: Rhythmic Notation Vertical
144 // Positioning - Whole Note Diamond Baseline Adjust
145 twobyte alterDblWholeDiamondBaseline; // Alternate Notation: Rhythmic Notation Vertical
146 // Positioning - Double Whole Note Diamond Baseline Adjust
147
148 Efix16 barlineDblSpace; // Space between double barlines
149 Efix16 barlineFinalSpace; // Space between final barlines
150 Evpu32 barlineDashSpace; // Barline dash space
151
152 Evpu16 beamSecondarySepar; // Secondary beam separation
153 twobyte beamMaxDistance; // Max Distance from Middle Staff Line (in Spaces)
154
155 twobyte graceNoteSpacing;
156
157 twobyte clefDefaultOffset; // Default clef change offset
158 Evpu16 clefBefore; // Space before clef
159 Evpu16 clefAfter; // Space after clef
160
161 Evpu16 dotNoteSpace; // Space between augmentation dot and note
162 twobyte dotSpaceBetweenDots; // Space between augmentation dots
163 twobyte dotVerticalAdjust; // Vertical adjustment of augmentation dot
164 twobyte dotFlagAdjust; // Horizontal dot adjustment for upstem flags
165
166 Evpu16 keysigSpaceBefore; // Space before key signature
167 Evpu16 keysigSpaceAfter; // Space after key signature
168 Evpu16 keysigSpaceAfterCancel; // Space after canceled key signature
169 Evpu16 keysigSpaceBetween; // Space between key signature accidentals
170
171 Evpu16 musicSpaceBefore; // Space before music
172 Evpu16 musicSpaceAfter; // Space after music
173
174 Efix32 stemNoteheadOffset; // Horizontal Stem Offset for Noteheads
175
176 Evpu16 timesigAbbrSymbolVert; // Time signatures - vertical adjustment of
177 // abbreviated symbol from center
178 Evpu16 timesigTopSymbolVert; // Time signatures - vertical adjustment of top time
179 // sig symbol from top staff line
180 Evpu16 timesigBottomSymbolVert; // Time signatures - vertical adjustment of bottom
181 // time sig symbol from bottom staff line
182 Evpu16 timesigSpaceBefore; // Time signatures - time before time signature
183 Evpu16 timesigSpaceAfter; // Time signatures - time after time signature
184
185 Evpu16 timesigPartsAbbrSymbolVert; // (parts) Time signatures - vertical adjustment of
186 // abbreviated symbol from center
187 Evpu16 timesigPartsTopSymbolVert; // (parts) Time signatures - vertical adjustment of top time
188 // sig symbol from top staff line
189 Evpu16 timesigPartsBottomSymbolVert; // (parts) Time signatures - vertical adjustment of bottom
190 // time sig symbol from bottom staff line
191 Evpu16 timesigPartsSpaceBefore; // (parts) Time signatures - time before time signature
192 Evpu16 timesigPartsSpaceAfter; // (parts) Time signatures - time after time signature
193
194 twobyte groupbracketdefaulthorizontaldistance;
195
196 Evpu16 keysigTimeSpace; // Extra Space Between Key and Time Signature
197 Evpu16 clefKeySpace; // Extra Space Between Clef and Key Signature
198 Evpu16 clefTimeSpace; // Extra Space Between Clef and Time Signature
199
200 tbool acciCrossLayerPositioning; // Use Cross-Layer Accidental Positioning
201
202};
203#include "pragma_align_end.h"
204
205/* _FCEDTExtraTupletPrefs is loaded directly by FCTupletPrefs, without the use of EXTAG. */
206#include "pragma_align_begin.h"
207struct _FCEDTExtraTupletPrefs
208{
209 twobyte horizUpstem; // Default tuplet definition - Horizontal Number Offset/Upstem side of notes
210 twobyte horizDownstem; // Default tuplet definition - Horizontal Number Offset/Downstem side of notes
211 Efix16 bracketThickness; // Default tuplet definition - Bracket thickness
212 twobyte maxSlope; // Tuplets page, maximum slope, in 10ths of a %
213};
214#include "pragma_align_end.h"
215
216/* _FCEDTLayoutDistancePrefs is loaded directly by FCLayoutPrefs, without the use of EXTAG. */
217#include "pragma_align_begin.h"
218struct _FCEDTLayoutDistancePrefs
219{
220 Evpu16 partsFirstSysDistance; // Vertical distance to first system in Page format for parts (in negative EVPUs)
221 Evpu16 scoreFirstSysDistance; // Vertical distance to first system in Page format for score (in negative EVPUs)
222
223 twobyte partsStaffHeight; // Staff height in systems for parts (in EVPUs * 16)
224 ePercent partsSystemScaling; // Default staff system scaling for parts
225 twobyte scoreStaffHeight; // Staff height in systems in score (in EVPUs * 16)
226 ePercent scoreSystemScaling; // Default staff system scaling in score
227};
228#include "pragma_align_end.h"
229
230/* _FCEDTPre2012MusicCharsPrefs is loaded directly by FCMusicChararactersPrefs on pre-2012 versions, without the use of EXTAG. */
231#include "pragma_align_begin.h"
232struct _FCEDTPre2012MusicCharsPrefs
233{
234 twobyte symbolcommontimesigscore;
235 twobyte symbolcuttimesigscore;
236 twobyte symbolTrill;
237 twobyte symbolWiggle;
238 twobyte symbol8va;
239 twobyte symbol8vb;
240 twobyte symbol15ma;
241 twobyte symbol15mb;
242};
243#include "pragma_align_end.h"
244
245/* _FCEDTMusicCharsPrefsDistances is loaded directly by FCMusicChararactersPrefs, without the use of EXTAG. */
246#include "pragma_align_begin.h"
247struct _FCEDTMusicCharsPrefsDistances
248{
249 twobyte halfslashbaseline;
250 twobyte wholeslashbaseline;
251 twobyte brevisslashbaseline;
252};
253#include "pragma_align_end.h"
254
255#include "pragma_align_begin.h"
256struct _FCEDTSizePrefs
257{
258 Efix16 barlineHeavyThickness; // Heavy barline thickness
259 Efix16 barlineThinThickness; // Thin barline thickness *
260 Evpu32 barlineDashLength; // Barline dash length
261
262 Efix32 beamThickness; // Beam thickness *
263 Evpu16 beamBrokenLength; // Broken beam length
264
265 ePercent graceNoteSize; // Grace note size in percent *
266 ePercent graceTablatureNoteSize; // Tablature grace note size in percent
267 Efix16 graceSlashThickness; // Grace note slash thickness *
268
269 Efix16 enclosureThickness; // Default enclosure line thickness
270 Efix16 staffLineThickness; // Staff line thickness *
271 Efix16 ledgerThickness; // Ledger line thickness *
272 Evpu16 ledgerLeftHalf; // Ledger lines - Left half length *
273 Evpu16 ledgerLeftHalfRest; // Ledger lines - Left half rest length *
274 Evpu16 ledgerRightHalf; // Ledger lines - Right half length *
275 Evpu16 ledgerRightHalfRest; // Ledger lines - Right half rest length *
276 fourbyte shapeDesignerSlurTip; // Shape designer slur tip width (in thousands of an EVPU)
277
278 Evpu16 stemNormalLength; // Normal stem length
279 Evpu16 stemShortLength; // Shortened stem length
280 Evpu16 stemHalfLength; // Half-stem length
281 Evpu16 stemReverseAdjust; // Reverse Stem Adjust
282 Efix16 stemThickness; // Stem line thickness
283
284};
285#include "pragma_align_end.h"
286
287#include "pragma_align_begin.h"
288struct _FCEDTMiscDocPrefs
289{
290 tbool barlineDoubleAtKeySig; /* New option for Finale 2014.5 */
291 tbool barlineDisplayAll; // Display All Barlines
292 tbool barlineCloseSys; // Close Barline at End of Each System
293 tbool barlineClosePiece; // Close Barline at End of Piece
294 tbool barlineFinalAtEnd; // Final Barline at End of Piece
295 tbool barlineLeftSingleStaff; // Left Barlines - Display on Single Staves
296 tbool barlineLeftMultStaves; // Left Barlines - Display on Multiple Staves
297 tbool barlineDefaultToNormal; // Left Barlines -
298 // ON: Default Style is Normal Barline
299 // OFF: Default Style is Previous Measure's Right Barline
300
301 twobyte beamStyle; // Beaming Style (one of the BEAMSTYLE_* styles):
302 // 0 - Base Slope on End Notes Only
303 // 1 - Flatten All Beams
304 // 2 - Flatten Beams Based On Standard Note
305 // 3 - Flatten Beams Based On Extreme Note
306 FLAG_16 beamFlags; // [A combination of the BEAMATTR_* constants.]
307 // 0x0100 - Extend Secondary Beams Over Rests
308 // 0x0080 - Allow Primary Beam Within a Space
309 // 0x0040 - Display Half-stems for Beamed Rests
310 // 0x0020 - Don't allow rest to float
311 // 0x0010 - Beam Three Eights Notes Before/After an Eight Rest
312 // 0x0008 - Beam Four Notes Together in Common Time
313 // 0x0004 - Stem flag: Don't Display Reversal Stemming
314 // 0x0002 - Include Rests When Beaming Notes in Four
315 // 0x0001 - Extend Beams Over Rests
316
317 Evpu16 beamMaxSlope; // Max beam slope
318
319 tbool clefOnlyOnFirstSys; // If set, display clef only on first staff system
320 twobyte clefDefault; // 0-based ID to the default clef
321 ePercent clefReduction; // Default clef reduction (in percent)
322
323 twobyte curveResolution; // Curve resolution (1-128), for non-PostScript and screen output
324
325 tbool dotAdjustForMultipleVoices; // Adjust augmentation dot for multiple voices
326
327 twobyte gracePlaybackDur; // Playback duration for grace notes (in EDUs)
328 tbool graceAlwaysSlash; // Always slash flagged grace notes
329
330 tbool keysigOnlyOfFirstSys; // If set, display clef only on first staff system
331 tbool keysigNaturalsInC; // If set, put naturals in C at start of staff systems
332 tbool keysigModeChange; // If set, redisplay key signature if only mode is changing
333 tbool keysigCancelOutgoing; // If set, cancel outgoing key signature
334 tbool keysigCancelSwitchSharpsFlats; /* Finale 25.4 option - "(Cancel) When switching between sharps and flats" */
335 tbool keysigPreserveOctave; // If set, preserve octave when simplifying keys
336
337 twobyte timesigCompMeterDeci; // Time Signatures - Decimal Places for composite meters
338 tbool timesigAbbrCommonTime; // Time Signatures - If set, abbreviate common time
339 tbool timesigAbbrCutTime; // Time Signatures - If set, abbreviate cut time
340
341 tbool stemUseConnections; // If set, Use Stem Connections
342 FLAG_16 courtesyFlags; // 0x0004 - Display courtesy Clef at End of Staff System
343 // 0x0002 - Display courtesy Time Signature at End of Staff System
344 // 0x0001 - Display courtesy Key Signature at End of Staff System
345 // [Use the SYSCOURTESY_* flags]
346 tbool secondsInTimeStamp; // Use seconds in time stamp
347 twobyte dateFormat; // 1 - long date format, 0 - short date format, 2 - Mac only
348 twobyte textTabChars; // Number of characters for tabs in text
349 tbool scaleManualPos; // If set, scale manual positioning of notes
350 tbool crossStaffInOriginal; // If set, display cross-staff notes in original staff
351 tbool useNoteShapes; // If set, use note shapes
352
353 TimeEdu16 pickupMeasure; // Pickup measure - 0 if no pickup measure
354
355 CMPER specialExtractedPartCmper; // Cmper to the special extracted part IU list. 0 if no special extracted part is active.
356 tbool displayPartExpressions; // Set if "Display Expressions for Parts" option has been set.
357
358 fourbyte PSUnderlineDepth; // Macintosh only: PostScript Options - Underline Depth
359 fourbyte PSUnderlineThickness; // Macintosh only: PostScript Options - Underline Thickness
360
361 tbool chordItalicizeCapo; // If set, Capo chords will be italicized
362 FLAG_16 chordFretboardFlag; // 0 - don't display fretboards, 12 - Display fretboards
363 fourbyte chordFretboardResize; // Resize percent value * 10000
364 // chordFretboardFlag must be set accordingly
365 twobyte chordEnablePlayback; // 1- No chord playback, 2 - Enable chord playback
366 FLAG_16 layoutFlags; // The LAYOUTFLG_* constants
367
368 tbool showactivelayeronly; /* The "Show Active Layer Only" setting */
369
370 tbool consolidaterests; /* Finale 2014 option : Consolidate Rests Across Layers */
371
372 tbool keepOctaveTranspositionInConcertPitch; /* Finale 25.2 option: Document/Keep octave transposition in Concert Pitch */
373
374 tbool alignMeasureNumbersWithBarlines; // Finale 27.4 option
375 tbool legacyDotPostionOnFlippedStems; // Finale 27.4 option
376};
377#include "pragma_align_end.h"
378
379#include "pragma_align_begin.h"
380struct _FCEDTPageFormatPrefs
381{
382 Evpu32 pageHeight; // Page height
383 Evpu32 pageWidth; // Page width
384 ePercent pageScaling; // Scale page to
385 Evpu16 leftTop; // Left Page Margins - Top Margin (in EVPUs negative)
386 Evpu16 leftLeft; // Left Page Margins - Left side Margin
387 Evpu16 leftBottom; // Left Page Margins - Bottom side Margin
388 Evpu16 leftRight; // Left Page Margins - Right side Margin (in EVPUs negative)
389 Evpu16 rightTop; // Right Page Margins - Top Margin (in EVPUs negative)
390 Evpu16 rightLeft; // Right Page Margins - Left Margin
391 Evpu16 rightBottom; // Right Page Margins - Bottom Margin
392 Evpu16 rightRight; // Right Page Margins - Right Margin (in EVPUs negative)
393 Evpu16 sysTop; // Staff system margin - Top margin (in EVPUs negative)
394 Evpu16 sysLeft; // Staff system margin - Left margin
395 Evpu16 sysBottom; // Staff system margin - Bottom margin (in EVPUs negative).
396 // Add +96 to get the value displayed in the Page format dialogs.
397 Evpu16 sysRight; // Staff system margin - Right margin (in EVPUs negative)
398 Evpu16 sysDistBetween; // Distance between staff systems (in EVPUs negative)
399 tbool bFacingPages; // If set, use the page right margin values
400 tbool bFirstSysMargin; // If set, use the first system margin values
401 tbool bFirstPageTop; // If set, use the first page top margin value
402 Evpu16 firstPageTop; // First page top margin value (in EVPUs negative)
403 Evpu16 firstSysTop; // Top staff system margin for first system (in EVPUs negative)
404 Evpu16 firstSysLeft; // Left staff system margin for first system
405};
406#include "pragma_align_end.h"
407
408#include "pragma_align_begin.h"
409struct _FCEDTRepeatPrefs
410{
411 Efix16 heavyLine; // Heavy line thickness
412 Efix16 thinLine; // Thin line thickness
413 Efix16 spaceBetweenLines; // Space between lines
414 FLAG_16 backToBackStyle; // 0 - Thin, 1 -Mixed, 2 - Thick. Any of the RPT_BBSTL_* styles
415 Evpu16 forwardSpace; // Distance between repeat line and dot - forward repeats
416 Evpu16 backwardSpace; // Distance between repeat line and dot - backward repeats
417 Evpu16 upperVertAdjust; // Vertical dot adjustments for upper repeat dot
418 Evpu16 lowerVertAdjust; // Vertical dot adjustments for upper repeat dot
419 FLAG_16 wingStyle; // Wing style (0 - None, 1 - Single, 2 - Double, 3-curved). Any of the RPT_WINGSTL_* defines
420 Evpu16 afterClefSpace; // Forward repeat spacing - after clef
421 Evpu16 afterKeySpace; // Forward repeat spacing - after key sig
422 Evpu16 afterTimeSpace; // Forward repeat spacing - after time sig
423
424 // Repeat endings:
425 Evpu16 endingBracketHeight; // Default height of bracket
426 Evpu16 endingFrontHook; // Default length of front hook
427 Evpu16 endingBackHook; // Default length of back hook
428 Efix16 endingLineThickness; // Line thickness
429 twobyte endingInsetStart; // Inset for start of bracket
430 twobyte endingInsetEnd; // Inset for end of bracket
431 Evpu16 endingTextHoriz; // Default horizontal positioning for ending text
432 Evpu16 endingTextVert; // Default vertical positioning for ending text
433
434 tbool dotafternumber; /* Dot after number */
435 twobyte maxpasses; /* Max passes */
436
437 tbool thinInnerBracketReference; /* Finale 25.1 option: true - bracket line should align to the thin inner repeat line, false - bracket line should align to thick outer repeat line */
438 tbool showOnTopStaffOnly;
439 twobyte showOnStaffListNumber;
440};
441#include "pragma_align_end.h"
442
443#include "pragma_align_begin.h"
444struct _FCEDTPianoBracePrefs
445{
446 // All values are in 1/10000 of an EVPU (7/10/2009 RES: confirm -- float in Finale?)
447 fourbyte innerTipHoriz; // Inner tip - horizontal
448 fourbyte innerTipVert; // Inner tip - vertical
449 fourbyte innerBodyHoriz; // Inner body - horizontal
450 fourbyte innerBodyVert; // Inner body - vertical
451 fourbyte outerTipHoriz; // Outer tip - horizontal
452 fourbyte outerTipVert; // Outer tip - vertical
453 fourbyte outerBodyHoriz; // Outer body - horizontal
454 fourbyte outerBodyVert; // Outer body - vertical
455 fourbyte width; // Width of brace
456 fourbyte centerThickness; // Center thickness
457 fourbyte tipThickness; // Tip thickness
458};
459#include "pragma_align_end.h"
460
461#include "pragma_align_begin.h"
462struct _FCEDTSmartShapePrefs // Misc smart shape prefs
463{
464 CMPER customLineStyle; // cmper pointing to the default custom-line definition
465 CMPER glissandoStyle; // cmper pointing to the default glissando definition
466 CMPER tabSlideStyle; // cmper pointing to the default tab slide definition
467 CMPER guitarBendStyle; // cmper pointing to the default guitar bend style
468 Evpu16 crescDimOpening; // cresc/dim opening width ("long span" on Fin 25.3+)
469 Evpu16 crescDimShortOpening; // Finale 25.3 option: cresc/dim "short span" opening width
470 twobyte crescDimMaxShortSpanLength; // Finale 25.3 option: cresc/dim "max short span length"
471 Efix16 crescDimWidth; // cresc/dim line width
472 tbool bCrescDimHorizontal; // If set, always create cresc/dim horizontal
473 Efix16 lineThickness; // Normal smartshape line thickness
474 Evpu32 dashLength; // Smartshape dash length
475 Evpu32 dashSpace; // Smartshape dash space
476 Evpu16 hookLength; // Smartshape hook length
477 tbool bOctavaAsText; // If set, show Octava signs as text
478
479 tbool bUseEngraverSlurs; // If set, use Engraver Slurs
480 twobyte engrMaxAngle; // Engraver Slurs - maximum slur angle in degrees (in 1/100 of a degree)
481 twobyte engrSymmetry; // Engraver Slurs - Slur symmetry percentage (in 1/100 of a degree)
482 Evpu16 engrSpace; // Engraver Slurs - Space around objects
483 twobyte engrAcciMode; // Engraver Slurs - Acci mode (1 - Don't avoid accis, 2 - Avoid accis)
484 Evpu16 engrAcciSpace; // Engraver Slurs - Space around accidentals
485 tbool engrStretchFirst; // Engraver Slurs - If set, stretch first. Otherwise lift first.
486 tbool engrStretchMode; // Engraver Slurs - If set, stretch by percent. Otherwise stretch fixed. (Used only if engraverStretchFirst is set).
487 twobyte engrMaxStretchPrecent; // Engraver Slurs - Maximum stretch percent (in 1/100 of a degree)
488 Efix32 engrMaxStretchFixed; // Engraver Slurs - Maximum stretch fixed value
489 Efix32 engrMaxLift; // Engraver Slurs - Maximum lift value
490
491 Evpu16 slurbrStaffLineAvoid; // Slur system breaks - avoid staff lines by at least
492 Evpu16 slurbrStartAdjust; // Slur system breaks - horizontal system start adjustment
493 Evpu16 slurbrEndAdjust; // Slur system breaks - horizontal system end adjustment
494
495 Int10000ths32 slurtipWidth; // Slur tip width (in 1/10,000 of an EVPU)
496 tbool slurtipAvoidStaff; // If set, slur tips should avoid staff lines
497 Evpu16 slurtipAvoidStaffVal; // Slur tip should avoid staff lines by this amount - 1
498 // Example: To avoid by 4 EVPUs, set this value to 5
499 Evpu16 slurThicknessHorizLeft; // Slur thickness, horizontal left
500 Evpu16 slurThicknessVertLeft; // Slur thickness, vertical left
501 Evpu16 slurThicknessHorizRight; // Slur thickness, horizontal right
502 Evpu16 slurThicknessVertRight; // Slur thickness, vertical right
503
504 tbool bendParentheses; // Guitar Bend Options - Place Release Bend Number in Parentheses
505 tbool bendHideNumber; // Guitar Bend Options - Hide "Bend-To" Number
506 tbool bendAutoGenerateText; // Guitar Bend Options - Automatically Generate Text
507 tbool bendReplaceWithFull; // Guitar Bend Options - Replace "1" with "Full"
508};
509#include "pragma_align_end.h"
510
511#include "pragma_align_begin.h"
512struct _FCEDTPartExtractPrefs
513{
514 twobyte spacingMethod; // The spacing method to use for extracted parts:
515 // 0 - Time Sig Spacing
516 // 1 - Beat Spacing
517 // 2 - Note Spacing
518 // 3 - Preserve current spacing method
519 twobyte partNameHeaderHoriz; // Horizontal position of part name header
520 twobyte partNameHeaderVert; // Vertical position of part name header
521 tbool newStaffPlacement; // If set, use new staff position placement
522 Evpu16 newTopStaff; // If new staff pos placement is used, the new top staff system position
523 Evpu16 newStaffDistance; // If new staff pos placement is used, the distance between staff systems
524 tbool removePageOneBlocks; // If set, remove page text/graphics on page 1
525 tbool removePageTwoPlusBlocks; // If set, remove page text/graphics on page 2+
526 tbool removeStaffGroupNames; // If set, remove Staff or Group Names
527 FLAG_16 fitMeasures; // FLAGS:
528 // 0x0001 - Fit [measuresPerSystem] number of measures to one staff system
529 // 0x0002 - Treat multimeasure rests as one measure. New for Finale 2001.
530 twobyte measuresPerSystem; // Number of measures per staff system, used if [fitMeasures] is ON
531 twobyte promptForEachName; // If set, prompt for each file name. Otherwise, autogenerate file names
532 tbool removeMultiPageBlocks; // If set, remove multi-page text/graphics blocks
533 tbool createPartNameHeader; // If set, create Staff or Group Name Header
534 twobyte partNameHeaderResize; // Resize (in %) of the part header name
535 twobyte partNameHeaderFromPage; // Put part header name starting on this page
536 twobyte partNameHeaderToPage; // Put part header name ending on this page
537 twobyte partNameHeaderFontID; // Enigma font ID for the part header name
538 // This value can be set to -1 or 0 if [partNameHeaderUseFontID] is OFF
539 twobyte partNameHeaderFontSize; // Font size for the part header name, 0 = use default
540 twobyte partNameHeaderFontEfx; // Font effect bits for the part header name
541 tbool partNameHeaderUseFontID; // If set, this marks that [partNameHeaderFontID] contains a valid font ID that will be used
542 tbool openExtractedParts; // If set, automatically open the extracted parts. New for Finale 2001.
543 tbool spaceSystemsEvenly; // If set, apply Space Systems Evenly on the extracted parts. New for Finale 2001.
544 twobyte partNameHeaderAAAA; // ???
545 twobyte partNameHeaderBBBB; // ???
546};
547#include "pragma_align_end.h"
548
549#include "pragma_align_begin.h"
550struct _FCEDTTiePrefs
551{
552 Evpu16 thicknessRight; // Right-side tie thickness
553 Evpu16 thicknessLeft; // Left-side tie thickness
554 tbool breakForTimeSigs; // If set, break the tie at time signature changes
555 tbool breakForKeySigs; // If set, break the tie at key signature changes
556 Evpu16 breakTimeSigLeftHOffset; // Break for time signatures - left gap
557 Evpu16 breakTimeSigRightHOffset; // Break for time signatures - right gap
558 Evpu16 breakKeySigLeftHOffset; // Break for key signatures - left gap
559 Evpu16 breakKeySigRightHOffset; // Break for key signatures - right gap
560 Evpu16 sysBreakLeftHAdj; // Tie system break, horizontal start adjustment
561 Evpu16 sysBreakRightHAdj; // Tie system break, horizontal end adjustment
562 tbool useOuterPlacement; // Use outer placement
563 FLAG_16 secondsPlacement; // One of the TIE_SCNDS_* constants
564 twobyte chordTieDirType; // Tie direction at chords: 0 - Outside/Inside, 1 - Stem Reversal, 2 - Slit Evenly
565 tbool chordTieDirOpposingSeconds; // Tie direction - opposing seconds
566 twobyte mixedStemDirection; // Tie direction at mixed stems: 0 - Over, 1 - Under, 2 - Opposite first stem
567 tbool afterSingleDot; // If set, start after single dot
568 tbool afterMultipleDots; // If set, start after multiple dots
569 tbool beforeAcciSingleNote; // If set, end before single accidental
570 twobyte specialPosMode; /* This was one of TIE_SPECIAL_POS_MODE_* constants
571 before. Only the 0x02 state is used now */
572 Evpu16 avoidStaffLinesDistance; // Avoid staff lines vertically by this value
573 twobyte insetStyle; // If 0, use fixed inset in percent
574 // If 1, use inset in percent
575 tbool useInterpolation; // If set, Interpolate Height Between Short and Long Span
576 // If not set, Use Medium Height Between Short and Long Span
577 tbool useTieEndCtlStyle; // Use tie end style (for contour)
578 tbool avoidStaffLinesOnly; // If set, avoid staff lines in staves only
579 Int10000ths32 tipWidth;
580 Evpu16 gutterTies;
581};
582#include "pragma_align_end.h"
583
584#include "pragma_align_begin.h"
585struct _FCEDTMusicSpacingPrefs
586{
587 twobyte type; // ????
588 Evpu16 minWidth; // Minimum measure width
589 Evpu16 maxWidth; // Maximum measure width
590 Evpu16 minDistance; // Minimum distance between items
591 Evpu16 minDistTiedNotes; // Minimum distance between notes with ties
592 FLAG_16 flag; // Spacing flags
593 twobyte useAllotmentTables; // 0 - Use ref duration/width, 1 - Use Spacing Allotment Tables
594 twobyte referenceDurationLow;
595 twobyte referenceDurationHigh;
596 twobyte referenceWidthLow;
597 twobyte referenceWidthHigh;
598 twobyte scalingFactorLow; // Scaling factor multiplied by 1000
599 twobyte scalingFactorHigh;
600 twobyte graceNoteMinDistance;
601 twobyte graceNoteSpacingMode;
602 Evpu16 accidentalsGutter;
603 Evpu16 tiesGutter;
604};
605#include "pragma_align_end.h"
606
607
608#include "pragma_align_begin.h"
609struct _FCEDTLyricsPrefs
610{
611 Evpu16 spaceBetweenHyphens; // Space between hyphens. In Fin2004, this is Maximum Space Between Hyphens Pos: ^15(65534) 1
612 Efix16 wordExtensionThickness; // Word Extension Line Thickness Pos: ^67(65534) 5
613
614 twobyte useSmartHyphens; // Pos: ^35(65534) 5
615 twobyte hyphenSystemStart; // Pos: ^57(65534) 0
616
617/* This data structure spans 2 incis at ^87(65534)
618 * */
619
620 twobyte othersSyllAlign; // Alignment options for other syllables Pos: ^87(65534) 1st inci 0
621 twobyte othersSyllJusti; // Justification options for other syllables Pos: ^87(65534) 1st inci 1
622 FLAG_16 flag; // Placeholder flag (no UI)
623
624 twobyte wordExtensionSyllAlign; // Alignment options Pos: ^87(65534) 1st inci 3
625 twobyte wordExtensionSyllJusti; // Justification options Pos: ^87(65534) 1st inci 4
626 FLAG_16 wordExtensionSyllFlags; // 0x8000 if Positioning of syllables with Word Extensions should be used Pos: ^87(65534) 1st inci 5
627
628 twobyte firstSyllAlign; // Alignment options Pos: ^87(65534), 2nd inci 0
629 twobyte firstSyllJusti; // Justification options Pos: ^87(65534), 2nd inci 1
630 FLAG_16 firstSyllFlags; // 0x8000 if Positioning of first syllables should be used Pos: ^87(65534), 2nd inci 2
631
632 twobyte startSysSyllAlign; // Alignment options Pos: ^87(65534) 2nd inci 3
633 twobyte startSysSyllJusti; // Justification options Pos: ^87(65534) 2nd inci 4
634 FLAG_16 startSysSyllFlags; // 0x8000 if Positioning of syllables on start of system should be used Pos: ^87(65534) 2nd inci 5
635};
636#include "pragma_align_end.h"
637
638
639#include "pragma_align_begin.h"
640struct _FCEDTMMRestDefaultsPrefs
641{
642 Evpu16 measWidth; // Measure width
643 twobyte AAAA; // reserved
644 Evpu16 vertNumAdj; // Vertical number adjustment (negative = upwards)
645 twobyte shapeID; // Shape ID number
646 twobyte startNumberingAt; // Start numbering at ?? measures
647 twobyte symbolMeasures; // Use symbols for rests less than this. Used if flag is set.
648 Evpu16 spaceBetweenSymbols; // Space between symbols
649 Evpu16 horizNumAdj; // Horizontal number adjustment
650 Evpu16 shpAdjustStart; // Shape Adjust Start Point
651 Evpu16 shpAdjustEnd; // Shape Adjust End Point
652 twobyte BBBB; // reserved
653 FLAG_16 flags; // 0x0001 - Use Symbols for Rests less Than ??? Measures
654
655 tbool mmautoupdate; /* Rests should auto-update */
656};
657#include "pragma_align_end.h"
658
659#include "pragma_align_begin.h"
660struct _FCEDTPartScopePrefs
661{
662 twobyte score_in_c; /* This state seems to be inverted. Set to PFMC_INVERTBOOL */
663};
664#include "pragma_align_end.h"
665
666#include "pragma_align_begin.h"
667struct _FCEDTGroupNamePosPrefs
668{
669 Evpu16 horzOff;
670 Evpu16 vertOff;
671 FLAG_16 flag;
672};
673#include "pragma_align_end.h"
674
675// NOTE:
676//
677// For pre-26.2 we use fragment loading rather than EDTChordPrefs in order to support the additional fields
678// in EDTChordPrefs26_2 and to avoid alignment issues around the uonebyte field in EDTChordPrefs.
679//
680#include "pragma_align_begin.h"
681struct _FCEDTChordPrefs
682{
683 twobyte ChordStyle;
684 tbool UseSimpleChordSpelling; // if YES, simplify chord names enharmonically
685 twobyte DefChordAlignment; // controls the global alignment of chords
686 // chord alteration baseline adjustments in evpus
687 // (from default fonts dialog)
688 Evpu16 CSHARPLIFT;
689 Evpu16 CFLATLIFT;
690 Evpu16 CNATURALLIFT;
691 // fields from EDTChordPrefs26_2
692 Int10000ths32 fretPercent;
693 Int10000ths32 chordPercent;
694 tbool showFretboards;
695 eFretStyle fretStyleID;
696 eFretInst fretInstID;
697 tbool multiFretItemsPerStr;
698 tbool italicizeCapoChords;
699 tbool chordPlayback;
700};
701#include "pragma_align_end.h"
702
703/* The following constants aren't hard-coded. Adjust if they would conflict with some new tag in the future. */
704
705const EXTAG _fcpf_DistancePrefs = MAKEEXTAG(edPrefs, 'D', 'P'); /* FCDistancePrefs */
706// const EXTAG _fcpf_ExtraTupletPrefs = MAKEEXTAG(edPrefs, '?', '?'); /* Not used - tables are accessed directly */
707// const EXTAG _fcpf_LayoutDistancePrefs = MAKEEXTAG(edPrefs, '?', '?'); /* Not used - tables are accessed directly */
708// const EXTAG _fcpf_Pre2012MusicCharsPrefs = MAKEEXTAG(edPrefs, '?', '?'); /* Not used - tables are accessed directly */
709// const EXTAG _fcpf_MusicCharsPrefsDistances = MAKEEXTAG(edPrefs, '?', '?'); /* Not used - tables are accessed directly */
710const EXTAG _fcpf_SizePrefs = MAKEEXTAG(edPrefs, 'S', 'I'); /* FCSizePrefs */
711const EXTAG _fcpf_MiscDocPrefs = MAKEEXTAG(edPrefs, 'M', 'I'); /* FCMiscDocPrefs */
712const EXTAG _fcpf_RepeatPrefs = MAKEEXTAG(edPrefs, 'R', 'P'); /* FCRepeatPrefs */
713const EXTAG _fcpf_PianoBracePrefs = MAKEEXTAG(edPrefs, 'P', 'B'); /* FCPianoBracePrefs */
714const EXTAG _fcpf_SmartShapePrefs = MAKEEXTAG(edPrefs, 'S', 'S'); /* FCSmartShapePrefs */
715const EXTAG _fcpf_PlaybackPrefs = MAKEEXTAG(edPrefs, 'P', 'L'); /* FCPlaybackPrefs */
716const EXTAG _fcpf_TiePrefs = MAKEEXTAG(edPrefs, 'T', 'I'); /* FCTiePrefs */
717const EXTAG _fcpf_MusicSpacingPrefs = MAKEEXTAG(edPrefs, 'M', 'S'); /* FCMusicSpacingPrefs */
718const EXTAG _fcpf_PartExtractPrefs = MAKEEXTAG(edPrefs, 'E', 'X');
719const EXTAG _fcpf_PageFormatPrefs = MAKEEXTAG(edPrefs, 'P', 'F');
720const EXTAG _fcpf_LyricsPrefs = MAKEEXTAG(edPrefs, 'l', 'y'); /* FCLyricsPrefs */
721const EXTAG _fcpf_MMRestDefaultPrefs = MAKEEXTAG(edPrefs, 'm', 'm'); /* FCMultimeasureRestPrefs */
722const EXTAG _fcpf_PartScopePrefs = MAKEEXTAG(edPrefs, 'p', 'S'); /* FCPartScopePrefs */
723const EXTAG _fcpf_GroupNamePosPrefs = MAKEEXTAG(edPrefs, 'G', 'p'); /* FCGroupNamePositionPrefs */
724const EXTAG _fcpf_StaffNamePositionPrefs = MAKEEXTAG(edPrefs, 'S', 'p'); /* FCStaffNamePositionPrefs */
725
726enum PREFMAP_ARRAY_CONVERSION
727{
728 PFMC_NONE, /* No conversion */
729 PFMC_MACFOURBYTE, /* Fourbyte is stored in "Mac" manner (hiword+loword) */
730 PFMC_WINFOURBYTE, /* Fourbyte is stored in "Windows" manner (loword+hiword) */
731 PFMC_INVERTBOOL, /* The boolean state of a tbool should be inverted
732 before presenting it to the programmer */
733 PFMC_SIGNEDBYTE /* The twobyte might be stored as a signed byte; convert it to a
734 unsigned twobyte */
735};
736#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
737
743{
744 /* Modified utility structures with their origin in finalepdk.cpp.
745 *
746 * Since there are bugs in the finalepdk.cpp implementation, and
747 * the structures causes too many workarounds the PDK Framework classes,
748 * it's better to not rely on finalepdk.cpp for the data that isn't
749 * directly supported by Finale.
750 */
751public:
752#ifndef DOXYGEN_SHOULD_IGNORE_THIS
753 struct PREFERENCE_LOCATION_MAPRECORD
754 {
755 bool bProcessed; /* For internal use */
756 char firstChar; /* First char of tag */
757 char secondChar; /* Second char of tag */
758 CMPER cmper; /* Cmper to load, if not 65534. For non-digit tags such as ^pd, 0 is used as an actual value. */
759 twobyte inci; /* Inci to load */
760 twobyte structOffset; /* offset within the struct */
761 twobyte offsetInInci; /* 0-based twobyte offset within the preference inci (0-5) */
762 twobyte bytesize; /* 2 - twobyte, 4 - fourbyte */
763 PREFMAP_ARRAY_CONVERSION conversion; /* Conversion */
764 EVERSION minversion; /* The minimum Finale version. Set to 0 to don't check. */
765 };
766#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
767private:
768
769#ifndef DOXYGEN_SHOULD_IGNORE_THIS
771 fourbyte MakePrefsFourbyte(const twobyte inci0, const twobyte inci1, const PREFMAP_ARRAY_CONVERSION convType);
772
774 void MakePrefsTwobytes(const fourbyte fb, twobyte *inci0, twobyte *inci1, const PREFMAP_ARRAY_CONVERSION convType);
775
777 bool MapPrefStruct(EXTAG tag,
778 twobyte prefNumber,
779 PREFERENCE_LOCATION_MAPRECORD **ppMapDef,
780 twobyte *noOfElements);
781#endif
782
783protected:
784
785#ifndef DOXYGEN_SHOULD_IGNORE_THIS
786
788 bool FragmentStructLoad(void* pVoidBuffer, fourbyte *pSize,
789 PREFERENCE_LOCATION_MAPRECORD *pMapDef, twobyte noOfElements);
790
792 bool FragmentStructSave(void* pVoidBuffer, fourbyte size,
793 PREFERENCE_LOCATION_MAPRECORD *pMapDef, twobyte noOfElements);
794
795#if FXT_VERSION >= FINALEVERSION_26_2
796 // as they are implemented, increasing numbers of subclasses will use this to determine whether to load old or new prefs.
797 // const is ok here, because none of the base classes have proper copy ctors or assignment ops. better to get compile errors if we try.
798 const bool _use26;
799#endif
800
801#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
802
803#if FXT_VERSION >= FINALEVERSION_26_2
806
807#ifndef DOXYGEN_SHOULD_IGNORE_THIS
817 __FCPrefsBase(bool use26); // allows subclass to control when to use 26.2 prefs struct.
818#endif
819#else
822#endif // FXT_VERSION >= FINALEVERSION_26_2
823
824public:
825 const char* ClassName() const override { return "__FCPrefsBase"; }
826
829 bool Reload() override;
830
837 virtual bool Load(twobyte prefsno = 1);
838
839 bool Save() override;
840
841 bool LoadFirst() override { return Load(1); }
842
847 int GetItemNo() const { return _dataid.prefs.prefNumber; }
848};
849
850// playback prefs defines
851
852// playback record flags
853#define PLAYFLAG_NOTEDURATIONS 0x0001
854#define PLAYFLAG_KEYVELOCITIES 0x0002
855#define PLAYFLAG_SENDPATCHES 0x0010
856#define PLAYFLAG_TEMPOCHANGES 0x0020
857#define PLAYFLAG_CONTDATA 0x0080
858#define PLAYFLAG_SCROLLING 0x0400
859#define PLAYFLAG_RESETRPTS 0x0800
860#define PLAYFLAG_CHASECONTDATA 0x1000
861#define PLAYFLAG_CHASEPATCHES 0x2000
862#define PLAYFLAG_RCVMIDISYNC 0x4000
863
869{
870 union
871 {
872#if FXT_VERSION >= FINALEVERSION_26_2
873 EDTPlaybackPrefs26_2 _new;
874#endif
875 _FCEDTPlaybackPrefs _old;
876 } _prefsdata;
877
878#if FXT_VERSION >= FINALEVERSION_26_2
879 _FCEDTPDRecord_26 _pd; // used only in Finale 26.2+
880#endif
881
882 std::unique_ptr<FCHyperClick> _hyperClickBarNote;
883 std::unique_ptr<FCHyperClick> _hyperClickBarData;
884 std::unique_ptr<FCHyperClick> _hyperClickBeatNote;
885 std::unique_ptr<FCHyperClick> _hyperClickBeatData;
886
887 EXTAG Tag() const override
888 {
889#if FXT_VERSION >= FINALEVERSION_26_2
890 if (_use26) return pf_PlaybackPrefs26_2;
891#endif
892 return _fcpf_PlaybackPrefs;
893 }
894
895 int DataSizeLoad() const override
896 {
897#if FXT_VERSION >= FINALEVERSION_26_2
898 if (_use26) return sizeof(_prefsdata._new);
899#endif
900 return sizeof(_prefsdata._old);
901 }
902 void* Allocate() override { return (void*) _GetPrefsData(); }
903
908 void CloneMemoryFrom(__FCBaseData* pSource) override
909 {
910 memcpy(_GetPrefsData(), ((FCPlaybackPrefs*)pSource)->_GetPrefsData(), DataSizeLoad());
911#if FXT_VERSION >= FINALEVERSION_26_2
912 memcpy(&_pd, &((FCPlaybackPrefs*)pSource)->_pd, sizeof(_pd));
913#endif
914 _datablock = &_prefsdata;
915 _loadedsize = DataSizeLoad();
916 }
917
918 __FCBaseData* CreateObject() override
919 { return new FCPlaybackPrefs(); }
920
921 bool _GetPlaybackBitFlag(FLAG_32 flag) const
922 {
923#if FXT_VERSION >= FINALEVERSION_26_2
924 if (_use26) return GetBitFlag(_pd.playbackRecordFlags, flag);
925#endif
926 return GetBitFlag(_prefsdata._old.playbackRecordFlags, flag);
927 }
928
929 void _SetPlaybackBitFlag(FLAG_32 flag, bool state)
930 {
931#if FXT_VERSION >= FINALEVERSION_26_2
932 if (_use26)
933 {
934 Set16BitFlag(&_pd.playbackRecordFlags, flag, state);
935 return;
936 }
937#endif
938 Set16BitFlag(&_prefsdata._old.playbackRecordFlags, flag, state);
939 }
940
941 void InitMembers()
942 {
943 memset(&_prefsdata, 0, sizeof(_prefsdata));
944 _hyperClickBarNote = std::unique_ptr<FCHyperClick>(new FCHyperClick(&_SET_PREFDATA1(hyperClickBarNote), true));
945 _hyperClickBarData = std::unique_ptr<FCHyperClick>(new FCHyperClick(&_SET_PREFDATA1(hyperClickBarData), false));
946 _hyperClickBeatNote = std::unique_ptr<FCHyperClick>(new FCHyperClick(&_SET_PREFDATA1(hyperClickBeatNote), true));
947 _hyperClickBeatData = std::unique_ptr<FCHyperClick>(new FCHyperClick(&_SET_PREFDATA1(hyperClickBeatData), false));
948 }
949
950public:
951#ifndef DOXYGEN_SHOULD_IGNORE_THIS
953 void* _GetPrefsData() { return &_prefsdata; }
954
955 bool Load(twobyte prefsno = 1) override;
956
957 bool Save() override;
958
959#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
960
961#ifndef DOXYGEN_SHOULD_IGNORE_THIS
963 bool GetSendClickOff() const { return _GET_PREFDATA1(sendClickOff); }
965 void SetSendClickOff(bool state) { _SET_PREFDATA1(sendClickOff) = state; }
966#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
967
970 {
972 PLAYBACKSTART_MEASURE = PLAYBACK_START_MODE_ALWAYS_AT,
973
975 PLAYBACKSTART_LEFTMOST = PLAYBACK_START_MODE_LEFTMOST,
976
978 PLAYBACKSTART_CURRENTCOUNTER = PLAYBACK_START_MODE_USE_COUNTER
979 };
980
993
996 {
998 SMPTETIMETYPE_24 = SMPTE_TIME_TYPE_24,
999
1001 SMPTETIMETYPE_25 = SMPTE_TIME_TYPE_25,
1002
1004 SMPTETIMETYPE_2997_DROP = SMPTE_TIME_TYPE_30_DROP, // 2997 Drop coerced to 30 Drop, per Joe Lenarz.
1005
1007 SMPTETIMETYPE_30 = SMPTE_TIME_TYPE_30,
1008
1010 SMPTETIMETYPE_2997_NONDROP = SMPTE_TIME_TYPE_2997,
1011 };
1012
1025
1026 const char* ClassName() const override { return "FCPlaybackPrefs"; }
1027 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_PLAYBACKPREFS; }
1028
1034#if FXT_VERSION >= FINALEVERSION_26_2
1035 __FCPrefsBase(false) // force all Finale versions to use old struct until bug in EDTPlaybackPrefs26_2 update is fixed
1036#else
1038#endif
1039 { InitMembers(); }
1040
1041#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1042#if FXT_VERSION >= FINALEVERSION_26_2
1043
1044
1045#ifdef PDK_FRAMEWORK_LUAFRIENDLY
1047 static FCPlaybackPrefs* FCPlaybackPrefs_Lua(void* ptr, lua_State* L)
1048 {
1049 return _OneOptionalParamLuaConstructor<FCPlaybackPrefs, bool>(ptr, L);
1050 }
1051#endif
1052
1057 FCPlaybackPrefs(bool use26) : __FCPrefsBase(use26)
1058 { InitMembers(); }
1059
1060#endif // FXT_VERSION >= FINALEVERSION_26_2
1061#endif // DOXYGEN_SHOULD_IGNORE_THIS
1062
1068 twobyte GetBaseKeyVelocity() const { return _GET_PREFDATA2(baseKeyVelocity, baseVelocity); }
1069
1074 TimeEdu32 GetMetronomeBeat() const { return _GET_PREFDATA2(metronomeBeat, edusPerBeat); }
1075
1081 twobyte GetMetronomeSpeed() const { return _GET_PREFDATA2(metronomeSpeed, beatsPerMinute); }
1082
1089 twobyte GetSwing() const { return _GET_PREFDATA2(swing, swingValue); }
1090
1095 eMeas GetStartMeasure() const { return _GET_PREFDATA2(startAtMeas, startMeas); }
1096
1101 TimeEdu32 GetStartMeasurePos() const { return _GET_PREFDATA1(startEdu); }
1102
1109 int GetStartRepeatPass() const { return _GET_PREFDATA1(startPass); }
1110
1118 eMeas GetStopMeasure() const
1119 {
1120 eMeas retVal _GET_PREFDATA2(stopAtMeas, endMeas);
1121 if (GetStopMeasurePos() == 0) retVal--;
1122 return retVal;
1123 }
1124
1129 TimeEdu32 GetStopMeasurePos() const { return _GET_PREFDATA2(stopEdu, endEdu); }
1130
1137 int GetStopRepeatPass() const { return _GET_PREFDATA1(endPass); }
1138
1145#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1147#else
1148 int
1149#endif
1150 GetStartMode() const { return (PLAYBACKSTARTMODE) _GET_PREFDATA2(startAtMode, startMode); }
1151
1158#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1160#else
1161 int
1162#endif
1164 {
1165#if FXT_VERSION >= FINALEVERSION_26_2
1166 if (_use26) return (PLAYBACKEXPSMODE)_pd.exprMode;
1167#endif
1168 return (PLAYBACKEXPSMODE)_prefsdata._old.exprMode;
1169 }
1170
1175 bool GetPlayNoteDurations() const { return _GetPlaybackBitFlag(PLAYFLAG_NOTEDURATIONS); }
1176
1181 bool GetPlayKeyVelocities() const { return _GetPlaybackBitFlag(PLAYFLAG_KEYVELOCITIES); }
1182
1187 bool GetPlayContinuousData() const { return _GetPlaybackBitFlag(PLAYFLAG_CONTDATA); }
1188
1193 bool GetPlayTempoChanges() const { return _GetPlaybackBitFlag(PLAYFLAG_TEMPOCHANGES); }
1194
1199 bool GetRepeatsIgnore() const { return MAKEBOOL(_GET_PREFDATA1(doPlaybackRepeats)); }
1200
1205 bool GetRepeatsReset() const { return _GetPlaybackBitFlag(PLAYFLAG_RESETRPTS); }
1206
1211 bool GetSendPatchesToMidi() const { return _GetPlaybackBitFlag(PLAYFLAG_SENDPATCHES); }
1212
1219 bool GetSyncReceiveMidi() const { return _GetPlaybackBitFlag(PLAYFLAG_RCVMIDISYNC); }
1220
1225 bool GetSyncChasePatches() const { return _GetPlaybackBitFlag(PLAYFLAG_CHASEPATCHES); }
1226
1231 bool GetSyncChaseContinuousData() const { return _GetPlaybackBitFlag(PLAYFLAG_CHASECONTDATA); }
1232
1239#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1241#else
1242 int
1243#endif
1244 GetSMPTEFrameRate() const { return (SMPTEFRAMERATE) _GET_PREFDATA1(smpteTimeType); }
1245
1252 TimeRtu32 GetSMPTEStartTime() const { return _GET_PREFDATA1(smpteStartTime); }
1253
1258 int GetCountOffMeasures() const { return _GET_PREFDATA1(countOffBars); }
1259
1266 bool GetCountOffWhenRecording() const { return MAKEBOOL(_GET_PREFDATA1(countOffWhenRecording)); }
1267
1274 bool GetCountOffWhenPlaying() const { return MAKEBOOL(_GET_PREFDATA1(countOffWhenPlaying)); }
1275
1282 bool GetClickWhenRecording() const { return MAKEBOOL(_GET_PREFDATA1(clickWhenRecording)); }
1283
1290 bool GetClickWhenPlaying() const { return MAKEBOOL(_GET_PREFDATA1(clickWhenPlaying)); }
1291
1298#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1300#else
1301 int
1302#endif
1304 {
1305 if (_GET_PREFDATA1(clickSourceType) == CLICK_SOURCE_TYPE_MIDI)
1306 {
1307 if (_GET_PREFDATA1(hyperClickDataType) == HYPERCLICK_DATA_TYPE_MIDIDATA)
1308 return METSOURCE_MIDIDATA;
1309 return METSOURCE_MIDINOTE;
1310 }
1311 return METSOURCE_FINALECLICK;
1312 }
1313
1318 bool GetScrollingPlayback() const { return _GetPlaybackBitFlag(PLAYFLAG_SCROLLING); }
1319
1328 FCHyperClick* GetClickInfoForMidiNotesOnDownBeats() const { return _hyperClickBarNote.get(); }
1329
1338 FCHyperClick* GetClickInfoForMidiNotesOnOtherBeats() const { return _hyperClickBeatNote.get(); }
1339
1347 FCHyperClick* GetClickInfoForMidiDataOnDownBeats() const { return _hyperClickBarData.get(); }
1348
1356 FCHyperClick* GetClickInfoForMidiDataOnOtherBeats() const { return _hyperClickBeatData.get(); }
1357
1363 void SetBaseKeyVelocity(twobyte value) { _SET_PREFDATA2(baseKeyVelocity, baseVelocity) = value; }
1364
1371 void SetMetronomeBeat(TimeEdu32 value)
1372 {
1373 // can't use _SET_PREFDATA2 macro because the types are different
1374#if FXT_VERSION >= FINALEVERSION_26_2
1375 if (_use26)
1376 _prefsdata._new.edusPerBeat = value;
1377 else
1378#endif
1379 _prefsdata._old.metronomeBeat = static_cast<twobyte>(value);
1380 }
1381
1388 void SetMetronomeSpeed(twobyte value) { _SET_PREFDATA2(metronomeSpeed, beatsPerMinute) = value; }
1389
1396 void SetSwing(twobyte value) { _SET_PREFDATA2(swing, swingValue) = value; }
1397
1407 void SetStartMeasure(eMeas measure) { _SET_PREFDATA2(startAtMeas, startMeas) = measure; }
1408
1415 void SetStartMeasurePos(TimeEdu32 value) { _SET_PREFDATA1(startEdu) = value; }
1416
1417#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1422 void SetStartRepeatPass(int value) { _SET_PREFDATA1(startPass) = static_cast<twobyte>(value); }
1423#endif // DOXYGEN_SHOULD_IGNORE_THIS
1424
1434 void SetStopMeasure(eMeas measure)
1435 {
1436 if (GetStopMeasurePos() == 0) measure++;
1437 _SET_PREFDATA2(stopAtMeas, endMeas) = measure;
1438 }
1439
1446 void SetStopMeasurePos(TimeEdu32 value)
1447 {
1448 value = MAX(value, 0);
1449 if (value == EDU32_MAX)
1450 value = 0;
1451 if (!value && GetStopMeasurePos())
1453 else if (value && !GetStopMeasurePos())
1455 _SET_PREFDATA2(stopEdu, endEdu) = value;
1456 }
1457
1458#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1463 void SetStopRepeatPass(int value) { _SET_PREFDATA1(endPass) = static_cast<twobyte>(value); }
1464#endif // DOXYGEN_SHOULD_IGNORE_THIS
1465
1476 {
1477 _SET_PREFDATA2(stopEdu, endEdu) = 0;
1478 _SET_PREFDATA2(stopAtMeas, endMeas) = EMEAS_MAX;
1479 }
1480
1495
1509 void ConfigurePlaybackRegion(const FCMusicRegion* pRegion, bool startOnly = false)
1510 {
1511 if (pRegion->IsEmpty())
1512 {
1514 return;
1515 }
1517 SetStartMeasure(pRegion->GetStartMeasure());
1519 if (! startOnly)
1520 {
1521 SetStopMeasure(pRegion->GetEndMeasure());
1522 SetStopMeasurePos(pRegion->GetEndMeasurePos() + 1); // adding 1 allows the final edu pos to play back
1523 }
1524 }
1525
1533#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1535#else
1536 int
1537#endif
1538 mode) { _SET_PREFDATA2(startAtMode, startMode) = (twobyte) mode; }
1539
1547#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1549#else
1550 int
1551#endif
1552 mode)
1553 {
1554#if FXT_VERSION >= FINALEVERSION_26_2
1555 if (_use26)
1556 {
1557 _pd.exprMode = mode;
1558 return;
1559 }
1560#endif
1561 _prefsdata._old.exprMode = mode;
1562 }
1563
1568 void SetPlayNoteDurations(bool state) { _SetPlaybackBitFlag(PLAYFLAG_NOTEDURATIONS, state); }
1569
1574 void SetPlayKeyVelocities(bool state) { _SetPlaybackBitFlag(PLAYFLAG_KEYVELOCITIES, state); }
1575
1580 void SetPlayContinuousData(bool state) { _SetPlaybackBitFlag(PLAYFLAG_CONTDATA, state); }
1581
1586 void SetPlayTempoChanges(bool state) { _SetPlaybackBitFlag(PLAYFLAG_TEMPOCHANGES, state); }
1587
1592 void SetRepeatsIgnore(bool state) { _SET_PREFDATA1(doPlaybackRepeats) = state; }
1593
1598 void SetRepeatsReset(bool state) { _SetPlaybackBitFlag(PLAYFLAG_RESETRPTS, state); }
1599
1604 void SetSendPatchesToMidi(bool state) { _SetPlaybackBitFlag(PLAYFLAG_SENDPATCHES, state); }
1605
1612 void SetSyncReceiveMidi(bool state) { _SetPlaybackBitFlag(PLAYFLAG_RCVMIDISYNC, state); }
1613
1618 void SetSyncChasePatches(bool state) { _SetPlaybackBitFlag(PLAYFLAG_CHASEPATCHES, state); }
1619
1624 void SetSyncChaseContinuousData(bool state) { _SetPlaybackBitFlag(PLAYFLAG_CHASECONTDATA, state); }
1625
1633#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1635#else
1636 int
1637#endif
1638 mode) { _SET_PREFDATA1(smpteTimeType) = (twobyte) mode; }
1639
1646 void SetSMPTEStartTime(TimeRtu32 value) { _SET_PREFDATA1(smpteStartTime) = value; }
1647
1652 void SetCountOffMeasures(int value) { _SET_PREFDATA1(countOffBars) = value; }
1653
1660 void SetCountOffWhenRecording(bool state) { _SET_PREFDATA1(countOffWhenRecording) = state; }
1661
1668 void SetCountOffWhenPlaying(bool state) { _SET_PREFDATA1(countOffWhenPlaying) = state; }
1669
1676 void SetClickWhenRecording(bool state) { _SET_PREFDATA1(clickWhenRecording) = state; }
1677
1684 void SetClickWhenPlaying(bool state) { _SET_PREFDATA1(clickWhenPlaying) = state; }
1685
1693#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1695#else
1696 int
1697#endif
1698 value)
1699 {
1700 switch (static_cast<METSOUNDSOURCE>(value))
1701 {
1703 _SET_PREFDATA1(clickSourceType) = CLICK_SOURCE_TYPE_INTERNAL;
1704 _SET_PREFDATA1(hyperClickDataType) = HYPERCLICK_DATA_TYPE_MIDINOTE;
1705 break;
1706 case METSOURCE_MIDINOTE:
1707 _SET_PREFDATA1(clickSourceType) = CLICK_SOURCE_TYPE_MIDI;
1708 _SET_PREFDATA1(hyperClickDataType) = HYPERCLICK_DATA_TYPE_MIDINOTE;
1709 break;
1710 case METSOURCE_MIDIDATA:
1711 _SET_PREFDATA1(clickSourceType) = CLICK_SOURCE_TYPE_MIDI;
1712 _SET_PREFDATA1(hyperClickDataType) = HYPERCLICK_DATA_TYPE_MIDIDATA;
1713 break;
1714 }
1715 }
1716
1725 void SetScrollingPlayback(bool state) { _SetPlaybackBitFlag(PLAYFLAG_SCROLLING, state); }
1726};
1727
1734{
1735 _FCEDTDistancePrefs _prefsdata;
1736
1737 EXTAG Tag() const override { return _fcpf_DistancePrefs; }
1738
1739 int DataSizeLoad() const override { return sizeof(_FCEDTDistancePrefs); }
1740 void* Allocate() override { return (void*) &_prefsdata; }
1741
1746 void CloneMemoryFrom(__FCBaseData* pSource) override
1747 {
1748 memcpy(&_prefsdata, ((FCDistancePrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
1749 _datablock = &_prefsdata;
1750 _loadedsize = sizeof(_prefsdata);
1751 }
1752
1753 __FCBaseData* CreateObject() override
1754 { return new FCDistancePrefs(); }
1755public:
1756#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1758 void* _GetPrefsData() { return &_prefsdata; }
1759#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1760
1761 const char* ClassName() const override { return "FCDistancePrefs"; }
1762 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_DISTANCEPREFS; }
1763
1769 {
1770 memset(&_prefsdata, 0, sizeof(_prefsdata));
1771 }
1772
1777 twobyte GetSpaceBefore() const { return _prefsdata.musicSpaceBefore; }
1778
1783 twobyte GetSpaceAfter() const { return _prefsdata.musicSpaceAfter; }
1784
1789 twobyte GetAugmentationDotSpace() const { return _prefsdata.dotSpaceBetweenDots; }
1790
1795 twobyte GetAugmentationDotNoteSpace() const { return _prefsdata.dotNoteSpace; }
1796
1801 twobyte GetAugmentationDotVerticalAdjust() const { return _prefsdata.dotVerticalAdjust; }
1802
1807 twobyte GetAugmentationDotUpstemAdjust() const { return _prefsdata.dotFlagAdjust; }
1808
1813 twobyte GetClefChangeOffset() const { return - _prefsdata.clefDefaultOffset; }
1814
1819 twobyte GetSecondaryBeamSpace() const { return _prefsdata.beamSecondarySepar; }
1820
1825 Evpu16 GetTimeSigTopVertical() const { return _prefsdata.timesigTopSymbolVert; }
1826
1831 Evpu16 GetTimeSigPartsTopVertical() const { return _prefsdata.timesigPartsTopSymbolVert; }
1832
1837 Evpu16 GetTimeSigBottomVertical() const { return _prefsdata.timesigBottomSymbolVert; }
1838
1843 Evpu16 GetTimeSigPartsBottomVertical() const { return _prefsdata.timesigPartsBottomSymbolVert; }
1844
1849 Efix16 GetBarlineDoubleSpace() const { return _prefsdata.barlineDblSpace; }
1850
1855 Efix16 GetBarlineFinalSpace() const { return _prefsdata.barlineFinalSpace; }
1856
1861 Evpu32 GetBarlineDashSpace() const { return _prefsdata.barlineDashSpace; }
1862
1867 Evpu16 GetKeySpaceBefore() const { return _prefsdata.keysigSpaceBefore; }
1868
1873 Evpu16 GetKeySpaceAfter() const { return _prefsdata.keysigSpaceAfter; }
1874
1879 Evpu16 GetKeySpaceAfterCancel() const { return _prefsdata.keysigSpaceAfterCancel; }
1880
1885 Evpu16 GetKeySpaceBetweenAccidentals() const { return _prefsdata.keysigSpaceBetween; }
1886
1891 Evpu16 GetClefSpaceBefore() const { return _prefsdata.clefBefore; }
1892
1897 Evpu16 GetClefSpaceAfter() const { return _prefsdata.clefAfter; }
1898
1903 Efix32 GetStemVerticalNoteheadOffset() const { return _prefsdata.stemNoteheadOffset; } /* Incorrectly documented as horizontal in the PDK */
1904
1909 Evpu16 GetTimeSigAbbreviatedVertical() const { return _prefsdata.timesigAbbrSymbolVert; }
1910
1915 Evpu16 GetTimeSigPartsAbbreviatedVertical() const { return _prefsdata.timesigPartsAbbrSymbolVert; }
1916
1921 Evpu16 GetTimeSigSpaceBefore() const { return _prefsdata.timesigSpaceBefore; }
1922
1927 Evpu16 GetTimeSigPartsSpaceBefore() const { return _prefsdata.timesigPartsSpaceBefore; }
1928
1933 Evpu16 GetTimeSigSpaceAfter() const { return _prefsdata.timesigSpaceAfter; }
1934
1939 Evpu16 GetTimeSigPartsSpaceAfter() const { return _prefsdata.timesigPartsSpaceAfter; }
1940
1945 twobyte GetAccidentalVertical() const { return _prefsdata.acciVertSpace; }
1946
1951 Evpu16 GetAccidentalMultiCharSpace() const { return _prefsdata.acciMultCharSpace; }
1952
1957 Evpu16 GetAccidentalNoteSpace() const { return _prefsdata.acciNoteSpace; }
1958
1963 Evpu16 GetAccidentalMultiSpace() const { return _prefsdata.acciMultiSpaces; }
1964
1970 twobyte GetAlternateHalfDiamondVertical() const { return _prefsdata.alterHalfDiamondBaseline; }
1971
1977 twobyte GetAlternateWholeDiamondVertical() const { return _prefsdata.alterWholeDiamondBaseline; }
1978
1984 twobyte GetAlternateBrevisDiamondVertical() const { return _prefsdata.alterDblWholeDiamondBaseline; }
1985
1990 twobyte GetBeamMaxDistance() const { return _prefsdata.beamMaxDistance; }
1991
1996 Evpu16 GetGraceNoteSpacing() const { return _prefsdata.graceNoteSpacing; }
1997
2003 Evpu16 GetGroupBracketDefaultDistance() const { return _prefsdata.groupbracketdefaulthorizontaldistance; }
2004
2009 Evpu16 GetKeyTimeExtraSpace() const { return _prefsdata.keysigTimeSpace; }
2010
2015 Evpu16 GetClefKeyExtraSpace() const { return _prefsdata.clefKeySpace; }
2016
2021 Evpu16 GetClefTimeExtraSpace() const { return _prefsdata.clefTimeSpace; }
2022
2027 bool GetAccidentalCrossLayerPositioning() const { return _prefsdata.acciCrossLayerPositioning != 0; }
2028
2029 // *******
2030 // SETTERS
2031 // *******
2032
2037 void SetSpaceBefore(twobyte value) { _prefsdata.musicSpaceBefore = value; }
2038
2043 void SetSpaceAfter(twobyte value) { _prefsdata.musicSpaceAfter = value; }
2044
2049 void SetAugmentationDotSpace(twobyte value) { _prefsdata.dotSpaceBetweenDots = value; }
2050
2055 void SetAugmentationDotNoteSpace(twobyte value) { _prefsdata.dotNoteSpace = value; }
2056
2061 void SetAugmentationDotVerticalAdjust(twobyte value) { _prefsdata.dotVerticalAdjust = value; }
2062
2067 void SetAugmentationDotUpstemAdjust(twobyte value) { _prefsdata.dotFlagAdjust = value; }
2068
2073 void SetClefChangeOffset(twobyte value) { _prefsdata.clefDefaultOffset = -value; }
2074
2079 void SetSecondaryBeamSpace(twobyte value) { _prefsdata.beamSecondarySepar = value; }
2080
2085 void SetTimeSigTopVertical(Evpu16 value) { _prefsdata.timesigTopSymbolVert = value; }
2086
2091 void SetTimeSigPartsTopVertical(Evpu16 value) { _prefsdata.timesigPartsTopSymbolVert = value; }
2092
2097 void SetTimeSigBottomVertical(Evpu16 value) { _prefsdata.timesigBottomSymbolVert = value; }
2098
2103 void SetTimeSigPartsBottomVertical(Evpu16 value) { _prefsdata.timesigPartsBottomSymbolVert = value; }
2104
2109 void SetBarlineDoubleSpace(Efix16 value) { _prefsdata.barlineDblSpace = value; }
2110
2115 void SetBarlineFinalSpace(Efix16 value) { _prefsdata.barlineFinalSpace = value; }
2116
2121 void SetBarlineDashSpace(Evpu32 value) { _prefsdata.barlineDashSpace = value; }
2122
2127 void SetKeySpaceBefore(Evpu16 value) { _prefsdata.keysigSpaceBefore = value; }
2128
2133 void SetKeySpaceAfter(Evpu16 value) { _prefsdata.keysigSpaceAfter = value; }
2134
2139 void SetKeySpaceAfterCancel(Evpu16 value) { _prefsdata.keysigSpaceAfterCancel = value; }
2140
2145 void SetKeySpaceBetweenAccidentals(Evpu16 value) { _prefsdata.keysigSpaceBetween = value; }
2146
2151 void SetClefSpaceBefore(Evpu16 value) { _prefsdata.clefBefore = value; }
2152
2157 void SetClefSpaceAfter(Evpu16 value) { _prefsdata.clefAfter = value; }
2158
2163 void SetStemVerticalNoteheadOffset(Efix32 value) { _prefsdata.stemNoteheadOffset = value; } /* Incorrectly documented as horizontal in the PDK */
2164
2169 void SetTimeSigAbbreviatedVertical(Evpu16 value) { _prefsdata.timesigAbbrSymbolVert = value; }
2170
2175 void SetTimeSigPartsAbbreviatedVertical(Evpu16 value) { _prefsdata.timesigPartsAbbrSymbolVert = value; }
2176
2181 void SetTimeSigSpaceBefore(Evpu16 value) { _prefsdata.timesigSpaceBefore = value; }
2182
2187 void SetTimeSigPartsSpaceBefore(Evpu16 value) { _prefsdata.timesigPartsSpaceBefore = value; }
2188
2193 void SetTimeSigSpaceAfter(Evpu16 value) { _prefsdata.timesigSpaceAfter = value; }
2194
2199 void SetTimeSigPartsSpaceAfter(Evpu16 value) { _prefsdata.timesigPartsSpaceAfter = value; }
2200
2205 void SetAccidentalVertical(twobyte value) { _prefsdata.acciVertSpace = value; }
2206
2211 void SetAccidentalMultiCharSpace(Evpu16 value) { _prefsdata.acciMultCharSpace = value; }
2212
2217 void SetAccidentalNoteSpace(Evpu16 value) { _prefsdata.acciNoteSpace = value; }
2218
2223 void SetAccidentalMultiSpace(Evpu16 value) { _prefsdata.acciMultiSpaces = value; }
2224
2230 void SetAlternateHalfDiamondVertical(twobyte value) { _prefsdata.alterHalfDiamondBaseline = value; }
2231
2237 void SetAlternateWholeDiamondVertical(twobyte value) { _prefsdata.alterWholeDiamondBaseline = value; }
2238
2244 void SetAlternateBrevisDiamondVertical(twobyte value) { _prefsdata.alterDblWholeDiamondBaseline = value; }
2245
2250 void SetBeamMaxDistance(twobyte value) { _prefsdata.beamMaxDistance = value; }
2251
2256 void SetGraceNoteSpacing(Evpu16 value) { _prefsdata.graceNoteSpacing = value; }
2257
2263 void SetGroupBracketDefaultDistance(Evpu16 value) { _prefsdata.groupbracketdefaulthorizontaldistance = value; }
2264
2269 void SetKeyTimeExtraSpace(Evpu16 value) { _prefsdata.keysigTimeSpace = value; }
2270
2275 void SetClefKeyExtraSpace(Evpu16 value) { _prefsdata.clefKeySpace = value; }
2276
2281 void SetClefTimeExtraSpace(Evpu16 value) { _prefsdata.clefTimeSpace = value; }
2282
2287 void SetAccidentalCrossLayerPositioning(bool value) { _prefsdata.acciCrossLayerPositioning = value; }
2288};
2289
2290
2296{
2297 _FCEDTSizePrefs _prefsdata;
2298 EXTAG Tag() const override { return _fcpf_SizePrefs; }
2299
2300 int DataSizeLoad() const override { return sizeof(_FCEDTSizePrefs); }
2301 void* Allocate() override { return (void*) &_prefsdata; }
2302
2307 void CloneMemoryFrom(__FCBaseData* pSource) override
2308 {
2309 memcpy(&_prefsdata, ((FCSizePrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
2310 _datablock = &_prefsdata;
2311 _loadedsize = sizeof(_prefsdata);
2312 }
2313
2314 __FCBaseData* CreateObject() override
2315 { return new FCDistancePrefs(); }
2316public:
2317#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2319 void* _GetPrefsData() { return &_prefsdata; }
2320#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2321
2322 const char* ClassName() const override { return "FCSizePrefs"; }
2323 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SIZEPREFS; }
2324
2330
2331 // *******
2332 // GETTERS
2333 // *******
2334
2339 Efix16 GetBeamThickness() const { return _prefsdata.beamThickness; }
2340
2345 twobyte GetGraceNoteSize() const { return _prefsdata.graceNoteSize; }
2346
2351 Efix16 GetGraceSlashThickness() const { return _prefsdata.graceSlashThickness; }
2352
2357 Efix16 GetHeavyBarlineThickness() const { return _prefsdata.barlineHeavyThickness; }
2358
2363 Efix16 GetThinBarlineThickness() const { return _prefsdata.barlineThinThickness; }
2364
2369 Evpu32 GetBarlineDashLength() const { return _prefsdata.barlineDashLength; }
2370
2375 Efix16 GetStaffLineThickness() const { return _prefsdata.staffLineThickness; }
2376
2381 Efix16 GetLedgerLineThickness() const { return _prefsdata.ledgerThickness; }
2382
2387 Evpu16 GetLedgerLeftHalf() const { return _prefsdata.ledgerLeftHalf; }
2388
2393 Evpu16 GetLedgerLeftRestHalf() const { return _prefsdata.ledgerLeftHalfRest; }
2394
2400 Evpu16 GetLedgerRightHalf() const { return _prefsdata.ledgerRightHalf; }
2401
2406 Evpu16 GetLedgerRightRestHalf() const { return _prefsdata.ledgerRightHalfRest; }
2407
2412 Evpu16 GetBrokenBeamLength() const { return _prefsdata.beamBrokenLength; }
2413
2418 ePercent GetTablatureGraceNoteSize() const { return _prefsdata.graceTablatureNoteSize; }
2419
2424 Efix16 GetEnclosureThickness() const { return _prefsdata.enclosureThickness; }
2425
2430 fourbyte GetShapeSlurTipWidth() const { return _prefsdata.shapeDesignerSlurTip; }
2431
2436 Evpu16 GetNormalStemLength() const { return _prefsdata.stemNormalLength; }
2437
2442 Evpu16 GetShortenedStemLength() const { return _prefsdata.stemShortLength; }
2443
2448 Evpu16 GetHalfStemLength() const { return _prefsdata.stemHalfLength; }
2449
2454 Evpu16 GetReverseStemAdjust() const { return _prefsdata.stemReverseAdjust; }
2455
2460 Efix16 GetStemLineThickness() const { return _prefsdata.stemThickness; }
2461
2462
2463 // *******
2464 // SETTERS
2465 // *******
2466
2471 void SetBeamThickness(Efix16 value) { _prefsdata.beamThickness = value; }
2472
2477 void SetGraceNoteSize(twobyte value) { _prefsdata.graceNoteSize = value; }
2478
2483 void SetGraceSlashThickness(Efix16 value) { _prefsdata.graceSlashThickness = value; }
2484
2489 void SetHeavyBarlineThickness(Efix16 value) { _prefsdata.barlineHeavyThickness = value; }
2490
2495 void SetThinBarlineThickness(Efix16 value) { _prefsdata.barlineThinThickness = value; }
2496
2501 void SetBarlineDashLength(Evpu32 value) { _prefsdata.barlineDashLength = value; }
2502
2507 void SetStaffLineThickness(Efix16 value) { _prefsdata.staffLineThickness = value; }
2508
2513 void SetLedgerLineThickness(Efix16 value) { _prefsdata.ledgerThickness = value; }
2514
2519 void SetLedgerLeftHalf(Evpu16 value) { _prefsdata.ledgerLeftHalf = value; }
2520
2525 void SetLedgerLeftRestHalf(Evpu16 value) { _prefsdata.ledgerLeftHalfRest = value; }
2526
2531 void SetLedgerRightHalf(Evpu16 value) { _prefsdata.ledgerRightHalf = value; }
2532
2537 void SetLedgerRightRestHalf(Evpu16 value) { _prefsdata.ledgerRightHalfRest = value; }
2538
2543 void SetBrokenBeamLength(Evpu16 value) { _prefsdata.beamBrokenLength = value; }
2544
2549 void SetTablatureGraceNoteSize(ePercent value) { _prefsdata.graceTablatureNoteSize = value; }
2550
2555 void SetEnclosureThickness(Efix16 value) { _prefsdata.enclosureThickness = value; }
2556
2561 void SetShapeSlurTipWidth(fourbyte value) { _prefsdata.shapeDesignerSlurTip = value; }
2562
2567 void SetNormalStemLength(Evpu16 value) { _prefsdata.stemNormalLength = value; }
2568
2573 void SetShortenedStemLength(Evpu16 value) { _prefsdata.stemShortLength = value; }
2574
2579 void SetHalfStemLength(Evpu16 value) { _prefsdata.stemHalfLength = value; }
2580
2585 void SetReverseStemAdjust(Evpu16 value) { _prefsdata.stemReverseAdjust = value; }
2586
2591 void SetStemLineThickness(Efix16 value) { _prefsdata.stemThickness = value; }
2592};
2593
2594
2600{
2601 _FCEDTMiscDocPrefs _prefsdata;
2602
2603 EXTAG Tag() const override { return _fcpf_MiscDocPrefs; }
2604
2605 int DataSizeLoad() const override { return sizeof(_FCEDTMiscDocPrefs); }
2606 void* Allocate() override { return (void*) &_prefsdata; }
2607
2612 void CloneMemoryFrom(__FCBaseData* pSource) override
2613 {
2614 memcpy(&_prefsdata, ((FCMiscDocPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
2615 _datablock = &_prefsdata;
2616 _loadedsize = sizeof(_prefsdata);
2617 }
2618
2619 __FCBaseData* CreateObject() override
2620 { return new FCMiscDocPrefs(); }
2621public:
2622#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2624 void* _GetPrefsData() { return &_prefsdata; }
2625#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2626
2627#if FXT_VERSION >= FINALEVERSION_26_2
2629 bool Load(twobyte prefsNumber = 0) override;
2630
2632 bool Save() override;
2633#endif
2634
2650
2656 {
2658 BEAMSLOPE_ENDNOTESONLY = BEAMSTYLE_ENDNOTESONLY,
2659
2661 BEAMSLOPE_FLATTENALL = BEAMSTYLE_FLATTENALL,
2662
2664 BEAMSLOPE_FLATTENSTANDARD = BEAMSTYLE_FLATTENSTANDARD,
2665
2667 BEAMSLOPE_FLATTENEXTREME = BEAMSTYLE_FLATTENEXTREME
2669
2688
2694 {
2695 }
2696
2697 const char* ClassName() const override { return "FCMiscDocPrefs"; }
2698 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_MISCDOCPREFS; }
2699
2700
2701 /***********/
2702 /* Getters */
2703 /***********/
2704
2710 bool GetExtendSecondaryBeamsOverRests() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_SECOVERRESTS); }
2711
2717 bool GetPrimaryBeamWithinSpace() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_ALLOWPRIMINSPACE); }
2718
2724 bool GetHalfStemsForBeamedRests() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_HALFSTEMS); }
2725
2726
2732 bool GetAllowFloatingRests() const { return !GetBitFlag(_prefsdata.beamFlags, BEAMATTR_NORESTFLOAT); }
2733
2738 bool GetBeamThreeEights() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_THREEEIGHTSANDREST); }
2739
2748#ifndef PDK_FRAMEWORK_LUAFRIENDLY
2750#else
2751 twobyte
2752#endif
2753 GetBeamSlopeStyle() const { return (BEAMSLOPESTYLES) _prefsdata.beamStyle; }
2754
2759 bool GetExtendBeamsOverRests() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_OVERRESTS); }
2760
2765 bool GetBeamedCommonTimeEights() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_FOURINCOMMON); }
2766
2771 bool GetDisplayReverseStemming() const { return !GetBitFlag(_prefsdata.beamFlags, BEAMATTR_NOREVERSALSTEMMING); }
2772
2777 bool GetIncludeRestsInFour() const { return GetBitFlag(_prefsdata.beamFlags, BEAMATTR_RESTSINFOUR); }
2778
2786 bool GetDoubleBarlineAtKeyChange() const;
2787
2792 bool GetDisplayAllBarlines() const { return _prefsdata.barlineDisplayAll != 0; }
2793
2798 bool GetCloseBarlineAtSystem() const { return _prefsdata.barlineCloseSys != 0; }
2799
2804 bool GetCloseBarlineAtEnd() const { return _prefsdata.barlineClosePiece != 0; }
2805
2810 bool GetFinalBarlineAtEnd() const { return _prefsdata.barlineFinalAtEnd != 0; }
2811
2817 bool GetLeftBarlineDisplaySingle() const { return _prefsdata.barlineLeftSingleStaff != 0; }
2818
2823 bool GetLeftBarlineDisplayMultiple() const { return _prefsdata.barlineLeftMultStaves != 0; }
2824
2831 [[deprecated]] bool GetLeftBarlineDisplayMultipe() const { return GetLeftBarlineDisplayMultiple(); }
2832
2840 bool GetNormalDefaultBarline() const { return _prefsdata.barlineDefaultToNormal != 0; }
2841
2846 bool GetAlwaysSlashGraceNote() const { return _prefsdata.graceAlwaysSlash != 0; }
2847
2853 bool GetUseStemConnections() const { return _prefsdata.stemUseConnections != 0; }
2854
2859 twobyte GetClefResize() const { return _prefsdata.clefReduction; }
2860
2865 bool GetShowActiveLayerOnly() const { return _prefsdata.showactivelayeronly != 0; }
2866
2875
2882 [[deprecated]]bool GetItalicizeCapoChords() const { return _prefsdata.chordItalicizeCapo != 0; }
2883
2890 [[deprecated]] bool GetShowFretboards() const
2891 {
2892 return GetBitFlag(_prefsdata.chordFretboardFlag, 0x01);
2893 }
2894
2899 Evpu16 GetMaxBeamSlope() const { return _prefsdata.beamMaxSlope; }
2900
2905 bool GetOnlyFirstSystemClef() const { return _prefsdata.clefOnlyOnFirstSys != 0; }
2906
2911 eClef GetDefaultClefIndex() const { return _prefsdata.clefDefault; }
2912
2917 twobyte GetCurveResolution() const { return _prefsdata.curveResolution; }
2918
2923 bool GetAdjustDotForMultiVoices() const { return _prefsdata.dotAdjustForMultipleVoices != 0; }
2924
2929 twobyte GetGraceNotePlaybackDuration() const { return _prefsdata.gracePlaybackDur; }
2930
2935 bool GetKeySigOnlyFirstSystem() const { return _prefsdata.keysigOnlyOfFirstSys != 0; }
2936
2941 bool GetKeySigNaturalsInC() const { return _prefsdata.keysigNaturalsInC != 0; }
2942
2947 bool GetKeySigModeChange() const { return _prefsdata.keysigModeChange != 0; }
2948
2953 bool GetKeySigCancelOutgoing() const { return _prefsdata.keysigCancelOutgoing != 0; }
2954
2962
2967 bool GetKeySigPreserveOctave() const { return _prefsdata.keysigPreserveOctave != 0; }
2968
2973 twobyte GetTimeSigCompositeDecimals() const { return _prefsdata.timesigCompMeterDeci; }
2974
2979 bool GetAbbreviateCommonTimeSig() const { return _prefsdata.timesigAbbrCommonTime != 0; }
2980
2985 bool GetAbbreviateCutTimeSig() const { return _prefsdata.timesigAbbrCutTime != 0; }
2986
2991 bool GetCourtesyClefAtSystemEnd() const { return GetBitFlag(_prefsdata.courtesyFlags, SYSCOURTESY_CLEF); }
2992
2997 bool GetCourtesyTimeSigAtSystemEnd() const { return GetBitFlag(_prefsdata.courtesyFlags, SYSCOURTESY_TIMESIG); }
2998
3003 bool GetCourtesyKeySigAtSystemEnd() const { return GetBitFlag(_prefsdata.courtesyFlags, SYSCOURTESY_KEYSIG); }
3004
3010 bool GetSecondsInTimeStamp() const { return _prefsdata.secondsInTimeStamp != 0; }
3011
3018#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3020#else
3021 twobyte
3022#endif
3023 GetDateFormat() const { return (DATEFORMATS) _prefsdata.dateFormat; }
3024
3029 int GetTextTabCharacters() const { return _prefsdata.textTabChars; }
3030
3035 bool GetScaleManualNotePositioning() const { return _prefsdata.scaleManualPos != 0; }
3036
3041 bool GetCrossStaffNotesInOriginal () const { return _prefsdata.crossStaffInOriginal != 0; }
3042
3047 bool GetUseNoteShapes() const { return _prefsdata.useNoteShapes != 0; }
3048
3053 TimeEdu16 GetPickupDuration() const { return _prefsdata.pickupMeasure; }
3054
3060 CMPER GetSpecialExtractionID() const { return _prefsdata.specialExtractedPartCmper; }
3061
3066 bool GetDisplayPartExpressions() const { return _prefsdata.displayPartExpressions != 0; }
3067
3072 fourbyte GetUnderlineDepth() const { return _prefsdata.PSUnderlineDepth; }
3073
3078 fourbyte GetUnderlineThickness() const { return _prefsdata.PSUnderlineThickness; }
3079
3086 [[deprecated]]fourbyte GetFretboardsResizeFraction() const { return _prefsdata.chordFretboardResize; }
3087
3094 [[deprecated]]bool GetChordPlayback() const { return (_prefsdata.chordEnablePlayback & 0x02) != 0; }
3095
3100 bool GetAvoidSystemMarginCollisions() const { return GetBitFlag(_prefsdata.layoutFlags, LAYOUTFLG_AVOIDCOLLISIONS); }
3101
3102
3109#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3111#else
3112 twobyte
3113#endif
3115 {
3116 switch (_prefsdata.layoutFlags & LAYOUTFLG_ADJUST_PAGE_BITS)
3117 {
3118 case LAYOUTFLG_ADJUST_PAGE_CUR:
3120 case LAYOUTFLG_ADJUST_PAGE_ALL:
3121 return PAGEMARGINSCOPE_ALL;
3122 case LAYOUTFLG_ADJUST_PAGE_LR:
3124 case LAYOUTFLG_ADJUST_PAGE_RNG:
3125 return PAGEMARGINSCOPE_RANGE;
3126 }
3128 }
3129
3138 bool GetKeepOctaveTransposition() const;
3139
3151
3173
3174
3175 /* *********/
3176 /* Setters */
3177 /* *********/
3178
3183 void SetAlwaysSlashGraceNote(bool state) { _prefsdata.graceAlwaysSlash = state; }
3184
3190 void SetExtendSecondaryBeamsOverRests(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_SECOVERRESTS, state); }
3191
3197 void SetPrimaryBeamWithinSpace(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_ALLOWPRIMINSPACE, state); }
3198
3204 void SetHalfStemsForBeamedRests(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_HALFSTEMS, state); }
3205
3210 void SetAllowFloatingRests(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_NORESTFLOAT, !state); }
3211
3216 void SetBeamThreeEights(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_THREEEIGHTSANDREST, state); }
3217
3222 void SetDisplayReverseStemming(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_NOREVERSALSTEMMING, !state); }
3223
3228 void SetIncludeRestsInFour(bool state) { return Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_RESTSINFOUR, state); }
3229
3239#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3241#else
3242 twobyte
3243#endif
3244 mode)
3245 {
3246 switch (mode)
3247 {
3252 _prefsdata.beamStyle = (twobyte) mode;
3253 break;
3254 }
3255 }
3256
3257
3262 void SetExtendBeamsOverRests(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_OVERRESTS, state); }
3263
3269 void SetUseStemConnections(bool state) { _prefsdata.stemUseConnections = state; }
3270
3275 void SetShowActiveLayerOnly(bool state) { _prefsdata.showactivelayeronly = state; }
3276
3284 void SetConsolidateRestsAcrossLayers(bool value);
3285
3290 void SetClefResize(twobyte value) { _prefsdata.clefReduction = value; }
3291
3296 void SetBeamedCommonTimeEights(bool state) { Set16BitFlag(&_prefsdata.beamFlags, BEAMATTR_FOURINCOMMON, state); }
3297
3305 void SetDoubleBarlineAtKeyChange(bool state);
3306
3311 void SetDisplayAllBarlines(bool state) { _prefsdata.barlineDisplayAll = state; }
3312
3317 void SetCloseBarlineAtSystem(bool state) { _prefsdata.barlineCloseSys = state; }
3318
3323 void SetCloseBarlineAtEnd(bool state) { _prefsdata.barlineClosePiece = state; }
3324
3330 void SetFinalBarlineAtEnd(bool state) { _prefsdata.barlineFinalAtEnd = state; }
3331
3336 void SetLeftBarlineDisplaySingle(bool state) { _prefsdata.barlineLeftSingleStaff = state; }
3337
3342 void SetLeftBarlineDisplayMultiple(bool state) { _prefsdata.barlineLeftMultStaves = state; }
3343
3350 [[deprecated]] void SetLeftBarlineDisplayMultipe(bool state) { SetLeftBarlineDisplayMultiple(state); }
3351
3359 void SetNormalDefaultBarline(bool state) { _prefsdata.barlineDefaultToNormal = state; }
3360
3367 [[deprecated]]void SetItalicizeCapoChords(bool state) { _prefsdata.chordItalicizeCapo = state; }
3368
3375 [[deprecated]]void SetShowFretboards(bool state) { Set16BitFlag(&_prefsdata.chordFretboardFlag, 0x01, state); }
3376
3381 void SetMaxBeamSlope(Evpu16 slope) { _prefsdata.beamMaxSlope = slope; }
3382
3387 void SetOnlyFirstSystemClef(bool state) { _prefsdata.clefOnlyOnFirstSys = state; }
3388
3393 void SetDefaultClefIndex(eClef clef) { _prefsdata.clefDefault = clef; }
3394
3401 void SetCurveResolution(twobyte value)
3402 {
3403 if (value < 1) return;
3404 if (value > 128) return;
3405 _prefsdata.curveResolution = value;
3406 }
3407
3412 void SetAdjustDotForMultiVoices(bool state) { _prefsdata.dotAdjustForMultipleVoices = state; }
3413
3418 void SetGraceNotePlaybackDuration(twobyte value) { _prefsdata.gracePlaybackDur = value; }
3419
3424 void SetKeySigOnlyFirstSystem(bool state) { _prefsdata.keysigOnlyOfFirstSys = state; }
3425
3430 void SetKeySigNaturalsInC(bool state) { _prefsdata.keysigNaturalsInC = state; }
3431
3436 void SetKeySigModeChange(bool state) { _prefsdata.keysigModeChange = state; }
3437
3442 void SetKeySigCancelOutgoing(bool state) { _prefsdata.keysigCancelOutgoing = state; }
3443
3452 void SetKeySigCancelSwitchingSharpsFlats(bool state);
3453
3458 void SetKeySigPreserveOctave(bool state) { _prefsdata.keysigPreserveOctave = state; }
3459
3464 void SetTimeSigCompositeDecimals(twobyte count) { _prefsdata.timesigCompMeterDeci = count; }
3465
3470 void SetAbbreviateCommonTimeSig(bool state) { _prefsdata.timesigAbbrCommonTime = state; }
3471
3476 void SetAbbreviateCutTimeSig(bool state) { _prefsdata.timesigAbbrCutTime = state; }
3477
3482 void SetCourtesyClefAtSystemEnd(bool state) { Set16BitFlag(&_prefsdata.courtesyFlags, SYSCOURTESY_CLEF, state); }
3483
3488 void SetCourtesyTimeSigAtSystemEnd(bool state) { Set16BitFlag(&_prefsdata.courtesyFlags, SYSCOURTESY_TIMESIG, state); }
3489
3494 void SetCourtesyKeySigAtSystemEnd(bool state) { Set16BitFlag(&_prefsdata.courtesyFlags, SYSCOURTESY_KEYSIG, state); }
3495
3501 void SetSecondsInTimeStamp(bool state) { _prefsdata.secondsInTimeStamp = state; }
3502
3510#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3512#else
3513 twobyte
3514#endif
3515 dateformat)
3516 {
3517 switch (dateformat)
3518 {
3519 case DATEFORMAT_SHORT:
3520 case DATEFORMAT_LONG:
3521 case DATEFORMAT_MACLONG:
3522 _prefsdata.dateFormat = dateformat;
3523 break;
3524 }
3525 }
3526
3531 void SetTextTabCharacters(int tabcount) { _prefsdata.textTabChars = tabcount; }
3532
3537 void SetScaleManualNotePositioning(bool state) { _prefsdata.scaleManualPos = state; }
3538
3543 void SetCrossStaffNotesInOriginal(bool state) { _prefsdata.crossStaffInOriginal = state; }
3544
3549 void SetUseNoteShapes(bool state) { _prefsdata.useNoteShapes = state; }
3550
3555 void SetPickupDuration(TimeEdu16 duration) { _prefsdata.pickupMeasure = duration; }
3556
3562 void SetSpecialExtractionID(CMPER cmper) { _prefsdata.specialExtractedPartCmper = cmper; }
3563
3568 void SetDisplayPartExpressions(bool state) { _prefsdata.displayPartExpressions = state; }
3569
3574 void SetUnderlineDepth(fourbyte value) { _prefsdata.PSUnderlineDepth = value; }
3575
3580 void SetUnderlineThickness(fourbyte value) { _prefsdata.PSUnderlineThickness = value; }
3581
3588 [[deprecated]]void SetFretboardsResizeFraction(fourbyte value) { _prefsdata.chordFretboardResize = value; }
3589
3596 [[deprecated]]void SetChordPlayback(bool state) { _prefsdata.chordEnablePlayback = state ? 0x02 : 0x01; }
3597
3602 void SetAvoidSystemMarginCollisions(bool state) { Set16BitFlag(&_prefsdata.layoutFlags, LAYOUTFLG_AVOIDCOLLISIONS, state); }
3603
3611#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3613#else
3614 twobyte
3615#endif
3616 mode
3617 )
3618 {
3619 switch (mode)
3620 {
3622 _prefsdata.layoutFlags &= ~LAYOUTFLG_ADJUST_PAGE_BITS;
3623 _prefsdata.layoutFlags |= LAYOUTFLG_ADJUST_PAGE_CUR;
3624 break;
3626 _prefsdata.layoutFlags &= ~LAYOUTFLG_ADJUST_PAGE_BITS;
3627 _prefsdata.layoutFlags |= LAYOUTFLG_ADJUST_PAGE_ALL;
3628 break;
3630 _prefsdata.layoutFlags &= ~LAYOUTFLG_ADJUST_PAGE_BITS;
3631 _prefsdata.layoutFlags |= LAYOUTFLG_ADJUST_PAGE_LR;
3632 break;
3634 _prefsdata.layoutFlags &= ~LAYOUTFLG_ADJUST_PAGE_BITS;
3635 _prefsdata.layoutFlags |= LAYOUTFLG_ADJUST_PAGE_RNG;
3636 break;
3637 }
3638 }
3639
3648 void SetKeepOctaveTransposition(bool state);
3649
3658 void SetAlignMeasureNumbersWithBarline(bool state);
3659
3668 void SetLegacyDotPositionOnFlippedStems(bool state);
3669};
3670
3671#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3672#if FXT_VERSION < FINALEVERSION_26_2
3673#include "pragma_align_begin.h"
3674struct EDTTupletPrefs26_2
3675{
3676 // These fields are identical to EDTTupletPrefs2005.
3677 twobyte DefaultTuplet_tupnum;
3678 TimeEdu16 DefaultTuplet_tupsymdur;
3679 twobyte DefaultTuplet_refnum;
3680 TimeEdu16 DefaultTuplet_refdur;
3681 FLAG_16 DefaultTuplet_tuplflag;
3682 Evpu16 DefaultTuplet_tupOffX;
3683 Evpu16 DefaultTuplet_tupOffY;
3684 Evpu16 DefaultTuplet_brackOffX;
3685 Evpu16 DefaultTuplet_brackOffY;
3686 FLAG_16 DefaultTuplet_flag;
3687 Evpu16 DefaultTuplet_leftHookLen;
3688 Evpu16 DefaultTuplet_leftHookExt;
3689 Evpu16 DefaultTuplet_rightHookLen;
3690 Evpu16 DefaultTuplet_rightHookExt;
3691 twobyte DefaultTuplet_slope;
3692 // These fields were added in Finale 26.2.
3693 twobyte tupMaxSlope;
3694 Efix16 tupLineWidth;
3695 Evpu16 tupNUpstemOffset;
3696 Evpu16 tupNDownstemOffset;
3697};
3698#include "pragma_align_end.h"
3699#endif // FXT_VERSION < FINALEVERSION_26_2
3700#endif // DOXYGEN_SHOULD_IGNORE_THIS
3701
3702#ifdef PDK_FRAMEWORK_ENTRIES
3714{
3715 EDTTupletPrefs26_2 _prefsdata; /* Supported directly */
3716 EXTAG Tag() const override { return pf_TupletPrefs; }
3717
3718 int DataSizeLoad() const override { return _use26 ? sizeof(_prefsdata) : sizeof(EDTTupletPrefs); }
3719 void* Allocate() override { return (void*)&_prefsdata; }
3720
3725 void CloneMemoryFrom(__FCBaseData* pSource) override
3726 {
3727 memcpy(&_prefsdata, ((FCTupletPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
3728 _datablock = &_prefsdata;
3729 _loadedsize = sizeof(_prefsdata);
3730 }
3731
3732 __FCBaseData* CreateObject() override
3733 {
3734 return new FCTupletPrefs();
3735 }
3736public:
3737#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3739 void* _GetPrefsData() { return &_prefsdata; }
3740#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3741
3742 const char* ClassName() const override { return "FCTupletPrefs"; }
3743 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_TUPLETPREFS; }
3744
3745 FCTupletPrefs() :
3746 __FCPrefsBase() {}
3747
3757 bool Load(twobyte prefsnumber = 1) override;
3758
3765 bool Save() override;
3766
3775 bool ChangeTuplet(FCTuplet *pTuplet, bool changeposition = true);
3776
3785 bool CopyFromTuplet(FCTuplet *pTuplet, bool changeposition = true);
3786
3787 /* *********/
3788 /* GETTERS */
3789 /* *********/
3790
3797#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3799#else
3800 int
3801#endif
3802 GetPlacementMode() const;
3803
3808 bool GetEngraverTuplet() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_ENGRAVERTUPLET); }
3809
3815 bool GetAvoidStaff() const { return GetBitFlag(_prefsdata.DefaultTuplet_tuplflag, TUPLET_AVOID_STAFF); }
3816
3821 bool GetAllowHorizontalDrag() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_ALLOW_HORZ); }
3822
3827 bool GetUseBottomNote() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_USEBOTTOM); }
3828
3835#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3837#else
3838 int
3839#endif
3840 GetNumberStyle() const;
3841
3848#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3850#else
3851 int
3852#endif
3853 GetShapeStyle() const;
3854
3859 bool GetBreakSlurBracket() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_BREAKBRACK); }
3860
3867#ifndef PDK_FRAMEWORK_LUAFRIENDLY
3869#else
3870 int
3871#endif
3872 GetBracketMode() const;
3873
3878 bool GetAlwaysFlat() const { return GetBitFlag(_prefsdata.DefaultTuplet_tuplflag, TUPLET_FLAT); }
3879
3885 bool GetBracketFullDuration() const { return GetBitFlag(_prefsdata.DefaultTuplet_tuplflag, TUPLET_FULLDURA); }
3886
3891 twobyte GetHorizontalOffset() const { return _prefsdata.DefaultTuplet_tupOffX; }
3892
3897 twobyte GetVerticalOffset() const { return _prefsdata.DefaultTuplet_tupOffY; }
3898
3903 bool GetCenterUsingDuration() const { return GetBitFlag(_prefsdata.DefaultTuplet_tuplflag, TUPLET_METRIC_CENTER); }
3904
3909 bool GetIgnoreNumberOffset() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_IGNOREGLOFFS); }
3910
3915 twobyte GetHorizontalShapeOffset() const { return _prefsdata.DefaultTuplet_brackOffX; }
3916
3921 twobyte GetVerticalShapeOffset() const { return _prefsdata.DefaultTuplet_brackOffY; }
3922
3927 bool GetMatchHookLengths() const { return GetBitFlag(_prefsdata.DefaultTuplet_flag, TUPLET_MATCH_HOOKS); }
3928
3933 twobyte GetLeftHookLength() const { return -_prefsdata.DefaultTuplet_leftHookLen; }
3934
3939 twobyte GetLeftExtension() const { return _prefsdata.DefaultTuplet_leftHookExt; }
3940
3945 twobyte GetRightHookLength() const { return -_prefsdata.DefaultTuplet_rightHookLen; }
3946
3951 twobyte GetRightExtension() const { return _prefsdata.DefaultTuplet_rightHookExt; }
3952
3957 twobyte GetSlopeAdjust() const { return _prefsdata.DefaultTuplet_slope; }
3958
3964 {
3965 return _prefsdata.tupNUpstemOffset;
3966 }
3967
3973 {
3974 return _prefsdata.tupNDownstemOffset;
3975 }
3976
3981 Efix16 GetBracketThickness() const
3982 {
3983 return _prefsdata.tupLineWidth;
3984 }
3985
3992 twobyte GetMaxSlope() const
3993 {
3994 return _prefsdata.tupMaxSlope;
3995 }
3996
3997
3998 /* *********/
3999 /* SETTERS */
4000 /* *********/
4001
4008 void SetPlacementMode(
4009#ifndef PDK_FRAMEWORK_LUAFRIENDLY
4011#else
4012 int
4013#endif
4014 value);
4015
4020 void SetEngraverTuplet(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_ENGRAVERTUPLET, value); }
4021
4028 void SetAvoidStaff(bool value);
4029
4034 void SetAllowHorizontalDrag(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_ALLOW_HORZ, value); }
4035
4040 void SetUseBottomNote(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_USEBOTTOM, value); }
4041
4048 void SetNumberStyle(
4049#ifndef PDK_FRAMEWORK_LUAFRIENDLY
4051#else
4052 int
4053#endif
4054 value);
4055
4062 void SetShapeStyle(
4063#ifndef PDK_FRAMEWORK_LUAFRIENDLY
4065#else
4066 int
4067#endif
4068 value);
4069
4074 void SetBreakSlurBracket(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_BREAKBRACK, value); }
4075
4084 void SetBracketMode(
4085#ifndef PDK_FRAMEWORK_LUAFRIENDLY
4087#else
4088 int
4089#endif
4090 value);
4091
4098 void SetAlwaysFlat(bool value);
4099
4106 void SetBracketFullDuration(bool value);
4107
4112 void SetHorizontalOffset(twobyte value) { _prefsdata.DefaultTuplet_tupOffX = value; }
4113
4118 void SetVerticalOffset(twobyte value) { _prefsdata.DefaultTuplet_tupOffY = value; }
4119
4126 void SetCenterUsingDuration(bool value);
4127
4132 void SetIgnoreNumberOffset(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_IGNOREGLOFFS, value); }
4133
4138 void SetHorizontalShapeOffset(twobyte value) { _prefsdata.DefaultTuplet_brackOffX = value; }
4139
4144 void SetVerticalShapeOffset(twobyte value) { _prefsdata.DefaultTuplet_brackOffY = value; }
4145
4150 void SetMatchHookLengths(bool value) { Set16BitFlag(&_prefsdata.DefaultTuplet_flag, TUPLET_MATCH_HOOKS, value); }
4151
4156 void SetLeftHookLength(twobyte value) { _prefsdata.DefaultTuplet_leftHookLen = -value; }
4157
4162 void SetLeftExtension(twobyte value) { _prefsdata.DefaultTuplet_leftHookExt = value; }
4163
4168 void SetRightHookLength(twobyte value) { _prefsdata.DefaultTuplet_rightHookLen = -value; }
4169
4174 void SetRightExtension(twobyte value) { _prefsdata.DefaultTuplet_rightHookExt = value; }
4175
4180 void SetSlopeAdjust(twobyte value) { _prefsdata.DefaultTuplet_slope = value; }
4181
4186 void SetNumberOffsetUpstem(twobyte value)
4187 {
4188 _prefsdata.tupNUpstemOffset = value;
4189 }
4190
4195 void SetNumberOffsetDownstem(twobyte value)
4196 {
4197 _prefsdata.tupNDownstemOffset = value;
4198 }
4199
4204 void SetBracketThickness(Efix16 value)
4205 {
4206 _prefsdata.tupLineWidth = value;
4207 }
4208
4213 void SetMaxSlope(twobyte value)
4214 {
4215 _prefsdata.tupMaxSlope = value;
4216 }
4217
4218#ifdef PDK_FRAMEWORK_DEBUG
4219 void DebugDump() override
4220 {
4222 switch (GetPlacementMode())
4223 {
4224 case FCTuplet::TUPLETPLACEMENT_MANUAL:
4225 DebugOut("Placement mode: Manual");
4226 break;
4227 case FCTuplet::TUPLETPLACEMENT_STEMSIDE:
4228 DebugOut("Placement mode: Stem/Beam Side");
4229 break;
4230 case FCTuplet::TUPLETPLACEMENT_NOTESIDE:
4231 DebugOut("Placement mode: Note Side");
4232 break;
4233 case FCTuplet::TUPLETPLACEMENT_ABOVE:
4234 DebugOut("Placement mode: Above");
4235 break;
4236 case FCTuplet::TUPLETPLACEMENT_BELOW:
4237 DebugOut("Placement mode: Below");
4238 break;
4239 }
4240 DebugOutBool("Engraver tuplet: ", GetEngraverTuplet());
4241 DebugOutBool("Avoid staff: ", GetAvoidStaff());
4242 DebugOutBool("Allow horizontal drag: ", GetAllowHorizontalDrag());
4243 DebugOutBool("Use bottom note: ", GetUseBottomNote());
4244 switch (GetNumberStyle())
4245 {
4246 case FCTuplet::TUPLETNUMBER_NONE:
4247 DebugOut("Number appearance: None");
4248 break;
4249 case FCTuplet::TUPLETNUMBER_REGULAR:
4250 DebugOut("Number appearance: Number");
4251 break;
4252 case FCTuplet::TUPLETNUMBER_RATIO:
4253 DebugOut("Number appearance: Ratio");
4254 break;
4255 case FCTuplet::TUPLETNUMBER_RATIOANDNOTE:
4256 DebugOut("Number appearance: 7:8q");
4257 break;
4258 case FCTuplet::TUPLETNUMBER_RATIOANDNOTE_BOTH:
4259 DebugOut("Number appearance: 7q:8q");
4260 break;
4261 }
4262 switch (GetShapeStyle())
4263 {
4264 case FCTuplet::TUPLETSHAPE_NONE:
4265 DebugOut("Shape appearance: None");
4266 break;
4267 case FCTuplet::TUPLETSHAPE_BRACKET:
4268 DebugOut("Shape appearance: Bracket");
4269 break;
4270 case FCTuplet::TUPLETSHAPE_SLUR:
4271 DebugOut("Shape appearance: Slur");
4272 break;
4273 }
4274
4275 DebugOutBool("Break slur of bracket: ", GetBreakSlurBracket());
4276 switch (GetBracketMode())
4277 {
4278 case FCTuplet::TUPLETBRACKET_ALWAYS:
4279 DebugOut("Always use specified shape");
4280 break;
4281 case FCTuplet::TUPLETBRACKET_UNBEAMEDONLY:
4282 DebugOut("Bracket unbeamed notes only");
4283 break;
4284 case FCTuplet::TUPLETBRACKET_NEVERBEAMEDONBEAMSIDE:
4285 DebugOut("Never bracket beamed notes on beam side");
4286 break;
4287 }
4288 DebugOutInt("Horizontal offset: ", GetHorizontalOffset());
4289 DebugOutInt("Vertical offset: ", GetVerticalOffset());
4290 DebugOutBool("Center number using duration: ", GetCenterUsingDuration());
4291 DebugOutBool("Ignore Horizontal Number Offset: ", GetIgnoreNumberOffset());
4292 DebugOutInt("Horizontal shape offset: ", GetHorizontalShapeOffset());
4293 DebugOutInt("Vertical shape offset: ", GetVerticalShapeOffset());
4294 DebugOutBool("Always flat: ", GetAlwaysFlat());
4295 DebugOutBool("Bracket full duration: ", GetBracketFullDuration());
4296 DebugOutBool("Match length of hooks: ", GetMatchHookLengths());
4297 DebugOutInt("Left hook length: ", GetLeftHookLength());
4298 DebugOutInt("Left hook extension: ", GetLeftExtension());
4299 DebugOutInt("Right hook length: ", GetRightHookLength());
4300 DebugOutInt("Right hook extension: ", GetRightExtension());
4301 DebugOutInt("Manual slope adjustment: ", GetSlopeAdjust());
4302 }
4303#endif
4304
4305
4306};
4307#endif // PDK_FRAMEWORK_ENTRIES
4308
4309
4317{
4318 _FCEDTPageFormatPrefs _prefsdata;
4319 twobyte _systemstaffheight;
4320 twobyte _systemscaling;
4321 twobyte _firstsysdistance;
4322
4323 EXTAG Tag() const override { return _fcpf_PageFormatPrefs; }
4324
4325 int DataSizeLoad() const override { return sizeof(_FCEDTPageFormatPrefs); }
4326 void* Allocate() override { return (void*) &_prefsdata; }
4327
4332 void CloneMemoryFrom(__FCBaseData* pSource) override
4333 {
4334 FCPageFormatPrefs* pSourceObj = (FCPageFormatPrefs*) pSource;
4335 memcpy(&_prefsdata, pSourceObj->_GetPrefsData(), sizeof(_prefsdata));
4336 _datablock = &_prefsdata;
4337 _loadedsize = sizeof(_prefsdata);
4338 _systemstaffheight = pSourceObj->GetSystemStaffHeight();
4339 _systemscaling = pSourceObj->GetSystemScaling();
4340 _firstsysdistance = pSourceObj->GetFirstSystemDistance();
4341 }
4342
4343 __FCBaseData* CreateObject() override
4344 { return new FCPageFormatPrefs(); }
4345public:
4346#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4348 void* _GetPrefsData() { return &_prefsdata; }
4349#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
4350
4351 const char* ClassName() const override { return "FCPageFormatPrefs"; }
4352 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_PAGEFORMATPREFS; }
4353
4359 __FCPrefsBase()
4360 {
4361 _systemstaffheight = 96 * 16;
4362 _systemscaling = 100;
4363 _firstsysdistance = 0;
4364 }
4365
4371 bool Load(twobyte prefsno = 1) override;
4372
4375 bool Save() override;
4376
4377
4385 {
4386 return Load(0);
4387 }
4388
4396 {
4397 return Load(1);
4398 }
4399
4406 twobyte GetFirstSystemLeft() const { return _prefsdata.firstSysLeft; }
4407
4414 twobyte GetFirstSystemTop() const { return -_prefsdata.firstSysTop; }
4415
4420 twobyte GetSystemLeft() const { return _prefsdata.sysLeft; }
4421
4426 twobyte GetSystemRight() const { return _prefsdata.sysRight; }
4427
4432 twobyte GetSystemTop() const { return -_prefsdata.sysTop; }
4433
4438 twobyte GetSystemBottom() const { return -_prefsdata.sysBottom; }
4439
4444 twobyte GetSystemDistanceBetween() const { return _prefsdata.sysDistBetween; }
4445
4450 bool GetUseFirstSystemMargins() const { return _prefsdata.bFirstSysMargin != 0; }
4451
4456 fourbyte GetPageWidth() const { return _prefsdata.pageWidth; }
4457
4462 fourbyte GetPageHeight() const { return _prefsdata.pageHeight; }
4463
4468 fourbyte GetPageScaling() const { return _prefsdata.pageScaling; }
4469
4474 twobyte GetLeftPageTopMargin() const { return -_prefsdata.leftTop; }
4475
4480 twobyte GetLeftPageBottomMargin() const { return _prefsdata.leftBottom; }
4481
4486 twobyte GetLeftPageLeftMargin() const { return _prefsdata.leftLeft; }
4487
4492 twobyte GetLeftPageRightMargin() const { return -_prefsdata.leftRight; }
4493
4498 bool GetUseFirstPageTopMargin() const { return _prefsdata.bFirstPageTop != 0; }
4499
4505 twobyte GetFirstPageTopMargin() const { return -_prefsdata.firstPageTop; }
4506
4511 bool GetUseFacingPages() const { return _prefsdata.bFacingPages != 0; }
4512
4519 twobyte GetRightPageTopMargin() const { return -_prefsdata.rightTop; }
4520
4527 twobyte GetRightPageBottomMargin() const { return _prefsdata.rightBottom; }
4528
4535 twobyte GetRightPageLeftMargin() const { return _prefsdata.rightLeft; }
4536
4543 twobyte GetRightPageRightMargin() const { return -_prefsdata.rightRight; }
4544
4549 twobyte GetSystemStaffHeight() const { return _systemstaffheight; }
4550
4555 twobyte GetSystemScaling() const { return _systemscaling; }
4556
4561 twobyte GetFirstSystemDistance() const { return -_firstsysdistance; }
4562
4569 void SetFirstSystemLeft(twobyte value) { _prefsdata.firstSysLeft = value; }
4570
4577 void SetFirstSystemTop(twobyte value) { _prefsdata.firstSysTop = -value; }
4578
4583 void SetSystemLeft(twobyte value) { _prefsdata.sysLeft = value; }
4584
4589 void SetSystemRight(twobyte value) { _prefsdata.sysRight = value; }
4590
4595 void SetSystemTop(twobyte value) { _prefsdata.sysTop = -value; }
4596
4601 void SetSystemBottom(twobyte value) { _prefsdata.sysBottom = -value; }
4602
4607 void SetUseFirstSystemMargins(bool value) { _prefsdata.bFirstSysMargin = value; }
4608
4613 void SetPageWidth(fourbyte width) { _prefsdata.pageWidth = width; }
4614
4619 void SetPageHeight(fourbyte height) { _prefsdata.pageHeight = height; }
4620
4625 void SetPageScaling(twobyte scaling) { _prefsdata.pageScaling = scaling; }
4626
4631 void SetLeftPageTopMargin(twobyte value) { _prefsdata.leftTop = -value; }
4632
4637 void SetLeftPageBottomMargin(twobyte value) { _prefsdata.leftBottom = value; }
4638
4643 void SetLeftPageLeftMargin(twobyte value) { _prefsdata.leftLeft = value; }
4644
4649 void SetLeftPageRightMargin(twobyte value) { _prefsdata.leftRight = -value; }
4650
4655 void SetUseFirstPageTopMargin(bool state) { _prefsdata.bFirstPageTop = state; }
4656
4662 void SetFirstPageTopMargin(twobyte value) { _prefsdata.firstPageTop = -value; }
4663
4668 void SetUseFacingPages(bool state) { _prefsdata.bFacingPages = state; }
4669
4676 void SetRightPageTopMargin(twobyte value) { _prefsdata.rightTop = -value; }
4677
4684 void SetRightPageBottomMargin(twobyte value) { _prefsdata.rightBottom = value; }
4685
4692 void SetRightPageLeftMargin(twobyte value) { _prefsdata.rightLeft = value; }
4693
4700 void SetRightPageRightMargin(twobyte value) { _prefsdata.rightRight = -value; }
4701
4706 void SetSystemStaffHeight(twobyte value) { _systemstaffheight = value; }
4707
4712 void SetSystemScaling(twobyte value) { _systemscaling = value; }
4713
4718 void SetFirstSystemDistance(twobyte value) { _firstsysdistance = -value; }
4719
4725 void SetSystemDistanceBetween(twobyte value) { _prefsdata.sysDistBetween = value; }
4726};
4727
4728
4761{
4762#if FXT_VERSION >= FINALEVERSION_27_3
4763 EDTGeneralPrefs27_3 _prefsdata;
4764#else
4765 EDTGeneralPrefs2008 _prefsdata;
4766#endif
4767
4768 EXTAG Tag() const override { return pf_GeneralPrefs; }
4769
4770 EVERSION EnigmaVersion() const override { return (std::min)(FXT_VERSION, FINALEVERSION_27_3); }
4771 int DataSizeLoad() const override { return sizeof(_prefsdata); }
4772 void* Allocate() override { return (void*) &_prefsdata; }
4773
4775 enum GENPREFS_REBARSTOPFLAGS
4776 {
4777 REBARSTOPFLAGS_NOSTOP = 0,
4778 REBARSTOPFLAGS_STOPKEYCHANGE = 0x0001,
4779 REBARSTOPFLAGS_STOPTIMECHANGE = 0x0002,
4780 REBARSTOPFLAGS_STOPENDOFREGION = 0x0004,
4781 REBARSTOPFLAGS_STOPSPECIALBARLINE = 0x0008,
4782 REBARSTOPFLAGS_STOPEMPTYFRAME = 0x0020
4783 };
4784
4789 void CloneMemoryFrom(__FCBaseData* pSource) override
4790 {
4791 memcpy(&_prefsdata, ((FCGeneralPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
4792 _datablock = &_prefsdata;
4793 _loadedsize = sizeof(_prefsdata);
4794 }
4795
4796 __FCBaseData* CreateObject() override
4797 { return new FCGeneralPrefs(); }
4798public:
4799
4800#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4802 void* _GetPrefsData() { return &_prefsdata; }
4803#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
4804
4805 const char* ClassName() const override { return "FCGeneralPrefs"; }
4806 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_GENERALPREFS; }
4807
4823
4829 {
4832
4835
4837 QUANTIZATIONMODE_SPACEEVENLY = FQ_SPACEEVENLY
4839
4845 {
4847 UNDOSTATE_OFF = ::UNDO_OFF,
4848
4850 UNDOSTATE_DISABLED = ::UNDO_DISABLED,
4851
4853 UNDOSTATE_ENABLED = ::UNDO_ENABLED,
4854
4856 UNDOSTATE_SUSPENDED = ::UNDO_SUSPENDED
4858
4862
4871 twobyte GetPitchRepresentationType() const { return _prefsdata.PitchRepresentationType; }
4872
4884 twobyte GetPitchRepresentationValue() const { return _prefsdata.PitchRepresentationValue; }
4885
4894#ifndef PDK_FRAMEWORK_LUAFRIENDLY
4896#else
4897 twobyte
4898#endif
4900 {
4901 return (MEASUREMENTUNITS) _prefsdata.UnitsOfMeasurement;
4902 }
4903
4909 bool GetShowDefaultStaffNames() const { return _prefsdata.showDefaultStaffNames != 0; }
4910
4916 bool GetShowDefaultGroupNames() const { return _prefsdata.showDefaultGroupNames != 0; }
4917
4925 bool GetRespaceMeasureLayout() const { return _prefsdata.recalcRespaceMeas != 0; }
4926
4931 bool GetAutomaticUpdateLayout() const { return _prefsdata.recalcAuto != 0; }
4932
4941 {
4942 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
4943#if FXT_VERSION >= FINALEVERSION_27_3
4944 return _prefsdata.AutoMusicSpacing;
4945#else
4946 return false;
4947#endif
4948 }
4949
4957 bool GetRetainFrozenMeasures() const { return _prefsdata.recalcRetainFrozenMeasures != 0; }
4958
4967 bool GetRecalcMeasures() const { return _prefsdata.recalcMeasures != 0; }
4968
4975 bool GetRecalcSystems() const { return _prefsdata.recalcSystems != 0; }
4976
4984 bool GetRebarWhenTimeSigChanged() const { return _prefsdata.RebarWhenTimeSigChanged != 0; }
4985
4992 TimeEdu16 GetQuantizationSmallestNoteValue() const { return _prefsdata.resolution; }
4993
5002#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5004#else
5005 twobyte
5006#endif
5007 GetQuantizationMode() const { return (QUANTIZATIONMODE)_prefsdata.FQ_Mode; }
5008
5019 {
5020 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5021#if FXT_VERSION >= FINALEVERSION_27_3
5022 return _prefsdata.RemoveSmallNotes;
5023#else
5024 return 0;
5025#endif
5026 }
5027
5036#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5038#else
5039 twobyte
5040#endif
5041 GetQuantizationGraceNoteMode() const { return (GRACENOTE_QUANTIZATIONMODE)_prefsdata.XPAND_MINS; }
5042
5053 {
5054 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5055#if FXT_VERSION >= FINALEVERSION_27_3
5056 return _prefsdata.MinimizeRests;
5057#else
5058 return false;
5059#endif
5060 }
5061
5068 bool GetDottedRestsAreLegalInSimpleMeter() const { return _prefsdata.DottedRestsAreLegalInSimpleMeter != 0; }
5069
5076 bool GetDottedRestsAreLegalInCompoundMeter() const { return _prefsdata.DottedRestsAreLegalInCompoundMeter != 0; }
5077
5084 bool GetQuantizationRetainKeyVelocities() const { return _prefsdata.CaptureVelocity != 0; }
5085
5092 bool GetQuantizationRetainNoteDurations() const { return _prefsdata.CaptureDurations != 0; }
5093
5100 bool GetQuantizationIncludeVoiceTwo() const { return _prefsdata.noVOICE2 != 0; }
5101
5108 bool GetQuantizationSoftenSyncopations() const { return _prefsdata.softEBEATS != 0; }
5109
5120 {
5121 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5122#if FXT_VERSION >= FINALEVERSION_27_3
5123 return _prefsdata.FQ_USES_TEMPER;
5124#else
5125 return false;
5126#endif
5127 }
5128
5135 TimeEdu16 GetQuantizationSensitivityLevel() const { return _prefsdata.FQ_TEMPER; }
5136
5143 bool GetIncludeMIDITempoChanges() const { return _prefsdata.TDIALcap != 0; }
5144
5151 bool GetIncludeMIDIContinuousData() const { return _prefsdata.MEXPRcap != 0; }
5152
5159 bool GetRebarStopOnlyAtEndOfPiece() const { return _prefsdata.RebarStopFlags == REBARSTOPFLAGS_NOSTOP; }
5160
5167 bool GetRebarStopAtEndOfRegion() const { return GetBitFlag(_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPENDOFREGION); }
5168
5175 bool GetRebarStopAtKeyChange() const { return GetBitFlag(_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPKEYCHANGE); }
5176
5183 bool GetRebarStopAtTimeChange() const { return GetBitFlag(_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPTIMECHANGE); }
5184
5191 bool GetRebarStopAtSpecialBarline() const { return GetBitFlag(_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPSPECIALBARLINE); }
5192
5199 bool GetRebarStopAtEmptyFrame() const { return GetBitFlag(_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPEMPTYFRAME); }
5200
5207 bool GetRebeamOnRebar() const { return _prefsdata.RebeamOnRebar != 0; }
5208
5215 twobyte GetKeyboardSplitPoint() const { return _prefsdata.SplitKeyNumber; }
5216
5227 {
5228 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5229#if FXT_VERSION >= FINALEVERSION_27_3
5230 return _prefsdata.TransposeMIDIOnInput;
5231#else
5232 return false;
5233#endif
5234 }
5235
5246 {
5247 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5248#if FXT_VERSION >= FINALEVERSION_27_3
5249 return 100 - _prefsdata.HiddenTextShade;
5250#else
5251 return 0;
5252#endif
5253 }
5254
5264 ePercent GetCustomZoom1() const
5265 {
5266 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5267#if FXT_VERSION >= FINALEVERSION_27_3
5268 return _prefsdata.viewPerc1;
5269#else
5270 return 0;
5271#endif
5272 }
5273
5283 ePercent GetCustomZoom2() const
5284 {
5285 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5286#if FXT_VERSION >= FINALEVERSION_27_3
5287 return _prefsdata.viewPerc2;
5288#else
5289 return 0;
5290#endif
5291 }
5292
5302 ePercent GetCustomZoom3() const
5303 {
5304 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5305#if FXT_VERSION >= FINALEVERSION_27_3
5306 return _prefsdata.viewPerc3;
5307#else
5308 return 0;
5309#endif
5310 }
5311
5318#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5319 UNDOSTATE
5320#else
5321 twobyte
5322#endif
5323 GetUndoState() const { return (UNDOSTATE)_prefsdata.UndoEnabled; }
5324
5325 // *******
5326 // SETTERS
5327 // *******
5328
5337 void SetPitchRepresentationType(twobyte value) { _prefsdata.PitchRepresentationType = value; }
5338
5350 void SetPitchRepresentationValue(twobyte value) { _prefsdata.PitchRepresentationValue = value; }
5351
5359 void SetMeasurementUnit(twobyte value) { _prefsdata.UnitsOfMeasurement = value; }
5360
5366 void SetShowDefaultStaffNames(bool state) { _prefsdata.showDefaultStaffNames = state; }
5367
5373 void SetShowDefaultGroupNames(bool state) { _prefsdata.showDefaultGroupNames = state; }
5374
5382 void SetRespaceMeasureLayout(bool state) { _prefsdata.recalcRespaceMeas = state; }
5383
5388 void SetAutomaticUpdateLayout(bool state) { _prefsdata.recalcAuto = state; }
5389
5397 void SetAutomaticMusicSpacing([[maybe_unused]]bool state)
5398 {
5399 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5400#if FXT_VERSION >= FINALEVERSION_27_3
5401 _prefsdata.AutoMusicSpacing = state;
5402#endif
5403 }
5404
5412 void SetRetainFrozenMeasures(bool state) { _prefsdata.recalcRetainFrozenMeasures = state; }
5413
5421 void SetRecalcMeasures(bool state) { _prefsdata.recalcMeasures = state; }
5422
5428 void SetRecalcSystems(bool state) { _prefsdata.recalcSystems = state; }
5429
5436 void SetRebarWhenTimeSigChanged(bool state) { _prefsdata.RebarWhenTimeSigChanged = state; }
5437
5444 void SetQuantizationSmallestNoteValue(TimeEdu16 value) { _prefsdata.resolution = value; }
5445
5454 void SetQuantizationMode(twobyte value)
5455 {
5456 switch ((QUANTIZATIONMODE)value)
5457 {
5461 _prefsdata.FQ_Mode = value;
5462 }
5463 }
5464
5474 void SetQuantizationSmallestNoteValueToRemove([[maybe_unused]]TimeEdu16 value)
5475 {
5476 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5477#if FXT_VERSION >= FINALEVERSION_27_3
5478 _prefsdata.RemoveSmallNotes = value;
5479#endif
5480 }
5481
5491 {
5492 switch ((GRACENOTE_QUANTIZATIONMODE)value)
5493 {
5497 _prefsdata.XPAND_MINS = value;
5498 }
5499 }
5500
5510 void SetQuantizationMinimizeRests([[maybe_unused]]bool state)
5511 {
5512 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5513#if FXT_VERSION >= FINALEVERSION_27_3
5514 _prefsdata.MinimizeRests = state;
5515#endif
5516 }
5517
5524 void SetDottedRestsAreLegalInSimpleMeter(bool state) { _prefsdata.DottedRestsAreLegalInSimpleMeter = state; }
5525
5532 void SetDottedRestsAreLegalInCompoundMeter(bool state) { _prefsdata.DottedRestsAreLegalInCompoundMeter = state; }
5533
5540 void SetQuantizationRetainKeyVelocities(bool state) { _prefsdata.CaptureVelocity = state; }
5541
5548 void SetQuantizationRetainNoteDurations(bool state) { _prefsdata.CaptureDurations = state; }
5549
5556 void SetQuantizationIncludeVoiceTwo(bool state) { _prefsdata.noVOICE2 = state; }
5557
5564 void SetQuantizationSoftenSyncopations(bool state) { _prefsdata.softEBEATS = state; }
5565
5575 void SetQuantizationUseSensitivityLevel([[maybe_unused]]bool state)
5576 {
5577 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5578#if FXT_VERSION >= FINALEVERSION_27_3
5579 _prefsdata.FQ_USES_TEMPER = state;
5580#endif
5581 }
5582
5589 void SetQuantizationSensitivityLevel(TimeEdu16 value) { _prefsdata.FQ_TEMPER = value; }
5590
5597 void SetIncludeMIDITempoChanges(bool state) { _prefsdata.TDIALcap = state; }
5598
5605 void SetIncludeMIDIContinuousData(bool state) { _prefsdata.MEXPRcap = state; }
5606
5613 void SetRebarStopAtEndOfRegion(bool state) { Set16BitFlag(&_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPENDOFREGION, state); }
5614
5621 void SetRebarStopAtKeyChange(bool state) { Set16BitFlag(&_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPKEYCHANGE, state); }
5622
5629 void SetRebarStopAtTimeChange(bool state) { Set16BitFlag(&_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPTIMECHANGE, state); }
5630
5637 void SetRebarStopAtSpecialBarline(bool state) { Set16BitFlag(&_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPSPECIALBARLINE, state); }
5638
5645 void SetRebarStopAtEmptyFrame(bool state) { Set16BitFlag(&_prefsdata.RebarStopFlags, REBARSTOPFLAGS_STOPEMPTYFRAME, state); }
5646
5653 void SetRebeamOnRebar(bool state) { _prefsdata.RebeamOnRebar = state; }
5654
5661 void SetKeyboardSplitPoint(twobyte value) { _prefsdata.SplitKeyNumber = value; }
5662
5672 void SetTransposeMIDIOnInput([[maybe_unused]]bool state)
5673 {
5674 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5675#if FXT_VERSION >= FINALEVERSION_27_3
5676 _prefsdata.TransposeMIDIOnInput = state;
5677#endif
5678 }
5679
5689 void SetHiddenObjectShading([[maybe_unused]]twobyte percent)
5690 {
5691 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5692#if FXT_VERSION >= FINALEVERSION_27_3
5693 const twobyte min = (std::min)((twobyte)100, percent);
5694 _prefsdata.HiddenTextShade = 100 - (std::max)((twobyte)0, min);
5695#endif
5696 }
5697
5707 void SetCustomZoom1([[maybe_unused]]ePercent percent)
5708 {
5709 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5710#if FXT_VERSION >= FINALEVERSION_27_3
5711 _prefsdata.viewPerc1 = (std::max)((ePercent)0, percent);
5712#endif
5713 }
5714
5724 void SetCustomZoom2([[maybe_unused]]ePercent percent)
5725 {
5726 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5727#if FXT_VERSION >= FINALEVERSION_27_3
5728 _prefsdata.viewPerc2 = (std::max)((ePercent)0, percent);
5729#endif
5730 }
5731
5741 void SetCustomZoom3([[maybe_unused]]ePercent percent)
5742 {
5743 FINALE_VERSION_CHECK(FINALEVERSION_27_3);
5744#if FXT_VERSION >= FINALEVERSION_27_3
5745 _prefsdata.viewPerc3 = (std::max)((ePercent)0, percent);
5746#endif
5747 }
5748
5753 void ClearRebarStopAtOptions() { _prefsdata.RebarStopFlags = REBARSTOPFLAGS_NOSTOP; }
5754
5755};
5756
5762{
5763private:
5764 _FCEDTMusicSpacingPrefs _prefsdata;
5765
5766 EXTAG Tag() const override { return _fcpf_MusicSpacingPrefs; }
5767
5768 int DataSizeLoad() const override { return sizeof(_FCEDTMusicSpacingPrefs); }
5769 void* Allocate() override { return (void*) &_prefsdata; }
5770
5775 void CloneMemoryFrom(__FCBaseData* pSource) override
5776 {
5777 FCMusicSpacingPrefs* pOtherObject = (FCMusicSpacingPrefs*) pSource;
5778 memcpy(&_prefsdata, pOtherObject->_GetPrefsData(), sizeof(_prefsdata));
5779 _datablock = &_prefsdata;
5780 _loadedsize = sizeof(_prefsdata);
5781 }
5782
5783 __FCBaseData* CreateObject() override
5784 { return new FCMusicSpacingPrefs(); }
5785public:
5786
5792 {
5793 GRACESPMODE_RESETTOOFFSET = 0,
5794 GRACESPMODE_KEEPCURRENT = 1,
5795 GRACESPMODE_AUTOMATIC = 2
5796 };
5797
5803 {
5804 MANUALPOS_CLEAR = 0, /* These aren't directly stored, so
5805 * the enum values are not that
5806 * cruical. */
5807 MANUALPOS_INCORPORATE = 1,
5808 MANUALPOS_IGNORE = 2
5809 };
5810
5828
5829#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5831 void* _GetPrefsData() { return &_prefsdata; }
5832#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
5833
5834 const char* ClassName() const override { return "FCMusicSpacingPrefs"; }
5835 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_MUSICSPACINGPREFS; }
5836
5843
5844 // *******
5845 // GETTERS
5846 // *******
5847
5848
5858 int GetScalingValue() const {
5859 int returnvalue = _prefsdata.scalingFactorHigh * 0x10000;
5860 returnvalue += _prefsdata.scalingFactorLow;
5861 return returnvalue;
5862 }
5863
5872 double GetScalingFactor() const
5873 {
5874 int returnvalue = _prefsdata.scalingFactorHigh * 0x10000;
5875 returnvalue += _prefsdata.scalingFactorLow;
5876 double floatresult = (double) returnvalue;
5877 return floatresult / 10000.0;
5878 }
5879
5884 Evpu16 GetMinimumItemDistance() const { return _prefsdata.minDistance; }
5885
5890 twobyte GetMinimumDistanceWithTies() const { return _prefsdata.minDistTiedNotes; }
5891
5896 twobyte GetMaxMeasureWidth() const { return _prefsdata.maxWidth; }
5897
5902 twobyte GetMinMeasureWidth() const { return _prefsdata.minWidth; }
5903
5908 bool GetAvoidArticulations() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLARTICS); }
5909
5914 bool GetAvoidChords() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLCHORDS); }
5915
5920 bool GetAvoidClefs() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLCLEFS); }
5921
5926 bool GetAvoidHiddenNotes() const { return !GetBitFlag(_prefsdata.flag, MSP_IGNOREHIDDEN); }
5927
5932 bool GetAvoidLedgerLines() const { return !GetBitFlag(_prefsdata.flag, MSP_AVCOLNOLEDGERS); }
5933
5938 bool GetAvoidLyrics() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLLYRICS); }
5939
5944 bool GetAvoidNoteAndAccidentals() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLNOTES); }
5945
5950 bool GetAvoidSeconds() const { return GetBitFlag(_prefsdata.flag, MSP_AVCOLSECONDS); }
5951
5957 bool GetInterpolateAllotments() const { return GetBitFlag(_prefsdata.flag, MSP_INTERPOLATE); }
5958
5965#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5967#else
5968 int
5969#endif
5970 GetGraceNoteSpacingMode() const { return (GRACENOTE_SPACINGMODE) _prefsdata.graceNoteSpacingMode; }
5971
5976 twobyte GetGraceNoteMinDistance() const { return _prefsdata.graceNoteMinDistance; }
5977
5984#ifndef PDK_FRAMEWORK_LUAFRIENDLY
5986#else
5987 int
5988#endif
5990 {
5991 if (GetBitFlag(_prefsdata.flag, MSP_CLRPOSITS)) return MANUALPOS_CLEAR;
5992 if (GetBitFlag(_prefsdata.flag, MSP_USEPOSITS)) return MANUALPOS_INCORPORATE;
5993 return MANUALPOS_IGNORE;
5994 }
5995
6002#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6004#else
6005 int
6006#endif
6008 {
6009 if (GetBitFlag(_prefsdata.flag, MSP_AVCOLUNISONS_ALL)) return UNISSPACE_ALLNOTEHEADS;
6010 if (GetBitFlag(_prefsdata.flag, MSP_AVCOLUNISONS_SAME)) return UNISSPACE_DIFFERENTNOTEHEADS;
6011 return UNISSPACE_NONE;
6012 }
6013
6019 twobyte GetAccidentalsGutter() const { return -_prefsdata.accidentalsGutter; }
6020
6028 [[deprecated]]twobyte GetTiesGutter() const { return -_prefsdata.tiesGutter; }
6029
6038 {
6039#if OPERATING_SYSTEM == WINDOWS
6040 return GetBitFlag(_prefsdata.flag, MSP_USEPRINTER);
6041#else
6042 return false;
6043#endif
6044 }
6045
6053 {
6054 return (_prefsdata.useAllotmentTables == 1);
6055 }
6056
6062 {
6063 return MAKELONG(_prefsdata.referenceDurationLow, _prefsdata.referenceDurationHigh);
6064 }
6065
6071 {
6072 return MAKELONG(_prefsdata.referenceWidthLow, _prefsdata.referenceWidthHigh);
6073 }
6074
6075 // *******
6076 // SETTERS
6077 // *******
6078
6086 void SetScalingValue(int value)
6087 {
6088 ufourbyte fbRatio = (ufourbyte) value;
6089 _prefsdata.scalingFactorLow = fbRatio & 0xffff;
6090 _prefsdata.scalingFactorHigh = (fbRatio & 0xffff0000) >> 16;
6091 }
6092
6103 void SetScalingFactor(double ratio)
6104 {
6105 ratio *= 10000.0;
6106 ufourbyte fbRatio = static_cast<ufourbyte>(std::lround(ratio));
6107 _prefsdata.scalingFactorLow = fbRatio & 0xffff;
6108 _prefsdata.scalingFactorHigh = (fbRatio & 0xffff0000) >> 16;
6109 }
6110
6115 void SetMinimumItemDistance(Evpu16 value) { _prefsdata.minDistance = value; }
6116
6121 void SetMinimumDistanceWithTies(twobyte value) { _prefsdata.minDistTiedNotes = value; }
6122
6127 void SetMaxMeasureWidth(twobyte value) { _prefsdata.maxWidth = value; }
6128
6133 void SetMinMeasureWidth(twobyte value) { _prefsdata.minWidth = value; }
6134
6139 void SetAvoidArticulations(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLARTICS, state); }
6140
6145 void SetAvoidChords(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLCHORDS, state); }
6146
6151 void SetAvoidClefs(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLCLEFS, state); }
6152
6157 void SetAvoidHiddenNotes(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_IGNOREHIDDEN, !state); }
6158
6163 void SetAvoidLedgerLines(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLNOLEDGERS, !state); }
6164
6169 void SetAvoidLyrics(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLLYRICS, state); }
6170
6175 void SetAvoidNoteAndAccidentals(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLNOTES, state); }
6176
6181 void SetAvoidSeconds(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_AVCOLSECONDS, state); }
6182
6188 void SetInterpolateAllotments(bool state) { Set16BitFlag(&_prefsdata.flag, MSP_INTERPOLATE, state); }
6189
6197#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6199#else
6200 int
6201#endif
6202 value
6203 ) { _prefsdata.graceNoteSpacingMode = (twobyte) value; }
6204
6209 void SetGraceNoteMinDistance(twobyte value) { _prefsdata.graceNoteMinDistance = value; }
6210
6218#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6220#else
6221 int
6222#endif
6223 value
6224 )
6225 {
6226 switch (value)
6227 {
6228 case MANUALPOS_CLEAR:
6229 Set16BitFlag(&_prefsdata.flag, MSP_CLRPOSITS, true);
6230 Set16BitFlag(&_prefsdata.flag, MSP_USEPOSITS, false);
6231 break;
6232 case MANUALPOS_INCORPORATE:
6233 Set16BitFlag(&_prefsdata.flag, MSP_CLRPOSITS, false);
6234 Set16BitFlag(&_prefsdata.flag, MSP_USEPOSITS, true);
6235 break;
6236 case MANUALPOS_IGNORE:
6237 Set16BitFlag(&_prefsdata.flag, MSP_CLRPOSITS, false);
6238 Set16BitFlag(&_prefsdata.flag, MSP_USEPOSITS, false);
6239 break;
6240 }
6241 }
6242
6250#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6252#else
6253 int
6254#endif
6255 value
6256 )
6257 {
6258 switch (value)
6259 {
6261 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_ALL, true);
6262 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_SAME, false);
6263 break;
6265 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_ALL, false);
6266 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_SAME, true);
6267 break;
6268 case UNISSPACE_NONE:
6269 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_ALL, false);
6270 Set16BitFlag(&_prefsdata.flag, MSP_AVCOLUNISONS_SAME, false);
6271 break;
6272 }
6273 }
6274
6275
6281 void SetAccidentalsGutter(twobyte value) { _prefsdata.accidentalsGutter = -value; }
6282
6290 [[deprecated]]void SetTiesGutter(twobyte value) { _prefsdata.tiesGutter = -value; }
6291
6299 void SetUsePrinterMetrics(bool WINCODE(state))
6300 {
6301#if OPERATING_SYSTEM == WINDOWS
6302 return Set16BitFlag(&_prefsdata.flag, MSP_USEPRINTER, state);
6303#endif
6304 }
6305
6312 void SetUseAllotmentMode(bool allotmenttable)
6313 {
6314 _prefsdata.useAllotmentTables = allotmenttable ? 1 : 0;
6315 }
6316
6321 void SetScalingReferenceDuration(fourbyte duration)
6322 {
6323 _prefsdata.referenceDurationLow = LOWORD(duration);
6324 _prefsdata.referenceDurationHigh = HIWORD(duration);
6325 }
6326
6331 void SetScalingReferenceWidth(fourbyte width)
6332 {
6333 _prefsdata.referenceWidthLow = LOWORD(width);
6334 _prefsdata.referenceWidthHigh = HIWORD(width);
6335 }
6336
6337};
6338
6339
6340
6350{
6351 EEnigmaFont _prefsdata;
6352 EXTAG Tag() const override { return pf_DefaultFontPrefs; }
6353
6354 int DataSizeLoad() const override { return sizeof(EEnigmaFont); }
6355 void* Allocate() override { return (void*) &_prefsdata; }
6356
6361 void CloneMemoryFrom(__FCBaseData* pSource) override
6362 {
6363 memcpy(&_prefsdata, ((FCFontPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
6364 _datablock = &_prefsdata;
6365 _loadedsize = sizeof(_prefsdata);
6366 }
6367
6368 __FCBaseData* CreateObject() override
6369 { return new FCFontPrefs(); }
6370public:
6371#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6373 void* _GetPrefsData() { return &_prefsdata; }
6374#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
6375
6376 const char* ClassName() const override { return "FCFontPrefs"; }
6377 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_FONTPREFS; }
6378
6383 {
6385 FONTPREF_MUSIC = DEFAULTFONT_MUSIC,
6386
6388 FONTPREF_KEYSIG = DEFAULTFONT_KEY,
6389
6391 FONTPREF_CLEF = DEFAULTFONT_CLEF,
6392
6394 FONTPREF_TIMESIG = DEFAULTFONT_TIME,
6395
6397 FONTPREF_CHORDSYMBOL = DEFAULTFONT_CHORD_SYMBOL,
6398
6400 FONTPREF_CHORDALTERATION = DEFAULTFONT_CHORD_ALTERATION,
6401
6403 FONTPREF_ENDING = DEFAULTFONT_ENDING,
6404
6406 FONTPREF_TUPLET = DEFAULTFONT_TUPLET,
6407
6409 FONTPREF_TEXTBLOCK = DEFAULTFONT_TEXTBLOCK,
6410
6412 FONTPREF_LYRICSVERSE = DEFAULTFONT_LYRIC_VERSE,
6413
6415 FONTPREF_LYRICSCHORUS = DEFAULTFONT_LYRIC_CHORUS,
6416
6418 FONTPREF_LYRICSSECTION = DEFAULTFONT_LYRIC_SECTION,
6419
6421 FONTPREF_MULTIMEASUREREST = DEFAULTFONT_MULTIREST,
6422
6424 FONTPREF_CHORDSUFFIX = DEFAULTFONT_CHORD_SUFFIX,
6425
6427 FONTPREF_EXPRESSION = DEFAULTFONT_EXPR,
6428
6430 FONTPREF_REPEAT = DEFAULTFONT_REPEAT,
6431
6433 FONTPREF_CHORDFRETBOARD = DEFAULTFONT_CHORD_FRETBOARD,
6434
6436 FONTPREF_FLAG = DEFAULTFONT_FLAGS,
6437
6439 FONTPREF_ACCIDENTAL = DEFAULTFONT_ACCIS,
6440
6442 FONTPREF_ALTERNATESLASH = DEFAULTFONT_ALTNOTSLASH,
6443
6445 FONTPREF_ALTERNATENUMBER = DEFAULTFONT_ALTNOTNUM,
6446
6448 FONTPREF_REST = DEFAULTFONT_RESTS,
6449
6451 FONTPREF_REPEATDOT = DEFAULTFONT_REPTDOTS,
6452
6454 FONTPREF_NOTEHEAD = DEFAULTFONT_NOTEHEADS,
6455
6457 FONTPREF_AUGMENTATIONDOT = DEFAULTFONT_AUGDOTS,
6458
6460 FONTPREF_TIMESIGPLUS = DEFAULTFONT_TIMEPLUS,
6461
6463 FONTPREF_ARTICULATION = DEFAULTFONT_ARTICULATION,
6464
6466 FONTPREF_DEFTABLATURE = DEFAULTFONT_TABLATURE,
6467
6469 FONTPREF_PERCUSSION = DEFAULTFONT_PERCUSSION,
6470
6472 FONTPREF_8VA = DEFAULTFONT_SMARTSHAPE_8VA,
6473
6475 FONTPREF_MEASURENUMBER = DEFAULTFONT_MEASNUMB,
6476
6478 FONTPREF_STAFFNAME = DEFAULTFONT_STAFFNAMES,
6479
6481 FONTPREF_ABRVSTAFFNAME = DEFAULTFONT_ABRVSTAFFNAMES,
6482
6484 FONTPREF_GROUPNAME = DEFAULTFONT_GROUPNAMES,
6485
6487 FONTPREF_8VB = DEFAULTFONT_SMARTSHAPE_8VB,
6488
6490 FONTPREF_15MA = DEFAULTFONT_SMARTSHAPE_15MA,
6491
6493 FONTPREF_15MB = DEFAULTFONT_SMARTSHAPE_15MB,
6494
6496 FONTPREF_TR = DEFAULTFONT_SMARTSHAPE_TR,
6497
6499 FONTPREF_WIGGLE = DEFAULTFONT_SMARTSHAPE_WIGGLE,
6500
6502 FONTPREF_ABRVGROUPNAME = DEFAULTFONT_ABRVGROUPNAMES,
6503
6505 FONTPREF_GUITARBENDFULL = DEFAULTFONT_GUITARBEND_FULL,
6506
6508 FONTPREF_GUITARBENDNUMBER = DEFAULTFONT_GUITARBEND_NUMBER,
6509
6511 FONTPREF_GUITARBENDFRACTION = DEFAULTFONT_GUITARBEND_FRACTION,
6512
6514 FONTPREF_TIMESIG_PARTS = DEFAULTFONT_TIME_PARTS,
6515
6517 FONTPREF_TIMESIGPLUS_PARTS = DEFAULTFONT_TIMEPLUS_PARTS
6519
6520
6526 {
6527 memset(&_prefsdata, 0, sizeof(_prefsdata));
6528 }
6529
6538 bool GetFontInfo(FCFontInfo* pFontInfo)
6539 {
6540 if (!DataIsLoaded()) return false;
6541 pFontInfo->SetEnigmaStyles(_prefsdata.efx);
6542 pFontInfo->SetSize(_prefsdata.size);
6543 pFontInfo->SetFontID(_prefsdata.font);
6544 pFontInfo->SetNameByID(_prefsdata.font);
6545 return true;
6546 }
6547
6558 {
6559 if (!DataIsLoaded()) return NULL;
6560 FCFontInfo* pFontInfo = new FCFontInfo();
6561 if (! GetFontInfo(pFontInfo))
6562 {
6563 delete pFontInfo;
6564 return NULL;
6565 }
6566 return pFontInfo;
6567 }
6568
6569#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
6571 luabridge::RefCountedPtr<FCFontInfo> CreateFontInfo_GC()
6572 { return makeLuaSharedPtr(CreateFontInfo()); }
6573#endif
6574
6584 bool SetFontInfo(FCFontInfo* pFontInfo)
6585 {
6586 if (!DataIsLoaded()) return false;
6587 _prefsdata.efx = pFontInfo->GetEnigmaStyles();
6588 _prefsdata.size = pFontInfo->GetSize();
6589 _prefsdata.font = pFontInfo->GetIDByName();
6590 return true;
6591 }
6592};
6593
6594
6595
6604{
6605 union
6606 {
6607#if FXT_VERSION >= FINALEVERSION_26_2
6608 EDTMultimeasureRestPrefs26_2 _new;
6609#endif
6610 _FCEDTMMRestDefaultsPrefs _old;
6611 } _prefsdata;
6612
6613 EXTAG Tag() const override
6614 {
6615#if FXT_VERSION >= FINALEVERSION_26_2
6616 if (_use26) return pf_MultimeasureRestPrefs26_2;
6617#endif
6618 return _fcpf_MMRestDefaultPrefs;
6619 }
6620
6621 int DataSizeLoad() const override
6622 {
6623#if FXT_VERSION >= FINALEVERSION_26_2
6624 if (_use26) return sizeof(_prefsdata._new);
6625#endif
6626 return sizeof(_prefsdata._old);
6627 }
6628 void* Allocate() override { return (void*) _GetPrefsData(); }
6629
6634 void CloneMemoryFrom(__FCBaseData* pSource) override
6635 {
6636 memcpy(_GetPrefsData(), ((FCMultiMeasureRestPrefs*)pSource)->_GetPrefsData(), DataSizeLoad());
6637 _datablock = &_prefsdata;
6638 _loadedsize = DataSizeLoad();
6639 }
6640
6641 __FCBaseData* CreateObject() override
6642 { return new FCMultiMeasureRestPrefs(); }
6643public:
6644#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6646 void* _GetPrefsData() { return &_prefsdata; }
6647#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
6648
6649 const char* ClassName() const override { return "FCMultiMeasureRestPrefs"; }
6650 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_MULTIMEASURERESTPREFS; }
6651
6658 {
6659 memset(&_prefsdata, 0, sizeof(_prefsdata));
6660 }
6661
6667 twobyte GetWidth() const { return _GET_PREFDATA2(measWidth, measpace); }
6668
6674 twobyte GetShapeID() const { return _GET_PREFDATA2(shapeID, shapedef); }
6675
6680 twobyte GetShapeEndAdjust() const { return _GET_PREFDATA2(shpAdjustEnd, endAdjust); }
6681
6686 twobyte GetShapeStartAdjust() const { return _GET_PREFDATA2(shpAdjustStart, startAdjust); }
6687
6693 bool GetAutoUpdate() const { return _GET_PREFDATA2(mmautoupdate, defAutoUpdateMMRests) != 0; }
6694
6699 twobyte GetSymbolSpace() const { return _GET_PREFDATA2(spaceBetweenSymbols, spacing); }
6700
6705 bool GetUseSymbols() const { return GetBitFlag(_GET_PREFDATA2(flags, flag), 0x0001); }
6706
6712 twobyte GetUseSymbolsLessThan() const { return _GET_PREFDATA2(symbolMeasures, threshold); }
6713
6720 bool GetStretchHorizontally() const;
6721
6726 twobyte GetStartNumberingAt() const { return _GET_PREFDATA2(startNumberingAt, numStart); }
6727
6732 twobyte GetNumberHorizontalAdjust() const { return _GET_PREFDATA2(horizNumAdj, numAdjX); }
6733
6740 twobyte GetNumberVerticalAdjust() const { return _GET_PREFDATA2(vertNumAdj, numdec); }
6741
6747 void SetShapeID(twobyte shapeID) { _SET_PREFDATA2(shapeID, shapedef) = shapeID; }
6748
6754 void SetAutoUpdate(bool value) { _SET_PREFDATA2(mmautoupdate, defAutoUpdateMMRests) = value; }
6755
6760 void SetSymbolSpace(twobyte value) { _SET_PREFDATA2(spaceBetweenSymbols, spacing) = value; }
6761
6766 void SetUseSymbols(bool value) { Set16BitFlag(&_SET_PREFDATA2(flags, flag), 0x0001, value); }
6767
6773 void SetUseSymbolsLessThan(twobyte value) { _SET_PREFDATA2(symbolMeasures, threshold) = value; }
6774
6781 void SetStretchHorizontally(bool value);
6782
6787 void SetStartNumberingAt(twobyte value) { _SET_PREFDATA2(startNumberingAt, numStart) = value; }
6788
6793 void SetNumberHorizontalAdjust(twobyte value) { _SET_PREFDATA2(horizNumAdj, numAdjX) = value; }
6794
6801 void SetNumberVerticalAdjust(twobyte value) { _SET_PREFDATA2(vertNumAdj, numdec) = value; }
6802
6807 void SetWidth(twobyte value) { _SET_PREFDATA2(measWidth, measpace) = value; }
6808
6813 void SetShapeEndAdjust(twobyte value) { _SET_PREFDATA2(shpAdjustEnd, endAdjust) = value; }
6814
6819 void SetShapeStartAdjust(twobyte value) { _SET_PREFDATA2(shpAdjustStart, startAdjust) = value; }
6820
6825 bool ChangeRest(FCMultiMeasureRest* pRest);
6826
6831 bool CopyFromRest(FCMultiMeasureRest *pRest);
6832
6833#ifdef PDK_FRAMEWORK_DEBUG
6834 void DebugDump() override
6835 {
6837 DebugOutInt("Width: ", GetWidth());
6838 }
6839#endif
6840};
6841
6851{
6852 EDTSlurContourPrefs _prefsdata;
6853
6854 EXTAG Tag() const override
6855 {
6856 // pf_TiePlacementPrefs was a pseudo-extag that is no longer supported as of the F26.2 PDK.
6857 // The extag here is what it translated to (with cmper kPreferencesCmper), however unfortunately
6858 // it does not work in Finale 26.2 or higher, so the direct Load/Save mechanism for this class is
6859 // deprecated starting in Finale 26.2. (See the Doxygen comment above for alternatives.)
6860 return MAKEEXTAG(edOther2Inci, '5', '2');
6861 }
6862
6863 int DataSizeLoad() const override { return sizeof(EDTSlurContourPrefs); }
6864 void* Allocate() override { return (void*) &_prefsdata; }
6865
6870 void CloneMemoryFrom(__FCBaseData* pSource) override
6871 {
6872 memcpy(&_prefsdata, ((FCSlurContourPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
6873 _datablock = &_prefsdata;
6874 _loadedsize = sizeof(_prefsdata);
6875 }
6876
6877 __FCBaseData* CreateObject() override { return new FCSlurContourPrefs(); }
6878public:
6879#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6881 void* _GetPrefsData() { return &_prefsdata; }
6882
6884 bool Load([[maybe_unused]]twobyte prefsno = 0) override
6885 {
6886 _dataid.other.cmper = kPreferencesCmper; // right now overwritten by _FCPrefsBase::Load, but don't AssUMe
6887 _dataid.other.inci = 0;
6888 return __FCPrefsBase::Load(kPreferencesCmper); // Load fails in Finale 26.2+
6889 }
6890
6891#if FXT_VERSION >= FINALEVERSION_26_2
6893 template <std::size_t N>
6894 void SetFromFinale26_2(const EDTSlurControlPointStyle (&inp)[N])
6895 {
6896 static_assert(sizeof(inp) == sizeof(_prefsdata), "Size of Finale 26.2 EDTSlurControlPointStyle array does not match size of EDTSlurContourPrefs.");
6897 memcpy(&_prefsdata, &inp, sizeof(_prefsdata));
6898 _loadedsize = DataSizeLoad();
6899 }
6900
6902 template <std::size_t N>
6903 void PutToFinale26_2(EDTSlurControlPointStyle (&outp)[N]) const
6904 {
6905 static_assert(sizeof(outp) == sizeof(_prefsdata), "Size of Finale 26.2 EDTSlurControlPointStyle array does not match size of EDTSlurContourPrefs.");
6906 memcpy(&outp, &_prefsdata, sizeof(outp));
6907 }
6908#endif // FXT_VERSION >= FINALEVERSION_26_2
6909#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
6910
6911 const char* ClassName() const override { return "FCSlurContourPrefs"; }
6912 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SLURCONTOURPREFS; }
6913
6916 {
6917 memset(&_prefsdata, 0, sizeof(_prefsdata));
6918 }
6919
6929 twobyte CalcInset(int slurlength) const
6930 {
6931 if (!DataIsLoaded()) return 0;
6932 if (slurlength <= _prefsdata.shortSpan.def) return _prefsdata.shortSpan.inset;
6933 const ESlurContourDefaults* pShorterDefaults = NULL;
6934 const ESlurContourDefaults* pLongerDefaults = NULL;
6935 if (slurlength <= _prefsdata.mediumSpan.def)
6936 {
6937 pShorterDefaults = &_prefsdata.shortSpan;
6938 pLongerDefaults = &_prefsdata.mediumSpan;
6939 }
6940 else if (slurlength <= _prefsdata.longSpan.def)
6941 {
6942 pShorterDefaults = &_prefsdata.mediumSpan;
6943 pLongerDefaults = &_prefsdata.longSpan;
6944 }
6945 else
6946 {
6947 pShorterDefaults = &_prefsdata.longSpan;
6948 pLongerDefaults = &_prefsdata.extraLongSpan;
6949 }
6950
6951 /* If the width isn't extremely short or long span, calculate */
6952 int evpuoffset = slurlength - pShorterDefaults->def;
6953 int heigthspandiff = pLongerDefaults->inset - pShorterDefaults->inset;
6954 int evpuspan = pLongerDefaults->def - pShorterDefaults->def;
6955 return pShorterDefaults->inset + evpuoffset * heigthspandiff / evpuspan;
6956 }
6957
6967 Evpu16 CalcHeight(int slurlength) const
6968 {
6969 if (!DataIsLoaded()) return 0;
6970 if (slurlength <= _prefsdata.shortSpan.def) return _prefsdata.shortSpan.height;
6971 const ESlurContourDefaults* pShorterDefaults = NULL;
6972 const ESlurContourDefaults* pLongerDefaults = NULL;
6973 if (slurlength <= _prefsdata.mediumSpan.def)
6974 {
6975 pShorterDefaults = &_prefsdata.shortSpan;
6976 pLongerDefaults = &_prefsdata.mediumSpan;
6977 }
6978 else if (slurlength <= _prefsdata.longSpan.def)
6979 {
6980 pShorterDefaults = &_prefsdata.mediumSpan;
6981 pLongerDefaults = &_prefsdata.longSpan;
6982 }
6983 else
6984 {
6985 pShorterDefaults = &_prefsdata.longSpan;
6986 pLongerDefaults = &_prefsdata.extraLongSpan;
6987 }
6988
6989
6990 /* If the width isn't extremely short or long span, calculate */
6991 int evpuoffset = slurlength - pShorterDefaults->def;
6992 int heigthspandiff = pLongerDefaults->height - pShorterDefaults->height;
6993 int evpuspan = pLongerDefaults->def - pShorterDefaults->def;
6994 return pShorterDefaults->height + evpuoffset * heigthspandiff / evpuspan;
6995 }
6996
6997 //
6998 // GETTERS
6999 //
7000
7005 Evpu16 GetShortSpan() const
7006 {
7007 return _prefsdata.shortSpan.def;
7008 }
7009
7016 twobyte GetShortInset() const
7017 {
7018 return _prefsdata.shortSpan.inset;
7019 }
7020
7025 Evpu16 GetShortHeight() const
7026 {
7027 return _prefsdata.shortSpan.height;
7028 }
7029
7034 Evpu16 GetMediumSpan() const
7035 {
7036 return _prefsdata.mediumSpan.def;
7037 }
7038
7045 twobyte GetMediumInset() const
7046 {
7047 return _prefsdata.mediumSpan.inset;
7048 }
7049
7054 Evpu16 GetMediumHeight() const
7055 {
7056 return _prefsdata.mediumSpan.height;
7057 }
7058
7063 Evpu16 GetLongSpan() const
7064 {
7065 return _prefsdata.longSpan.def;
7066 }
7067
7074 twobyte GetLongInset() const
7075 {
7076 return _prefsdata.longSpan.inset;
7077 }
7078
7083 Evpu16 GetLongHeight() const
7084 {
7085 return _prefsdata.longSpan.height;
7086 }
7087
7092 Evpu16 GetExtraLongSpan() const
7093 {
7094 return _prefsdata.extraLongSpan.def;
7095 }
7096
7101 twobyte GetExtraLongInset() const
7102 {
7103 return _prefsdata.extraLongSpan.inset;
7104 }
7105
7110 Evpu16 GetExtraLongHeight() const
7111 {
7112 return _prefsdata.extraLongSpan.height;
7113 }
7114
7115 //
7116 // SETTERS
7117 //
7118
7123 void SetShortSpan(Evpu16 value)
7124 {
7125 _prefsdata.shortSpan.def = value;
7126 }
7127
7134 void SetShortInset(twobyte value)
7135 {
7136 _prefsdata.shortSpan.inset = value;
7137 }
7138
7143 void SetShortHeight(Evpu16 value)
7144 {
7145 _prefsdata.shortSpan.height = value;
7146 }
7147
7152 void SetMediumSpan(Evpu16 value)
7153 {
7154 _prefsdata.mediumSpan.def = value;
7155 }
7156
7163 void SetMediumInset(twobyte value)
7164 {
7165 _prefsdata.mediumSpan.inset = value;
7166 }
7167
7172 void SetMediumHeight(Evpu16 value)
7173 {
7174 _prefsdata.mediumSpan.height = value;
7175 }
7176
7181 void SetLongSpan(Evpu16 value)
7182 {
7183 _prefsdata.longSpan.def = value;
7184 }
7185
7192 void SetLongInset(twobyte value)
7193 {
7194 _prefsdata.longSpan.inset = value;
7195 }
7196
7201 void SetLongHeight(Evpu16 value)
7202 {
7203 _prefsdata.longSpan.height = value;
7204 }
7205
7210 void SetExtraLongSpan(Evpu16 value)
7211 {
7212 _prefsdata.extraLongSpan.def = value;
7213 }
7214
7221 void SetExtraLongInset(twobyte value)
7222 {
7223 _prefsdata.extraLongSpan.inset = value;
7224 }
7225
7230 void SetExtraLongHeight(Evpu16 value)
7231 {
7232 _prefsdata.extraLongSpan.height = value;
7233 }
7234
7235#ifdef PDK_FRAMEWORK_DEBUG
7236 void DebugDump() override
7237 {
7239 }
7240#endif
7241};
7242
7243#ifndef DOXYGEN_SHOULD_IGNORE_THIS
7244#if FXT_VERSION < FINALEVERSION_26_2
7245#include "pragma_align_begin.h"
7246struct EDTSmartShapeEntryConnectStyle
7247{
7248 twobyte connectIndex;
7249 Evpu16 xOffset;
7250 Evpu16 yOffset;
7251};
7252#include "pragma_align_end.h"
7253#endif // FXT_VERSION < FINALEVERSION_26_2
7254#endif // DOXYGEN_SHOULD_IGNORE_THIS
7255
7256
7271{
7272 EDTSmartShapeEntryConnectStyle _data;
7273
7274public:
7346
7347#ifndef DOXYGEN_SHOULD_IGNORE_THIS
7352 FCSmartShapeEntryConnectStyle(const EDTSmartShapeEntryConnectStyle& src) : __FCBase()
7353 {
7354 _data = src;
7355 }
7356
7362 {
7363 memset(&_data, 0, sizeof(_data));
7364 }
7365
7367 void CopyDataTo(EDTSmartShapeEntryConnectStyle* target) const
7368 { *target = _data; }
7369#endif // DOXYGEN_SHOULD_IGNORE_THIS
7370
7371 const char* ClassName() const override { return "FCSmartShapeEntryConnectStyle"; }
7372
7380#ifndef PDK_FRAMEWORK_LUAFRIENDLY
7382#else
7383 twobyte
7384#endif
7385 GetConnectionIndex() const { return static_cast<SSENTCNCTSTYLE_INDICES>(_data.connectIndex); }
7386
7391 Evpu16 GetHorizontalOffset() const { return _data.xOffset; }
7392
7397 Evpu16 GetVerticalOffset() const { return _data.yOffset; }
7398
7403 void SetHorizontalOffset(Evpu16 value) { _data.xOffset = value; }
7404
7409 void SetVerticalOffset(Evpu16 value) { _data.yOffset = value; }
7410};
7411
7419{
7420#ifndef DOXYGEN_SHOULD_IGNORE_THIS
7421 union
7422 {
7423#if FXT_VERSION >= FINALEVERSION_26_2
7424 EDTSmartShapePrefs26_2 _new;
7425#endif
7426 _FCEDTSmartShapePrefs _old;
7427 } _prefsdata;
7428
7429 EXTAG Tag() const override
7430 {
7431#if FXT_VERSION >= FINALEVERSION_26_2
7432 if (_use26) return pf_SmartShapePrefs26_2;
7433#endif
7434 return _fcpf_SmartShapePrefs;
7435 }
7436
7437 int DataSizeLoad() const override
7438 {
7439#if FXT_VERSION >= FINALEVERSION_26_2
7440 if (_use26) return sizeof(_prefsdata._new);
7441#endif
7442 return sizeof(_prefsdata._old);
7443 }
7444
7445 void* Allocate() override { return (void*) _GetPrefsData(); }
7446
7451 void CloneMemoryFrom(__FCBaseData* pSource) override
7452 {
7453 memcpy(_GetPrefsData(), ((FCSmartShapePrefs*)pSource)->_GetPrefsData(), DataSizeLoad());
7454 _datablock = _GetPrefsData();
7456 }
7457
7458 __FCBaseData* CreateObject() override { return new FCSmartShapePrefs(); }
7459
7460#endif
7461public:
7462#ifndef DOXYGEN_SHOULD_IGNORE_THIS
7464 void* _GetPrefsData() { return &_prefsdata; }
7465#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
7466
7467 const char* ClassName() const override { return "FCSmartShapePrefs"; }
7468 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_SMARTSHAPEPREFS; }
7469
7488
7494 {
7495 memset(&_prefsdata, 0, sizeof(_prefsdata));
7496 }
7497
7498 /* **********/
7499 /* GETTERS */
7500 /* **********/
7501
7507 {
7508 return _GET_PREFDATA2(customLineStyle, ssLineStyleCmpCustom);
7509 }
7510
7515 CMPER GetGlissandoDefID() const
7516 {
7517 return _GET_PREFDATA2(glissandoStyle, ssLineStyleCmp_Glissando);
7518 }
7519
7524 CMPER GetTabSlideDefID() const
7525 {
7526 return _GET_PREFDATA2(tabSlideStyle, ssLineStyleCmp_TabSlide);
7527 }
7528
7534 {
7535 return _GET_PREFDATA2(guitarBendStyle, ssLineStyleCmp_TabBendCurve);
7536 }
7537
7543 {
7544 return _GET_PREFDATA2(bCrescDimHorizontal, crescHorizontal);
7545 }
7546
7554 {
7555 return _GET_PREFDATA2(crescDimOpening, longHairpinOpeningWidth);
7556 }
7557
7565 Evpu16 GetHairpinDefaultShortOpening() const;
7566
7573 twobyte GetHairpinMaxShortSpanLength() const;
7574
7579 Efix16 GetHairpinLineWidth() const
7580 {
7581 return _GET_PREFDATA2(crescDimWidth, crescLineWidth);
7582 }
7583
7589 {
7590 return _GET_PREFDATA2(bUseEngraverSlurs, useEngraverSlurs) != 0;
7591 }
7592
7597 Efix16 GetLineWidth() const
7598 {
7599 return _GET_PREFDATA2(lineThickness, smartLineWidth);
7600 }
7601
7606 Evpu16 GetLineDashLength() const
7607 {
7608 return _GET_PREFDATA2(dashLength, smartDashOn);
7609 }
7610
7615 Evpu16 GetLineDashSpace() const
7616 {
7617 return _GET_PREFDATA2(dashSpace, smartDashOff);
7618 }
7619
7624 Evpu16 GetHookLength() const
7625 {
7626 return _GET_PREFDATA2(hookLength, hookLength);
7627 }
7628
7633 bool GetOctavesAsText() const
7634 {
7635 return _GET_PREFDATA2(bOctavaAsText, showOctavaAsText) != 0;
7636 }
7637
7643 {
7644 return _GET_PREFDATA2(engrMaxAngle, maxSlurAngle);
7645 }
7646
7652 {
7653 return _GET_PREFDATA2(engrSymmetry, slurSymmetry);
7654 }
7655
7661 {
7662 return _GET_PREFDATA2(engrSpace, slurPadding);
7663 }
7664
7671 {
7672#if FXT_VERSION >= FINALEVERSION_26_2
7673 if (_use26) return _prefsdata._new.slurAvoidAccidentals != 0;
7674#endif
7675 return (_prefsdata._old.engrAcciMode == 2);
7676 }
7677
7685 {
7686 return _GET_PREFDATA2(engrAcciSpace, slurAcciPadding);
7687 }
7688
7696 {
7697 return _GET_PREFDATA2(engrStretchFirst, slurDoStretchFirst) != 0;
7698 }
7699
7707 {
7708 return _GET_PREFDATA2(engrStretchMode, slurStretchByPercent) != 0;
7709 }
7710
7716 {
7717 return _GET_PREFDATA2(engrMaxStretchPrecent, maxSlurStretchPercent);
7718 }
7719
7725 {
7726 return _GET_PREFDATA2(engrMaxStretchFixed, maxSlurStretch);
7727 }
7728
7734 {
7735 return _GET_PREFDATA2(engrMaxLift, maxSlurLift);
7736 }
7737
7743 {
7744 return _GET_PREFDATA2(slurbrStaffLineAvoid, slurBreakVertAdj);
7745 }
7746
7752 {
7753 return _GET_PREFDATA2(slurbrStartAdjust, slurLeftBreakHorzAdj);
7754 }
7755
7761 {
7762 return _GET_PREFDATA2(slurbrEndAdjust, slurRightBreakHorzAdj);
7763 }
7764
7769 Int10000ths32 GetSlurTipWidth() const
7770 {
7771 return _GET_PREFDATA2(slurtipWidth, smartSlurTipWidth);
7772 }
7773
7781 {
7782 return _GET_PREFDATA2(slurtipAvoidStaff, slurAvoidStaffLines) != 0;
7783 }
7784
7792 {
7793#if FXT_VERSION >= FINALEVERSION_26_2
7794 if (_use26) return _prefsdata._new.slurAvoidStaffLinesAmt;
7795#endif
7796 /* The pre-F26.2 internal setting is off by one compared to the UI.
7797 PDK Framework uses the UI setting. */
7798 return _prefsdata._old.slurtipAvoidStaffVal - 1;
7799 }
7800
7806 {
7807 return _GET_PREFDATA2(slurThicknessHorizLeft, slurThicknessCp1X);
7808 }
7809
7815 {
7816 return _GET_PREFDATA2(slurThicknessVertLeft, slurThicknessCp1Y);
7817 }
7818
7824 {
7825 return _GET_PREFDATA2(slurThicknessHorizRight, slurThicknessCp2X);
7826 }
7827
7833 {
7834 return _GET_PREFDATA2(slurThicknessVertRight, slurThicknessCp2Y);
7835 }
7836
7842 {
7843 return _GET_PREFDATA2(bendParentheses, guitarBendUseParens) != 0;
7844 }
7845
7851 {
7852 return _GET_PREFDATA2(bendHideNumber, guitarBendHideBendTo) != 0;
7853 }
7854
7860 {
7861 return _GET_PREFDATA2(bendAutoGenerateText, guitarBendGenText) != 0;
7862 }
7863
7871 {
7872 return _GET_PREFDATA2(bendReplaceWithFull, guitarBendUseFull) != 0;
7873 }
7874
7882 {
7883#if FXT_VERSION >= FINALEVERSION_26_2
7884 if (_use26) return _prefsdata._new.articAvoidSlurAmt;
7885#endif
7886 return 0;
7887 }
7888
7889 /* **********/
7890 /* SETTERS */
7891 /* **********/
7892
7897 void SetCustomLineDefID(CMPER idvalue)
7898 {
7899 _SET_PREFDATA2(customLineStyle, ssLineStyleCmpCustom) = idvalue;
7900 }
7901
7906 void SetGlissandoDefID(CMPER idvalue)
7907 {
7908 _SET_PREFDATA2(glissandoStyle, ssLineStyleCmp_Glissando) = idvalue;
7909 }
7910
7915 void SetTabSlideDefID(CMPER idvalue)
7916 {
7917 _SET_PREFDATA2(tabSlideStyle, ssLineStyleCmp_TabSlide) = idvalue;
7918 }
7919
7924 void SetGuitarBendDefID(CMPER idvalue)
7925 {
7926 _SET_PREFDATA2(guitarBendStyle, ssLineStyleCmp_TabBendCurve) = idvalue;
7927 }
7928
7934 {
7935 _SET_PREFDATA2(bCrescDimHorizontal, crescHorizontal) = state;
7936 }
7937
7944 void SetHairpinDefaultOpening(Evpu16 value)
7945 {
7946 _SET_PREFDATA2(crescDimOpening, longHairpinOpeningWidth) = value;
7947 }
7948
7955 void SetHairpinDefaultShortOpening(Evpu16 value);
7956
7963 void SetHairpinMaxShortSpanLength(twobyte value);
7964
7969 void SetHairpinLineWidth(Efix16 value)
7970 {
7971 _SET_PREFDATA2(crescDimWidth, crescLineWidth) = value;
7972 }
7973
7978 void SetUseEngraverSlurs(bool state)
7979 {
7980 _SET_PREFDATA2(bUseEngraverSlurs, useEngraverSlurs) = state;
7981 }
7982
7987 void SetLineWidth(Efix16 value)
7988 {
7989 _SET_PREFDATA2(lineThickness, smartLineWidth) = value;
7990 }
7991
7996 void SetLineDashLength(Evpu16 value)
7997 {
7998 _SET_PREFDATA2(dashLength, smartDashOn) = value;
7999 }
8000
8005 void SetLineDashSpace(Evpu16 value)
8006 {
8007 _SET_PREFDATA2(dashSpace, smartDashOff) = value;
8008 }
8009
8014 void SetHookLength(Evpu16 value)
8015 {
8016 _SET_PREFDATA2(hookLength, hookLength) = value;
8017 }
8018
8023 void SetOctavesAsText(bool state)
8024 {
8025 _SET_PREFDATA2(bOctavaAsText, showOctavaAsText) = state;
8026 }
8027
8032 void SetEngraverSlurMaxAngle(twobyte value)
8033 {
8034 _SET_PREFDATA2(engrMaxAngle, maxSlurAngle) = value;
8035 }
8036
8042 {
8043 _SET_PREFDATA2(engrSymmetry, slurSymmetry) = value;
8044 }
8045
8051 {
8052 _SET_PREFDATA2(engrSpace, slurPadding) = value;
8053 }
8054
8060 {
8061#if FXT_VERSION >= FINALEVERSION_26_2
8062 if (_use26)
8063 {
8064 _prefsdata._new.slurAvoidAccidentals = state;
8065 return;
8066 }
8067#endif
8068 _prefsdata._old.engrAcciMode = state ? 2 : 1;
8069 }
8070
8078 {
8079 _SET_PREFDATA2(engrAcciSpace, slurAcciPadding) = value;
8080 }
8081
8089 {
8090 _SET_PREFDATA2(engrStretchFirst, slurDoStretchFirst) = state;
8091 }
8092
8100 {
8101 _SET_PREFDATA2(engrStretchMode, slurStretchByPercent) = state;
8102 }
8103
8109 {
8110 _SET_PREFDATA2(engrMaxStretchPrecent, maxSlurStretchPercent) = value;
8111 }
8112
8118 {
8119 _SET_PREFDATA2(engrMaxStretchFixed, maxSlurStretch) = value;
8120 }
8121
8126 void SetEngraverSlurMaxLift(Efix32 value)
8127 {
8128 _SET_PREFDATA2(engrMaxLift, maxSlurLift) = value;
8129 }
8130
8136 {
8137 _SET_PREFDATA2(slurbrStaffLineAvoid, slurBreakVertAdj) = value;
8138 }
8139
8144 void SetSlurBreakSystemStart(Evpu16 value)
8145 {
8146 _SET_PREFDATA2(slurbrStartAdjust, slurLeftBreakHorzAdj) = value;
8147 }
8148
8153 void SetSlurBreakSystemEnd(Evpu16 value)
8154 {
8155 _SET_PREFDATA2(slurbrEndAdjust, slurRightBreakHorzAdj) = value;
8156 }
8157
8162 void SetSlurTipWidth(Int10000ths32 value)
8163 {
8164 _SET_PREFDATA2(slurtipWidth, smartSlurTipWidth) = value;
8165 }
8166
8174 {
8175 _SET_PREFDATA2(slurtipAvoidStaff, slurAvoidStaffLines) = state;
8176 }
8177
8185 {
8186#if FXT_VERSION >= FINALEVERSION_26_2
8187 if (_use26)
8188 {
8189 _prefsdata._new.slurAvoidStaffLinesAmt = value;
8190 return;
8191 }
8192#endif
8193 /* The pre-F26.2 internal setting is off by one compared to the UI.
8194 PDK Framework uses the UI setting. */
8195 _prefsdata._old.slurtipAvoidStaffVal = value + 1;
8196 }
8197
8203 {
8204 _SET_PREFDATA2(slurThicknessHorizLeft, slurThicknessCp1X) = value;
8205 }
8206
8212 {
8213 _SET_PREFDATA2(slurThicknessVertLeft, slurThicknessCp1Y) = value;
8214 }
8215
8221 {
8222 _SET_PREFDATA2(slurThicknessHorizRight, slurThicknessCp2X) = value;
8223 }
8224
8230 {
8231 _SET_PREFDATA2(slurThicknessVertRight, slurThicknessCp2Y) = value;
8232 }
8233
8239 {
8240 _SET_PREFDATA2(bendParentheses, guitarBendUseParens) = state;
8241 }
8242
8248 {
8249 _SET_PREFDATA2(bendHideNumber, guitarBendHideBendTo) = state;
8250 }
8251
8257 {
8258 _SET_PREFDATA2(bendAutoGenerateText, guitarBendGenText) = state;
8259 }
8260
8268 {
8269 _SET_PREFDATA2(bendReplaceWithFull, guitarBendUseFull) = state;
8270 }
8271
8278 void SetArticulationAvoidSlursBy([[maybe_unused]]Evpu16 value)
8279 {
8280#if FXT_VERSION >= FINALEVERSION_26_2
8281 if (_use26)
8282 {
8283 _prefsdata._new.articAvoidSlurAmt = value;
8284 return;
8285 }
8286#endif
8287 }
8288
8300 {
8301 FCSlurContourPrefs * retval = new FCSlurContourPrefs();
8302#if FXT_VERSION >= FINALEVERSION_26_2
8303 if (_use26)
8304 {
8305 retval->SetFromFinale26_2(_prefsdata._new.slurControlStyles);
8306 return retval;
8307 }
8308#endif
8309 if (! retval->Load())
8310 {
8311 delete retval;
8312 return nullptr;
8313 }
8314 return retval;
8315 }
8316
8317#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
8319 luabridge::RefCountedPtr<FCSlurContourPrefs> CreateSlurContourPrefs_GC() const
8320 { return makeLuaSharedPtr(CreateSlurContourPrefs()); }
8321#endif
8322
8333 {
8334#if FXT_VERSION >= FINALEVERSION_26_2
8335 if (_use26)
8336 {
8337 pPrefs->PutToFinale26_2(_prefsdata._new.slurControlStyles);
8338 return true;
8339 }
8340#endif
8341 return pPrefs->Save();
8342 }
8343
8350 twobyte GetEntryConnectStyleCount([[maybe_unused]]twobyte styleType) const
8351 {
8352#if FXT_VERSION >= FINALEVERSION_26_2
8353 if (_use26)
8354 {
8355 switch (static_cast<SSENTCNCTSTYLE_TYPES>(styleType))
8356 {
8357 case SSENTCNCTSTYLETYPE_SLURS: return DIM(_prefsdata._new.slurConnectStyles);
8358 case SSENTCNCTSTYLETYPE_TAB_SLIDES: return DIM(_prefsdata._new.tabSlideConnectStyles);
8359 case SSENTCNCTSTYLETYPE_GLISSANDOS: return DIM(_prefsdata._new.glissandoConnectStyles);
8360 case SSENTCNCTSTYLETYPE_BEND_CURVES: return DIM(_prefsdata._new.bendCurveConnectStyles);
8361 }
8362 }
8363#endif // FXT_VERSION >= FINALEVERSION_26_2
8364 return 0;
8365 }
8366
8387 FCSmartShapeEntryConnectStyle* CreateEntryConnectStyle([[maybe_unused]]twobyte styleType, [[maybe_unused]]utwobyte index) const
8388 {
8389#if FXT_VERSION >= FINALEVERSION_26_2
8390 if (_use26 && index < GetEntryConnectStyleCount(styleType))
8391 {
8392 switch (static_cast<SSENTCNCTSTYLE_TYPES>(styleType))
8393 {
8395 return new FCSmartShapeEntryConnectStyle(_prefsdata._new.slurConnectStyles[index]);
8397 return new FCSmartShapeEntryConnectStyle(_prefsdata._new.tabSlideConnectStyles[index]);
8399 return new FCSmartShapeEntryConnectStyle(_prefsdata._new.glissandoConnectStyles[index]);
8401 return new FCSmartShapeEntryConnectStyle(_prefsdata._new.bendCurveConnectStyles[index]);
8402 }
8403
8404 }
8405#endif // FXT_VERSION >= FINALEVERSION_26_2
8406 return NULL;
8407 }
8408
8409#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
8411 luabridge::RefCountedPtr<FCSmartShapeEntryConnectStyle> CreateEntryConnectStyle_GC(twobyte styleType, utwobyte index) const
8412 { return makeLuaSharedPtr(CreateEntryConnectStyle(styleType, index)); }
8413#endif
8414
8432 bool SaveEntryConnectStyle([[maybe_unused]]const FCSmartShapeEntryConnectStyle* inpConnectStyle,
8433 [[maybe_unused]]twobyte styleType, [[maybe_unused]]utwobyte index)
8434 {
8435#if FXT_VERSION >= FINALEVERSION_26_2
8436 if (_use26 && index < GetEntryConnectStyleCount(styleType))
8437 {
8438 EDTSmartShapeEntryConnectStyle* target = nullptr;
8439 switch (static_cast<SSENTCNCTSTYLE_TYPES>(styleType))
8440 {
8442 target = &_prefsdata._new.slurConnectStyles[index];
8443 break;
8445 target = &_prefsdata._new.tabSlideConnectStyles[index];
8446 break;
8448 target = &_prefsdata._new.glissandoConnectStyles[index];
8449 break;
8451 target = &_prefsdata._new.bendCurveConnectStyles[index];
8452 break;
8453 }
8454 if (target->connectIndex == inpConnectStyle->GetConnectionIndex())
8455 {
8456 inpConnectStyle->CopyDataTo(target);
8457 return true;
8458 }
8459 }
8460#endif // FXT_VERSION >= FINALEVERSION_26_2
8461 return false;
8462 }
8463
8464#ifdef PDK_FRAMEWORK_DEBUG
8465 void DebugDump() override
8466 {
8468 }
8469#endif
8470};
8471
8472
8482{
8483public:
8507private:
8508 bool _ValidateIndex(
8509#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8511#else
8512 int
8513#endif
8514 index) const
8515 {
8516 switch (index)
8517 {
8518 case TIEPLACE_OVERINNER:
8524 return true;
8525 }
8526 return false;
8527 }
8528
8529 EDTTiePlacementPrefs _prefsdata;
8530
8531 EXTAG Tag() const override
8532 {
8533 // pf_TiePlacementPrefs was a pseudo-extag that is no longer supported as of the F26.2 PDK.
8534 // The extag here is what it translated to (with cmper kPreferencesCmper), however unfortunately
8535 // it does not work in Finale 26.2 or higher, so the direct Load/Save mechanism for this class is
8536 // deprecated starting in Finale 26.2. (See the Doxygen comment above for alternatives.)
8537 return MAKEEXTAG(edOther4Inci, '8', '5');
8538 }
8539
8540 int DataSizeLoad() const override { return sizeof(EDTTiePlacementPrefs); }
8541 void* Allocate() override { return (void*)&_prefsdata; }
8542
8547 void CloneMemoryFrom(__FCBaseData* pSource) override
8548 {
8549 memcpy(&_prefsdata, ((FCTiePlacementPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
8550 _datablock = &_prefsdata;
8551 _loadedsize = sizeof(_prefsdata);
8552 }
8553
8554 __FCBaseData* CreateObject() override
8555 {
8556 return new FCTiePlacementPrefs();
8557 }
8558public:
8559#ifndef DOXYGEN_SHOULD_IGNORE_THIS
8561 void* _GetPrefsData() { return &_prefsdata; }
8562
8564 bool Load([[maybe_unused]]twobyte prefsno = 0) override
8565 {
8566 _dataid.other.cmper = kPreferencesCmper; // right now overwritten by _FCPrefsBase::Load, but don't AssUMe
8567 _dataid.other.inci = 0;
8568 return __FCPrefsBase::Load(kPreferencesCmper); // Load fails in Finale 26.2+
8569 }
8570
8571#if FXT_VERSION >= FINALEVERSION_26_2
8573 template <std::size_t N>
8574 void SetFromFinale26_2(const EDTTieConnectStyle (&inp)[N])
8575 {
8576 static_assert(sizeof(inp) == sizeof(_prefsdata), "Size of Finale 26.2 EDTTieConnectStyle array does not match size of EDTTiePlacementPrefs.");
8577 memcpy(&_prefsdata, &inp, sizeof(_prefsdata));
8578 _loadedsize = DataSizeLoad();
8579 }
8580
8582 template <std::size_t N>
8583 void PutToFinale26_2(EDTTieConnectStyle (&outp)[N]) const
8584 {
8585 static_assert(sizeof(outp) == sizeof(_prefsdata), "Size of Finale 26.2 EDTTieConnectStyle array does not match size of EDTTiePlacementPrefs.");
8586 memcpy(&outp, &_prefsdata, sizeof(outp));
8587 }
8588#endif
8589#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
8590
8591 const char* ClassName() const override { return "FCTiePlacementPrefs"; }
8592 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_TIEPLACEMENTPREFS; }
8593
8599
8600 // *******
8601 // GETTERS
8602 // *******
8603
8613#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8615#else
8616 int
8617#endif
8618 placementtype
8619 ) const
8620 {
8621 if (!_ValidateIndex(placementtype)) return 0;
8622 return _prefsdata.placements[(int)placementtype].startHoriz;
8623 }
8624
8634#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8636#else
8637 int
8638#endif
8639 placementtype
8640 ) const
8641 {
8642 if (!_ValidateIndex(placementtype)) return 0;
8643 return _prefsdata.placements[(int)placementtype].startVert;
8644 }
8645
8655#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8657#else
8658 int
8659#endif
8660 placementtype
8661 ) const
8662 {
8663 if (!_ValidateIndex(placementtype)) return 0;
8664 return _prefsdata.placements[(int)placementtype].endHoriz;
8665 }
8666
8676#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8678#else
8679 int
8680#endif
8681 placementtype
8682 ) const
8683 {
8684 if (!_ValidateIndex(placementtype)) return 0;
8685 return _prefsdata.placements[(int)placementtype].endVert;
8686 }
8687
8688 // *******
8689 // SETTERS
8690 // *******
8691
8701#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8703#else
8704 int
8705#endif
8706 placementtype, Evpu16 offsetvalue)
8707 {
8708 if (!_ValidateIndex(placementtype)) return;
8709 _prefsdata.placements[(int)placementtype].startHoriz = offsetvalue;
8710 }
8711
8721#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8723#else
8724 int
8725#endif
8726 placementtype, Evpu16 offsetvalue)
8727 {
8728 if (!_ValidateIndex(placementtype)) return;
8729 _prefsdata.placements[(int)placementtype].startVert = offsetvalue;
8730 }
8731
8741#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8743#else
8744 int
8745#endif
8746 placementtype, Evpu16 offsetvalue)
8747 {
8748 if (!_ValidateIndex(placementtype)) return;
8749 _prefsdata.placements[(int)placementtype].endHoriz = offsetvalue;
8750 }
8751
8761#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8763#else
8764 int
8765#endif
8766 placementtype, Evpu16 offsetvalue)
8767 {
8768 if (!_ValidateIndex(placementtype)) return;
8769 _prefsdata.placements[(int)placementtype].endVert = offsetvalue;
8770 }
8771
8772};
8773
8783{
8784public:
8803private:
8804 bool _ValidateIndex(
8805#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8807#else
8808 int
8809#endif
8810 index) const
8811 {
8812 switch (index)
8813 {
8814 case TCONTOURIDX_SHORT:
8815 case TCONTOURIDX_MEDIUM:
8816 case TCONTOURIDX_LONG:
8818 return true;
8819 }
8820 return false;
8821 }
8822
8823 EDTTieContourPrefs _prefsdata;
8824
8825 EXTAG Tag() const override
8826 {
8827 // pf_TieContourPrefs was a pseudo-extag that is no longer supported as of the F26.2 PDK.
8828 // The extag here is what it translated to (with cmper kPreferencesCmper), however unfortunately
8829 // it does not work in Finale 26.2 or higher, so the direct Load/Save mechanism for this class is
8830 // deprecated starting in Finale 26.2. (See the Doxygen comment above for alternatives.)
8831 return MAKEEXTAG(MAKETAG(edMultiInciOther,5), '8', '6');
8832 }
8833
8834 int DataSizeLoad() const override { return sizeof(EDTTieContourPrefs); }
8835 void* Allocate() override { return (void*) &_prefsdata; }
8836
8841 void CloneMemoryFrom(__FCBaseData* pSource) override
8842 {
8843 memcpy(&_prefsdata, ((FCTieContourPrefs*)pSource)->_GetPrefsData(), sizeof(_prefsdata));
8844 _datablock = &_prefsdata;
8845 _loadedsize = sizeof(_prefsdata);
8846 }
8847
8848 __FCBaseData* CreateObject() override
8849 { return new FCTieContourPrefs(); }
8850public:
8851#ifndef DOXYGEN_SHOULD_IGNORE_THIS
8853 void* _GetPrefsData() { return &_prefsdata; }
8854
8856 bool Load([[maybe_unused]]twobyte prefsno = 0) override
8857 {
8858 _dataid.other.cmper = kPreferencesCmper; // right now overwritten by _FCPrefsBase::Load, but don't AssUMe
8859 _dataid.other.inci = 0;
8860 return __FCPrefsBase::Load(kPreferencesCmper); // Load fails in Finale 26.2+
8861 }
8862
8863#if FXT_VERSION >= FINALEVERSION_26_2
8865 template <std::size_t N>
8866 void SetFromFinale26_2(const EDTTieControlStyle (&inp)[N])
8867 {
8868 static_assert(sizeof(inp) == sizeof(_prefsdata.contours), "Size of Finale 26.2 EDTTieControlStyle array does not match size of EDTTieContourPrefs.");
8869 memcpy(&_prefsdata.contours, &inp, sizeof(_prefsdata.contours));
8870 _loadedsize = DataSizeLoad();
8871 }
8872
8874 template <std::size_t N>
8875 void PutToFinale26_2(EDTTieControlStyle (&outp)[N]) const
8876 {
8877 static_assert(sizeof(outp) == sizeof(_prefsdata.contours), "Size of Finale 26.2 EDTTieControlStyle array does not match size of EDTTieContourPrefs.");
8878 memcpy(&outp, &_prefsdata.contours, sizeof(outp));
8879 }
8880#endif
8881#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
8882
8883 const char* ClassName() const override { return "FCTieContourPrefs"; }
8884 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_TIECONTOURPREFS; }
8885
8891
8892 // *******
8893 // GETTERS
8894 // *******
8895
8902 Evpu16 GetSpan(
8903#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8905#else
8906 int
8907#endif
8908 index
8909 ) const
8910 {
8911 if (!_ValidateIndex(index)) return 0;
8912 return _prefsdata.contours[(int)index].span;
8913 }
8914
8922#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8924#else
8925 int
8926#endif
8927 index
8928 ) const
8929 {
8930 if (!_ValidateIndex(index)) return 0;
8931 float value = _prefsdata.contours[(int)index].insetRelativeLeft;
8932 value /= 2048;
8933 return value;
8934 }
8935
8943#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8945#else
8946 int
8947#endif
8948 index
8949 ) const
8950 {
8951 if (!_ValidateIndex(index)) return 0;
8952 return _prefsdata.contours[(int)index].insetRelativeLeft;
8953 }
8954
8962#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8964#else
8965 int
8966#endif
8967 index
8968 ) const
8969 {
8970 if (!_ValidateIndex(index)) return 0;
8971 return _prefsdata.contours[(int)index].heightLeft;
8972 }
8973
8981#ifndef PDK_FRAMEWORK_LUAFRIENDLY
8983#else
8984 int
8985#endif
8986 index) const
8987 {
8988 if (!_ValidateIndex(index)) return 0;
8989 return _prefsdata.contours[(int)index].insetFixedLeft;
8990 }
8991
8999#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9001#else
9002 int
9003#endif
9004 index) const
9005 {
9006 if (!_ValidateIndex(index)) return 0;
9007 float value = _prefsdata.contours[(int)index].insetRelativeRight;
9008 value /= 2048;
9009 return value;
9010 }
9011
9019#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9021#else
9022 int
9023#endif
9024 index) const
9025 {
9026 if (!_ValidateIndex(index)) return 0;
9027 return _prefsdata.contours[(int)index].insetRelativeRight;
9028 }
9029
9037#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9039#else
9040 int
9041#endif
9042 index) const
9043 {
9044 if (!_ValidateIndex(index)) return 0;
9045 return _prefsdata.contours[(int)index].heightRight;
9046 }
9047
9055#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9057#else
9058 int
9059#endif
9060 index) const
9061 {
9062 if (!_ValidateIndex(index)) return 0;
9063 return _prefsdata.contours[(int)index].insetFixedRight;
9064 }
9065
9066 // *******
9067 // SETTERS
9068 // *******
9069
9079#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9081#else
9082 int
9083#endif
9084 index, Evpu16 value)
9085 {
9086 if (!_ValidateIndex(index)) return;
9087 _prefsdata.contours[(int)index].span = value;
9088 }
9089
9099#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9101#else
9102 int
9103#endif
9104 index, float percentvalue)
9105 {
9106 if (!_ValidateIndex(index)) return;
9107 percentvalue *= 2048;
9108 _prefsdata.contours[(int)index].insetRelativeLeft = (twobyte) percentvalue;
9109 }
9110
9120#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9122#else
9123 int
9124#endif
9125 index, Evpu16 rawvalue)
9126 {
9127 if (!_ValidateIndex(index)) return;
9128 _prefsdata.contours[(int)index].insetRelativeLeft = rawvalue;
9129 }
9130
9140#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9142#else
9143 int
9144#endif
9145 index, Evpu16 value)
9146 {
9147 if (!_ValidateIndex(index)) return;
9148 _prefsdata.contours[(int)index].heightLeft = value;
9149 }
9150
9160#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9162#else
9163 int
9164#endif
9165 index, Evpu16 value)
9166 {
9167 if (!_ValidateIndex(index)) return;
9168 _prefsdata.contours[(int)index].insetFixedLeft = value;
9169 }
9170
9180#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9182#else
9183 int
9184#endif
9185 index, float percentvalue)
9186 {
9187 if (!_ValidateIndex(index)) return;
9188 percentvalue *= 2048;
9189 _prefsdata.contours[(int)index].insetRelativeRight = (twobyte) percentvalue;
9190 }
9191
9201#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9203#else
9204 int
9205#endif
9206 index, Evpu16 rawvalue)
9207 {
9208 if (!_ValidateIndex(index)) return;
9209 _prefsdata.contours[(int)index].insetRelativeRight = rawvalue;
9210 }
9211
9221#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9223#else
9224 int
9225#endif
9226 index, Evpu16 value)
9227 {
9228 if (!_ValidateIndex(index)) return;
9229 _prefsdata.contours[(int)index].heightRight = value;
9230 }
9231
9241#ifndef PDK_FRAMEWORK_LUAFRIENDLY
9243#else
9244 int
9245#endif
9246 index, Evpu16 value)
9247 {
9248 if (!_ValidateIndex(index)) return;
9249 _prefsdata.contours[(int)index].insetFixedRight = value;
9250 }
9251
9252};
9253
9264{
9265 union
9266 {
9267#if FXT_VERSION >= FINALEVERSION_26_2
9268 EDTTiePrefs26_2 _new;
9269#endif
9270 _FCEDTTiePrefs _old;
9271 } _prefsdata;
9272
9273 EXTAG Tag() const override
9274 {
9275#if FXT_VERSION >= FINALEVERSION_26_2
9276 if (_use26) return pf_TiePrefs26_2;
9277#endif
9278 return _fcpf_TiePrefs;
9279 }
9280
9281 int DataSizeLoad() const override
9282 {
9283#if FXT_VERSION >= FINALEVERSION_26_2
9284 if (_use26) return sizeof(_prefsdata._new);
9285#endif
9286 return sizeof(_prefsdata._old);
9287 }
9288
9289 void* Allocate() override { return (void*) _GetPrefsData(); }
9290
9295 void CloneMemoryFrom(__FCBaseData* pSource) override
9296 {
9297 memcpy(_GetPrefsData(), ((FCTiePrefs*)pSource)->_GetPrefsData(), DataSizeLoad());
9298 _datablock = _GetPrefsData();
9299 _loadedsize = DataSizeLoad();
9300 }
9301
9302 __FCBaseData* CreateObject() override
9303 { return new FCTiePrefs(); }
9304public:
9305#ifndef DOXYGEN_SHOULD_IGNORE_THIS
9307 void* _GetPrefsData() { return &_prefsdata; }
9308#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
9309
9315 {
9317 TIESECONDS_NONE = TIE_SCNDS_NONE,
9318
9320 TIESECONDS_SHIFTSTART = TIE_SCNDS_SHIFT_START,
9321
9323 TIESECONDS_SHIFTEND = TIE_SCNDS_SHIFT_END,
9324
9326 TIESECONDS_SHIFTBOTH = TIE_SCNDS_BOTH
9328
9344
9345
9361
9362 const char* ClassName() const override { return "FCTiePrefs"; }
9363 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_TIEPREFS; }
9364
9370
9375 Evpu16 GetThicknessRight() const { return _GET_PREFDATA1(thicknessRight); }
9376
9381 Evpu16 GetThicknessLeft() const { return _GET_PREFDATA1(thicknessLeft); }
9382
9387 bool GetBreakForTimeSigs() const { return _GET_PREFDATA1(breakForTimeSigs) != 0; }
9388
9393 bool GetBreakForKeySigs() const { return _GET_PREFDATA1(breakForKeySigs) != 0; }
9394
9399 Evpu16 GetTimeSigLeftHorizontalOffset() const { return _GET_PREFDATA1(breakTimeSigLeftHOffset); }
9400
9405 Evpu16 GetTimeSigRightHorizontalOffset() const { return _GET_PREFDATA1(breakTimeSigRightHOffset); }
9406
9411 Evpu16 GetKeySigLeftHorizontalOffset() const { return _GET_PREFDATA1(breakKeySigLeftHOffset); }
9412
9417 Evpu16 GetKeySigRightHorizontalOffset() const { return _GET_PREFDATA1(breakKeySigRightHOffset); }
9418
9423 Evpu16 GetSystemLeftHorizontalOffset() const { return _GET_PREFDATA1(sysBreakLeftHAdj); }
9424
9429 Evpu16 GetSystemRightHorizontalOffset() const { return _GET_PREFDATA1(sysBreakRightHAdj); }
9430
9439 Evpu16 GetExtraSystemStartSpace() const { return _GET_PREFDATA2(gutterTies, frontTieSepar); }
9440
9445 bool GetUseOuterPlacement() const { return _GET_PREFDATA1(useOuterPlacement) != 0; }
9446
9453 FLAG_16 GetSecondsPlacement() const { return _GET_PREFDATA1(secondsPlacement); }
9454
9461 twobyte GetChordDirectionType() const { return _GET_PREFDATA1(chordTieDirType); }
9462
9467 bool GetChordDirectionOpposingSeconds() const { return _GET_PREFDATA1(chordTieDirOpposingSeconds) != 0; }
9468
9475 twobyte GetMixedStemDirectionType() const { return _GET_PREFDATA1(mixedStemDirection); }
9476
9481 bool GetAfterSingleDot() const { return _GET_PREFDATA1(afterSingleDot) != 0; }
9482
9487 bool GetAfterMultipleDots() const { return _GET_PREFDATA1(afterMultipleDots) != 0; }
9488
9493 bool GetBeforeSingleAccidental() const { return _GET_PREFDATA1(beforeAcciSingleNote) != 0; }
9494
9499 bool GetAvoidStaffLines() const {return GetBitFlag(_GET_PREFDATA1(specialPosMode), 0x0002); }
9500
9505 Evpu16 GetAvoidStaffLinesDistance() const { return _GET_PREFDATA1(avoidStaffLinesDistance); }
9506
9513 bool GetFixedInsetStyle() const { return (_GET_PREFDATA1(insetStyle) == TIE_OPT_INSET_STYLE_FIXED); }
9514
9522 bool GetUseInterpolation() const { return _GET_PREFDATA1(useInterpolation) != 0; }
9523
9528 bool GetUseTieEndStyle() const { return _GET_PREFDATA1(useTieEndCtlStyle) != 0; }
9529
9535 bool GetAvoidStaffLinesOnly() const { return _GET_PREFDATA1(avoidStaffLinesOnly) != 0; }
9536
9541 fourbyte GetTipWidth() const { return _GET_PREFDATA1(tipWidth); }
9542
9547 void SetThicknessRight(Evpu16 value) { _SET_PREFDATA1(thicknessRight) = value; }
9548
9553 void SetThicknessLeft(Evpu16 value) { _SET_PREFDATA1(thicknessLeft) = value; }
9554
9559 void SetBreakForTimeSigs(bool state) { _SET_PRE