Show/HideTabContent |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>. | All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>. | ||
=== CheckInstallRequirements === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Module</code> || {{Template:TypeColorCard|Slot}} || Required || Module to check. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || Error message, if requirements not met. | |||
|} | |||
=== CheckUninstallRequirements === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Module</code> || {{Template:TypeColorCard|Slot}} || Required || Module to check. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || Error message, if requirements not met. | |||
|} | |||
=== CheckVersion === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Min</code>,<code>Test</code>,<code>Max</code> || {{Template:TypeColorCard|double3x3}} || Required || Minimum, tested version, and maximum as rows of a double3x3 matrix. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|bool}} || If the tested version is within the inclusive range. | |||
|} | |||
=== ConfirmPackHandler === | |||
Confirms that the selected pack handler is capable of packing the active tab on the print. | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>PackHandler</code> || {{Template:TypeColorCard|Slot}} || Required || Pack handler. | |||
|- | |||
| <code>Print</code> || {{Template:TypeColorCard|Slot}} || Required || Print to pack. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|bool}} || If the provided handler can pack the print. | |||
|} | |||
=== DeleteTab === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab to be deleted. | |||
|} | |||
=== DispatchAsyncEvent === | |||
Async version of [[#DispatchEvent|DispatchEvent]]. It is important to clone the event data slot before dispatching and to delete it afterwards because multiple events could be dispatched at the same time, which would be overriding the data. | |||
=== DispatchEvent === | |||
The event data must have the name of the event. If it is defined on a module, the event name is automatically prefixed by the module ID as <code><i>ID</i>.<i>event</i></code>. | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Event</code> || {{Template:TypeColorCard|Slot}} || Required || Event data. | |||
|} | |||
=== DuplicateTab === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab to be duplicated. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || Duplicated tab. | |||
|} | |||
=== GetRegistry === | |||
Get a list of all registry entries. The result's slot children each have the slot Dynamic Variable <code>Entry</code>. Entries are ordered by priority from high to low. <b>The returned registry is read-only, use <code>Register</code> for adding entries.</b> | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Name</code> || {{Template:TypeColorCard|String}} || Required || Name of the registry. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || Registry entries. | |||
|} | |||
=== HideTabContent === | === HideTabContent === | ||
Line 11: | Line 152: | ||
|- | |- | ||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab whose content should be hidden. | | <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab whose content should be hidden. | ||
|} | |||
=== InstallModule (async) === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Module</code> || {{Template:TypeColorCard|Slot}} || Required || The module to install. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || Error message, if unsuccessful. | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The previously installed module with the same ID, if it existed. | |||
|} | |} | ||
Line 91: | Line 252: | ||
|- | |- | ||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab. | | <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab. | ||
|} | |||
=== Register === | |||
Adds an entry to a registry. Prefer using <code>Module/Lifecycle.Register</code> for adding entries to a registry. This is only useful if you need to register something after the module was already installed. See [[Moduprint/API#Registries]] for more information. | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>Entry</code> || {{Template:TypeColorCard|Slot}} || Required || Slot that should be registered. | |||
|- | |||
| <code>Registry</code> || {{Template:TypeColorCard|String}} || Required || Name of the registry this entry belongs to. | |||
|- | |||
| <code>Priority</code> || {{Template:TypeColorCard|String}} || Optional || Entry priority in the registry, see below. | |||
|} | |} | ||
Line 133: | Line 310: | ||
|- | |- | ||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || <code>Default</code>, <code>Drop</code>, <code>Handled</code>. | | <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || <code>Default</code>, <code>Drop</code>, <code>Handled</code>. | ||
|} | |||
=== UninstallModule (async) === | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>ID</code> || {{Template:TypeColorCard|Slot}} || Required || The ID of the module to uninstall. | |||
|} | |||
{| class="wikitable" | |||
|+Result | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|String}} || Error message, if unsuccessful. | |||
|- | |||
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The previously uninstalled module. | |||
|} | |||
=== UnregisterAllByModule === | |||
Removes all entries from all registries that were created by a module. Prefer using <code>Module/Lifecycle.Register</code> for adding entries to a registry. This is automatically called when a module is uninstalled. You should not need to call this manually. | |||
{| class="wikitable" | |||
|+Context | |||
|- | |||
! Name !! Type !! !! Purpose | |||
|- | |||
| <code>ID</code> || {{Template:TypeColorCard|String}} || Required || Module ID. | |||
|} | |} |
Latest revision as of 17:39, 5 August 2025
All methods listed here are accessible through slot Dynamic Reference Variables named Manager/Method.name
.
CheckInstallRequirements
Name | Type | Purpose | |
---|---|---|---|
Module |
Slot |
Required | Module to check. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
String |
Error message, if requirements not met. |
CheckUninstallRequirements
Name | Type | Purpose | |
---|---|---|---|
Module |
Slot |
Required | Module to check. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
String |
Error message, if requirements not met. |
CheckVersion
Name | Type | Purpose | |
---|---|---|---|
Min ,Test ,Max |
double3x3 |
Required | Minimum, tested version, and maximum as rows of a double3x3 matrix. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
bool |
If the tested version is within the inclusive range. |
ConfirmPackHandler
Confirms that the selected pack handler is capable of packing the active tab on the print.
Name | Type | Purpose | |
---|---|---|---|
PackHandler |
Slot |
Required | Pack handler. |
Print |
Slot |
Required | Print to pack. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
bool |
If the provided handler can pack the print. |
DeleteTab
Name | Type | Purpose | |
---|---|---|---|
Tab |
Slot |
Required | Tab to be deleted. |
DispatchAsyncEvent
Async version of DispatchEvent. It is important to clone the event data slot before dispatching and to delete it afterwards because multiple events could be dispatched at the same time, which would be overriding the data.
DispatchEvent
The event data must have the name of the event. If it is defined on a module, the event name is automatically prefixed by the module ID as ID.event
.
Name | Type | Purpose | |
---|---|---|---|
Event |
Slot |
Required | Event data. |
DuplicateTab
Name | Type | Purpose | |
---|---|---|---|
Tab |
Slot |
Required | Tab to be duplicated. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
Duplicated tab. |
GetRegistry
Get a list of all registry entries. The result's slot children each have the slot Dynamic Variable Entry
. Entries are ordered by priority from high to low. The returned registry is read-only, use Register
for adding entries.
Name | Type | Purpose | |
---|---|---|---|
Name |
String |
Required | Name of the registry. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
Registry entries. |
HideTabContent
Hides the tab's content. To set a tab active, use SetTabActive
instead. This method is only useful for unpacking flux into multiple tabs.
Name | Type | Purpose | |
---|---|---|---|
Tab |
Slot |
Required | Tab whose content should be hidden. |
InstallModule (async)
Name | Type | Purpose | |
---|---|---|---|
Module |
Slot |
Required | The module to install. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
String |
Error message, if unsuccessful. |
Manager/Local.Result |
Slot |
The previously installed module with the same ID, if it existed. |
NewPrint
Creates a new print under the local user's space. Use NewPrintTab
if you need the print to be created at a specific location.
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
The created print. |
NewPrintAt
Creates a new print.
Name | Type | Purpose | |
---|---|---|---|
Parent |
Slot |
Optional | The parent of the print, defaults to local user space. |
Position |
float3 |
Optional | Global Position. |
Rotation |
floatQ |
Optional | Global Rotation. |
Scale |
float3 |
Optional | Global Scale, defaults to 1 .
|
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
The created print. |
NewTab, NewActiveTab
Name | Type | Purpose | |
---|---|---|---|
Print |
Slot |
Required | The print to create a new tab on. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
The created tab. |
NewTabWithContent
The tab content holder is created directly under the provided pack target slot.
Name | Type | Purpose | |
---|---|---|---|
Print |
Slot |
Required | The print to create a new tab on. |
Content |
Slot |
Required | The content slot of the tab. |
PackTarget |
Slot |
Optional | Where the tab is parented to. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
Slot |
The created tab. |
Register
Adds an entry to a registry. Prefer using Module/Lifecycle.Register
for adding entries to a registry. This is only useful if you need to register something after the module was already installed. See Moduprint/API#Registries for more information.
Name | Type | Purpose | |
---|---|---|---|
Entry |
Slot |
Required | Slot that should be registered. |
Registry |
String |
Required | Name of the registry this entry belongs to. |
Priority |
String |
Optional | Entry priority in the registry, see below. |
SetTabActive
Name | Type | Purpose | |
---|---|---|---|
Tab /Print |
Slot |
Required | The tab to set active or the print itself to set no tab active. |
ShowTabContent
Shows the tab's content. To set a tab active, use SetTabActive
instead. This method is only useful for unpacking flux into multiple tabs.
Name | Type | Purpose | |
---|---|---|---|
Tab |
Slot |
Required | Tab whose content should be shown. |
Snap
Name | Type | Purpose | |
---|---|---|---|
Print |
Slot |
Required | The print to snap to. |
Target |
Slot |
Required | Object to snap to the print. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
String |
Default , Drop , Handled .
|
UninstallModule (async)
Name | Type | Purpose | |
---|---|---|---|
ID |
Slot |
Required | The ID of the module to uninstall. |
Name | Type | Purpose |
---|---|---|
Manager/Local.Result |
String |
Error message, if unsuccessful. |
Manager/Local.Result |
Slot |
The previously uninstalled module. |
UnregisterAllByModule
Removes all entries from all registries that were created by a module. Prefer using Module/Lifecycle.Register
for adding entries to a registry. This is automatically called when a module is uninstalled. You should not need to call this manually.
Name | Type | Purpose | |
---|---|---|---|
ID |
String |
Required | Module ID. |