Applications are constructed by providing an object of configuration options.
Optional
options: Partial<any> = {}Options used to configure the Application instance
The currently viewed elevation range.
Application instance configuration options.
If this Application uses tabbed navigation groups, this mapping is updated whenever the changeTab method is called. Reports the active tab for each group. Subclasses may override this property to define default tabs for each group.
The current position of the application with respect to the window.document.body.
Private
#visibleThe currently filtered Regions.
Private
#searchPrivate
#hoveredRecord a reference to the currently highlighted Region.
Private
#idPrivate
#renderableFlag that this Application instance is renderable. Applications are not renderable unless a subclass defines the _renderHTML and _replaceHTML methods.
Private
#elementThe outermost HTMLElement of this rendered Application. For window applications this is ApplicationV2##frame. For non-window applications this ApplicationV2##content.
Private
#contentThe HTMLElement within which inner HTML is rendered. For non-window applications this is the same as ApplicationV2##element.
Private
#minimizationData pertaining to the minimization status of the Application.
Private
#positionThe rendered position of the Application.
Private
#statePrivate
#semaphoreA Semaphore used to enqueue asynchronous operations.
Private
#controlsIs the window control buttons menu currently expanded?
Private
#eventsA mapping of registered events.
Static
DEFAULT_The default configuration options which are assigned to every instance of this Application class.
Handle clicks to configure a Region.
Handle clicks to assume control over a Region.
Handle button clicks to create a new Region.
Handle clicks to delete a Region.
Handle clicks to toggle the locked state of a Region.
Static
PARTSStatic
BASE_Designates which upstream Application class in this class' inheritance chain is the base application. Any DEFAULT_OPTIONS of super-classes further upstream of the BASE_APPLICATION are ignored. Hook events for super-classes further upstream of the BASE_APPLICATION are not dispatched.
Static
RENDER_The sequence of rendering states that describe the Application life-cycle.
Static
emittedConvenience references to window header elements.
The CSS class list of this Application instance
The HTML element ID of this Application instance.
A convenience reference to the title of the Application window.
The HTMLElement which renders this Application into the DOM.
Is this Application instance currently minimized?
Is this Application instance currently rendered?
The current render state of the Application.
Does this Application instance render within an outer window frame?
Close the Application, removing it from the DOM.
Options which modify how the application is closed.
A Promise which resolves to the closed Application instance
Render the Application, creating its HTMLElement and replacing its innerHTML. Add it to the DOM if it is not currently rendered and rendering is forced. Otherwise, re-render its contents.
Optional
options: any = {}Options which configure application rendering behavior. A boolean is interpreted as the "force" option.
Optional
_options: any = {}Legacy options for backwards-compatibility with the original ApplicationV1#render signature.
A Promise which resolves to the rendered Application instance
Render an HTMLElement for the Application. An Application subclass must implement this method in order for the Application to be renderable.
Context data for the render operation
Options which configure application rendering behavior
The result of HTML rendering may be implementation specific. Whatever value is returned here is passed to _replaceHTML
Update the Application element position using provided data which is merged with the prior position.
Optional
position: Partial<ApplicationPosition>New Application positioning data
The updated application position
Change the active tab within a tab group in this Application instance.
The name of the tab which should become active
The name of the tab group which defines the set of tabs
Optional
options: { Additional options which affect tab navigation
An interaction event which caused the tab change, if any
An explicit navigation element being modified
Force changing the tab even if the new tab is already active
Update application position after changing the tab?
Add a new event listener for a certain type of event.
The type of event being registered for
The listener function called when the event occurs
Optional
options: { Options which configure the event listener
Should the event only be responded to once and then removed
Remove an event listener for a certain type of event.
The type of event being removed
The listener function being removed
Protected
_initializeProtected
Initialize configuration options for the Application instance. The default behavior of this method is to intelligently merge options for each class with those of their parents.
Options provided directly to the constructor
Configured options for the application instance
Protected
_getProtected
Configure the array of header control menu options
Protected
_headerProtected
Iterate over header control buttons, filtering for controls which are visible for the current client.
Protected
_replaceHTMLProtected
Replace the HTML of the application with the result provided by the rendering backend. An Application subclass should implement this method in order for the Application to be renderable.
The result returned by the application rendering backend
The content element into which the rendered result must be inserted
Options which configure application rendering behavior
Protected
_renderProtected
Render a header control button.
Protected
_updateProtected
_insertProtected
_removeProtected
_updateProtected
Translate a requested application position updated into a resolved allowed position for the Application. Subclasses may override this method to implement more advanced positioning behavior.
Requested Application positioning data
Resolved Application positioning data
Protected
_preProtected
_preProtected
_preProtected
_preProtected
Actions performed before the Application is re-positioned. Pre-position steps are not awaited because setPosition is synchronous.
The requested application position
Protected
_onProtected
Actions performed after the Application is re-positioned.
The requested application position
Protected
_attachProtected
_onProtected
A generic event handler for action clicks which can be extended by subclasses. Action handlers defined in DEFAULT_OPTIONS are called first. This method is only called for actions which have no defined handler.
The originating click event
The capturing HTML element which defined a [data-action]
Protected
_onProtected
Handle submission for an Application which uses the form element.
The form configuration for which this handler is bound
The form submission event
Private
#preparePrivate
#updatePrivate
#onFilter regions.
The key-up event from keyboard input
The raw string input to the search field
The regular expression to test against
The HTML element which should be filtered
Private
#onPrivate
#onPrivate
#onPrivate
#onPrivate
#renderManage the rendering step of the Application life-cycle. This private method delegates out to several protected methods which can be defined by the subclass.
Optional
options: anyOptions which configure application rendering behavior
A Promise which resolves to the rendered Application instance
Private
#closeManage the closing step of the Application life-cycle. This private method delegates out to several protected methods which can be defined by the subclass.
Optional
options: ApplicationClosingOptionsOptions which modify how the application is closed
A Promise which resolves to the rendered Application instance
Private
#applyApply validated position changes to the element.
The new position data to apply.
Private
#doPerform an event in the application life-cycle. Await an internal life-cycle method defined by the class. Optionally dispatch an event for any registered listeners.
A handler function to call
Options which configure event handling
Await the result of the handler function?
Arguments passed to the handler function
Debugging text to log for the event
An event name to dispatch for registered listeners
A hook name to dispatch for this and all parent classes
Arguments passed to the requested hook function
A promise which resoles once the handler is complete
Private
#onPrivate
#onPrivate
#onPrivate
#onPrivate
#startPrivate
#endPrivate
#onHandle a pointer move event while dragging or resizing the window frame.
The amount the cursor has moved since the last frame, or undefined if the movement occurred between frames.
Private
#onPrivate
#onPrivate
#onPrivate
#onPrivate
#onStatic
inheritanceIterate over the inheritance chain of this Application. The chain includes this Application itself and all parents until the base application is encountered.
ApplicationV2.BASE_APPLICATION
Static
parseCSSDimensionStatic
Private
#onStatic
Private
#onStatic
Private
#onStatic
Private
#onStatic
Private
#on
Scene Region Legend.
Mixes
HandlebarsApplication
Alias
RegionLegend