import{_ as t,a,b as r,ag as l}from"./chunks/framework.BcrMLAmg.js";const b=JSON.parse('{"title":"BaseElement","description":"","frontmatter":{},"headers":[],"relativePath":"references/elements/BaseElement.md","filePath":"references/elements/BaseElement.md","lastUpdated":1757844696000}'),n={name:"references/elements/BaseElement.md"};function s(d,e,o,i,c,h){return r(),a("div",null,e[0]||(e[0]=[l('

BaseElement

The base class for all UI elements in Basalt. This class provides basic properties and event handling functionality.

Extends: PropertySystem

Properties

PropertyTypeDefaultDescription
typestringBaseElementThe type identifier of the element
idstringBaseElementThe unique identifier for the element
namestringBaseElementThe name of the element
eventCallbackstableBaseElementThe event callbacks for the element
enabledbooleanBaseElementWhether the element is enabled or not

Functions

MethodReturnsDescription
BaseElement.defineEvent-Registers a new event listener for the element (on class level)
BaseElement.registerEventCallback-Registers a new event callback for the element (on class level)
BaseElement:isTypebooleanChecks if the element is a specific type
BaseElement:listenEventtableEnables or disables event listening for a specific event
BaseElement:registerCallbacktableRegisters a callback function
BaseElement:fireEventtableTriggers an event and calls all registered callbacks
BaseElement:onChangetableObserves a property and calls a callback when it changes
BaseElement:getBaseFrameBaseFrameReturns the base frame of the element
BaseElement:destroy-Destroys the element and cleans up all references
BaseElement:updateRendertableRequests a render update for this element

BaseElement.defineEvent(class, eventName, requiredEvent?)

Registers a new event listener for the element (on class level)

Parameters

BaseElement.registerEventCallback(class, callbackName, string)

Registers a new event callback for the element (on class level)

Parameters

BaseElement:isType(type)

Checks if the element is a specific type

Parameters

Returns

BaseElement:listenEvent(eventName, enable?)

Enables or disables event listening for a specific event

Parameters

Returns

BaseElement:registerCallback(event, callback)

Registers a callback function for an event

Parameters

Returns

BaseElement:fireEvent(event, any)

Triggers an event and calls all registered callbacks

Parameters

Returns

BaseElement:onChange(property, callback)

Observes a property and calls a callback when it changes

Parameters

Returns

BaseElement:getBaseFrame()

Returns the base frame of the element

Returns

BaseElement:destroy()

Destroys the element and cleans up all references

BaseElement:updateRender()

Requests a render update for this element

Returns

',55)]))}const u=t(n,[["render",s]]);export{b as __pageData,u as default};