Finale PDK Framework 0.77
Power Up Your Finale Music Software
Loading...
Searching...
No Matches
ff_parts.h
1/*
2 * File: ff_parts.h
3 * Author: Jari Williamsson
4 *
5 * Created on den 22 mars 2011, 13:01
6 */
7
8#ifndef FF_PARTS_H
9#define FF_PARTS_H
10
11#include "ff_basecollection.h"
12#include "ff_othercollection.h"
13
14#ifndef DOXYGEN_SHOULD_IGNORE_THIS
15/* Undocumented - For internal use only */
16#include "pragma_align_begin.h"
17struct __XEDTPartDef
18{
19 CMPER nameID; // The EDTTextBlock2004 text block ID for the part's name.
20 utwobyte partOrder; // The unique order of the part that determines its tab
21 // order and position in the Edit Part submenu. (1-based)
22 twobyte copies; // The number of copies of the part to print.
23 FLAG_16 flags;
24 twobyte m_nSmartMusicInst; // The number of the SmartMusic instrument
25 // to use for this part.
26 twobyte m_DefaultNameStaffOrGroup; // Contains the cmper of the staff or
28};
29#include "pragma_align_end.h"
30
31
32const EXTAG xot_PartDef = MAKEEXTAG(edOther,'p','D');
33/* cmper = EPARTID; inci = 0 */
34
35const FLAG_16 __PARTDEF_PRINTPART = 0x0001;
36const FLAG_16 __PARTDEF_EXTRACTPART = 0x0002;
37const FLAG_16 __PARTDEF_APPLYFORMAT = 0x0004;
38const FLAG_16 __PARTDEF_NEEDS_RECALC = 0x0008; /* Need to call recalc()
39next time part is viewed */
40const FLAG_16 __PARTDEF_NEEDS_SPACING = 0x0010; /* Need to space music next
41time part is viewed */
42const FLAG_16 __PARTDEF_IS_NEW = 0x0020;
43const FLAG_16 __PARTDEF_IS_MODIFIED = 0x0040; /* A staff was added or
44deleted. Apply part creation prefs
45 // but don't do any other "New Part" stuff. */
46const FLAG_16 __PARTDEF_NAMEISDEFAULT = 0x0080; /* Part name is a default
47 staff or group name,
48 e.g. [Staff 1] or [Group 1]. */
49const FLAG_16 __PARTDEF_USE_AS_SMP_INST = 0x0100; /* This part will be
50 available as an item in SmartMusic's instrument list
51 when the file is opened in SmartMusic. */
52const FLAG_16 __PARTDEF_UNLINK_INSTS = 0x0200; /* Part's instrument
53settings are unlinked from the score's instrument settings. */
54
55/* XEDTVoicingDef
56 **
57 ** VD other for voiced linked parts.
58 **
59*/
60
61// *** voicingFlags definitions ****
62const FLAG_16 __VOICING_ENABLED = 0x0004; // If not set, use all notes from source (score)
63// staff else apply voicing rules below
64
65// VOICING_USE flags (mutually exclusive)
66const FLAG_16 __VOICING_USE_SINGLELAYER = 0x0000; // Use all notes from layer specified in 'layer'
67const FLAG_16 __VOICING_USE_MULTILAYER = 0x0001; // Use selected notes from multiple layers, depending on other flags.
68// (reserving 0x0002 and 0x0003 for future expansion)
69const FLAG_16 __VOICING_USEMASK = 0x0003;
70
71// VOICING_SINGLELAYER_ flags -- only apply if VOICING_USE_MULTILAYER selected
72const FLAG_16 __VOICING_SINGLELAYER_ALL = 0x0000; // If single layer, use all notes
73const FLAG_16 __VOICING_SINGLELAYER_TOP = 0x0008; // If single layer, use top note only
74const FLAG_16 __VOICING_SINGLELAYER_BOT = 0x0010; // If single layer, use bottom note only
75const FLAG_16 __VOICING_SINGLELAYER_SELECT = 0x0018; // If single layer, use selected notes
76// (reserving 0x0020 for future expansion)
77const FLAG_16 __VOICING_SINGLELAYER_MASK = 0x0038; // Mask for above values -- AND to flags and right-shift by 3 to compare to above values
78
79const FLAG_16 __VOICING_SINGLELAYER_SELECT_1ST = 0x0040; // If single layer and VOICING_SINGLELAYER_SELECT, use 1st note
80const FLAG_16 __VOICING_SINGLELAYER_SELECT_2ND = 0x0080; // If single layer and VOICING_SINGLELAYER_SELECT, use 2nd note
81const FLAG_16 __VOICING_SINGLELAYER_SELECT_3RD = 0x0100; // If single layer and VOICING_SINGLELAYER_SELECT, use 3rd note
82const FLAG_16 __VOICING_SINGLELAYER_SELECT_4TH = 0x0200; // If single layer and VOICING_SINGLELAYER_SELECT, use 4th note
83const FLAG_16 __VOICING_SINGLELAYER_SELECT_5TH = 0x0400; // If single layer and VOICING_SINGLELAYER_SELECT, use 5th note
84const FLAG_16 __VOICING_SINGLELAYER_SELECT_FROMBOTTOM = 0x2000; // If bit set, the above applies from bottom of entry, otherwise from top
85const FLAG_16 __VOICING_SINGLELAYER_SELECT_SINGLENOTE = 0x1000; // If bit set, include single note passages in this part, regardless of above rules
86
87#include "pragma_align_begin.h"
88struct __XEDTVoicingDef
89{
90 FLAG_16 voicingFlags; // see flag definitions, above
91 eLayer singleLayer; // Which single layer to take notes from, if VOICING_USE_SINGLELAYER is set, ignored otherwise
92 eLayer multiLayer; // Which layer to take notes from, if VOICING_USEMULTIPLELAYERS and multiple layers are present
93private:
94 twobyte AAAA;
95 twobyte BBBB;
96 twobyte CCCC;
97
98public:
99 __XEDTVoicingDef() : voicingFlags(0), singleLayer(0), multiLayer(0), AAAA(0), BBBB(0), CCCC(0) {}
100};
101#include "pragma_align_end.h"
102
103const EXTAG xot_VoicingDef = MAKEEXTAG(edOther,'V','D');
104/* cmper = inst ID (1-based), unshared and only in part, incident = 0 */
105
106#endif
107
108
119{
120#ifndef DOXYGEN_SHOULD_IGNORE_THIS
121private:
122 __XEDTPartDef _partdata;
123 FCString _astring;
124 EPARTID _partid;
125 EDOCID _documentid;
126 EPARTID _previouspart;
127
128 EXTAG Tag() const override { return xot_PartDef; }
129
130 int DataSizeLoad() const override { return sizeof(_partdata); }
131 void* Allocate() override { return (void*) &_partdata; }
132
137 void CloneMemoryFrom(__FCBaseData* pSource) override
138 {
139 memcpy(&_partdata, ((FCPart*)pSource)->_GetDataPtr(), sizeof(_partdata));
140 _datablock = &_partdata;
141 _loadedsize = sizeof(_partdata);
142 }
143
145 __FCBaseData* CreateObject() override
146 {
147 return new FCPart();
148 }
149
150#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
151
152public:
169public:
170
171 const char* ClassName() const override { return "FCPart"; }
172 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_PART; }
173
174#ifndef DOXYGEN_SHOULD_IGNORE_THIS
178 void* _GetDataPtr() { return &_partdata; }
179#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
180
181
189 FCPart(EPARTID partid = PARTID_CURRENT) : __FCNoInciOther() {
190 if (partid == PARTID_CURRENT) {
191 partid = FX_GetCurrentPartID();
192 }
193 _partid = partid;
194 _documentid = FX_GetCurrentEnigmaDocument();
195 _previouspart = PARTID_UNKNOWN;
196 memset(&_partdata, 0, sizeof(_partdata));
197 }
198
201 virtual ~FCPart() {
202#ifdef PDK_FRAMEWORK_DIAGNOSE
203 if (_previouspart != PARTID_UNKNOWN) {
204 DebugOut("FCPart::SwitchTo() has been called without a FCPart::SwitchBack()!!!");
205 }
206#endif
207 }
208
214 EPARTID GetID() const {
215 return _partid;
216 }
217
218
231
232#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
234 luabridge::RefCountedPtr<FCString> CreateCustomTextString_GC()
235 { return makeLuaSharedPtr(CreateCustomTextString()); }
236#endif
237
245 bool DeleteCustomText();
246
257 bool SaveCustomTextString(FCString* pString);
258
259
266 EDOCID GetDocumentID() const {
267 return _documentid;
268 }
269
276 bool SetID(FCPart* pPart) {
277 if (_previouspart != PARTID_UNKNOWN) return false;
278 _partid = pPart->GetID();
279 _documentid = FX_GetCurrentEnigmaDocument();
280 _previouspart = PARTID_UNKNOWN;
281 return true;
282 }
283
292 bool SwitchTo() {
293 if (!IsCurrentDocument()) return false;
294 if (_previouspart != PARTID_UNKNOWN) return false;
295 _previouspart = FX_GetCurrentPartID();
296 FX_SetCurrentPartID(_partid);
297 return true;
298 }
299
309 {
310 if (_previouspart == PARTID_UNKNOWN) return false;
311 if (!IsCurrentDocument()) return false;
312 FX_SetCurrentPartID(_previouspart);
313 _previouspart = PARTID_UNKNOWN;
314 return true;
315 }
316
324 if (!IsCurrentDocument()) return false;
325 FX_SetCurrentPartInView(_partid);
326 return true;
327 }
328
334 bool IsStaffIncluded(int staffno);
335
341 bool IsScore() {
342 return GetID() == PARTID_SCORE;
343 }
344
350 bool IsPart() {
351 return GetID() != PARTID_SCORE;
352 }
353
354
360 bool IsCurrent() {
361 if (_partid != FX_GetCurrentPartID()) return false;
362 if (!IsCurrentDocument()) return false;
363 return true;
364 }
365
373 return (_documentid == FX_GetCurrentEnigmaDocument());
374 }
375
383 bool HasCustomText() const { return (_partdata.nameID != 0); }
384
386 bool IsIdentical(const __FCBase* pCompareObject) const override {
387 if (!__FCBase::IsIdentical(pCompareObject)) return false;
388 const FCPart* pComparePart = dynamic_cast<const FCPart*>(pCompareObject);
389 if (!pComparePart) return false;
390 if (GetID() != pComparePart->GetID()) return false;
391 if (GetDocumentID() != pComparePart->GetDocumentID()) return false;
392 return true;
393 }
394
404 {
405 if (_previouspart != PARTID_UNKNOWN) return false;
406 _documentid = FX_GetCurrentEnigmaDocument();
407 _partid = FX_GetCurrentPartID();
408 _previouspart = PARTID_UNKNOWN;
409 return true;
410 }
411
424 void GetName(FCString* pString);
425
430 bool GetShouldPrint() const { return GetBitFlag(_partdata.flags, __PARTDEF_PRINTPART); }
431
436 bool GetShouldExtract() const { return GetBitFlag(_partdata.flags, __PARTDEF_EXTRACTPART); }
437
445 bool GetShouldUpdateLayout() const { return GetBitFlag(_partdata.flags, __PARTDEF_NEEDS_RECALC); }
446
454 bool GetShouldUpdateSpacing() const { return GetBitFlag(_partdata.flags, __PARTDEF_NEEDS_SPACING); }
455
460 bool GetUnlinkedInstrument() const { return GetBitFlag(_partdata.flags, __PARTDEF_UNLINK_INSTS); }
461
470 utwobyte GetOrderID() const { return _partdata.partOrder; }
471
476 twobyte GetPrintCopies() const { return _partdata.copies; }
477
482 void SetShouldPrint(bool state) { Set16BitFlag(&_partdata.flags, __PARTDEF_PRINTPART, state); }
483
488 void SetShouldExtract(bool state) { Set16BitFlag(&_partdata.flags, __PARTDEF_EXTRACTPART, state); }
489
497 void SetShouldUpdateLayout(bool state) { Set16BitFlag(&_partdata.flags, __PARTDEF_NEEDS_RECALC, state); }
498
506 void SetShouldUpdateSpacing(bool state) { Set16BitFlag(&_partdata.flags, __PARTDEF_NEEDS_SPACING, state); }
507
512 void SetUnlinkedInstrument(bool state) { Set16BitFlag(&_partdata.flags, __PARTDEF_UNLINK_INSTS, state); }
513
524 void SetOrderID(utwobyte idvalue)
525 {
526 if (idvalue < 1) return;
527 if (IsScore()) return;
528 _partdata.partOrder = idvalue;
529 }
530
535 void SetPrintCopies(twobyte value) { _partdata.copies = value; }
536
548 bool Print(FCPrintSettings* pSettings);
549
550#ifdef PDK_FRAMEWORK_DEBUG
551
552 void DebugDump() override {
554 DebugOutInt("Part ID: ", GetID());
555 FCString astring;
556 GetName(&astring);
557 DebugOutString("Part name: ", astring.GetCString());
558 }
559#endif
560};
561
572class FCParts : public __FCCollection {
573public:
580 {
581 }
582
583 const char* ClassName() const override {
584 return "FCParts";
585 }
586
593 int LoadAll();
594
597 int ForEachWithScope(FCIteratorHandler* pIterator);
598
607
614 {
615 FCPart* pPart = GetCurrent();
616 if (!pPart) return -1;
617 return GetIndexOf(pPart);
618 }
619
627 FCPart* GetScore();
628
637 static int CountPartsOnly()
638 {
639 return FX_CountParts();
640 }
641
646 FCPart* GetItemAt(int index) const { return (FCPart*) __FCCollection::GetItemAt(index); }
647
653 void SortByOrderID();
654
665 FCPart* FindPart(FCPart* pPartFind)
666 {
667 if (!pPartFind) return NULL;
668 for (int i = 0; i < GetCount(); i++)
669 {
670 FCPart* pPart = GetItemAt(i);
671 if (pPart->GetDocumentID() != pPartFind->GetDocumentID()) continue;
672 if (pPart->GetID() != pPartFind->GetID()) continue;
673 return pPart;
674 }
675 return NULL;
676 }
677
682 FCPart* FindID(EPARTID partid)
683 {
684 for (int i = 0; i < GetCount(); i++)
685 {
686 FCPart* pPart = GetItemAt(i);
687 if (pPart->GetID() != partid) continue;
688 return pPart;
689 }
690 return NULL;
691 }
692
701 static bool GenerateParts()
702 {
703#if FXT_VERSION >= FINALEVERSION_26_1
704 return FX_GenerateParts();
705#else
706 return false;
707#endif
708 }
709};
710
711
724{
725#ifndef DOXYGEN_SHOULD_IGNORE_THIS
726private:
727 __XEDTVoicingDef _voicingdata;
728
729 EXTAG Tag() const override { return xot_VoicingDef; }
730
731 int DataSizeLoad() const override { return sizeof(_voicingdata); }
732 void* Allocate() override { return _GetDataPtr(); }
733
738 void CloneMemoryFrom(__FCBaseData* pSource) override
739 {
740 FCPartStaffVoicing * pSourceTyped = dynamic_cast<FCPartStaffVoicing *>(pSource);
741 if (! pSourceTyped) return;
742 memcpy(_GetDataPtr(), pSourceTyped->_GetDataPtr(), DataSizeLoad());
743 _datablock = _GetDataPtr();
745 }
746
748 __FCBaseData* CreateObject() override
749 {
750 return new FCPart();
751 }
752
753#endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
754
755public:
767
785
797public:
798
799 const char* ClassName() const override { return "FCPartStaffVoicing"; }
800 const PDKFRAMEWORK_CLASSID GetClassID() const override { return FCID_PARTSTAFFVOICING; }
801
802#ifndef DOXYGEN_SHOULD_IGNORE_THIS
806 void* _GetDataPtr() { return &_voicingdata; }
807#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
808
809
815 {
816 memset(&_voicingdata, 0, sizeof(_voicingdata));
817 }
818
823 bool GetIsVoicingEnabled() const {
824 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_ENABLED);
825 }
826
831 void SetIsVoicingEnabled(bool value) {
832 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_ENABLED, value);
833 }
834
841#ifndef PDK_FRAMEWORK_LUAFRIENDLY
843#else
844 int
845#endif
847 return static_cast<PARTWILLDISPLAY>(_voicingdata.voicingFlags & __VOICING_USEMASK);
848 }
849
857#ifndef PDK_FRAMEWORK_LUAFRIENDLY
859#else
860 int
861#endif
862 value
863 )
864 {
865 _voicingdata.voicingFlags &= ~__VOICING_USEMASK;
866 _voicingdata.voicingFlags |= value;
867 }
868
876 return _voicingdata.singleLayer + 1;
877 }
878
885 void SetSingleLayerNumber(int value) {
886 _voicingdata.singleLayer = value - 1;
887 }
888
897#ifndef PDK_FRAMEWORK_LUAFRIENDLY
899#else
900 int
901#endif
903 return static_cast<VOICINGLAYERRULES>((_voicingdata.voicingFlags & __VOICING_SINGLELAYER_MASK) >> 3);
904 }
905
915#ifndef PDK_FRAMEWORK_LUAFRIENDLY
917#else
918 int
919#endif
920 value
921 )
922 {
923 _voicingdata.voicingFlags &= ~__VOICING_SINGLELAYER_MASK;
924 _voicingdata.voicingFlags |= value << 3;
925 }
926
934 return _voicingdata.multiLayer + 1;
935 }
936
943 void SetMultipleLayerNumber(int value) {
944 _voicingdata.multiLayer = value - 1;
945 }
946
955 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_1ST);
956 }
957
965 void SetSingleLayerSelect1st(bool value) {
966 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_1ST, value);
967 }
968
977 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_2ND);
978 }
979
987 void SetSingleLayerSelect2nd(bool value) {
988 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_2ND, value);
989 }
990
999 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_3RD);
1000 }
1001
1009 void SetSingleLayerSelect3rd(bool value) {
1010 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_3RD, value);
1011 }
1012
1021 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_4TH);
1022 }
1023
1031 void SetSingleLayerSelect4th(bool value) {
1032 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_4TH, value);
1033 }
1034
1043 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_5TH);
1044 }
1045
1053 void SetSingleLayerSelect5th(bool value) {
1054 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_5TH, value);
1055 }
1056
1066#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1068#else
1069 int
1070#endif
1072 if (GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_FROMBOTTOM))
1075 }
1076
1087#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1089#else
1090 int
1091#endif
1092 value
1093 )
1094 {
1095 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_FROMBOTTOM, value == VCOUNTNOTES_FROM_THE_BOTTOM);
1096 }
1097
1106 return GetBitFlag(_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_SINGLENOTE);
1107 }
1108
1117 Set16BitFlag(&_voicingdata.voicingFlags, __VOICING_SINGLELAYER_SELECT_SINGLENOTE, value);
1118 }
1119
1120#ifdef PDK_FRAMEWORK_DEBUG
1121 void DebugDump() override {
1123 }
1124#endif
1125};
1126
1127#endif /* FF_PARTS_H */
1128
Base class for all data-related classes (that handles Finale data).
Definition ff_base.h:676
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass.
Definition ff_base.h:695
virtual int DataSizeLoad() const =0
Returns the data size for the data structure that should be loaded.
virtual EXTAG Tag() const =0
The Enigma tag for the derived class.
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition finaleframework.cpp:838
virtual void * Allocate()=0
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition ff_base.h:708
Base class for the Finale Framework classes.
Definition ff_base.h:71
static void DebugOutString(const char *pszPrefixText, const char *thestring)
Static method that outputs a line for debugging purposes (C string version). The text appears with th...
Definition finaleframework.cpp:436
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag.
Definition finaleframework.cpp:635
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition ff_base.h:84
virtual bool IsIdentical(const __FCBase *pCompareObject) const
Returns true if the data in the passed object is considered to be identical to the current object,...
Definition ff_base.h:539
static void DebugOutInt(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in d...
Definition finaleframework.cpp:335
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition finaleframework.cpp:526
bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits) const
Gets a state from flag bits. Returns true if any bit in the mask is set.
Definition ff_base.h:485
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:609
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition ff_basecollection.h:26
int GetIndexOf(__FCBase *pObject) const
Returns the 0-based order index for the object within the collection.
Definition finaleframework.cpp:13775
int GetCount() const
Returns the number of elements of the collection.
Definition ff_basecollection.h:102
__FCBase * GetItemAt(int index) const
Returns the object at the index position. Index is 0-based.
Definition finaleframework.cpp:13767
Base class for the "Other" (ot_*) Enigma structures that don't use the inci parameter.
Definition ff_other.h:231
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_other.h:349
Class for iterator handlers.
Definition ff_iterator.h:26
Class that represents one linked part in a document. The class also provides methods to switch betwee...
Definition ff_parts.h:119
bool SetID(FCPart *pPart)
Sets up the object's part ID to be assigned to another part.
Definition ff_parts.h:276
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_parts.h:172
FCPart(EPARTID partid=PARTID_CURRENT)
The constructor. Sets the basic data for the part.
Definition ff_parts.h:189
void SetShouldPrint(bool state)
Sets if the part should print or not.
Definition ff_parts.h:482
bool IsIdentical(const __FCBase *pCompareObject) const override
Overridden method to provide comparison mechanism for parts.
Definition ff_parts.h:386
bool SwitchBack()
Switches back yo the "original" current part, that was in focus at the call to SwitchTo.
Definition ff_parts.h:308
bool GetShouldExtract() const
Returns if the part should be checked for part extraction.
Definition ff_parts.h:436
PREDEFINED_PARTIDS
Predefined constants for part IDs.
Definition ff_parts.h:159
@ PARTID_SCORE
Definition ff_parts.h:161
@ PARTID_CURRENT
Definition ff_parts.h:164
@ PARTID_UNKNOWN
Definition ff_parts.h:167
bool GetShouldPrint() const
Returns if the part should print or not.
Definition ff_parts.h:430
EDOCID GetDocumentID() const
Returns the internal document ID that is connected to the part.
Definition ff_parts.h:266
bool GetShouldUpdateSpacing() const
Returns if the part is marked for a required music spacing update.
Definition ff_parts.h:454
bool DeleteCustomText()
Deletes the custom text, resulting in the part using only default part names.
Definition finaleframework.cpp:32299
bool IsCurrent()
Returns true if the part is the very same as the current part in the editing focus.
Definition ff_parts.h:360
void SetShouldUpdateSpacing(bool state)
Sets if the part is marked for a required music spacing update.
Definition ff_parts.h:506
bool Print(FCPrintSettings *pSettings)
Quick-access method to print only one part in the currently active document.
Definition finaleframework.cpp:32363
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_parts.h:171
bool GetUnlinkedInstrument() const
Returns if the part's instrument info is unlinked for the part.
Definition ff_parts.h:460
bool SetCurrent()
Maps the part to the part/document currently in focus.
Definition ff_parts.h:403
FCString * CreateCustomTextString()
Creates the raw string part name as a FCString object, for the parts that doesn't use the default-gen...
Definition finaleframework.cpp:32291
twobyte GetPrintCopies() const
Returns the number of print copies for the part.
Definition ff_parts.h:476
bool HasCustomText() const
Returns true if part name is a custom text.
Definition ff_parts.h:383
EPARTID GetID() const
Returns the internal part ID.
Definition ff_parts.h:214
bool GetShouldUpdateLayout() const
Returns if the part is marked for a required layout update.
Definition ff_parts.h:445
utwobyte GetOrderID() const
Returns the part's internal (1-based) order ID.
Definition ff_parts.h:470
void SetShouldUpdateLayout(bool state)
Sets if the part is marked for a required layout update.
Definition ff_parts.h:497
void GetName(FCString *pString)
Returns the local string object that stores the part string.
Definition finaleframework.cpp:32329
void SetPrintCopies(twobyte value)
Sets the number of print copies for the part.
Definition ff_parts.h:535
bool ViewInDocument()
Switch the document display to another part.
Definition ff_parts.h:323
bool SwitchTo()
Sets the focus to this part (but does not set it in view).
Definition ff_parts.h:292
bool IsPart()
Returns true if the part is a part (and not the score).
Definition ff_parts.h:350
void SetUnlinkedInstrument(bool state)
Sets if the part's instrument info is unlinked for the part.
Definition ff_parts.h:512
bool IsCurrentDocument()
Returns true if the document connected with the part in the object is the current document.
Definition ff_parts.h:372
bool IsStaffIncluded(int staffno)
Returns true if the staff number is included in the part.
Definition finaleframework.cpp:32351
virtual ~FCPart()
The destructor. Checks if SwitchBack has been called (if PDK_FRAMEWORK_DIAGNOSE has been defined).
Definition ff_parts.h:201
void SetOrderID(utwobyte idvalue)
Sets the part's internal (1-based) order ID. Use with care!!!
Definition ff_parts.h:524
bool IsScore()
Returns true if the part is the score.
Definition ff_parts.h:341
void SetShouldExtract(bool state)
Sets if the part should be checked for part extraction.
Definition ff_parts.h:488
bool SaveCustomTextString(FCString *pString)
Saves the raw Enigma string as a custom text.
Definition finaleframework.cpp:32308
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_parts.h:552
Class that represents the Voicing information for a single staff in a part.
Definition ff_parts.h:724
bool GetSingleLayerSelect3rd() const
If true, uses the 3rd note in a single layer.
Definition ff_parts.h:998
bool GetSingleLayerSelect2nd() const
If true, uses the 2nd note in a single layer.
Definition ff_parts.h:976
void SetIsVoicingEnabled(bool value)
Sets whether the staff has Voicing enabled.
Definition ff_parts.h:831
VOICINGCOUNTNOTES GetCountNotesRule() const
Returns the rule for "Count Notes".
Definition ff_parts.h:1071
void SetWillDisplay(PARTWILLDISPLAY value)
Sets the value for "This Staff in This Part Will Display".
Definition ff_parts.h:856
bool GetSingleLayerSelect1st() const
If true, uses the 1st note in a single layer.
Definition ff_parts.h:954
void SetIncludeSingleNotePassages(bool value)
Sets whether to include single-note passages.
Definition ff_parts.h:1116
bool GetSingleLayerSelect4th() const
If true, uses the 4th note in a single layer.
Definition ff_parts.h:1020
bool GetSingleLayerSelect5th() const
If true, uses the 5th note in a single layer.
Definition ff_parts.h:1042
PARTWILLDISPLAY
Predefined constants for "will display" rules.
Definition ff_parts.h:760
@ PARTDISP_SELECTED_NOTES_MULTIPLE_LAYERS
Definition ff_parts.h:765
@ PARTDISP_ALLNOTES_IN_SINGLE_LAYER
Definition ff_parts.h:762
void SetSingleLayerSelect3rd(bool value)
Sets whether to use the 3rd note in a single layer.
Definition ff_parts.h:1009
VOICINGCOUNTNOTES
Predefined constants for how to count notes when selecting notes.
Definition ff_parts.h:790
@ VCOUNTNOTES_FROM_THE_BOTTOM
Definition ff_parts.h:795
@ VCOUNTNOTES_FROM_THE_TOP
Definition ff_parts.h:792
void SetSingleLayerSelect1st(bool value)
Sets whether to use the 1st note in a single layer.
Definition ff_parts.h:965
void SetSingleLayerSelect5th(bool value)
Sets whether to use the 5th note in a single layer.
Definition ff_parts.h:1053
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_parts.h:1121
bool GetIncludeSingleNotePassages() const
If true, include single-note passages.
Definition ff_parts.h:1105
void SetSingleLayerNumber(int value)
Sets the 1-based single layer number from which to display notes.
Definition ff_parts.h:885
void SetSingleLayerSelect4th(bool value)
Sets whether to use the 4th note in a single layer.
Definition ff_parts.h:1031
int GetSingleLayerNumber() const
Returns the 1-based single layer number from which to display notes.
Definition ff_parts.h:875
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_parts.h:800
bool GetIsVoicingEnabled() const
Returns true if the staff has Voicing enabled.
Definition ff_parts.h:823
FCPartStaffVoicing()
The constructor. Sets the basic data for the part.
Definition ff_parts.h:814
void SetCountNotesRule(VOICINGCOUNTNOTES value)
Sets the rule for "Count Notes".
Definition ff_parts.h:1086
void SetSingleLayerSelect2nd(bool value)
Sets whether to use the 2nd note in a single layer.
Definition ff_parts.h:987
VOICINGLAYERRULES GetSingleLayerDisplayRule() const
Returns the value for "In Measures Containing a Single Layer, Display".
Definition ff_parts.h:902
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_parts.h:799
void SetSingleLayerDisplayRule(VOICINGLAYERRULES value)
Sets the value for "In Measures Containing a Single Layer, Display".
Definition ff_parts.h:914
void SetMultipleLayerNumber(int value)
Sets the 1-based layer number from which to display notes when there are multiple layers.
Definition ff_parts.h:943
PARTWILLDISPLAY GetWillDisplay() const
Returns the value for "This Staff in This Part Will Display".
Definition ff_parts.h:846
VOICINGLAYERRULES
Predefined constants for "In Measures Containing a Single Layer, Display* rules.
Definition ff_parts.h:772
@ VOICINGLAYERRULE_TOP_NOTE
Definition ff_parts.h:777
@ VOICINGLAYERRULE_SELECTED_NOTES
Definition ff_parts.h:783
@ VOICINGLAYERRULE_ALL_NOTES
Definition ff_parts.h:774
@ VOICINGLAYERRULE_BOTTOM_NOTE
Definition ff_parts.h:780
int GetMultipleLayerNumber() const
Returns the 1-based layer number from which to display notes when there are multiple layers.
Definition ff_parts.h:933
Collection class for FCPart objects.
Definition ff_parts.h:572
FCPart * GetScore()
Returns the score object from the collection.
Definition finaleframework.cpp:32448
int ForEachWithScope(FCIteratorHandler *pIterator)
Works like ForEach, but sets each part into scope before calling the Iterate handler method.
Definition finaleframework.cpp:32414
static bool GenerateParts()
Static function that generates linked parts in the current document. It deletes any linked parts that...
Definition ff_parts.h:701
int LoadAll()
Loads all parts (including the "score part") for the document.
Definition finaleframework.cpp:32395
FCPart * GetItemAt(int index) const
Definition ff_parts.h:646
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_parts.h:583
static int CountPartsOnly()
Returns the number of available parts in the active document, without loading any parts....
Definition ff_parts.h:637
FCParts()
The construtor.
Definition ff_parts.h:579
FCPart * FindID(EPARTID partid)
Finds a part by matching against a part ID.
Definition ff_parts.h:682
void SortByOrderID()
Sorts the loaded collection by order ID, which will result in the same order as in the parts definiti...
Definition finaleframework.cpp:32476
FCPart * FindPart(FCPart *pPartFind)
Finds a part by matching against a FCPart object.
Definition ff_parts.h:665
FCPart * GetCurrent()
Returns a pointer to the element in the parts collection that is the "current" part (that has the dat...
Definition finaleframework.cpp:32438
int GetCurrentIndex()
Returns the 0-based index to the element in the parts collection that is the "current" part (that has...
Definition ff_parts.h:613
Class containing printing settings (and the ability to print documents).
Definition ff_base.h:4969
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
const char * GetCString() const
Returns a C-string version of the string.
Definition finaleframework.cpp:1338