Finale PDK Framework  0.54
Classes | Public Types | Public Member Functions | List of all members
FCLuaIterator Class Reference

Class for Lua callback iterators. This class is not part of the C++ PDK Framework. More...

#include <fflua_luaiterator.h>

Inheritance diagram for FCLuaIterator:
__FCBase

Public Types

enum  LUAITERATOR_ENTRYFILTERS {
  LIEFILTER_NOTE = 0, LIEFILTER_REST, LIEFILTER_CHORD, LIEFILTER_SINGLENOTE,
  LIEFILTER_ARTICULATIONFLAG, LIEFILTER_SMARTSHAPEFLAG, LIEFILTER_NOTEDETAILFLAG, LIEFILTER_PERFORMANCEDATAFLAG,
  LIEFILTER_SPECIALALTSFLAG, LIEFILTER_TUPLETSTARTFLAG, LIEFILTER_LYRICFLAG, LIEFILTER_STEMDETAILFLAG,
  LIEFILTER_SECONDARYBEAMFLAG, LIEFILTER_GRACENOTE, LIEFILTER_DOTTED, LIEFILTER_DURWHOLE,
  LIEFILTER_DURHALF, LIEFILTER_DURQUARTER, LIEFILTER_DUR8TH, LIEFILTER_DUR16TH,
  LIEFILTER_DUR32ND, LIEFILTER_DUR64TH
}
 Constants for the note entry filters. More...
 
enum  LUAITERATOR_NOTEFILTERS { LINFILTER_TIE, LINFILTER_ACCIDENTAL, LINFILTER_ACCIDENTALPARENTHESES, LINFILTER_ACCIDENTALFREEZE }
 Constants for the note filters. More...
 
enum  LUAITERATOR_LOGICMETHOD { LILOGIC_AND = 0, LILOGIC_OR = 1, LILOGIC_NOT = 2 }
 Logical operators that are used for filters. If no filters are added/activated, all items are automatically processed. More...
 
- Public Types inherited from __FCBase
enum  PDKFRAMEWORK_CLASSID {
  FCID_UNKNOWN = 0, FCID_ACCIDENTALMOD, FCID_ALLOTMENT, FCID_ARTICULATION,
  FCID_ARTICULATIONDEF, FCID_BACKWARDREPEAT, FCID_BASELINE, FCID_BEAMMOD,
  FCID_BEATCHARTELEMENT, FCID_BROKENBEAMMOD, FCID_CATEGORYDEF, FCID_CELLCLEFCHANGE,
  FCID_CELLFRAMEHOLD, FCID_CELLGRAPHIC, FCID_CELLTEXT, FCID_CENTERSMARTSHAPE,
  FCID_CHORD, FCID_CHORDPREFS, FCID_CHORDSUFFIXELEMENT, FCID_CHORUSSYLLABLE,
  FCID_CLEFDEF, FCID_COMPOSITETIMESIGBOTTOMELEMENT, FCID_COMPOSITETIMESIGTOPELEMENT, FCID_CROSSSTAFFMOD,
  FCID_CUSTOMSMARTLINEDEF, FCID_CUSTOMSTEMMOD, FCID_DISTANCEPREFS, FCID_DOTMOD,
  FCID_ENCLOSURE, FCID_ENDINGREPEAT, FCID_ENTRYALTERMOD, FCID_EXECUTABLESHAPEDEF,
  FCID_EXPRESSION, FCID_FONTINFO, FCID_FONTPREFS, FCID_FREEZESYSTEM,
  FCID_FRETBOARDSTYLEDEF, FCID_FRETBOARDSTYLEDEFS, FCID_FRETBOARDGROUPDEF, FCID_FRETBOARDGROUPDEFS,
  FCID_FRETINSTRUMENTDEF, FCID_GENERALPREFS, FCID_GRIDSGUIDESPREFS, FCID_GROUP,
  FCID_GROUPNAMEPOSITIONPREFS, FCID_HUMANPLAYBACKPREFS, FCID_INDEPENDENTCELLDETAIL, FCID_INSTRUMENTDEF,
  FCID_INSTRUMENTPLAYBACKDATA, FCID_KEYSIGNATURE, FCID_LAYERPREFS, FCID_LYRICSPREFS,
  FCID_MEASURE, FCID_MEASURENUMBERREGION, FCID_METATOOLASSIGNMENT, FCID_MIDIEXPRESSION,
  FCID_MISCDOCPREFS, FCID_MULTIMEASUREREST, FCID_MULTIMEASURERESTPREFS, FCID_MULTISTAFFINSTRUMENT,
  FCID_MULTISTAFFINSTRUMENTS, FCID_MUSICCHARACTERPREFS, FCID_MUSICSPACINGPREFS, FCID_NUMBER,
  FCID_NOTEHEADMOD, FCID_OTHERINCI, FCID_PERCUSSIONLAYOUTNOTE, FCID_PERCUSSIONSTAFF,
  FCID_PERFORMANCEMOD, FCID_PAGE, FCID_PAGEFORMATPREFS, FCID_PAGEGRAPHIC,
  FCID_PAGETEXT, FCID_PART, FCID_PARTEXTRACTPREFS, FCID_PARTSCOPEPREFS,
  FCID_PERCUSSIONNOTEMOD, FCID_PIANOBRACEPREFS, FCID_PLAYBACKPREFS, FCID_RAWTEXT,
  FCID_REPEATPREFS, FCID_SECONDARYBEAMBREAKMOD, FCID_SECTIONSYLLABLE, FCID_SEPARATEMEASURENUMBER,
  FCID_SEPARATEPLACEMENT, FCID_SHAPEDEF, FCID_SHAPEEXPRESSIONDEF, FCID_SLURCONTOURPREFS,
  FCID_SIZEPREFS, FCID_SMARTSHAPE, FCID_SMARTSHAPEENTRYMARK, FCID_SMARTSHAPEMEASUREMARK,
  FCID_SMARTSHAPEPREFS, FCID_STAFF, FCID_STAFFLIST, FCID_STAFFNAMEPOSITION,
  FCID_STAFFNAMEPOSITIONPREFS, FCID_STAFFSTYLEASSIGN, FCID_STAFFSTYLEDEF, FCID_STAFFSYSTEM,
  FCID_STEMCONNECTIONTABLE, FCID_STEMMOD, FCID_STRING, FCID_SYLLABLEENTRYMOD,
  FCID_SYSTEMSTAFF, FCID_TABLATURENOTEMOD, FCID_TEMPOELEMENT, FCID_TEXTBLOCK,
  FCID_TEXTEXPRESSIONDEF, FCID_TEXTREPEAT, FCID_TEXTREPEATDEF, FCID_TIEMOD,
  FCID_TIEPREFS, FCID_TIECONTOURPREFS, FCID_TIEPLACEMENTPREFS, FCID_TIMESIGNATURE,
  FCID_TUPLET, FCID_TUPLETPREFS, FCID_VERSESYLLABLE
}
 Constants for the GetClassID method. More...
 
