18 bool _workaround2012bug;
21 int _GetNumChars()
const
24 const T* pData =
reinterpret_cast<T*
>(
_datablock);
25 while (length > 0 && !pData[length-1]) length--;
34 _dataid.text.rawTextNumber = number;
52 const char*
ClassName()
const override {
return "FCRawText"; }
55#ifndef DOXYGEN_SHOULD_IGNORE_THIS
101#ifndef DOXYGEN_SHOULD_IGNORE_THIS
108#ifdef PDK_FRAMEWORK_LUAFRIENDLY
109 throw std::runtime_error(
"invalid value for raw text type");
150#ifndef PDK_FRAMEWORK_LUAFRIENDLY
164 return _GetNumChars<eUniChar16>();
165 return _GetNumChars<char>();
172 bool Load(twobyte number);
187 bool SaveAs(twobyte number);
228#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
230 luabridge::RefCountedPtr<FCString> CreateString_GC()
const
254#ifdef PDK_FRAMEWORK_DEBUG
282 EXTAG
Tag()
const override {
return 0; }
284 const char*
ClassName()
const override {
return "__FCOtherText"; }
293 EXTAG Tag()
const override {
return ot_EndingRepeatText; }
295 const char*
ClassName()
const override {
return "FCEndingRepeatText"; }
302 EXTAG Tag()
const override {
303#if FXT_VERSION >= FINALEVERSION_25_3
305 return ot_RepeatStaffListName;
307 return ot_StaffListName;
311 bool HasUnicodeSupport()
const override;
314 const char*
ClassName()
const override {
return "FCStaffListText"; }
320const EXTAG __ot_CategoryStaffListName = MAKEEXTAG(edOther,
'C',
'L');
325 EXTAG Tag()
const override {
return __ot_CategoryStaffListName; }
326 bool HasUnicodeSupport()
const override {
return false; }
328 const char*
ClassName()
const override {
return "FCCategoryStaffListText"; }
333const EXTAG __ot_StaffAssignStaffListName = MAKEEXTAG(edOther,
'S',
'l');
338 EXTAG Tag()
const override {
return __ot_StaffAssignStaffListName; }
339 bool HasUnicodeSupport()
const override {
return false; }
341 const char*
ClassName()
const override {
return "FCStaffListStaffAssignText"; }
347 EXTAG
Tag()
const override {
return ot_TextRepeatStyleText; }
349 const char*
ClassName()
const override {
return "FCTextRepeatText"; }
356 EXTAG
Tag()
const override {
return ot_PercussionMapTitle; }
358 const char*
ClassName()
const override {
return "FCPercussionLayoutNotesText"; }
365 EXTAG
Tag()
const override {
return ot_InstDefinitionName; }
367 const char*
ClassName()
const override {
return "FCInstrumentDefText"; }
374 EXTAG
Tag()
const override {
return tx_BookMark; }
376 const char*
ClassName()
const override {
return "FCBookmarkText"; }
386 EXTAG
Tag()
const override = 0;
387 const char*
ClassName()
const override {
return "__FCLyricsBase"; }
433#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
435 luabridge::RefCountedPtr<FCFontInfo> CreateSyllableFontInfo_GC(
int syllableindex,
int searchfromindex = 0)
const
474 EXTAG
Tag()
const override {
return tx_VerseLyric; }
476 const char*
ClassName()
const override {
return "FCVerseLyricsText"; }
486 EXTAG
Tag()
const override {
return tx_SectionLyric; }
488 const char*
ClassName()
const override {
return "FCSectionLyricsText"; }
498 EXTAG
Tag()
const override {
return tx_ChorusLyric; }
500 const char*
ClassName()
const override {
return "FCChorusLyricsText"; }
504#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
518#ifndef DOXYGEN_SHOULD_IGNORE_THIS
524 bool _LoadWrapper(twobyte number)
526 if (!
Load(number))
return false;
528 if (!pString)
return true;
536 EXTAG
Tag()
const override {
return tx_FileInfo; }
538 const char*
ClassName()
const override {
return "FCFileInfoText"; }
540#ifndef DOXYGEN_SHOULD_IGNORE_THIS
541 const twobyte GetID_Title() {
return 1; }
542 const twobyte GetID_Subtitle() {
return 7; }
543 const twobyte GetID_Composer() {
return 2; }
544 const twobyte GetID_Arranger() {
return 6; }
545 const twobyte GetID_Lyricist() {
return 5; }
546 const twobyte GetID_Copyright() {
return 3; }
547 const twobyte GetID_Description() {
return 4; }
554 bool LoadTitle() {
return _LoadWrapper(GetID_Title()); }
Base class for all data-related classes (that handles Finale data).
Definition ff_base.h:676
EXTAG GetCustomTag() const
Returns the custom Enigma tag, if any.
Definition ff_base.h:870
EDataID _dataid
The EdataID for the last loaded/saved object.
Definition ff_base.h:712
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass.
Definition ff_base.h:695
virtual EXTAG Tag() const =0
The Enigma tag for the derived class.
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_base.h:1006
virtual bool LoadNext()
Loads the next element from the database, if any.
Definition finaleframework.cpp:980
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
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition ff_base.h:84
The base class for all lyrics text classes.
Definition ff_text.h:384
FCFontInfo * CreateSyllableFontInfo(int syllableindex, int searchfromindex=0) const
Creates a font info object for the start of the syllable.
Definition finaleframework.cpp:4539
bool GetSyllableText(FCString *pString, int syllableno) const
Returns the plain syllable text without hyphen, space, or formatting.
Definition finaleframework.cpp:4574
EXTAG Tag() const override=0
The Enigma tag for the derived class.
int CalcSyllableOffset(int syllableindex, int searchfromindex=0) const
Get the character offset of a syllable from the beginning of the raw text.
Definition finaleframework.cpp:4519
bool GetSyllableRange(FCRange *pRange, int syllableindex, int searchfromindex=0) const
Returns the range of characters of the syllable.
Definition finaleframework.cpp:4559
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:387
The base class for text classes that loads from 'other' (not as regular raw text).
Definition ff_text.h:274
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:282
twobyte GetItemNo() const override
Gets the item number for the text.
Definition ff_text.h:287
void SetRawTextNumber(twobyte number) override
Definition ff_text.h:277
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:284
Text used for a bookmarks. Please refer to the FCBookmark class.
Definition ff_text.h:372
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:374
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:376
The class for chorus lyrics texts.
Definition ff_text.h:496
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:498
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:500
Text in repeat endings.
Definition ff_text.h:292
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:295
The class for file information text fields.
Definition ff_text.h:517
bool SaveAsDescription()
Saves the text as the "Description" in the File Info text.
Definition ff_text.h:639
bool LoadSubtitle()
Loads the subtitle File Info text.
Definition ff_text.h:560
bool LoadCopyright()
Loads the copyright File Info text.
Definition ff_text.h:584
bool LoadArranger()
Loads the arranger File Info text.
Definition ff_text.h:572
bool LoadDescription()
Loads the description File Info text.
Definition ff_text.h:590
bool SaveAsArranger()
Saves the text as the "Arranger" in the File Info text.
Definition ff_text.h:618
bool LoadTitle()
Loads the title File Info text.
Definition ff_text.h:554
bool SaveAsTitle()
Saves the text as the "Title" in the File Info text.
Definition ff_text.h:597
bool SaveAsLyricist()
Saves the text as the "Lyricist" in the File Info text.
Definition ff_text.h:625
bool LoadLyricist()
Loads the lyricist File Info text.
Definition ff_text.h:578
bool SaveAsSubtitle()
Saves the text as the "Subtitle" in the File Info text.
Definition ff_text.h:604
bool LoadComposer()
Loads the composer File Info text.
Definition ff_text.h:566
bool SaveAsComposer()
Saves the text as the "Composer" in the File Info text.
Definition ff_text.h:611
bool SaveAsCopyright()
Saves the text as the "Copyright" in the File Info text.
Definition ff_text.h:632
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:536
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:538
Class for document-independent font information.
Definition ff_base.h:1138
Text used for an instrument definition. Please refer to the FCInstrumentDef class.
Definition ff_text.h:363
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:365
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:367
Text used for the name of a percussion layout. Please refer to the FCPercussionLayoutNotes class.
Definition ff_text.h:354
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:356
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:358
Class that encapsulates a range (start, length)
Definition ff_base.h:5570
The class for raw text objects. All other text classes are based on this class, but it can also be us...
Definition ff_text.h:17
void GetText(FCString *pString) const
Copies the object's text to a FCString object.
Definition finaleframework.cpp:4458
bool Load(twobyte number)
Loads the text with the indicated text number.
Definition finaleframework.cpp:4386
bool SaveNew()
Saves the text at the first empty spot.
Definition finaleframework.cpp:4430
virtual void SetRawTextNumber(twobyte number)
Definition ff_text.h:32
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_text.h:53
FCString * CreateString() const
Creates a string object with the loaded text. If the string doesn't exist (or if it's empty),...
Definition finaleframework.cpp:4470
RAWTEXTTYPES GetBlockType() const
Returns the text block type of this FCRawText.
Definition ff_text.h:155
virtual bool HasUnicodeSupport() const
Should return true if the data structure has Unicode support on the running platform.
Definition finaleframework.cpp:4491
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:52
bool LoadFirst() override
Loads the first raw text entry.
Definition ff_text.h:175
FCRawText()
The constructor.
Definition finaleframework.cpp:4337
EVERSION EnigmaVersion() const override
The Enigma version for save/load/create/delete operations.
Definition finaleframework.cpp:4348
bool SaveAs(twobyte number)
Saves the text by a new text number.
Definition finaleframework.cpp:4423
void SetText(const FCString *pString)
Sets the text for the object. (The object needs to be saved to Finale to take effect....
Definition finaleframework.cpp:4437
void * Allocate() override
Definition finaleframework.cpp:4373
RAWTEXTTYPES
enumerates the possible raw text types.
Definition ff_text.h:72
@ RAWTEXTTYPE_VERSELYRIC
Definition ff_text.h:77
@ RAWTEXTTYPE_CHORUSLYRIC
Definition ff_text.h:80
@ RAWTEXTTYPE_BOOKMARK
Definition ff_text.h:95
@ RAWTEXTTYPE_CUSTOMLINE
Definition ff_text.h:86
@ RAWTEXTTYPE_EXPRESSION
Definition ff_text.h:89
@ RAWTEXTTYPE_SECTIONLYRIC
Definition ff_text.h:83
@ RAWTEXTTYPE_FILEINFO
Definition ff_text.h:92
@ RAWTEXTTYPE_UNKNOWN
Definition ff_text.h:98
@ RAWTEXTTYPE_TEXTBLOCK
Definition ff_text.h:74
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_text.h:255
bool GetSubString(FCString *pString, const FCRange *pRange) const
Gets a string object with the range of characters from loaded text.
Definition finaleframework.cpp:4477
void Deallocate() override
Definition finaleframework.cpp:4379
int GetNumChars() const
Returns the number of characters in the raw text.
Definition ff_text.h:161
int DataSizeLoad() const override
Returns the data size for the data structure that should be loaded.
Definition finaleframework.cpp:4366
virtual twobyte GetItemNo() const
Gets the item number for the text.
Definition ff_text.h:216
virtual ~FCRawText()
The (virtual) destructor.
Definition finaleframework.cpp:4342
__FCBaseData * CreateObject() override
Definition ff_text.h:45
bool IsDynamicSize() override
Definition ff_text.h:39
The class for section lyrics texts.
Definition ff_text.h:484
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:486
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:488
Staff list titles for staff lists in categories.
Definition ff_text.h:324
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:328
Staff list titles for staff-assigned staff lists
Definition ff_text.h:337
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:341
Staff list titles for staff lists in repeats
Definition ff_text.h:301
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:314
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
bool TrimEnigmaFontTags()
Removes all Enigma font tags from a string, leaving only the actual text and text insert tags,...
Definition finaleframework.cpp:1437
Text used for text repeats.
Definition ff_text.h:345
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:347
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:349
The class for verse lyrics texts.
Definition ff_text.h:472
EXTAG Tag() const override
The Enigma tag for the derived class.
Definition ff_text.h:474
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_text.h:476