35 virtual const char*
ClassName() {
return "FCDocument"; }
44 _docid = FX_GetCurrentEnigmaDocument();
54 EDOCID
GetID()
const {
return _docid; }
60 bool IsCurrent() {
return _docid == FX_GetCurrentEnigmaDocument(); }
84 bool GetPathSpec(
void *pathspec, EVERSION convertversion);
92 if (_lastdocid != 0)
return false;
93 _docid = FX_GetCurrentEnigmaDocument();
118 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
120 void _DiscardSwitchBack() { _lastdocid = 0; }
141 int windowcount = FX_GetWindowCount();
142 if (windowcount == 0)
return false;
143 #if FXT_VERSION < FINALEVERSION_2012
144 int datasize =
sizeof (EXDocWindow2009) * windowcount;
145 EXDocWindow2009* pDocwindowarray =
new EXDocWindow2009[windowcount];
146 #elif FXT_VERSION < FINALEVERSION_25
147 int datasize =
sizeof (EXDocWindow2012) * windowcount;
148 EXDocWindow2012* pDocwindowarray =
new EXDocWindow2012[windowcount];
150 int datasize =
sizeof (EXDocWindow25) * windowcount;
151 EXDocWindow25* pDocwindowarray =
new EXDocWindow25[windowcount];
153 memset(pDocwindowarray, 0, datasize);
156 FX_GetWindowInfoList(pDocwindowarray, windowcount);
157 bool windowswitched =
false;
158 for (
int i = 0; i < windowcount; i++)
160 if (pDocwindowarray[i].docID == _docid)
162 if (!FX_SetCurrentWindow(pDocwindowarray[i].hWnd))
164 delete [] pDocwindowarray;
167 windowswitched =
true;
171 if (!windowswitched) {
172 delete [] pDocwindowarray;
176 if (!FX_SetCurrentEnigmaDocument(_docid))
178 delete [] pDocwindowarray;
181 FX_RedrawMusic(NULL);
232 return FX_IsEnigmaDocumentDirty(
GetID()) != 0;
242 return FX_SetEnigmaDocumentDirty(
GetID(), state);
256 if (!pString)
return;
260 #ifdef PDK_FRAMEWORK_DEBUG
280 virtual const char*
ClassName() {
return "FCDocuments"; }
302 for (
int i = 0; i <
GetCount(); i++)
305 if (pObject->
IsCurrent())
return pObject;
318 for (
int i = 0; i <
GetCount(); i++)
321 if (pObject->
GetID() == docid)
return pObject;
__FCBase * GetItemAt(int index)
Returns the object at the index position. Index is 0-based.
Definition: finaleframework.cpp:12797
const char * GetCString() const
Returns a C-string version of the string.
Definition: finaleframework.cpp:1159
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:375
bool SwitchBack(bool saveedits)
Ends the started edit block and switch back to the previous document.
Definition: finaleframework.cpp:27152
Class for a collection of documents. Usually used to get all the currently loaded documents in Finale...
Definition: ff_documents.h:277
bool Close()
Closes the document.
Definition: finaleframework.cpp:27290
void SetDirty(bool state)
Sets the "dirty" flag for the document (that indicates that the document needs to be saved)...
Definition: ff_documents.h:240
FCDocument * FindCurrent()
Returns the document in the collection that is the current document.
Definition: ff_documents.h:300
bool SwitchTo(FCString *pUndoString, bool saveedits)
Switch document focus to this document and start a new (nested) undo/redo record, without closing the...
Definition: finaleframework.cpp:27129
bool Open(FCString *pFilePath, bool createwindow, FCString *pUndoString)
Opens a file as a new Finale documnent. The new document will automatically get editing focus...
Definition: finaleframework.cpp:27216
static void _SetLastUndoString(FCString *pString)
For internal use only. This method should be called whenever a new undo block is started.
Definition: ff_documents.h:247
bool CloseCurrentDocumentWindow()
Closes the current document Window.
Definition: finaleframework.cpp:27283
static void DebugOutDigit(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in d...
Definition: finaleframework.cpp:274
bool IsUntitled()
Returns true if the document has no file connected to it.
Definition: finaleframework.cpp:27302
Class for an opened Finale document. An opened Finale document has a 1-based ID and can be displayed ...
Definition: ff_documents.h:26
int LoadAll()
Gets all open docs into the collection.
Definition: finaleframework.cpp:27378
void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_documents.h:261
int GetCount() const
Returns the number of elements of the collection.
Definition: ff_basecollection.h:86
void SetString(FCString *pString)
Copies a string.
Definition: finaleframework.cpp:2132
bool IsCurrent()
Returns true if the current document is the current document.
Definition: ff_documents.h:60
bool Print(FCPrintSettings *pSettings)
Prints the document, using the specified printer settings.
Definition: finaleframework.cpp:27296
FCDocument * GetItemAt(int index)
Overridden version of GetItemAt().
Definition: ff_documents.h:330
Base class for the Finale Framework classes.
Definition: ff_base.h:47
FCDocument(EDOCID id=-1)
The constructor.
Definition: ff_documents.h:41
EDOCID GetID() const
Returns the document ID.
Definition: ff_documents.h:54
bool Save()
Saves the current document at the current document path.
Definition: finaleframework.cpp:27211
bool DisplayVisually()
Moves the visual focus to the document.
Definition: ff_documents.h:138
static void GetLastUndoString(FCString *pString)
Fetches the last undo string for the edit block.
Definition: ff_documents.h:254
Class for iterator handlers.
Definition: ff_iterator.h:25
Class containing printing settings (and the ability to print documents).
Definition: ff_base.h:3969
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_documents.h:280
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_documents.h:35
int ForEachWithScope(FCIteratorHandler *pIterator, FCString *pUndoString)
Works like ForEach, but sets each document into scope before calling the Iterate handler method...
Definition: finaleframework.cpp:27392
bool SetToCurrent()
Remaps the object to the current document.
Definition: ff_documents.h:90
virtual bool IsIdentical(__FCBase *pCompareObject)
Overridden method for comparison of documents.
Definition: ff_documents.h:63
FCDocument * FindID(EDOCID docid)
Tries to find the document with a specific document ID.
Definition: ff_documents.h:316
bool GetDirty() const
Returns the "dirty" flag for document (that indicates that the document needs to be saved)...
Definition: ff_documents.h:230
bool GetPath(FCString *pString)
Gets the full path of the document in a FCString object.
Definition: finaleframework.cpp:27314
bool GetPathSpec(void *pathspec, EVERSION convertversion)
Copies the document path to a path spec.
Definition: finaleframework.cpp:27171
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition: ff_basecollection.h:24
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:547