enum  MEASUREMENTUNITS {
  MEASUREMENTUNIT_DEFAULT = UNIT_DEFAULT, MEASUREMENTUNIT_EVPUS = UNIT_EVPUS, MEASUREMENTUNIT_INCHES = UNIT_INCHES, MEASUREMENTUNIT_CENTIMETERS = UNIT_CENTS,
  MEASUREMENTUNIT_POINTS = UNIT_POINTS, MEASUREMENTUNIT_PICAS = UNIT_PICAS, MEASUREMENTUNIT_SPACES = UNIT_SPACES, MEASUREMENTUNIT_MILLIMETERS = 100
}
 Constants for Finale's standard measurement units. More...
 

Public Member Functions

 FCLuaIterator ()
 The constructor. More...
 
int ForEach (__FCCollectionData *pCollection, luabridge::LuaRef lua_callback_function)
 Browses through the items in a collection and sends the object to a Lua callback function, similar to the each() iterator in JW Lua. More...
 
int ForEachSaved (__FCCollectionData *pCollection, luabridge::LuaRef lua_callback_function)
 Browses through the items in a collection. After the Lua callback function has processed the object, the object is saved. More...
 
int ForEachEntry (FCMusicRegion *pRegion, luabridge::LuaRef lua_callback_function)
 Browses through the entries in a region, similar to the eachentry() iterator in JW Lua. More...
 
int ForEachEntrySaved (FCMusicRegion *pRegion, luabridge::LuaRef lua_callback_function)
 Browses through and saves the entries in a region, similar to the eachentrysaved() iterator in JW Lua. More...
 
int ForEachNote (FCMusicRegion *pRegion, luabridge::LuaRef lua_callback_function)
 Browses through all notes (as in noteheads) in a region. If a note entry consists of a chord with multiple notes, the Lua callback function is called for each note. More...
 
int ForEachNoteSaved (FCMusicRegion *pRegion, luabridge::LuaRef lua_callback_function)
 Browses through all notes (as in noteheads) in a region and saves the entries. If a note entry consists of a chord with multiple notes, the callback function is called for each note. More...
 
int ForEachCell (FCMusicRegion *pRegion, luabridge::LuaRef lua_callback_function)
 Browses through each cell in a region, similar to the eachcell() iterator in JW Lua. More...
 
int ForEachPart (luabridge::LuaRef lua_callback_function)
 Browses through all the parts in the current document, and passes the part to the callback function. When the callback function is called, the part has already automatically been set in editing focus. More...
 
int ForEachObject (int classID, luabridge::LuaRef lua_callback_function)
 Loads all the objects of a specific type and sends them to a Lua callback function. More...
 
int ForEachObjectSaved (int classID, luabridge::LuaRef lua_callback_function)
 Loads all the objects of a specific type and sends them to a Lua callback function. After callback has processed the object, each object is saved. More...
 
int ForEachRegionObject (FCMusicRegion *pRegion, int classID, luabridge::LuaRef lua_callback_function)
 Loads all the objects of a specific type within a selected region and sends them to a Lua callback function. More...
 
int ForEachRegionObjectSaved (FCMusicRegion *pRegion, int classID, luabridge::LuaRef lua_callback_function)
 Loads all the objects of a specific type that appears within a region and sends them to a Lua callback function. After callback has processed the object, each object is saved. More...
 
int ForEachDocument (luabridge::LuaRef lua_callback_function)
 Browses through all the currently opened documents, and passes the document to the Lua callback function. When the Lua callback function is called, the document has already automatically been set in editing focus. More...
 
int ForEachDocumentSaved (luabridge::LuaRef lua_callback_function)
 Browses through all the currently opened documents, passes the document to the Lua callback function, and saves the file to disk. When the Lua callback function is called, the document has already automatically been set in editing focus. More...
 
int ForEachFile (FCStrings *pFileStrings, luabridge::LuaRef lua_callback_function)
 Opens all the files in a list of strings (as a FCStrings object), and passes the document to the Lua callback function. When the Lua callback function is called, the document has already automatically been set in editing focus. More...
 
int ForEachFileSaved (FCStrings *pFileStrings, luabridge::LuaRef lua_callback_function)
 Opens all the files in a list of strings (as a FCStrings object), passes the document to the Lua callback function, and saves the file to disk. When the Lua callback function is called, the document has already automatically been set in editing focus. More...
 
int ForEachInteger (int integer1, int integer2, luabridge::LuaRef lua_callback_function)
 Passes an integer range to the Lua callback function, one by one. This iterator automatically handles upwards/downwards movement. More...
 
bool GetUseProgressBar () const
 Returns if the update progress bar should be used or not. More...
 
int GetProgressUpdateFrequency () const
 Returns the update frequency for the progress bar. More...
 
bool GetAbortableProgressBar () const
 Returns if the progress bar should be abortable (by the Esc key). More...
 
bool GetProgressBarUserAborted () const
 Returns true if the processing was aborted by the user (using the Esc key) during the last processing. More...
 
int GetLoadLayerMode () const
 Returns the load layer mode for the note entry iterators, such as ForEachEntry(), ForEachNote(), etc. More...
 
bool GetProcessScorePart () const
 Returns if the score part (the part with part ID 0) should be processed in ForEachPart calls. More...
 
bool GetProcessCurrentPart () const
 Returns if the part currently in editing focus should be processed in ForEachPart calls. More...
 
bool GetProcessCurrentDocument () const
 Returns if the document currently in editing focus should be processed in ForEachDocument and ForEachDocumentSaved calls. More...
 
bool GetNullRegionEqualsAll () const
 Returns if NULL regions should automatically be interpreted as a full document region, or not. This setting affects all region-based iterators. More...
 
bool GetForwardProcessing () const
 Returns the direction of the iteration. More...
 
bool GetDownwardProcessing () const
 Returns the vertical direction for processing staves in the iteration, for region-based iterators. More...
 
bool GetPartialMeasureSelections () const
 Returns partially selected measures should be processed. More...
 
void SetUseProgressBar (bool use)
 Sets if the update progress bar should be used or not. More...
 
void SetProgressUpdateFrequency (int freq)
 Sets the update frequency for the progress bar. More...
 
void SetAbortableProgressBar (bool state)
 Sets if the progress bar should be abortable (by the Esc key). More...
 
