15#if OPERATING_SYSTEM == MAC_OS
16#include "ff_cocoa_cppinterface.h"
31 bool _useFinaleFontExistAPI;
35#ifdef PDK_FRAMEWORK_LUAFRIENDLY
39 bool _starttimerfound, _endtimerfound, _performancefrequencyfound;
41#if OPERATING_SYSTEM == MAC_OS
42 _FCUI_cocoa _fcuicocoa;
45#if OPERATING_SYSTEM == WINDOWS
301#if PDK_FRAMEWORK_LUAFRIENDLY
302 FCUI(EWND parent, lua_State *L =
nullptr) :
__FCBase(), _luastate(L)
307 _parentwindow = parent;
308 _starttimerfound =
false;
309 _endtimerfound =
false;
310 _performancefrequencyfound =
false;
311 WINCODE(_useFinaleFontExistAPI =
false;)
312 MACCODE(_useFinaleFontExistAPI =
true;)
315 const char*
ClassName()
const override {
return "FCUI"; }
317#ifndef DOXYGEN_SHOULD_IGNORE_THIS
319 void _NotifyModalWindowWillOpen();
321 void _NotifyModalWindowDidClose();
339 void AlertErrorUTF8(
const char* pszMessage,
const char* pszTitle = NULL);
355#ifndef PDK_FRAMEWORK_LUAFRIENDLY
371#ifndef PDK_FRAMEWORK_LUAFRIENDLY
376 AlertYesNoUTF8(
const char* pszMessage,
const char* pszTitle = NULL);
396#ifndef PDK_FRAMEWORK_LUAFRIENDLY
419#ifndef PDK_FRAMEWORK_LUAFRIENDLY
435#ifndef PDK_FRAMEWORK_LUAFRIENDLY
488 void AlertInfoUTF8(
const char* pszMessage,
const char* pszTitle = NULL);
506#ifndef PDK_FRAMEWORK_LUAFRIENDLY
621 bool IsPartView()
const {
return (FX_GetCurrentPartID() != 0); }
630 bool IsLayerVisible(twobyte layernum)
const {
return FX_GetShowLayer(layernum-1); }
684 WINCODE(
return true;)
685 MACCODE(
return false;)
695 WINCODE(
return false;)
696 MACCODE(
return true;)
843#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
845 int DisplayExpressionDialog_LuaCFunction(lua_State *l)
848 CMPER cmperint = luabridge::Stack<CMPER>::get(l, 2) LB3(.value());
849 bool isshape = luabridge::Stack<
bool>::get(l, 3) LB3(.value());
853 luabridge::Stack<CMPER>::push(l, returnVal.first) LB3(.throw_on_error());
854 luabridge::Stack<
bool>::push(l, returnVal.second) LB3(.throw_on_error());
949#ifdef PDK_FRAMEWORK_DEBUG
Base class for the Finale Framework classes.
Definition ff_base.h:71
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:609
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 ...
Definition finaleframework.cpp:319
Class for document-independent font information.
Definition ff_base.h:1138
Class to return the results of the ListenToMidi dialog box.
Definition ff_playback.h:28
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
Standard class for basic user interface functionality.
Definition ff_ui.h:29
bool ExecuteOSMenuCommand(EMENUID osmenucmd, bool usemacfinaleapi=false) const
Executes an OS menu command returned by GetOSMenuCommandFromItemText.
Definition finaleframework.cpp:23774
void AlertErrorCString(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with an OK button. C string version.
Definition finaleframework.cpp:23069
bool IsOnMac() const
Returns true if the user runs on the Mac.
Definition ff_ui.h:693
void AlertError(FCString *pMessage, FCString *pTitle=NULL)
Displays a error message box / alert, with an OK button. FCString version.
Definition finaleframework.cpp:23087
bool IsPartView() const
Returns true if the current view is in a part (=not in the score).
Definition ff_ui.h:621
bool TextToClipboard(const char *pszText)
Copies text to the operating system's clipboard.
Definition finaleframework.cpp:23834
void AlertInfoUTF8(const char *pszMessage, const char *pszTitle=NULL)
Displays an information message box / alert, with an OK button. UTF8 version.
Definition finaleframework.cpp:23306
ALERT_RETURNS AlertYesNoUTF8(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with Yes+No buttons. UTF8 version.
Definition finaleframework.cpp:23123
void AlertErrorUTF8(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with an OK button. UTF8 string version.
Definition finaleframework.cpp:23078
bool MenuCommand(MENU_COMMANDS menucmd)
Executes a supported menu command from Finale's menu.
Definition finaleframework.cpp:23332
eUniChar32 DisplaySymbolDialog(FCFontInfo *pFontInfo, eUniChar32 symbolinit=0)
Displays the symbol selection dialog.
Definition finaleframework.cpp:24085
void AlertInfo(FCString *pMessage, FCString *pTitle=NULL)
Displays an information message box / alert, with an OK button. FCString version.
Definition finaleframework.cpp:23315
void RedrawDocument()
Visually redraws the current document.
Definition finaleframework.cpp:23784
FCUI(EWND parent)
The constructor.
Definition ff_ui.h:304
bool DisplayWebURL(FCString *pURLString)
Displays an URL in an external web browser.
Definition finaleframework.cpp:24200
ALERT_RETURNS AlertOkCancel(FCString *pMessage, FCString *pTitle=NULL)
Displays a error message box / alert, with Ok+Cancel buttons. FCString version.
Definition finaleframework.cpp:23234
ALERT_RETURNS AlertOkCancelUTF8(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with OK+Cancel buttons. UTF8 version.
Definition finaleframework.cpp:23225
bool ActivateWindow(EWND hwnd)
Activates a specific window.
Definition finaleframework.cpp:23959
void StopPerformanceTimer()
Stops the high-resolution timer.
Definition finaleframework.cpp:24259
void GetDecimalSeparator(FCString *pString)
Fills a FCString with the decimal separator used for the current user's locale.
Definition finaleframework.cpp:23792
void MoveToMeasure(int measure, int staffno=0)
Moves the view to the indicated 1-based measure.
Definition finaleframework.cpp:23971
EMENUID GetOSMenuCommandFromItemText(const char *pszTopMenu, const char *pszItemText)
Returns the OS-dependent menu command for a specific item in one of Finale's main menus.
Definition finaleframework.cpp:23710
void AlertNeutral(FCString *pMessage, FCString *pTitle=NULL)
Displays a standard message box / alert, with an OK button. FCString version.
Definition finaleframework.cpp:23281
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_ui.h:950
FCUI::ALERT_RETURNS AlertYesNoCancelUTF8(const char *pszMessage, const char *pszTitle)
Displays a error message box / alert, with Yes+No+Cancel buttons. UTF8 version.
Definition finaleframework.cpp:23165
CMPER DisplayArticulationDialog(CMPER cmperinit=0)
Displays the articulation definition selection dialog.
Definition finaleframework.cpp:24053
void GetUserLocaleName(FCString *pString)
Fills a FCString with the locale name used for the current user's locale.
Definition finaleframework.cpp:23805
void Beep()
Gives a beep from the speaker.
Definition finaleframework.cpp:23985
int GetScreenHeight() const
Returns the height in pixels of the primary screen.
Definition finaleframework.cpp:24004
int GetMaxLayers() const
Returns the maximum number of layers that Finale supports.
Definition finaleframework.cpp:24013
int GetScreenWidth() const
Returns the width in pixels of the primary screen.
Definition finaleframework.cpp:23995
ALERT_RETURNS AlertOkCancelCString(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with OK+Cancel buttons. C string version.
Definition finaleframework.cpp:23211
FXWND GetParentWindow()
Returns the window handle to the main window (that was passed to the constructor.)
Definition ff_ui.h:776
bool DisplayShellFolder(FCString *pFolderString)
Opens the file or folder in the operating system's workspace.
Definition finaleframework.cpp:24217
bool MenuPositionCommand(int mainmenuidx, int dropdownidx, int submenuidx)
Executes a menu command from a specific location in Finale's menu. Use this method with care!
Definition finaleframework.cpp:23663
ALERT_RETURNS
The return values used by the alert box methods.
Definition ff_ui.h:54
@ UNKNOWNRETURN
Definition ff_ui.h:69
@ YESRETURN
Definition ff_ui.h:63
@ NORETURN
Definition ff_ui.h:66
@ OKRETURN
Definition ff_ui.h:57
@ CANCELRETURN
Definition ff_ui.h:60
void SetUseIsFontAvailableAPI(bool state)
Sets if Finale's own API for checking font availability should be used for IsFontAvailable().
Definition ff_ui.h:663
EWND GetDocumentWindow()
Return the window handle to the current document window.
Definition finaleframework.cpp:23926
bool IsOnWindows() const
Returns true if the user runs on Windows.
Definition ff_ui.h:682
twobyte GetZoomLevel() const
Returns the current zoom level.
Definition finaleframework.cpp:23910
void AlertInfoCString(const char *pszMessage, const char *pszTitle=NULL)
Displays an information message box / alert, with an OK button. C string version.
Definition finaleframework.cpp:23297
ALERT_RETURNS AlertYesNo(FCString *pMessage, FCString *pTitle=NULL)
Displays a error message box / alert, with Yes+No buttons. FCString version.
Definition finaleframework.cpp:23132
void StartPerformanceTimer()
Starts the high-resolution timer.
Definition finaleframework.cpp:24246
bool GetUseIsFontAvailableAPI() const
Returns if Finale's own API for checking font availability should be used for IsFontAvailable().
Definition ff_ui.h:676
bool IsPageView() const
Returns true if the current view for the current document is Page View.
Definition finaleframework.cpp:23818
bool IsFontAvailable(FCString *pFontName)
Returns true if the font name exists on the running system.
Definition finaleframework.cpp:24148
bool ActivateDocumentWindow()
Brings the current document window to user focus.
Definition finaleframework.cpp:23941
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_ui.h:315
bool IsLayerVisible(twobyte layernum) const
Returns true for any valid layer number unless "Show Active Layer Only" is checked....
Definition ff_ui.h:630
twobyte GetCurrentPage() const
Returns the currently displayed page number in Page View.
Definition finaleframework.cpp:23877
bool TextToClipboardUTF8(const char *pszText)
Copies text to the operating system's clipboard from an UTF8 source.
Definition finaleframework.cpp:23854
ALERT_RETURNS AlertYesNoCString(const char *pszMessage, const char *pszTitle=NULL)
Displays a error message box / alert, with Yes+No buttons. C string version.
Definition finaleframework.cpp:23109
MENU_COMMANDS
The menu commands available to the FCUI::MenuCommand() method.
Definition ff_ui.h:77
@ MENUCMD_CREATEMMRESTS
Definition ff_ui.h:194
@ MENUCMD_TIMESIGTOOL
Definition ff_ui.h:212
@ MENUCMD_TEMPOTOOL
Definition ff_ui.h:263
@ MENUCMD_EHSPELLING_USESPELLINGTABLES
Definition ff_ui.h:142
@ MENUCMD_STAFFSETALLSTAVES
Definition ff_ui.h:164
@ MENUCMD_CHORDTOOL
Definition ff_ui.h:224
@ MENUCMD_OSSIATOOL
Definition ff_ui.h:251
@ MENUCMD_CLEARALLITEMS
Definition ff_ui.h:130
@ MENUCMD_FILLWITHRESTS
Definition ff_ui.h:112
@ MENUCMD_VIEWPAGEVIEW
Definition ff_ui.h:151
@ MENUCMD_REBEAM
Definition ff_ui.h:145
@ MENUCMD_HYPERSCRIBETOOL
Definition ff_ui.h:236
@ MENUCMD_MOVETONEXTSYSTEM
Definition ff_ui.h:100
@ MENUCMD_TIMESIGSPACING
Definition ff_ui.h:91
@ MENUCMD_PAGELAYOUTTOOL
Definition ff_ui.h:254
@ MENUCMD_REPEATTOOL
Definition ff_ui.h:218
@ MENUCMD_HANDGRABBERTOOL
Definition ff_ui.h:233
@ MENUCMD_ZOOMTOOL
Definition ff_ui.h:272
@ MENUCMD_VIEWSTUDIOVIEW
Definition ff_ui.h:154
@ MENUCMD_RESPELLNOTES
Definition ff_ui.h:94
@ MENUCMD_NULL
Definition ff_ui.h:79
@ MENUCMD_CLEFTOOL
Definition ff_ui.h:215
@ MENUCMD_STAFFSET4
Definition ff_ui.h:176
@ MENUCMD_STAFFSET7
Definition ff_ui.h:185
@ MENUCMD_CHECKTIES
Definition ff_ui.h:109
@ MENUCMD_RETRANSCRIBE
Definition ff_ui.h:191
@ MENUCMD_EHSPELLING_FAVORFLATS
Definition ff_ui.h:139
@ MENUCMD_MIDITOOL
Definition ff_ui.h:242
@ MENUCMD_EXPRESSIONTOOL
Definition ff_ui.h:227
@ MENUCMD_LOCKSYSTEMS
Definition ff_ui.h:103
@ MENUCMD_STEMDIRECTIONDOWN
Definition ff_ui.h:124
@ MENUCMD_TUPLETTOOL
Definition ff_ui.h:269
@ MENUCMD_STEMDIRECTIONUP
Definition ff_ui.h:121
@ MENUCMD_EHSPELLING_DEFAULT
Definition ff_ui.h:133
@ MENUCMD_KEYSIGTOOL
Definition ff_ui.h:209
@ MENUCMD_STAFFSET8
Definition ff_ui.h:188
@ MENUCMD_STAFFTOOL
Definition ff_ui.h:203
@ MENUCMD_REDRAWSCREEN
Definition ff_ui.h:158
@ MENUCMD_BREAKMMRESTS
Definition ff_ui.h:197
@ MENUCMD_UNLOCKSYSTEMS
Definition ff_ui.h:106
@ MENUCMD_SELECTIONTOOL
Definition ff_ui.h:200
@ MENUCMD_MEASURETOOL
Definition ff_ui.h:206
@ MENUCMD_NOTESPACING
Definition ff_ui.h:83
@ MENUCMD_RESIZETOOL
Definition ff_ui.h:257
@ MENUCMD_STAFFSET1
Definition ff_ui.h:167
@ MENUCMD_STEMDIRECTIONDEFAULT
Definition ff_ui.h:127
@ MENUCMD_STAFFSET3
Definition ff_ui.h:173
@ MENUCMD_EDITSCORE
Definition ff_ui.h:161
@ MENUCMD_EHSPELLING_FAVORSHARPS
Definition ff_ui.h:136
@ MENUCMD_RESETALLGROUPSANDBRACKETS
Definition ff_ui.h:118
@ MENUCMD_ARTICULATIONTOOL
Definition ff_ui.h:221
@ MENUCMD_STAFFSET2
Definition ff_ui.h:170
@ MENUCMD_REMOVEMANUALSLURADJUSTMENTS
Definition ff_ui.h:115
@ MENUCMD_NOTEMOVERTOOL
Definition ff_ui.h:248
@ MENUCMD_SPEEDYENTRYTOOL
Definition ff_ui.h:260
@ MENUCMD_LYRICSTOOL
Definition ff_ui.h:239
@ MENUCMD_MIRRORTOOL
Definition ff_ui.h:245
@ MENUCMD_GRAPHICSTOOL
Definition ff_ui.h:230
@ MENUCMD_BEATSPACING
Definition ff_ui.h:87
@ MENUCMD_STAFFSET6
Definition ff_ui.h:182
@ MENUCMD_TEXTTOOL
Definition ff_ui.h:266
@ MENUCMD_STAFFSET5
Definition ff_ui.h:179
@ MENUCMD_VIEWSCROLLVIEW
Definition ff_ui.h:148
@ MENUCMD_MOVETOPREVSYSTEM
Definition ff_ui.h:97
bool DisplayListenToMidiDialog(FCListenToMidiResult *result)
Displays the ListenToMidi dialog.
Definition finaleframework.cpp:24117
CMPER DisplayTextExpressionDialog(CMPER cmperinit=0)
Displays the expression selection dialog.
Definition finaleframework.cpp:24018
double ReturnPerformanceTiming()
Calculates the time difference after a start+stop of the hi-resolution timer.
Definition finaleframework.cpp:24268
ALERT_RETURNS AlertYesNoCancel(FCString *pMessage, FCString *pTitle=NULL)
Displays a error message box / alert, with Yes+No+Cancel buttons. FCString version.
Definition finaleframework.cpp:23174
twobyte GetCurrentMeasure() const
Returns the currently displayed measure number in Scroll View.
Definition finaleframework.cpp:23894
void AlertNeutralUTF8(const char *pszMessage, const char *pszTitle=NULL)
Displays a standard message box / alert, with an OK button. UTF8 verison.
Definition finaleframework.cpp:23272
void AlertNeutralCString(const char *pszMessage, const char *pszTitle=NULL)
Displays a standard message box / alert, with an OK button. C string verison.
Definition finaleframework.cpp:23263
static double GetHiResTimer()
Returns a high-resolution timer value, mainly for use with internal profilers.
Definition finaleframework.cpp:24286
CMPER DisplayShapeDialog(CMPER cmperinit=0)
Displays the shape definition selection dialog box.
Definition finaleframework.cpp:24069
std::pair< CMPER, bool > DisplayExpressionDialog(CMPER cmperinit=0, bool isshape=false)
Displays the expression selection dialog.
Definition finaleframework.cpp:24034
EWND GetActiveWindow()
Returns the currently active window.
Definition finaleframework.cpp:23950