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

BaseFrame

Extends: Container

Functions

MethodReturnsDescription
BaseFrame:initializeStateBaseFrameInitializes a new state

BaseFrame:initializeState(self, name, default, persist?, path?)

Initializes a new state for this element

Parameters

Returns

BaseElement

This is the state plugin. It provides a state management system for UI elements with support forpersistent states, computed states, and state sharing between elements.

Functions

MethodReturnsDescription
BaseElement:setStateBaseElementSets a state value
BaseElement:getStateanyGets a state value
BaseElement:onStateChangeBaseElementWatches for state changes
BaseElement:removeStateChangeBaseElementRemoves a state change observer
BaseElement:bindBaseElementBinds a property to a state

BaseElement:setState(self, name, value)

Sets the value of a state

Parameters

Returns

BaseElement:getState(self, name)

Gets the value of a state

Parameters

Returns

BaseElement:onStateChange(self, stateName, callback)

Registers a callback for state changes

Parameters

Returns

BaseElement:removeStateChange(self, stateName, callback)

Removes a state change observer

Parameters

Returns

BaseElement:bind(self, propertyName, stateName)

Binds a property to a state

Parameters

Returns

',44)]))}const f=a(r,[["render",n]]);export{u as __pageData,f as default};