void SetLoadLayerMode (int loadlayermode)
 Sets the load layer mode for the note entry iterators, such as ForEachEntry(), ForEachNote(), etc. More...
 
void SetProcessScorePart (bool state)
 Sets if the score part (the part with part ID 0) should be processed in ForEachPart calls. More...
 
void SetProcessCurrentPart (bool state)
 Sets if the part currently in editing focus should be processed in ForEachPart calls. More...
 
void SetProcessCurrentDocument (bool state)
 Sets if the document currently in editing focus should be processed in ForEachDocument and ForEachDocumentSaved calls. More...
 
void SetNullRegionEqualsAll (bool state)
 Sets if NULL regions should automatically be interpreted as a full document region, or not. This setting affects all region-based iterators. More...
 
void SetForwardProcessing (bool forward)
 Sets the direction of the iteration. More...
 
void SetDownwardProcessing (bool downward)
 Sets the vertical direction for processing staves in the iteration, for region-based iterators. More...
 
void SetPartialMeasureSelections (bool partialselections)
 Returns partially selected measures should be processed. More...
 
bool AddEntryFilter (int filter, int logicmode)
 Adds/activates a note entry filter. More...
 
bool RemoveEntryFilter (int filter, int logicmode)
 Removes a note entry filter. More...
 
void ClearAllEntryFilters ()
 Removes all entry filters. This will result in all entry being processed by the ForEachEntry and ForEachEntrySaved methods. More...
 
bool IsEntryFilterAdded (int filter, int logicmode)
 Returns true if a specific note entry filter has been added/activated for the iterator. More...
 
bool AddNoteFilter (int filter, int logicmode)
 Adds/activates a note filter. More...
 
bool RemoveNoteFilter (int filter, int logicmode)
 Removes a note filter. More...
 
void ClearAllNoteFilters ()
 Removes all note filters. More...
 
bool IsNoteFilterAdded (int filter, int logicmode)
 Returns true if a specific note filter has been added/activated for the iterator. More...
 
bool AddAltNotationFilter (int filter, int logicmode)
 Adds/activates an alternate notation filter. More...
 
bool RemoveAltNotationFilter (int filter, int logicmode)
 Removes a alternate notation filter. More...
 
void ClearAllAltNotationFilters ()
 Removes all filters for alternate notation. This will result in all items being processed. More...
 
bool IsAltNotationFilterAdded (int filter, int logicmode)
 Returns true if a specific filter for alternate notation has been added/activated for the iterator. More...
 
bool AddNotationStyleFilter (int filter, int logicmode)
 Adds/activates an notation style filter. More...
 
bool RemoveNotationStyleFilter (int filter, int logicmode)
 Removes a notation style filter. More...
 
void ClearAllNotationStyleFilters ()
 Removes all filters for notation styles. This will result in all items being processed. More...
 
bool IsNotationStyleFilterAdded (int filter, int logicmode)
 Returns true if a specific filter for a notation style has been added/activated for the iterator. More...
 
double CalcLastDuration ()
 Reports the duration of the last iterator run. More...
 
- Public Member Functions inherited from __FCBase
virtual const PDKFRAMEWORK_CLASSID GetClassID ()
 Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has problems to resolve the true classes of inherited objects. More...
 
virtual const char * ClassName ()
 Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child class. More...
 
 __FCBase ()
 The constructor.
 
virtual ~__FCBase ()
 Virtual destructor, so all inherited classes get the virtual destructor. More...
 
void DebugMsgDigit (const char *pszPrefixText, int i)
 Creates a simple Message Box for debug purposes. The text appears with the extra digit (in decimal presentation) appearing afterwards. More...
 
void DebugMsgHex (const char *pszPrefixText, int i)
 Creates a simple Message Box for debug purposes. The text appears with the extra digit (as a hexadecimal number) appearing afterwards. More...
 
void DebugMsgString (const char *pszPrefixText, const char *thestring)
 Creates a simple Message Box for debug purposes. The text appears with the extra string appearing afterwards. More...
 
void DebugMsg (const char *pszMsg)
 Creates a simple Message Box for debug purposes with just one text string. More...
 
void DebugOutMenuInfo (FCUI *pUI, int menuixd_horiz, int menuixd_vert) const
 Outputs the menu command info for debugging purposes. More...
 
int DebugOutFormat (const char *fmt,...)
 Outputs debug text using C style "printf" syntax. More...
 
virtual void DebugDump ()
 Outputs the class data/information for debugging purposes. More...
 
virtual void DebugDataDump ()
 Outputs a memory dump of the data block in the object for debugging purposes. More...
 
virtual void DebugDataByteArrayDump ()
 Outputs a memory dump of the data block in the object for debugging purposes, as a C++ byte array. More...
 
void Set16BitFlag (FLAG_16 *flag, FLAG_16 flagbits, bool state)
 Sets a 16 bit flag in the data block. More...
 
void Set32BitFlag (FLAG_32 *flag, FLAG_32 flagbits, bool state)
 Sets a 32 bit flag in the data block. More...
 
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. More...
 
void SetUserData (void *pData)
 Sets the user data attached to the instance of an object. More...
 
void SetUserData2 (void *pData)
 Sets the additional user data attached to the instance of an object. More...
 
void * GetUserData () const
 Gets the user data attached to the instance of an object. More...
 
void * GetUserData2 () const
 Gets the additional user data attached to the instance of an object. More...
 
virtual bool IsIdentical (__FCBase *pCompareObject)
 Returns true if the data in the passed object is considered to be identical to the current object, otherwise false. More...
 
void StoreXML_String (tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
 Helper function to store FCString objects in the XML file. More...
 
void StoreXML_Integer (tinyxml2::XMLElement *pParentNode, const char *pszElementName, int value)
 Helper function to store integer objects in the XML file. More...
 
void StoreXML_Bool (tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool value)
 Helper function to store boolean objects in the XML file. More...
 
void StoreXML_StringAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
 Helper function to store FCString objects in the XML file, as an attribute to a node. More...
 
void StoreXML_IntegerAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, int value)
 Helper function to store integer objects in the XML file, as an attribute to a node. More...
 
void StoreXML_BoolAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool value)
 Helper function to store boolean objects in the XML file, as an attribute to a node. More...
 
void StoreXML_FloatAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, float value)
 Helper function to store floating point objects in the XML file, as an attribute to a node. More...
 
virtual void StoreToXML (tinyxml2::XMLElement *pParentNode)
 Virtual method that is used to store an object's data. More...
 
