Finale PDK Framework 0.77
Power Up Your Finale Music Software
Loading...
Searching...
No Matches
fflua_customluawindow.h
1/*
2 * File: fflua_customluawindow.h
3 *
4 * Created by Jari Williamsson on 2015-11-01.
5 *
6 * ******* IMPORTANT!!! ******
7 * Although this file is available in the PDK Framework folder, it should NOT be used in
8 * the PDK Framework umbrella. This file is placed in the framework folder purely ONLY to
9 * provide online documentation for the FCCustomLuaWindow class!
10 *
11 * (The file will ONLY make sense in the context of the specific
12 * LuaBridge connection implementation.)
13 *
14 * The following class implementation is for the special FCCustomLuaWindow class in JW and RGP Lua. Since
15 * a limitation of LuaBridge is that the include file can only be included at one place,
16 * this work-around is used.
17 *
18 * If you include this header you must provide a LuaRun_ExceptionAbort function that prints the error
19 * in the Lua output stream, disconnects and disposes of the Lua state, and displays the message to the user.
20 * You can use lua_getstack to determine if LuaRun_ExceptionAbort is running under Lua and should throw the exception
21 * up the chain rather than taking other actions.
22 */
23
24
25#ifndef jwlua_fflua_customluawindow_h
26#define jwlua_fflua_customluawindow_h
27
28#include <unordered_map>
29#include <functional>
30
41{
42 /* Lua event handlers */
43 luabridge::LuaRef _handleCommand;
44 luabridge::LuaRef _textSelectionChanged;
45 luabridge::LuaRef _handleUpDownPressed;
46 luabridge::LuaRef _handleDataListSelect;
47 luabridge::LuaRef _handleDataListCheck;
48 luabridge::LuaRef _handleListDoubleClick;
49 luabridge::LuaRef _handleListEnterKey;
50 luabridge::LuaRef _handleCancelButtonPressed;
51 luabridge::LuaRef _handleOkButtonPressed;
52 luabridge::LuaRef _handleInitWindow;
53 luabridge::LuaRef _handleCloseWindow;
54 luabridge::LuaRef _handleActivate;
55 luabridge::LuaRef _handleTimer;
56 luabridge::LuaRef _handleDarkModeIsChanging;
57 luabridge::LuaRef _handleOSMenuCommandExecuted;
58 luabridge::LuaRef _scrollChanged;
59 luabridge::LuaRef _handleSaveRequest;
60 luabridge::LuaRef _handleMouseTrackingStarted;
61 luabridge::LuaRef _handleMouseTrackingStopped;
62 std::unordered_map<FCControl *, luabridge::LuaRef> _controlHandles;
63 std::function<void(lua_State *)> _disconnector;
64 bool _inErrorRecovery;
65#if OPERATING_SYSTEM == WINDOWS
66 std::unique_ptr<luabridge::LuaException> _forwardedException;
67#endif
68
69 bool _RegisterHandler(luabridge::LuaRef &class_storage, luabridge::LuaRef &lua_callback_function)
70 {
71 if (!lua_callback_function.isFunction()) return false;
72 class_storage = lua_callback_function;
73 return true;
74 }
75
76#if OPERATING_SYSTEM == MAC_OS
77 bool ModelessCancelCanEscape() const override { return true; }
78#endif
79
80 void WindowDestroyed() override
81 {
82 if (_disconnector && !IsModal())
83 _disconnector(_handleCommand.state());
85 }
86
87 template<typename RT>
88 auto _MakeLuaFunctionResult(bool success)
89 {
90 if constexpr (std::is_void<RT>::value)
91 return std::pair(success, static_cast<void*>(nullptr));
92 else
93 return std::pair(success, RT{});
94 }
95
96 template<typename RT = void, typename... Args>
97 auto CallLuaFunction(luabridge::LuaRef &luafunc, FCControl *pControl, Args... args)
98 {
99 auto retval = _MakeLuaFunctionResult<RT>(true);
100 if (!_inErrorRecovery && luafunc.isFunction())
101 {
102 try
103 {
104 luabridge::LuaResult result = [&]()
105 {
106 return pControl ? pControl->_LuaCallEventHandler(luafunc, LuaRun_ErrorFunction, args...)
107 : luafunc.callWithHandler(LuaRun_ErrorFunction, args...);
108 }();
109 if (!result) result.raiseException();
110 if constexpr (!std::is_void<RT>::value)
111 {
112 if (result.size() > 0)
113 {
114 auto casted = result[0].cast<RT>();
115 if (casted)
116 retval.second = casted.value();
117 }
118 }
119 }
120 catch (luabridge::LuaException &e)
121 {
122 _inErrorRecovery = true;
123 retval.first = false;
124#if OPERATING_SYSTEM == WINDOWS
125 // Windows has to unwind modals differently than Mac,
126 // due to a crash that seems to be related to throwing out of FX_Dialog when it is running a modal.
127 if (IsModal() || luafunc == _handleInitWindow)
128 {
129 _forwardedException.reset(new luabridge::LuaException(e));
130 if (luafunc == _handleCloseWindow || luafunc == _handleInitWindow) // we can't close while in init window event, unfortunately
131 retval.first = true;
132 else
134 }
135 else
136 LuaRun_ExceptionAbort(e);
137#else
138 LuaRun_ExceptionAbort(e);
139#endif
140 }
141 }
142 return retval;
143 }
144
145 template<typename RT = void, typename... Args>
146 auto CallLuaFunction(luabridge::LuaRef &luafunc, Args... args)
147 {
148 return CallLuaFunction<RT>(luafunc, static_cast<FCControl*>(nullptr), args...);
149 }
150
151
152public:
161 _handleCommand(L),
162 _textSelectionChanged(L),
163 _handleUpDownPressed(L),
164 _handleDataListSelect(L),
165 _handleDataListCheck(L),
166 _handleListDoubleClick(L),
167 _handleListEnterKey(L),
168 _handleCancelButtonPressed(L),
169 _handleOkButtonPressed(L),
170 _handleInitWindow(L),
171 _handleCloseWindow(L),
172 _handleActivate(L),
173 _handleTimer(L),
174 _handleDarkModeIsChanging(L),
175 _handleOSMenuCommandExecuted(L),
176 _scrollChanged(L),
177 _handleSaveRequest(L),
178 _handleMouseTrackingStarted(L),
179 _handleMouseTrackingStopped(L),
180 _disconnector(nullptr),
181 _inErrorRecovery(false)
182 {}
183
184#ifndef DOXYGEN_SHOULD_IGNORE_THIS
185#if OPERATING_SYSTEM == WINDOWS
187 twobyte ExecuteModal(__FCUserWindow* pParent) override
188 {
189 const twobyte retval = FCCustomWindow::ExecuteModal(pParent);
190 if (_forwardedException)
191 LuaRun_ExceptionAbort(*_forwardedException);
192 return retval;
193 }
194#endif // OPERATING_SYSTEM == WINDOWS
195#endif // DOXYGEN_SHOULD_IGNORE_THIS
196
197 const char* ClassName() const override { return "FCCustomLuaWindow"; }
198
240 {
241 if (! _disconnector)
242 return false;
243 FXWND hParent = GetFinaleMainWindow();
244#if OPERATING_SYSTEM == WINDOWS
245 const FCLuaScriptItem* pLuaScriptItem = GetControllingLuaScriptItem(_handleCommand.state());
246 if (pLuaScriptItem && pLuaScriptItem->GetControllingWindow())
247 hParent = pLuaScriptItem->GetControllingWindow()->GetWindowHandle();
248#endif
250 return true;
251 }
252
273 {
274#if OPERATING_SYSTEM == MAC_OS
275 _FCWindowController_cocoa* pCocoaLink = _GetCocoaLink();
276 if (pCocoaLink) pCocoaLink->SetModelessCanBecomeMainWindow(true);
277#endif
278 return ShowModeless();
279 }
280
281
282#ifndef DOXYGEN_SHOULD_IGNORE_THIS
284 void SetDisconnector(std::function<void(lua_State *)> func)
285 { _disconnector = func; }
286#endif
287
298 bool RegisterHandleCommand(luabridge::LuaRef lua_callback_function)
299 {
300 return _RegisterHandler(_handleCommand, lua_callback_function);
301 }
302
319 bool RegisterHandleControlEvent(FCControl * pControl, luabridge::LuaRef lua_callback_function)
320 {
321 if (! lua_callback_function.isFunction()) return false;
322 auto it = _controlHandles.find(pControl);
323 if (it == _controlHandles.end())
324 _controlHandles.emplace(pControl, lua_callback_function);
325 else
326 it->second = lua_callback_function;
327 return true;
328 }
329
339 bool RegisterTextSelectionChanged(luabridge::LuaRef lua_callback_function)
340 {
341 return _RegisterHandler(_textSelectionChanged, lua_callback_function);
342 }
343
353 bool RegisterScrollChanged(luabridge::LuaRef lua_callback_function)
354 {
355 return _RegisterHandler(_scrollChanged, lua_callback_function);
356 }
357
367 bool RegisterHandleKeyboardCommand(luabridge::LuaRef lua_callback_function)
368 {
369 return _RegisterHandler(_handleSaveRequest, lua_callback_function);
370 }
371
381 bool RegisterHandleUpDownPressed(luabridge::LuaRef lua_callback_function)
382 {
383 return _RegisterHandler(_handleUpDownPressed, lua_callback_function);
384 }
385
395 bool RegisterHandleDataListSelect(luabridge::LuaRef lua_callback_function)
396 {
397 return _RegisterHandler(_handleDataListSelect, lua_callback_function);
398 }
399
409 bool RegisterHandleDataListCheck(luabridge::LuaRef lua_callback_function)
410 {
411 return _RegisterHandler(_handleDataListCheck, lua_callback_function);
412 }
413
423 bool RegisterHandleListDoubleClick(luabridge::LuaRef lua_callback_function)
424 {
425 return _RegisterHandler(_handleListDoubleClick, lua_callback_function);
426 }
427
437 bool RegisterHandleListEnterKey(luabridge::LuaRef lua_callback_function)
438 {
439 return _RegisterHandler(_handleListEnterKey, lua_callback_function);
440 }
441
451 bool RegisterHandleCancelButtonPressed(luabridge::LuaRef lua_callback_function)
452 {
453 return _RegisterHandler(_handleCancelButtonPressed, lua_callback_function);
454 }
455
465 bool RegisterHandleOkButtonPressed(luabridge::LuaRef lua_callback_function)
466 {
467 return _RegisterHandler(_handleOkButtonPressed, lua_callback_function);
468 }
469
479 bool RegisterInitWindow(luabridge::LuaRef lua_callback_function)
480 {
481 return _RegisterHandler(_handleInitWindow, lua_callback_function);
482 }
483
493 bool RegisterCloseWindow(luabridge::LuaRef lua_callback_function)
494 {
495 return _RegisterHandler(_handleCloseWindow, lua_callback_function);
496 }
497
507 bool RegisterHandleActivate(luabridge::LuaRef lua_callback_function)
508 {
509 return _RegisterHandler(_handleActivate, lua_callback_function);
510 }
511
521 bool RegisterHandleTimer(luabridge::LuaRef lua_callback_function)
522 {
523 return _RegisterHandler(_handleTimer, lua_callback_function);
524 }
525
535 bool RegisterDarkModeIsChanging(luabridge::LuaRef lua_callback_function)
536 {
537 return _RegisterHandler(_handleDarkModeIsChanging, lua_callback_function);
538 }
539
554 bool RegisterOSMenuCommandExecuted(luabridge::LuaRef lua_callback_function)
555 {
556 return _RegisterHandler(_handleOSMenuCommandExecuted, lua_callback_function);
557 }
558
568 bool RegisterMouseTrackingStarted(luabridge::LuaRef lua_callback_function)
569 {
570 return _RegisterHandler(_handleMouseTrackingStarted, lua_callback_function);
571 }
572
582 bool RegisterMouseTrackingStopped(luabridge::LuaRef lua_callback_function)
583 {
584 return _RegisterHandler(_handleMouseTrackingStopped, lua_callback_function);
585 }
586
596 {
597 auto it = _controlHandles.find(pControl);
598 if (it == _controlHandles.end()) return false;
599 if (pControl)
600 CallLuaFunction(it->second, pControl);
601 return true; // return true even if exception, to avoid HandleCommand() trying it again
602 }
603
617 bool HandleCommand(FCControl* pControl) override
618 {
619 bool result = FCCustomWindow::HandleCommand(pControl);
620 if (pControl && !HandleControlEvent(pControl))
621 CallLuaFunction(_handleCommand, pControl);
622 return result;
623 }
624
631 void TextSelectionChanged(FCControl* pControl) override
632 {
634 if (pControl)
635 CallLuaFunction(_textSelectionChanged, pControl);
636 }
637
644 void ScrollChanged(FCControl* pControl) override
645 {
647 if (pControl)
648 CallLuaFunction(_scrollChanged, pControl);
649 }
650
658 bool HandleKeyboardCommand(FCControl* pControl, eUniChar16 character) override
659 {
660 auto [success, funcResult] = CallLuaFunction<bool>(_handleSaveRequest, pControl, character);
661 if (success && funcResult)
662 return true;
663 return FCCustomWindow::HandleKeyboardCommand(pControl, character);
664 }
665
675 void HandleUpDownPressed(FCControl* pControl, int delta) override
676 {
678 if (pControl)
679 CallLuaFunction(_handleUpDownPressed, pControl, delta);
680 }
681
690 void HandleDataListSelect(FCCtrlDataList* pControl, int lineindex) override
691 {
692 FCCustomWindow::HandleDataListSelect(pControl, lineindex);
693 if (pControl)
694 CallLuaFunction(_handleDataListSelect, pControl, lineindex);
695 }
696
706 void HandleDataListCheck(FCCtrlDataList* pControl, int lineindex, bool checkstate) override
707 {
708 FCCustomWindow::HandleDataListCheck(pControl, lineindex, checkstate);
709 if (pControl)
710 CallLuaFunction(_handleDataListCheck, pControl, lineindex, checkstate);
711 }
712
717 void HandleListDoubleClick(FCControl* pControl) override
718 {
720 if (pControl)
721 CallLuaFunction(_handleListDoubleClick, pControl);
722 }
723
729 bool HandleListEnterKey(FCControl* pControl) override
730 {
731 if (pControl)
732 {
733 auto [success, funcResult] = CallLuaFunction<bool>(_handleListEnterKey, pControl);
734 if (success && funcResult)
735 return true;
736 }
737 return FCCustomWindow::HandleListEnterKey(pControl);
738 }
739
745 void CancelButtonPressed() override
746 {
747 auto [success, _] = CallLuaFunction(_handleCancelButtonPressed);
748 if (success)
750 }
751
757 void OkButtonPressed() override
758 {
759 auto [success, _] = CallLuaFunction(_handleOkButtonPressed);
760 if (success)
762 }
763
768 void InitWindow() override
769 {
771 CallLuaFunction(_handleInitWindow);
772 }
773
778 void CloseWindow() override
779 {
780 auto [success, _] = CallLuaFunction(_handleCloseWindow);
781 if (success)
783 }
784
791 void HandleActivate(bool activated) override
792 {
794 CallLuaFunction(_handleActivate, activated);
795 }
796
803 void HandleTimer(twobyte timerID) override
804 {
806 CallLuaFunction(_handleTimer, timerID);
807 }
808
815 void DarkModeIsChanging(bool isDarkMode) override
816 {
818 CallLuaFunction(_handleDarkModeIsChanging, isDarkMode);
819 }
820
828 void OSMenuCommandExecuted(EMENUID menuCommand, int menuCommandType) override
829 {
830 FCCustomWindow::OSMenuCommandExecuted(menuCommand, menuCommandType);
831 CallLuaFunction(_handleOSMenuCommandExecuted, menuCommand, menuCommandType);
832 }
833
840 void MouseTrackingStarted(FCControl* pControl) override
841 {
843 CallLuaFunction(_handleMouseTrackingStarted, pControl);
844 }
845
852 void MouseTrackingStopped(FCControl* pControl) override
853 {
855 CallLuaFunction(_handleMouseTrackingStopped, pControl);
856 }
857};
858
859#endif
Base class for all other dialog/window classes.
Definition ff_dialogs.h:563
virtual void HandleDataListSelect(FCCtrlDataList *pControl, int lineindex)
Virtual handler method for when FCCtrlDataList selection state changes. Overwrite to provide function...
Definition ff_dialogs.h:1221
virtual void TextSelectionChanged(FCControl *pControl)
Virtual method that is called when the selected text on a FCCtrlTextEditor control changes.
Definition ff_dialogs.h:1157
virtual bool HandleCommand(FCControl *pControl)
Virtual method that is called when a user command occurs, such as a button press.
Definition ff_dialogs.h:1151
bool IsModal()
Returns true if the dialog currently is running in a modal state.
Definition ff_dialogs.h:800
virtual void HandleUpDownPressed(FCControl *pControl, int delta)
Virtual handler method for up/down arrow controls when they are clicked. Overwrite to provide functio...
Definition ff_dialogs.h:1212
virtual void CloseButtonPressed()
Virtual method that is called when a control with a "Close" action is pressed by the user.
Definition ff_dialogs.h:1110
virtual void HandleDataListCheck(FCCtrlDataList *pControl, int lineindex, bool checkstate)
Virtual handler method for when FCCtrlDataList check state changes (for data list controls with check...
Definition ff_dialogs.h:1232
virtual void CloseWindow()=0
Closes the window. Functionality is provided by the child classes.
virtual bool HandleListEnterKey(FCControl *pControl)
Called every time there's an enter key hit inside a data list or list box.
Definition ff_dialogs.h:1246
virtual void OSMenuCommandExecuted(EMENUID menuCommand, int menuCommandType)
Called after a menu command on the main menu tree is executed. This function is also called when keyb...
Definition ff_dialogs.h:1099
virtual void HandleActivate(bool activated)
Virtual method that is called when the window is activated or deactivated. Overwrite in child classes...
Definition ff_dialogs.h:1252
virtual void CancelButtonPressed()
Virtual handler method that is called when a control with a "Cancel" action is pressed by the user.
Definition ff_dialogs.h:1140
virtual void HandleListDoubleClick(FCControl *pControl)
Called every time there's a double-click inside a data list or list box.
Definition ff_dialogs.h:1238
virtual void DarkModeIsChanging(bool isDarkMode)
Called whenever Dark Mode changes. (Currently macOS only.)
Definition ff_dialogs.h:1089
virtual void MouseTrackingStarted(FCControl *pControl)
Virtual method that is called when a mouse tracking starts. Currently only supported fo FCCtrlSlider.
Definition ff_dialogs.h:1264
virtual void WindowDestroyed()
Called once just when the window/dialog has been destroyed.
Definition ff_dialogs.h:1083
virtual void HandleTimer(twobyte timerID)
Virtual handler method that is called on timer events. Overwrite in child classes.
Definition ff_dialogs.h:1249
virtual void MouseTrackingStopped(FCControl *pControl)
Virtual method that is called when a mouse tracking stops. Currently only supported fo FCCtrlSlider.
Definition ff_dialogs.h:1270
virtual bool HandleKeyboardCommand(FCControl *pControl, eUniChar16 character)
Virtual method that notifies when a keyboard command has been requested with the Command key (macOS) ...
Definition ff_dialogs.h:1193
virtual void InitWindow()
Called once just when the window/dialog has been created.
Definition finaleframework.cpp:26005
Base class for all UI controls in a dialog.
Definition ff_dialogs.h:1536
Class that handles a contol with multiple lines of data, arranged in columns.
Definition ff_dialogs.h:4292
Special FCCustomWindow child class, that provides the additional functionality to hook up JW Lua call...
Definition fflua_customluawindow.h:41
bool ShowModeless()
Displays the dialog box as a modeless window. The dialog must have been registered with finenv....
Definition fflua_customluawindow.h:239
bool HandleControlEvent(FCControl *pControl)
Virtual method that is called when an event occurs on a registered control.
Definition fflua_customluawindow.h:595
bool RegisterHandleCancelButtonPressed(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the CancelButtonPressed() event handler.
Definition fflua_customluawindow.h:451
bool RegisterDarkModeIsChanging(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the DarkModeIsChanging() event handler.
Definition fflua_customluawindow.h:535
bool RegisterHandleListEnterKey(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleListEnterKey() event handler.
Definition fflua_customluawindow.h:437
bool RegisterScrollChanged(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the ScrollChanged() event handler.
Definition fflua_customluawindow.h:353
bool RegisterHandleListDoubleClick(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleListDoubleClick() event handler.
Definition fflua_customluawindow.h:423
bool RegisterInitWindow(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the InitWindow() event handler.
Definition fflua_customluawindow.h:479
bool RegisterHandleControlEvent(FCControl *pControl, luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleControlEvent() event handler.
Definition fflua_customluawindow.h:319
void HandleActivate(bool activated) override
Virtual handler method that is called when a window is activated or deactivated.
Definition fflua_customluawindow.h:791
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition fflua_customluawindow.h:197
bool RegisterHandleOkButtonPressed(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the OkButtonPressed() event handler.
Definition fflua_customluawindow.h:465
void HandleTimer(twobyte timerID) override
Virtual handler method that is called for each timer event.
Definition fflua_customluawindow.h:803
bool RegisterTextSelectionChanged(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the TextSelectionChanged() event handler.
Definition fflua_customluawindow.h:339
void InitWindow() override
Virtual handler method that is called when a window just has been created, but not yet shown.
Definition fflua_customluawindow.h:768
void HandleDataListSelect(FCCtrlDataList *pControl, int lineindex) override
Virtual handler method for when FCCtrlDataList selection state changes.
Definition fflua_customluawindow.h:690
bool ShowModelessWithGrabbyFocus()
Displays the macOS version of the dialog box as a modeless window with grabby focus behavior.
Definition fflua_customluawindow.h:272
void HandleDataListCheck(FCCtrlDataList *pControl, int lineindex, bool checkstate) override
Virtual handler method for when FCCtrlDataList check state changes (for data list controls with check...
Definition fflua_customluawindow.h:706
bool RegisterMouseTrackingStarted(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the MouseTrackingStarted() event handler.
Definition fflua_customluawindow.h:568
void DarkModeIsChanging(bool isDarkMode) override
Virtual handler method that is called when Dark Mode changes. (Currently macOS only....
Definition fflua_customluawindow.h:815
bool RegisterOSMenuCommandExecuted(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the OSMenuCommandExecuted() event handler.
Definition fflua_customluawindow.h:554
void HandleUpDownPressed(FCControl *pControl, int delta) override
Virtual handler method for up/down arrow controls when they are clicked.
Definition fflua_customluawindow.h:675
bool RegisterHandleTimer(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleTimer() event handler.
Definition fflua_customluawindow.h:521
void OkButtonPressed() override
Virtual handler method that is called when a control with a "OK" action is pressed by the user.
Definition fflua_customluawindow.h:757
void CloseWindow() override
Virtual handler method that is called when a window is closing. The Lua handler is called first.
Definition fflua_customluawindow.h:778
void MouseTrackingStopped(FCControl *pControl) override
Virtual handler method that is called when a mouse tracking stops. Currently only supported fo FCCtrl...
Definition fflua_customluawindow.h:852
void TextSelectionChanged(FCControl *pControl) override
Virtual handler method for detecing when the text selection changes on edit text controls.
Definition fflua_customluawindow.h:631
bool RegisterHandleDataListSelect(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleDataListSelect() event handler.
Definition fflua_customluawindow.h:395
void MouseTrackingStarted(FCControl *pControl) override
Virtual handler method that is called when a mouse tracking starts. Currently only supported fo FCCtr...
Definition fflua_customluawindow.h:840
void ScrollChanged(FCControl *pControl) override
Virtual handler method for detecing when the scrollbar changes.
Definition fflua_customluawindow.h:644
bool RegisterCloseWindow(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the CloseWindow() event handler.
Definition fflua_customluawindow.h:493
void OSMenuCommandExecuted(EMENUID menuCommand, int menuCommandType) override
Virtual handler method that is called after a menu command is executed.
Definition fflua_customluawindow.h:828
bool RegisterHandleKeyboardCommand(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleKeyboardCommand() event handler.
Definition fflua_customluawindow.h:367
bool HandleCommand(FCControl *pControl) override
Virtual method that is called when a user command occurs, such as a button press.
Definition fflua_customluawindow.h:617
bool RegisterMouseTrackingStopped(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the MouseTrackingStopped() event handler.
Definition fflua_customluawindow.h:582
bool HandleListEnterKey(FCControl *pControl) override
Virtual handler method there's an enter key hit inside a data list or list box.
Definition fflua_customluawindow.h:729
void HandleListDoubleClick(FCControl *pControl) override
Virtual handler method for when there's a double-click inside a data list or list box.
Definition fflua_customluawindow.h:717
bool RegisterHandleDataListCheck(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleDataListCheck() event handler.
Definition fflua_customluawindow.h:409
void CancelButtonPressed() override
Virtual handler method that is called when a control with a "Cancel" action is pressed by the user.
Definition fflua_customluawindow.h:745
bool RegisterHandleUpDownPressed(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleUpDownPressed() event handler.
Definition fflua_customluawindow.h:381
bool RegisterHandleCommand(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleCommand() event handler. This handler is a catch-all for all co...
Definition fflua_customluawindow.h:298
FCCustomLuaWindow(lua_State *L)
The constructor.
Definition fflua_customluawindow.h:160
bool RegisterHandleActivate(luabridge::LuaRef lua_callback_function)
Registers a Lua function to the HandleActivate() event handler.
Definition fflua_customluawindow.h:507
bool HandleKeyboardCommand(FCControl *pControl, eUniChar16 character) override
Virtual handler method for handling keyboard save requests.
Definition fflua_customluawindow.h:658
A class that supports programmatically created controls (that are not defined in resource files).
Definition ff_dialogs.h:6490
void OkButtonPressed() override
Override method for __FCUserWindow::OkButtonPressed.
Definition ff_dialogs.h:6604
Class that represents a single Lua script item. This class is not part of the C++ PDK Framework.
Definition fflua_luascriptitem.h:70
__FCUserWindow * GetControllingWindow() const
Gets the controlling window for this script item.
Definition fflua_luascriptitem.h:400
EXECMODAL_RETURNS ExecuteModal(__FCUserWindow *pParent=nullptr)
Executes a dialog box in a modal state.
Definition finaleframework.cpp:31789
void ShowModeless(EWND WINCODE(hParent))
Displays the dialog box as a modeless window.
Definition finaleframework.cpp:31742