FCMCustomLuaWindow

Summary of modifications:

  • All Register* methods (apart from RegisterHandleControlEvent and RegisterHandleTimer) have accompanying Add* and Remove* methods to enable multiple handlers to be added per event.
  • Handlers for non-control events can receive the window object as an optional additional parameter.
  • Control handlers are passed original object to preserve mixin data.
  • Added custom callback queue which can be used by custom events to add dispatchers that will run with the next control event.
  • Added HasBeenShown method for checking if the window has been shown
  • Added methods for the automatic restoration of previous window position when showing (RGPLua > 0.60) for use with finenv.RetainLuaState and modeless windows.
  • Added DebugClose option to assist with debugging (if ALT or SHIFT key is pressed when window is closed and debug mode is enabled, finenv.RetainLuaState will be set to false)

Functions

Init

fcmcustomluawindow.Init(self)

View source

[Internal]

Input Type Description
self FCMCustomLuaWindow

RegisterHandleCommand

fcmcustomluawindow.RegisterHandleCommand(self, callback)

View source

[Override] Ensures that the handler is passed the original control object.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleCommand in the PDK for callback signature.
Return type Description
boolean true on success

RegisterHandleDataListCheck

fcmcustomluawindow.RegisterHandleDataListCheck(self, callback)

View source

[Override] Ensures that the handler is passed the original control object.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleDataListCheck in the PDK for callback signature.
Return type Description
boolean true on success

RegisterHandleDataListSelect

fcmcustomluawindow.RegisterHandleDataListSelect(self, callback)

View source

[Override] Ensures that the handler is passed the original control object.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleDataListSelect in the PDK for callback signature.
Return type Description
boolean true on success

RegisterHandleUpDownPressed

fcmcustomluawindow.RegisterHandleUpDownPressed(self, callback)

View source

[Override] Ensures that the handler is passed the original control object.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleUpDownPressed in the PDK for callback signature.
Return type Description
boolean true on success

CancelButtonPressed

fcmcustomluawindow.CancelButtonPressed(window)

View source

[Callback Template] [Override] Can optionally receive the window object.

Input Type Description
window (optional) FCMCustomLuaWindow

RegisterHandleCancelButtonPressed

fcmcustomluawindow.RegisterHandleCancelButtonPressed(self, callback)

View source

[Override]

Input Type Description
self FCMCustomLuaWindow
callback function See CancelButtonPressed for callback signature.
Return type Description
boolean true on success

OkButtonPressed

fcmcustomluawindow.OkButtonPressed(window)

View source

[Callback Template] [Override] Can optionally receive the window object.

Input Type Description
window (optional) FCMCustomLuaWindow

RegisterHandleOkButtonPressed

fcmcustomluawindow.RegisterHandleOkButtonPressed(self, callback)

View source

[Override]

Input Type Description
self FCMCustomLuaWindow
callback function See OkButtonPressed for callback signature.
Return type Description
boolean true on success

InitWindow

fcmcustomluawindow.InitWindow(window)

View source

[Callback Template] [Override] Can optionally receive the window object.

Input Type Description
window (optional) FCMCustomLuaWindow

RegisterInitWindow

fcmcustomluawindow.RegisterInitWindow(self, callback)

View source

[Override]

Input Type Description
self FCMCustomLuaWindow
callback function See InitWindow for callback signature.
Return type Description
boolean true on success

CloseWindow

fcmcustomluawindow.CloseWindow(window)

View source

[Callback Template] [Override] Can optionally receive the window object.

Input Type Description
window (optional) FCMCustomLuaWindow

RegisterCloseWindow

fcmcustomluawindow.RegisterCloseWindow(self, callback)

View source

[Override]

Input Type Description
self FCMCustomLuaWindow
callback function See CloseWindow for callback signature.
Return type Description
boolean true on success

AddHandleCommand