bool ReadXML_String (tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
 Helper method to read FCString objects from the XML file. More...
 
bool ReadXML_Integer (tinyxml2::XMLElement *pParentNode, const char *pszElementName, int *pValue)
 Helper method to read integer objects from the XML file. More...
 
bool ReadXML_Bool (tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool *pValue)
 Helper method to read boolean objects from the XML file. More...
 
bool ReadXML_StringAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
 Helper method to read FCString objects from the XML file, as an attribute to a node. More...
 
bool ReadXML_IntegerAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, int *pValue)
 Helper method to read integer objects from the XML file, as an attribute to a node. More...
 
bool ReadXML_BoolAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool *pValue)
 Helper method to read boolean objects from the XML file, as an attribute to a node. More...
 
bool ReadXML_FloatAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, float *pValue)
 Helper method to read floating point objects from the XML file, as an attribute to a node. More...
 
virtual bool ReadFromXML (tinyxml2::XMLElement *pParentNode)
 Virtual method that is used to read object data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from __FCBase
static void DebugOutPtr (const char *pszPrefixText, void *ptr)
 Static method that outputs a line for debugging purposes. The prefix text appears with the extra ptr (in hexadeximal representation) appearing afterwards. More...
 
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 decimal presentation) appearing afterwards. More...
 
static void DebugOutFloat (const char *pszPrefixText, float f)
 Static method that outputs a line for debugging purposes. The text appears with the extra float value appearing afterwards. More...
 
static void DebugOutTag (const char *pszPrefixText, EXTAG extag)
 Static method that outputs a line for debugging purposes. The text appears with the EXTAG (in text) appearing afterwards. More...
 
static void DebugOutHex (const char *pszPrefixText, int i)
 Static method that outputs a line for debugging purposes. The text appears with the extra digit (in hexadecimal presentation) appearing afterwards. More...
 
static void DebugOutBin (const char *pszPrefixText, int i)
 Static method that outputs a line for debugging purposes. The text appears with the extra digit (in binary presentation) appearing afterwards. More...
 
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 the extra string appearing afterwards. More...
 
static void DebugOutString (const char *pszPrefixText, FCString *pString)
 Static method that outputs a line for debugging purposes (FCString version). The text appears with the extra string appearing afterwards. More...
 
static void DebugOutBool (const char *pszPrefixText, bool state)
 Static method that outputs a line for debugging purposes. The boolean state appears afterwards as either "TRUE" or "FALSE". More...
 
static void DebugOutBlock (const void *pBuffer, int startoffset, int size)
 Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (as hex digits) until the whole memory block is dumped. More...
 
static void DebugOutByteArrayBlock (const void *pBuffer, int startoffset, int size)
 Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (as hex digits) as a C++ onebyte array, until the whole memory block is dumped. More...
 
static void DebugOut (const char *pszLine)
 Static method to output a line of text for debugging purposes. More...
 

Detailed Description

Class for Lua callback iterators. This class is not part of the C++ PDK Framework.

All iterator methods starts with the prefix 'ForEach'. Iterator methods that automatically stores modified data or save files use a 'Saved' suffix.

Each iterator feeds the data to a Lua callback function. If the Lua callback function returns false, processing of any further items will stop.

This class contain these iterators:

Except for reporting timing values, one single iterator object can be used to call nested iterators (for example, if the callback function for ForEachEntry uses the same iterator object to call ForEach for some other data).

The table below shows the fiters that are supported by each iterator method.

Iterator Method Entry Filter Note Filter Notation Style Filter Alternate Notation Filter
ForEach No No No No
ForEachSaved No No No No
ForEachEntry YES No YES YES
ForEachEntrySaved YES No YES YES
ForEachNote YES YES YES YES
ForEachNoteSaved YES YES YES YES
ForEachCell No No YES (*) YES (*)
ForEachPart No No No No
ForEachObject No No No No
ForEachObjectSaved No No No No
ForEachRegionObject YES (**) No YES YES
ForEachRegionObjectSaved YES (**) No YES YES
ForEachDocument No No No No
ForEachDocumentSaved No No No No
ForEachFile No No No No
ForEachFileSaved No No No No
ForEachInteger No No No No

(*) Start of cell only (**) If the object type supports it

Member Enumeration Documentation

Constants for the note entry filters.

Accessed by AddEntryFilter and RemoveEntryFilter and similar methods. Used by the ForEachEntry and ForEachEntrySaved iterators.

Lua-supported.

Enumerator
LIEFILTER_NOTE 

Note entries that are notes.

LIEFILTER_REST 

Note entries that are rests.

LIEFILTER_CHORD 

Note entries with 2 notes or more.

LIEFILTER_SINGLENOTE 

Note entries that have 1 single note. Rests are not processed.

LIEFILTER_ARTICULATIONFLAG 

Note entries where FCNoteEntry::GetArticulationFlag() returns true.

LIEFILTER_SMARTSHAPEFLAG 

Note entries where FCNoteEntry::GetSmartShapeFlag() returns true.

LIEFILTER_NOTEDETAILFLAG 

Note entries where FCNoteEntry::GetNoteDetailFlag() returns true.

LIEFILTER_PERFORMANCEDATAFLAG 

Note entries where FCNoteEntry::GetPerformanceDataFlag() returns true.

LIEFILTER_SPECIALALTSFLAG 

Note entries where FCNoteEntry::GetSpecialAltsFlag() returns true.

LIEFILTER_TUPLETSTARTFLAG 

Note entries where FCNoteEntry::GetTupletStartFlag() returns true.

LIEFILTER_LYRICFLAG 

Note entries where FCNoteEntry::GetLyricFlag() returns true.

LIEFILTER_STEMDETAILFLAG 

Note entries where FCNoteEntry::GetStemDetailFlag() returns true.

LIEFILTER_SECONDARYBEAMFLAG 

Note entries where FCNoteEntry::GetSecondaryBeamFlag() returns true.

LIEFILTER_GRACENOTE 

Note entries where FCNoteEntry::GetGraceNote() returns true.

LIEFILTER_DOTTED 

Note entries that have augmentation dots.

LIEFILTER_DURWHOLE 

Note entries with whole note duration.

LIEFILTER_DURHALF 

Note entries with half note duration.

LIEFILTER_DURQUARTER 

Note entries with quarter note duration.

LIEFILTER_DUR8TH 

Note entries with eighth note duration.

LIEFILTER_DUR16TH 

Note entries with 16th note duration.

LIEFILTER_DUR32ND 

Note entries with 32nd note duration.

LIEFILTER_DUR64TH 

Note entries with 64th note duration.

Logical operators that are used for filters. If no filters are added/activated, all items are automatically processed.

Lua-supported.

Enumerator
LILOGIC_AND 

