Class: RSUITheme

RSUITheme

This class is the theme of the UI.

new RSUITheme()

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 8
Properties:
Name Type Description
__uiMainContainer RSUIMainContainer

The main container of the UI.

__currentTheme RSUIThemeType

The current theme.

Since:
  • 3.3.0
See:
Example
const theme = new RSUITheme(uiMainContainer);

Methods

emit(eventName, args)

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 103

Emits an event with the provided arguments.

Name Type Description
eventName string

The name of the event.

args any repeatable

Arguments to pass to the event handlers.

getCurrentTheme(){RSUIThemeType}

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 54

This method allow to get the current theme applied.

Returns:
Type Description
RSUIThemeType The current theme.

getEventHandlers(eventName){Array.<function()>}

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 121

Retrieves all event handlers for a given event.

Name Type Description
eventName string

The name of the event.

Returns:
Type Description
Array.<function()> An array of event handlers.

hasEvent(eventName){boolean}

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 112

Checks if an event has any registered handlers.

Name Type Description
eventName string

The name of the event.

Returns:
Type Description
boolean True if the event has handlers, otherwise false.

off(eventName, callback)

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 94

Removes an event handler. If no callback is provided, removes all handlers for the event.

Name Type Description
eventName string optional

The name of the event.

callback function optional

The callback function to remove.

on(eventName, callback)

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 76

Registers an event handler that will be invoked every time the event is emitted.

Name Type Description
eventName string

The name of the event.

callback function

The callback function to handle the event.

once(eventName, callback)

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 85

Registers a one-time event handler that will be invoked only the next time the event is emitted.

Name Type Description
eventName string

The name of the event.

callback function

The callback function to handle the event.

setTheme(){void}

Layers/GoRemoteSensing/clases/UI/utils/RSUITheme.ts, line 62

Allow to set the theme.

Returns:
Type Description
void Nothing.