fcmcustomluawindow.AddHandleCommand(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterHandleCommand except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleCommand in the PDK for callback signature.

AddHandleDataListCheck

fcmcustomluawindow.AddHandleDataListCheck(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterHandleDataListCheck except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleDataListCheck in the PDK for callback signature.

AddHandleDataListSelect

fcmcustomluawindow.AddHandleDataListSelect(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterHandleDataListSelect except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleDataListSelect in the PDK for callback signature.

AddHandleUpDownPressed

fcmcustomluawindow.AddHandleUpDownPressed(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterHandleUpDownPressed except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See FCCustomLuaWindow.HandleUpDownPressed in the PDK for callback signature.

AddHandleCancelButtonPressed

fcmcustomluawindow.AddHandleCancelButtonPressed(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterCancelButtonPressed except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See CancelButtonPressed for callback signature.

AddHandleOkButtonPressed

fcmcustomluawindow.AddHandleOkButtonPressed(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterOkButtonPressed except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See OkButtonPressed for callback signature.

AddInitWindow

fcmcustomluawindow.AddInitWindow(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterInitWindow except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See InitWindow for callback signature.

AddCloseWindow

fcmcustomluawindow.AddCloseWindow(self, callback)

View source

[Fluid] Adds a handler. Similar to the equivalent RegisterCloseWindow except there is no limit to the number of handlers that can be added. Added handlers are called in the order they are added after the registered handler, if there is one.

Input Type Description
self FCMCustomLuaWindow
callback function See CloseWindow for callback signature.

RemoveHandleCommand

fcmcustomluawindow.RemoveHandleCommand(self, callback)

View source

[Fluid] Removes a handler added by AddHandleCommand.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveHandleDataListCheck

fcmcustomluawindow.RemoveHandleDataListCheck(self, callback)

View source

[Fluid] Removes a handler added by AddHandleDataListCheck.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveHandleDataListSelect

fcmcustomluawindow.RemoveHandleDataListSelect(self, callback)

View source

[Fluid] Removes a handler added by AddHandleDataListSelect.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveHandleUpDownPressed

fcmcustomluawindow.RemoveHandleUpDownPressed(self, callback)

View source

[Fluid] Removes a handler added by AddHandleUpDownPressed.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveHandleCancelButtonPressed

fcmcustomluawindow.RemoveHandleCancelButtonPressed(self, callback)

View source

[Fluid] Removes a handler added by AddHandleCancelButtonPressed.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveHandleOkButtonPressed

fcmcustomluawindow.RemoveHandleOkButtonPressed(self, callback)

View source

[Fluid] Removes a handler added by AddHandleOkButtonPressed.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveInitWindow

fcmcustomluawindow.RemoveInitWindow(self, callback)

View source

[Fluid] Removes a handler added by AddInitWindow.

Input Type Description
self FCMCustomLuaWindow
callback function

RemoveCloseWindow

fcmcustomluawindow.RemoveCloseWindow(self, callback)

View source

[Fluid] Removes a handler added by AddCloseWindow.

Input Type Description
self FCMCustomLuaWindow
callback function

QueueHandleCustom

fcmcustomluawindow.QueueHandleCustom(self, callback)

View source

[Fluid] [Internal] Adds a function to the queue which will be executed in the same context as an event handler at the next available opportunity. Once called, the callback will be removed from tbe queue (i.e. it will only be called once). For multiple calls, the callback will need to be added to the queue again. The callback will not be passed any arguments.

Input Type Description
self FCMCustomLuaWindow
callback function

HasBeenShown

fcmcustomluawindow.HasBeenShown(self)

View source

Checks if the window has been shown at least once prior, either as a modal or modeless.

Input Type Description
self FCMCustomLuaWindow
Return type Description
boolean true if it has been shown, false if not

SetEnableDebugClose

fcmcustomluawindow.SetEnableDebugClose(self, enabled)

View source

[Fluid] If enabled and in debug mode, when the window is closed with either ALT or SHIFT key pressed, finenv.RetainLuaState will be set to false. This is done before CloseWindow handlers are called. Default state is disabled.

Input Type Description
self FCMCustomLuaWindow
enabled boolean

GetEnableDebugClose

fcmcustomluawindow.GetEnableDebugClose(self)

View source

Returns the enabled state of the DebugClose option.

Input Type Description
self FCMCustomLuaWindow
Return type Description
boolean true if enabled, false if disabled.

SetRestoreControlState

fcmcustomluawindow.SetRestoreControlState(self, enabled)

View source

[Fluid] Enables or disables the automatic restoration of control state on subsequent showings of the window. This is disabled by default.

Input Type Description
self FCMCustomLuaWindow
enabled boolean true to enable, false to disable.

GetRestoreControlState

fcmcustomluawindow.GetRestoreControlState(self)

View source

Checks if control state restoration is enabled.

Input Type Description
self FCMCustomLuaWindow
Return type Description
boolean true if enabled, false if disabled.

ExecuteModal

fcmcustomluawindow.ExecuteModal(self)

View source

[Override] Restores the previous position if auto restore is on.

Input Type Description
self FCMCustomLuaWindow
Return type Description
number

ShowModeless

fcmcustomluawindow.ShowModeless(self)

View source

[Override] Restores the previous position if auto restore is on.

Input Type Description
self FCMCustomLuaWindow
Return type Description
boolean