Logical "AND": Each activated filter must match for an item to be processed.

LILOGIC_OR 

Logical "OR": Any of the active filters can match, but at least one of the filters must match.

LILOGIC_NOT 

Logical "NOT": None of the filters are allowed to match.

Constants for the note filters.

Accessed by AddNoteFilter and RemoveNoteFilter and similar methods. Used by the ForEachNote and ForEachNoteSaved iterators.

Lua-supported.

Enumerator
LINFILTER_TIE 

Note that starts a tie.

LINFILTER_ACCIDENTAL 

Note that displays an accidental.

LINFILTER_ACCIDENTALPARENTHESES 

Note that has parentheses for accidentals set. This might be set event if the accidental isn't displayed.

LINFILTER_ACCIDENTALFREEZE 

Note with frozen accidental state.

Constructor & Destructor Documentation

FCLuaIterator::FCLuaIterator ( )
inline

The constructor.

Lua-supported.

Member Function Documentation

bool FCLuaIterator::AddAltNotationFilter ( int  filter,
int  logicmode 
)
inline

Adds/activates an alternate notation filter.

Lua-supported.

Parameters
[in]filterAny of the ALTSTAFF_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was added. False if it already was available.
bool FCLuaIterator::AddEntryFilter ( int  filter,
int  logicmode 
)
inline

Adds/activates a note entry filter.

Lua-supported.

Parameters
[in]filterThe type of filter. Any of the LIEFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT).
Returns
True if the filter was added. False if it already was available.
bool FCLuaIterator::AddNotationStyleFilter ( int  filter,
int  logicmode 
)
inline

Adds/activates an notation style filter.

Lua-supported.

Parameters
[in]filterAny of the STAFFNOTATION_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was added. False if it already was available.
bool FCLuaIterator::AddNoteFilter ( int  filter,
int  logicmode 
)
inline

Adds/activates a note filter.

Lua-supported.

Parameters
[in]filterAny of the LINFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT).
Returns
True if the filter was added. False if it already was available.
double FCLuaIterator::CalcLastDuration ( )
inline

Reports the duration of the last iterator run.

Timing only works correctly for "non-stacked" iterators in one iterator object. If one single iterator object calls nested iterators (=when the callback function starts yet another iterator process for some other objects), the returned value will not be accurate.

Lua-supported.

Returns
The duration of the last iterator run, in seconds (as a floating point value).
void FCLuaIterator::ClearAllAltNotationFilters ( )
inline

Removes all filters for alternate notation. This will result in all items being processed.

Lua-supported.

void FCLuaIterator::ClearAllEntryFilters ( )
inline

Removes all entry filters. This will result in all entry being processed by the ForEachEntry and ForEachEntrySaved methods.

Lua-supported.

void FCLuaIterator::ClearAllNotationStyleFilters ( )
inline

Removes all filters for notation styles. This will result in all items being processed.

Lua-supported.

void FCLuaIterator::ClearAllNoteFilters ( )
inline

Removes all note filters.

Lua-supported.

int FCLuaIterator::ForEach ( __FCCollectionData pCollection,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through the items in a collection and sends the object to a Lua callback function, similar to the each() iterator in JW Lua.

The Lua callback function recieves 1 parameter: the object in the collection.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function mymeasurehandler(measure)
2  print ("Measure: ", measure.ItemNo, "Width: ", measure.Width)
3 end
4 
5 local allmeasures = finale.FCMeasures()
6 allmeasures:LoadAll()
7 local iterator = finale.FCLuaIterator()
8 iterator:ForEach(allmeasures, mymeasurehandler)
Parameters
[in]pCollectionThe collection with loaded items, of any class that inherits __FCCollectionData.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed items.
int FCLuaIterator::ForEachCell ( FCMusicRegion pRegion,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through each cell in a region, similar to the eachcell() iterator in JW Lua.

The Lua callback function recieves 2 parameters: first parameter is the 1-based measure number, second parameter is the Staff ID.

Please refer to the table in the class details for info about the filters that are compatible with this method.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Cells with partial selections are processed.

Lua-supported.

Parameters
[in]pRegionThe region where the notes should be processed. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed cells.
int FCLuaIterator::ForEachDocument ( luabridge::LuaRef  lua_callback_function)
inline

Browses through all the currently opened documents, and passes the document to the Lua callback function. When the Lua callback function is called, the document has already automatically been set in editing focus.

The Lua callback function recieves 1 parameter: a FCDocument object.

The method GetProcessCurrentDocument affects if the current document should also be processed in the iteration.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function mydocumentcallback(doc)
2  local str = finale.FCString()
3  doc:GetPath(str)
4  systemstaves = finale.FCSystemStaves()
5  systemstaves:LoadScrollView()
6  print ("Document ", str.LuaString, "has" , systemstaves.Count, "staves.")
7 end
8 
9 local iterator = finale.FCLuaIterator()
10 iterator:ForEachDocument(mydocumentcallback)
Parameters
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed documents.
int FCLuaIterator::ForEachDocumentSaved ( luabridge::LuaRef  lua_callback_function)
inline

Browses through all the currently opened documents, passes the document to the Lua callback function, and saves the file to disk. When the Lua callback function is called, the document has already automatically been set in editing focus.

The Lua callback function recieves 1 parameter: a FCDocument object.

Please note that this method saves changes to disk. Only documents that have file names are saved. (Untitled documents are unsaved.)

The method GetProcessCurrentDocument affects if the current document should also be processed in the iteration.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function mydocsavecallback(doc)
2  local sizeprefs = finale.FCSizePrefs()
3  sizeprefs:Load(1)
4  sizeprefs.ThinBarlineThickness = 142
5  sizeprefs:Save()
6 end
7 
8 local iterator = finale.FCLuaIterator()
9 iterator:ForEachDocumentSaved(mydocsavecallback)
\param [in] lua_callback_function The Lua callback function.

\return The number of processed documents.
int FCLuaIterator::ForEachEntry ( FCMusicRegion pRegion,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through the entries in a region, similar to the eachentry() iterator in JW Lua.

The Lua callback function recieves 1 parameter: a FCNoteEntry object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Parameters
[in]pRegionThe region where the entries should be processed. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed entries.
int FCLuaIterator::ForEachEntrySaved ( FCMusicRegion pRegion,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through and saves the entries in a region, similar to the eachentrysaved() iterator in JW Lua.

This method is identical to ForEachEntry, except that each object is saved as well.

The Lua callback function recieves 1 parameter: a FCNoteEntry object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function myentrysavedcallback(entry)
2  if not entry.GraceNote then
3  entry.ManualPosition = 0
4  end
5 end
6 
7 local iterator = finale.FCLuaIterator()
8 iterator:ForEachEntrySaved(finenv.Region(), myentrysavedcallback)
Parameters
[in]pRegionThe region where the entries should be processed. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed entries.
int FCLuaIterator::ForEachFile ( FCStrings pFileStrings,
luabridge::LuaRef  lua_callback_function 
)
inline

Opens all the files in a list of strings (as a FCStrings object), and passes the document to the Lua callback function. When the Lua callback function is called, the document has already automatically been set in editing focus.

The Lua callback function recieves 2 parameter: the 1st parameter is a FCDocument object (which can be nil if the file can't be loaded), the 2nd parameter is the original FCString object that contains the file name path.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function myfilecallback(doc, filename)
2  if not doc then return end
3  local measures = finale.FCMeasures()
4  measures:LoadAll()
5  print ("File", filename.LuaString, "has", measures.Count, "measures.")
6 end
7 
8 local filenames = finale.FCStrings()
9 local str = finale.FCString()
10 str.LuaString = "d:\\file1.musx"
11 filenames:AddCopy(str)
12 str.LuaString = "d:\\file2.musx"
13 filenames:AddCopy(str)
14 
15 local iterator = finale.FCLuaIterator()
16 iterator:ForEachFile(filenames, myfilecallback)
Parameters
[in]pFileStringsThe collection of files to open. Each string must be a full path to a Finale document.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed files.
int FCLuaIterator::ForEachFileSaved ( FCStrings pFileStrings,
luabridge::LuaRef  lua_callback_function 
)
inline

Opens all the files in a list of strings (as a FCStrings object), passes the document to the Lua callback function, and saves the file to disk. When the Lua callback function is called, the document has already automatically been set in editing focus.

The Lua callback function recieves 2 parameter: the 1st parameter is a FCDocument object (which can be nil if the file can't be loaded), the 2nd parameter is the original FCString object that contains the file name path.

Please note that this method saves changes to disk.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local function myfilesavedcallback(doc, filename)
2  if not doc then return end
3  local miscdocprefs = finale.FCMiscDocPrefs()
4  miscdocprefs:Load(1)
5  miscdocprefs.AllowFloatingRests = true
6  miscdocprefs:Save()
7 end
8 
9 local filenames = finale.FCStrings()
10 local str = finale.FCString()
11 str.LuaString = "d:\\file1.musx"
12 filenames:AddCopy(str)
13 str.LuaString = "d:\\file2.musx"
14 filenames:AddCopy(str)
15 
16 local iterator = finale.FCLuaIterator()
17 iterator:ForEachFileSaved(filenames, myfilesavedcallback)
Parameters
[in]pFileStringsThe collection of files to open. Each string must be a full path to a Finale document.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed files.
int FCLuaIterator::ForEachInteger ( int  integer1,
int  integer2,
luabridge::LuaRef  lua_callback_function 
)
inline

Passes an integer range to the Lua callback function, one by one. This iterator automatically handles upwards/downwards movement.

The Lua callback function recieves 1 parameter: the integer value.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:
1 local function myintcallback(i)
2  print ("Number: ", i)
3 end
4 
5 local iterator = finale.FCLuaIterator()
6 iterator:ForEachInteger(10, 1, myintcallback) -- Go downwards
\param [in] integer1 The first (source) integer. If this value is larger than integer2, the

iteration will go downwards.

\param [in] integer2 The second (target) integer.

\param [in] lua_callback_function The Lua callback function.

\return The number of processed integers.
int FCLuaIterator::ForEachNote ( FCMusicRegion pRegion,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through all notes (as in noteheads) in a region. If a note entry consists of a chord with multiple notes, the Lua callback function is called for each note.

Rests entries are not processed.

The Lua callback function recieves 1 parameter: a FCNote object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local dsharpcount = 0
2 
3 local function mynotecallback(note)
4  local str = finale.FCString()
5  note:GetString(str, nil, true)
6  if str:StartsWith("D#") then
7  dsharpcount = dsharpcount + 1
8  end
9 end
10 
11 local iterator = finale.FCLuaIterator()
12 iterator:ForEachNote(finenv.Region(), mynotecallback)
13 print("Number of D Sharps:", dsharpcount)
Parameters
[in]pRegionThe region where the notes should be processed. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed entries.
int FCLuaIterator::ForEachNoteSaved ( FCMusicRegion pRegion,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through all notes (as in noteheads) in a region and saves the entries. If a note entry consists of a chord with multiple notes, the callback function is called for each note.

Rests entries are not processed.

This method is identical to ForEachNote, except that each note entry is saved as well.

The Lua callback function recieves 1 parameter: a FCNote object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Example of usage:

1 local iterator = finale.FCLuaIterator()
2 iterator:ForEachNoteSaved(finenv.Region(), function(note) note.Tie = false end)
Parameters
[in]pRegionThe region where the notes should be processed. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed entries.
int FCLuaIterator::ForEachObject ( int  classID,
luabridge::LuaRef  lua_callback_function 
)
inline

Loads all the objects of a specific type and sends them to a Lua callback function.

The Lua callback function recieves 1 parameter: the object in the collection.

This method is a bit similar 'loadall()' iterator, used in 'for' loops in JW Lua. The main difference is that this method uses the single object class as the parameter, while 'loadall()' uses the collection class.

After loading the data, the iterator itself is based on ForEach.

These class ID constants are supported by this method:

  • FCID_ARTICULATIONDEF
  • FCID_CATEGORYDEF
  • FCID_CHORD
  • FCID_CLEFDEF
  • FCID_CUSTOMSMARTLINEDEF
  • FCID_EXECUTABLESHAPEDEF
  • FCID_FRETBOARDSTYLEDEF
  • FCID_FRETBOARDGROUPDEF
  • FCID_FRETINSTRUMENTDEF
  • FCID_GROUP
  • FCID_INSTRUMENTDEF
  • FCID_MEASURE
  • FCID_MEASURENUMBERREGION
  • FCID_MULTIMEASUREREST
  • FCID_MULTISTAFFINSTRUMENT
  • FCID_PAGE
  • FCID_PAGEGRAPHIC
  • FCID_PAGETEXT
  • FCID_SHAPEDEF
  • FCID_SHAPEEXPRESSIONDEF
  • FCID_SMARTSHAPE
  • FCID_STAFF
  • FCID_STAFFSTYLEDEF
  • FCID_STAFFSYSTEM
  • FCID_TEXTEXPRESSIONDEF
  • FCID_TEXTREPEATDEF

Lua-supported.

Example of usage:
1 local function mycallback(textexprdef)
2  if textexprdef.ExecutableShapeID ~= 0 then
3  print ("Text Expression Def", textexprdef.ItemNo, "has an executable shape.")
4  end
5 end
6 
7 local iterator = finale.FCLuaIterator()
8 iterator:ForEachObject(finale.FCID_TEXTEXPRESSIONDEF, mycallback)
Parameters
[in]classIDThe class ID constant. Any of the supported FCID_ constants listed in the documentation for this method.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed objects.
int FCLuaIterator::ForEachObjectSaved ( int  classID,
luabridge::LuaRef  lua_callback_function 
)
inline

Loads all the objects of a specific type and sends them to a Lua callback function. After callback has processed the object, each object is saved.

The Lua callback function recieves 1 parameter: the object in the collection.

This method is identical to ForEachObject, except that the objects are saved.

Lua-supported.

Example of usage:
1 local function mycallback(texrepeatdef)
2  texrepeatdef.UseThisFont = false
3 end
4 
5 local iterator = finale.FCLuaIterator()
6 iterator:ForEachObjectSaved(finale.FCID_TEXTREPEATDEF, mycallback)
Parameters
[in]classIDThe class ID constant. Any of the supported FCID_ constants listed in the documentation for ForEachObject.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed objects.
int FCLuaIterator::ForEachPart ( luabridge::LuaRef  lua_callback_function)
inline

Browses through all the parts in the current document, and passes the part to the callback function. When the callback function is called, the part has already automatically been set in editing focus.

The Lua callback function recieves 1 parameter: The FCPart object.

The method GetProcessScorePart and GetProcessCurrentPart affect which of the parts that will be processed.

If the callback function script produces an error, the iteration stops and the error message is added to the script output. However, the script doesn't abort when a callback function produces an error.

Lua-supported.

Parameters
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed parts.
int FCLuaIterator::ForEachRegionObject ( FCMusicRegion pRegion,
int  classID,
luabridge::LuaRef  lua_callback_function 
)
inline

Loads all the objects of a specific type within a selected region and sends them to a Lua callback function.

The Lua callback function recieves 1 parameter: the object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

These class ID constants are supported by this method:

  • FCID_ACCIDENTALMOD
  • FCID_ARTICULATION
  • FCID_BEATCHARTELEMENT
  • FCID_BROKENBEAMMOD
  • FCID_CELLTEXT
  • FCID_CHORD
  • FCID_CROSSSTAFFMOD
  • FCID_CUSTOMSTEMMOD
  • FCID_DOTMOD
  • FCID_ENTRYALTERMOD
  • FCID_EXPRESSION
  • FCID_MIDIEXPRESSION
  • FCID_NOTEHEADMOD
  • FCID_PERCUSSIONNOTEMOD
  • FCID_PERFORMANCEMOD
  • FCID_SECONDARYBEAMBREAKMOD
  • FCID_SEPARATEMEASURENUMBER
  • FCID_SMARTSHAPEENTRYMARK
  • FCID_STEMMOD
  • FCID_SYLLABLEENTRYMOD
  • FCID_TABLATURENOTEMOD
  • FCID_TUPLET

Lua-supported.

Parameters
[in]pRegionThe pointer to the region object. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]classIDThe class ID constant. Any of the supported FCID_ constants listed in the documentation for this method.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed objects.
int FCLuaIterator::ForEachRegionObjectSaved ( FCMusicRegion pRegion,
int  classID,
luabridge::LuaRef  lua_callback_function 
)
inline

Loads all the objects of a specific type that appears within a region and sends them to a Lua callback function. After callback has processed the object, each object is saved.

The Lua callback function recieves 1 parameter: the object.

Please refer to the table in the class details for info about the filters that are compatible with this method.

This method is identical to ForEachRegionObject, except that the objects are saved.

Lua-supported.

Parameters
[in]pRegionThe pointer to the region object. If this is NULL and GetNullRegionEqualsAll() is true, the full document will be used as region.
[in]classIDThe class ID constant. Any of the supported FCID_ constants listed in the documentation for ForEachRegionObject.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed objects.
int FCLuaIterator::ForEachSaved ( __FCCollectionData pCollection,
luabridge::LuaRef  lua_callback_function 
)
inline

Browses through the items in a collection. After the Lua callback function has processed the object, the object is saved.

This method is identical to ForEach, except that each object is saved as well.

The Lua callback function recieves 1 parameter: the object in the collection.

Lua-supported.

Example of usage:
1 local function mymeasurehandler(measure)
2  measure.Width = measure.Width * 1.10
3 end
4 
5 local allmeasures = finale.FCMeasures()
6 allmeasures:LoadAll()
7 local iterator = finale.FCLuaIterator()
8 iterator:ForEachSaved(allmeasures, mymeasurehandler)
Parameters
[in]pCollectionThe collection with loaded items, of any class that inherits __FCCollectionData.
[in]lua_callback_functionThe Lua callback function.
Returns
The number of processed items.
bool FCLuaIterator::GetAbortableProgressBar ( ) const
inline

Returns if the progress bar should be abortable (by the Esc key).

Lua-supported (also as property).

bool FCLuaIterator::GetDownwardProcessing ( ) const
inline

Returns the vertical direction for processing staves in the iteration, for region-based iterators.

Lua-supported (also as property).

Returns
true - Iteration goes from top-selected staff and downwards. false - Iteration goes from bottom-selected staff and upwards.
bool FCLuaIterator::GetForwardProcessing ( ) const
inline

Returns the direction of the iteration.

By default, the iterator processes the lowest/first element first and goes upwards towards the last element. For some actions however (such as deleting data or inserting data that affects the end of a list), iterating backwards through the data is required.

Lua-supported (also as property).

Returns
true - Iteration goes from first element to last. false - Iteration goes from last element to first.
int FCLuaIterator::GetLoadLayerMode ( ) const
inline

Returns the load layer mode for the note entry iterators, such as ForEachEntry(), ForEachNote(), etc.

This method is identical to the one found at FCNoteEntryCell::GetLoadLayerMode().

Lua-supported (also as property).

bool FCLuaIterator::GetNullRegionEqualsAll ( ) const
inline

Returns if NULL regions should automatically be interpreted as a full document region, or not. This setting affects all region-based iterators.

Lua-supported (also as property).

bool FCLuaIterator::GetPartialMeasureSelections ( ) const
inline

Returns partially selected measures should be processed.

Lua-supported (also as property).

Returns
true - Measures which are partially selected will also be processed (in addition to fully processed measures). false - Only fully selected measure will be processed.
bool FCLuaIterator::GetProcessCurrentDocument ( ) const
inline

Returns if the document currently in editing focus should be processed in ForEachDocument and ForEachDocumentSaved calls.

Lua-supported (also as property).

bool FCLuaIterator::GetProcessCurrentPart ( ) const
inline

Returns if the part currently in editing focus should be processed in ForEachPart calls.

Lua-supported (also as property).

bool FCLuaIterator::GetProcessScorePart ( ) const
inline

Returns if the score part (the part with part ID 0) should be processed in ForEachPart calls.

Lua-supported (also as property).

bool FCLuaIterator::GetProgressBarUserAborted ( ) const
inline

Returns true if the processing was aborted by the user (using the Esc key) during the last processing.

Lua-supported (also as a read-only property).

int FCLuaIterator::GetProgressUpdateFrequency ( ) const
inline

Returns the update frequency for the progress bar.

Lua-supported (also as property).

bool FCLuaIterator::GetUseProgressBar ( ) const
inline

Returns if the update progress bar should be used or not.

Lua-supported (also as property).

bool FCLuaIterator::IsAltNotationFilterAdded ( int  filter,
int  logicmode 
)
inline

Returns true if a specific filter for alternate notation has been added/activated for the iterator.

Lua-supported.

Parameters
[in]filterAny of the ALTSTAFF_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT).
Returns
True if the alternate notation filter is available.
bool FCLuaIterator::IsEntryFilterAdded ( int  filter,
int  logicmode 
)
inline

Returns true if a specific note entry filter has been added/activated for the iterator.

Lua-supported.

Parameters
[in]filterAny of the LIEFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the note entry filter is available.
bool FCLuaIterator::IsNotationStyleFilterAdded ( int  filter,
int  logicmode 
)
inline

Returns true if a specific filter for a notation style has been added/activated for the iterator.

Lua-supported.

Parameters
[in]filterAny of the STAFFNOTATION_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the notation style filter is available.
bool FCLuaIterator::IsNoteFilterAdded ( int  filter,
int  logicmode 
)
inline

Returns true if a specific note filter has been added/activated for the iterator.

Lua-supported.

Parameters
[in]filterAny of the LINFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT).
Returns
True if the note entry filter is available.
bool FCLuaIterator::RemoveAltNotationFilter ( int  filter,
int  logicmode 
)
inline

Removes a alternate notation filter.

If all alternate notation filters should be removed/cleared, use ClearAllAltNotationFilters() instead.

Lua-supported.

Parameters
[in]filterAny of the ALTSTAFF_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was removed. False if it didn't exist.
bool FCLuaIterator::RemoveEntryFilter ( int  filter,
int  logicmode 
)
inline

Removes a note entry filter.

If all note entry filters should be removed/cleared, use ClearAllEntryFilters() instead.

Lua-supported.

Parameters
[in]filterAny of the LIEFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was removed. False if it didn't exist.
bool FCLuaIterator::RemoveNotationStyleFilter ( int  filter,
int  logicmode 
)
inline

Removes a notation style filter.

If all notation style filters should be removed/cleared, use ClearAllAltNotationFilters() instead.

Lua-supported.

Parameters
[in]filterAny of the STAFFNOTATION_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was removed. False if it didn't exist.
bool FCLuaIterator::RemoveNoteFilter ( int  filter,
int  logicmode 
)
inline

Removes a note filter.

If all note filters should be removed/cleared, use ClearAllNoteFilters() instead.

Lua-supported.

Parameters
[in]filterAny of the LINFILTER_ constants.
[in]logicmodeAny of the LILOGIC_ constants (LILOGIC_AND, LILOGIC_OR, LILOGIC_NOT)
Returns
True if the filter was removed. False if it didn't exist.
void FCLuaIterator::SetAbortableProgressBar ( bool  state)
inline

Sets if the progress bar should be abortable (by the Esc key).

Lua-supported (also as property).

void FCLuaIterator::SetDownwardProcessing ( bool  downward)
inline

Sets the vertical direction for processing staves in the iteration, for region-based iterators.

There's no performance difference between going downwards or upwards in an iterator.

Lua-supported (also as property).

Parameters
downwardtrue - Iteration goes from top-selected staff and downwards. false - Iteration goes from bottom-selected staff and upwards.
void FCLuaIterator::SetForwardProcessing ( bool  forward)
inline

Sets the direction of the iteration.

By default, the iterator processes the lowest/first element first and goes upwards towards the last element. For some actions however (such as deleting data or inserting data that affects the end of a list), iterating backwards through the data is required.

Please note that some types of backward iteration can be slower than forward iteration, so don't use it unless required.

Lua-supported (also as property).

Parameters
forwardtrue - Iteration goes from first element to last. false - Iteration goes from last element to first.
void FCLuaIterator::SetLoadLayerMode ( int  loadlayermode)
inline

Sets the load layer mode for the note entry iterators, such as ForEachEntry(), ForEachNote(), etc.

This method is identical to the one found at FCNoteEntryCell::SetLoadLayerMode().

Lua-supported (also as property).

void FCLuaIterator::SetNullRegionEqualsAll ( bool  state)
inline

Sets if NULL regions should automatically be interpreted as a full document region, or not. This setting affects all region-based iterators.

Lua-supported (also as property).

void FCLuaIterator::SetPartialMeasureSelections ( bool  partialselections)
inline

Returns partially selected measures should be processed.

Lua-supported (also as property).

Parameters
partialselectionstrue - Measures which are partially selected will also be processed (in addition to fully processed measures). false - Only fully selected measure will be processed.
void FCLuaIterator::SetProcessCurrentDocument ( bool  state)
inline

Sets if the document currently in editing focus should be processed in ForEachDocument and ForEachDocumentSaved calls.

Lua-supported (also as property).

void FCLuaIterator::SetProcessCurrentPart ( bool  state)
inline

Sets if the part currently in editing focus should be processed in ForEachPart calls.

Lua-supported (also as property).

void FCLuaIterator::SetProcessScorePart ( bool  state)
inline

Sets if the score part (the part with part ID 0) should be processed in ForEachPart calls.

Lua-supported (also as property).

void FCLuaIterator::SetProgressUpdateFrequency ( int  freq)
inline

Sets the update frequency for the progress bar.

Higher frequency values improves performance, but reduces accuracy of the progress bar.

Lua-supported (also as property).

Parameters
[in]freqThe number of items processed items that should be made before the progress bar is visually updated. 1 or above are allowed. 1 means a progress bar update for every processed item.
void FCLuaIterator::SetUseProgressBar ( bool  use)
inline

Sets if the update progress bar should be used or not.

Please note that, although it provides info to the user, the progress bar will slow down the processing.

Lua-supported (also as property).