Merge branch 'gh-pages' of https://github.com/Pyroxenium/Basalt2 into gh-pages
This commit is contained in:
@@ -6,10 +6,10 @@ and then applies the plugins to the elements. It also provides a way to get elem
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[ElementManager.getAPI](#ElementManager.getAPI)|table|
|
|[ElementManager.getAPI](#elementmanager-getapi)|table|
|
||||||
|[ElementManager.getElement](#ElementManager.getElement)|table|
|
|[ElementManager.getElement](#elementmanager-getelement)|table|
|
||||||
|[ElementManager.getElementList](#ElementManager.getElementList)|table|
|
|[ElementManager.getElementList](#elementmanager-getelementlist)|table|
|
||||||
|[ElementManager.loadElement](#ElementManager.loadElement)|-|
|
|[ElementManager.loadElement](#elementmanager-loadelement)|-|
|
||||||
|
|
||||||
|
|
||||||
## ElementManager.getAPI(name)
|
## ElementManager.getAPI(name)
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
# BarChart : Graph
|
# BarChart : Graph
|
||||||
This is the bar chart class. It is based on the graph element. It draws bar based points.
|
This is the bar chart class. It is based on the graph element. It draws bar based points.
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BarChart:init](#BarChart:init)|BarChart|Initializes the BarChart instance
|
|BarChart:init|BarChart|Initializes the BarChart instance
|
||||||
|[BarChart:render](#BarChart:render)|-|Renders the BarChart
|
|BarChart:render|-|Renders the BarChart
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,41 +14,46 @@ The base class for all UI elements in Basalt. This class provides basic properti
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement.defineEvent](#BaseElement.defineEvent)|-|
|
|[BaseElement.defineEvent](#baseelement-defineevent)|-|Registers a new event listener for the element (on class level)
|
||||||
|[BaseElement.registerEventCallback](#BaseElement.registerEventCallback)|-|
|
|[BaseElement.registerEventCallback](#baseelement-registereventcallback)|-|Registers a new event callback for the element (on class level)
|
||||||
|[BaseElement:destroy](#BaseElement:destroy)|-|Destroys the element and cleans up all references
|
|[BaseElement:destroy](#baseelement-destroy)|-|Destroys the element and cleans up all references
|
||||||
|[BaseElement:fireEvent](#BaseElement:fireEvent)|table|Triggers an event and calls all registered callbacks
|
|[BaseElement:fireEvent](#baseelement-fireevent)|table|Triggers an event and calls all registered callbacks
|
||||||
|[BaseElement:getBaseFrame](#BaseElement:getBaseFrame)|table|Returns the base frame of the element
|
|[BaseElement:getBaseFrame](#baseelement-getbaseframe)|BaseFrame|Returns the base frame of the element
|
||||||
|[BaseElement:isType](#BaseElement:isType)|boolean|Checks if the element is a specific type
|
|[BaseElement:isType](#baseelement-istype)|boolean|Checks if the element is a specific type
|
||||||
|[BaseElement:listenEvent](#BaseElement:listenEvent)|table|Enables or disables event listening for a specific event
|
|[BaseElement:listenEvent](#baseelement-listenevent)|table|Enables or disables event listening for a specific event
|
||||||
|[BaseElement:onChange](#BaseElement:onChange)|table|Observes a property and calls a callback when it changes
|
|[BaseElement:onChange](#baseelement-onchange)|table|Observes a property and calls a callback when it changes
|
||||||
|[BaseElement:registerCallback](#BaseElement:registerCallback)|table|Registers a callback function
|
|[BaseElement:registerCallback](#baseelement-registercallback)|table|Registers a callback function
|
||||||
|[BaseElement:updateRender](#BaseElement:updateRender)|-|Requests a render update for this element
|
|[BaseElement:updateRender](#baseelement-updaterender)|table|Requests a render update for this element
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement:dispatchEvent](#BaseElement:dispatchEvent)|boolean?|Handles all events
|
|BaseElement:dispatchEvent|boolean?|Handles all events
|
||||||
|[BaseElement:handleEvent](#BaseElement:handleEvent)|boolean?|The default event handler for all events
|
|BaseElement:handleEvent|boolean?|The default event handler for all events
|
||||||
|[BaseElement:init](#BaseElement:init)|table|Initializes the BaseElement instance
|
|BaseElement:init|table|Initializes the BaseElement instance
|
||||||
|[BaseElement:postInit](#BaseElement:postInit)|table|Post initialization
|
|BaseElement:postInit|table|Post initialization
|
||||||
|
|
||||||
## BaseElement.defineEvent()
|
## BaseElement.defineEvent(class, eventName, requiredEvent?)
|
||||||
Registers a new event listener for the element (on class level)
|
Registers a new event listener for the element (on class level)
|
||||||
|
|
||||||
## BaseElement.registerEventCallback()
|
### Parameters
|
||||||
|
* `class` `table` The class to register
|
||||||
|
* `eventName` `string` The name of the event to register
|
||||||
|
* `requiredEvent` *(optional)* `string` The name of the required event (optional)
|
||||||
|
|
||||||
|
## BaseElement.registerEventCallback(class, callbackName, ...)
|
||||||
Registers a new event callback for the element (on class level)
|
Registers a new event callback for the element (on class level)
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `class` `table` The class to register
|
||||||
|
* `callbackName` `string` The name of the callback to register
|
||||||
|
* `...` `string` The names of the events to register the callback for
|
||||||
|
|
||||||
## BaseElement:destroy()
|
## BaseElement:destroy()
|
||||||
Destroys the element and cleans up all references
|
Destroys the element and cleans up all references
|
||||||
|
|
||||||
### Usage
|
|
||||||
```lua
|
|
||||||
element:destroy()
|
|
||||||
```
|
|
||||||
|
|
||||||
## BaseElement:fireEvent(event, ...)
|
## BaseElement:fireEvent(event, ...)
|
||||||
Triggers an event and calls all registered callbacks
|
Triggers an event and calls all registered callbacks
|
||||||
|
|
||||||
@@ -59,16 +64,11 @@ Triggers an event and calls all registered callbacks
|
|||||||
### Returns
|
### Returns
|
||||||
* `table` `self` The BaseElement instance
|
* `table` `self` The BaseElement instance
|
||||||
|
|
||||||
### Usage
|
|
||||||
```lua
|
|
||||||
element:fireEvent("mouse_click", 1, 2)
|
|
||||||
```
|
|
||||||
|
|
||||||
## BaseElement:getBaseFrame()
|
## BaseElement:getBaseFrame()
|
||||||
Returns the base frame of the element
|
Returns the base frame of the element
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
* `table` `BaseFrame` The base frame of the element
|
* `BaseFrame` `BaseFrame` The base frame of the element
|
||||||
|
|
||||||
## BaseElement:isType(type)
|
## BaseElement:isType(type)
|
||||||
Checks if the element is a specific type
|
Checks if the element is a specific type
|
||||||
@@ -77,7 +77,7 @@ Checks if the element is a specific type
|
|||||||
* `type` `string` The type to check for
|
* `type` `string` The type to check for
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
* `boolean` `Whether` the element is of the specified type
|
* `boolean` `isType` Whether the element is of the specified type
|
||||||
|
|
||||||
## BaseElement:listenEvent(eventName, enable?)
|
## BaseElement:listenEvent(eventName, enable?)
|
||||||
Enables or disables event listening for a specific event
|
Enables or disables event listening for a specific event
|
||||||
@@ -89,11 +89,6 @@ Enables or disables event listening for a specific event
|
|||||||
### Returns
|
### Returns
|
||||||
* `table` `self` The BaseElement instance
|
* `table` `self` The BaseElement instance
|
||||||
|
|
||||||
### Usage
|
|
||||||
```lua
|
|
||||||
element:listenEvent("mouse_click", true)
|
|
||||||
```
|
|
||||||
|
|
||||||
## BaseElement:onChange(property, callback)
|
## BaseElement:onChange(property, callback)
|
||||||
Observes a property and calls a callback when it changes
|
Observes a property and calls a callback when it changes
|
||||||
|
|
||||||
@@ -114,17 +109,10 @@ Registers a callback function for an event
|
|||||||
### Returns
|
### Returns
|
||||||
* `table` `self` The BaseElement instance
|
* `table` `self` The BaseElement instance
|
||||||
|
|
||||||
### Usage
|
|
||||||
```lua
|
|
||||||
element:registerCallback("mouse_click", function(self, ...) end)
|
|
||||||
```
|
|
||||||
|
|
||||||
## BaseElement:updateRender()
|
## BaseElement:updateRender()
|
||||||
Requests a render update for this element
|
Requests a render update for this element
|
||||||
|
|
||||||
### Usage
|
### Returns
|
||||||
```lua
|
* `table` `self` The BaseElement instance
|
||||||
element:updateRender()
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,24 +18,24 @@ This is the base frame class. It is the root element of all elements and the onl
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseFrame:setCursor](#BaseFrame:setCursor)|-|Sets the cursor position
|
|[BaseFrame:setCursor](#baseframe-setcursor)|-|Sets the cursor position
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseFrame:blit](#BaseFrame:blit)|-|Renders a text with a foreground and background color to the render Object
|
|BaseFrame:blit|-|Renders a text with a foreground and background color to the render Object
|
||||||
|[BaseFrame:char](#BaseFrame:char)|-|Handles character events
|
|BaseFrame:char|-|Handles character events
|
||||||
|[BaseFrame:init](#BaseFrame:init)|table|Initializes the Frame instance
|
|BaseFrame:init|table|Initializes the Frame instance
|
||||||
|[BaseFrame:key](#BaseFrame:key)|-|Handles key events
|
|BaseFrame:key|-|Handles key events
|
||||||
|[BaseFrame:key_up](#BaseFrame:key_up)|-|Handles key up events
|
|BaseFrame:key_up|-|Handles key up events
|
||||||
|[BaseFrame:mouse_up](#BaseFrame:mouse_up)|-|Handles mouse up events
|
|BaseFrame:mouse_up|-|Handles mouse up events
|
||||||
|[BaseFrame:multiBlit](#BaseFrame:multiBlit)|-|Renders a multiBlit to the render Object
|
|BaseFrame:multiBlit|-|Renders a multiBlit to the render Object
|
||||||
|[BaseFrame:render](#BaseFrame:render)|-|Renders the Frame
|
|BaseFrame:render|-|Renders the Frame
|
||||||
|[BaseFrame:term_resize](#BaseFrame:term_resize)|-|Resizes the Frame
|
|BaseFrame:term_resize|-|Resizes the Frame
|
||||||
|[BaseFrame:textBg](#BaseFrame:textBg)|-|Renders a text with a background color to the render Object
|
|BaseFrame:textBg|-|Renders a text with a background color to the render Object
|
||||||
|[BaseFrame:textFg](#BaseFrame:textFg)|-|Renders a text with a foreground color to the render Object
|
|BaseFrame:textFg|-|Renders a text with a foreground color to the render Object
|
||||||
|
|
||||||
## BaseFrame:setCursor(x, y, blink)
|
## BaseFrame:setCursor(x, y, blink)
|
||||||
Sets the cursor position
|
Sets the cursor position
|
||||||
|
|||||||
@@ -8,17 +8,12 @@ The BigFont element is a text element that displays large text.
|
|||||||
|text|string|BigFont|BigFont text
|
|text|string|BigFont|BigFont text
|
||||||
|fontSize|number|1|The font size of the BigFont
|
|fontSize|number|1|The font size of the BigFont
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BigFont:init](#BigFont:init)|-|Initializes the BigFont instance
|
|BigFont:init|-|Initializes the BigFont instance
|
||||||
|[BigFont:render](#BigFont:render)|-|Renders the BigFont
|
|BigFont:render|-|Renders the BigFont
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,5 @@
|
|||||||
Basalt - Nyorie: Please don't copy paste this code to your projects, this code is slightly changed (to fit the way basalt draws stuff), if you want the original code, checkout this:
|
Basalt - Nyorie: Please don't copy paste this code to your projects, this code is slightly changed (to fit the way basalt draws stuff), if you want the original code, checkout this:
|
||||||
http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/
|
http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,17 +7,12 @@ The Button is a standard button element with click handling and state management
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|text|string|Button|Button text
|
|text|string|Button|Button text
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Button:init](#Button:init)|-|Initializes the Button instance
|
|Button:init|-|Initializes the Button instance
|
||||||
|[Button:render](#Button:render)|-|Renders the Button
|
|Button:render|-|Renders the Button
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,19 +10,14 @@ The Checkbox is a visual element that can be checked.
|
|||||||
|checkedText|string|Text|when checked
|
|checkedText|string|Text|when checked
|
||||||
|autoSize|boolean|true|Whether to automatically size the checkbox
|
|autoSize|boolean|true|Whether to automatically size the checkbox
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Checkbox.new](#Checkbox.new)|Checkbox|Creates a new Checkbox instance
|
|Checkbox.new|Checkbox|Creates a new Checkbox instance
|
||||||
|[Checkbox:init](#Checkbox:init)|-|Initializes the Checkbox instance
|
|Checkbox:init|-|Initializes the Checkbox instance
|
||||||
|[Checkbox:mouse_click](#Checkbox:mouse_click)|boolean|Handles mouse click events
|
|Checkbox:mouse_click|boolean|Handles mouse click events
|
||||||
|[Checkbox:render](#Checkbox:render)|-|Renders the Checkbox
|
|Checkbox:render|-|Renders the Checkbox
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,40 +27,40 @@ like Frames, BaseFrames, and more.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Container:addChild](#Container:addChild)|Container|Adds a child to the container
|
|[Container:addChild](#container-addchild)|Container|Adds a child to the container
|
||||||
|[Container:callChildrenEvent](#Container:callChildrenEvent)|boolean|Calls a event on all children
|
|[Container:callChildrenEvent](#container-callchildrenevent)|boolean|Calls a event on all children
|
||||||
|[Container:clear](#Container:clear)|Container|Clears the container
|
|[Container:clear](#container-clear)|Container|Clears the container
|
||||||
|[Container:getChild](#Container:getChild)|Container?|Removes a child from the container
|
|[Container:getChild](#container-getchild)|Container?|Removes a child from the container
|
||||||
|[Container:isChildVisible](#Container:isChildVisible)|boolean|Returns whether a child is visible
|
|[Container:isChildVisible](#container-ischildvisible)|boolean|Returns whether a child is visible
|
||||||
|[Container:registerChildEvent](#Container:registerChildEvent)|Container|Registers the children events of the container
|
|[Container:registerChildEvent](#container-registerchildevent)|Container|Registers the children events of the container
|
||||||
|[Container:registerChildrenEvents](#Container:registerChildrenEvents)|Container|Registers the children events of the container
|
|[Container:registerChildrenEvents](#container-registerchildrenevents)|Container|Registers the children events of the container
|
||||||
|[Container:removeChild](#Container:removeChild)|Container|Removes a child from the container
|
|[Container:removeChild](#container-removechild)|Container|Removes a child from the container
|
||||||
|[Container:removeChildrenEvents](#Container:removeChildrenEvents)|Container|Unregisters the children events of the container
|
|[Container:removeChildrenEvents](#container-removechildrenevents)|Container|Unregisters the children events of the container
|
||||||
|[Container:sortChildren](#Container:sortChildren)|Container|Sorts the children of the container
|
|[Container:sortChildren](#container-sortchildren)|Container|Sorts the children of the container
|
||||||
|[Container:sortChildrenEvents](#Container:sortChildrenEvents)|Container|Sorts the children events of the container
|
|[Container:sortChildrenEvents](#container-sortchildrenevents)|Container|Sorts the children events of the container
|
||||||
|[Container:unregisterChildEvent](#Container:unregisterChildEvent)|Container|Unregisters the children events of the container
|
|[Container:unregisterChildEvent](#container-unregisterchildevent)|Container|Unregisters the children events of the container
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Container:blit](#Container:blit)|Container|Draws a line of text and fg and bg as colors
|
|Container:blit|Container|Draws a line of text and fg and bg as colors
|
||||||
|[Container:char](#Container:char)|boolean|Handles char events
|
|Container:char|boolean|Handles char events
|
||||||
|[Container:handleEvent](#Container:handleEvent)|boolean|Default handler for events
|
|Container:handleEvent|boolean|Default handler for events
|
||||||
|[Container:init](#Container:init)|-|Initializes the Container instance
|
|Container:init|-|Initializes the Container instance
|
||||||
|[Container:key](#Container:key)|boolean|Handles key events
|
|Container:key|boolean|Handles key events
|
||||||
|[Container:key_up](#Container:key_up)|boolean|Handles key up events
|
|Container:key_up|boolean|Handles key up events
|
||||||
|[Container:mouse_click](#Container:mouse_click)|boolean|Handles mouse click events
|
|Container:mouse_click|boolean|Handles mouse click events
|
||||||
|[Container:mouse_drag](#Container:mouse_drag)|boolean|Handles mouse drag events
|
|Container:mouse_drag|boolean|Handles mouse drag events
|
||||||
|[Container:mouse_move](#Container:mouse_move)|boolean|Handles mouse move events
|
|Container:mouse_move|boolean|Handles mouse move events
|
||||||
|[Container:mouse_release](#Container:mouse_release)|-|Handles mouse release events
|
|Container:mouse_release|-|Handles mouse release events
|
||||||
|[Container:mouse_scroll](#Container:mouse_scroll)|boolean|Handles mouse scroll events
|
|Container:mouse_scroll|boolean|Handles mouse scroll events
|
||||||
|[Container:mouse_up](#Container:mouse_up)|boolean|Handles mouse up events
|
|Container:mouse_up|boolean|Handles mouse up events
|
||||||
|[Container:multiBlit](#Container:multiBlit)|Container|Draws multiple lines of text, fg and bg strings
|
|Container:multiBlit|Container|Draws multiple lines of text, fg and bg strings
|
||||||
|[Container:render](#Container:render)|-|Renders the container
|
|Container:render|-|Renders the container
|
||||||
|[Container:textBg](#Container:textBg)|Container|Draws a line of text and bg as color
|
|Container:textBg|Container|Draws a line of text and bg as color
|
||||||
|[Container:textFg](#Container:textFg)|Container|Draws a line of text and fg as color
|
|Container:textFg|Container|Draws a line of text and fg as color
|
||||||
|
|
||||||
## Container:addChild(child)
|
## Container:addChild(child)
|
||||||
Adds a child to the container
|
Adds a child to the container
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ The Display is a special element where you can use the window (term) API to draw
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Display:getWindow](#Display:getWindow)|table|Returns the current window object
|
|[Display:getWindow](#display-getwindow)|table|Returns the current window object
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Display:init](#Display:init)|-|Initializes the Display instance
|
|Display:init|-|Initializes the Display instance
|
||||||
|[Display:render](#Display:render)|-|Renders the Display
|
|Display:render|-|Renders the Display
|
||||||
|
|
||||||
## Display:getWindow()
|
## Display:getWindow()
|
||||||
Returns the current window object
|
Returns the current window object
|
||||||
|
|||||||
@@ -10,18 +10,13 @@ This is the dropdown class. It is a visual element that can show a list of selec
|
|||||||
|selectedText|string|""|The text to show when no item is selected
|
|selectedText|string|""|The text to show when no item is selected
|
||||||
|dropSymbol|string|"\31"|The symbol to show for dropdown indication
|
|dropSymbol|string|"\31"|The symbol to show for dropdown indication
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Dropdown:init](#Dropdown:init)|Dropdown|Initializes the Dropdown instance
|
|Dropdown:init|Dropdown|Initializes the Dropdown instance
|
||||||
|[Dropdown:mouse_click](#Dropdown:mouse_click)|boolean|Handles mouse click events
|
|Dropdown:mouse_click|boolean|Handles mouse click events
|
||||||
|[Dropdown:render](#Dropdown:render)|-|Renders the Dropdown
|
|Dropdown:render|-|Renders the Dropdown
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ This is the Flexbox class. It is a container that arranges its children in a fle
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Flexbox:addChild](#Flexbox:addChild)|Flexbox|Adds a child element to the flexbox
|
|[Flexbox:addChild](#flexbox-addchild)|Flexbox|Adds a child element to the flexbox
|
||||||
|[Flexbox:addLineBreak](#Flexbox:addLineBreak)|Flexbox|Adds a new line break to the flexbox.
|
|[Flexbox:addLineBreak](#flexbox-addlinebreak)|Flexbox|Adds a new line break to the flexbox.
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Flexbox:init](#Flexbox:init)|Flexbox|Initializes the Flexbox instance
|
|Flexbox:init|Flexbox|Initializes the Flexbox instance
|
||||||
|[Flexbox:removeChild](#Flexbox:removeChild)|Flexbox|Removes a child element from the flexbox
|
|Flexbox:removeChild|Flexbox|Removes a child element from the flexbox
|
||||||
|[Flexbox:render](#Flexbox:render)|Flexbox|Renders the flexbox and its children
|
|Flexbox:render|Flexbox|Renders the flexbox and its children
|
||||||
|
|
||||||
## Flexbox:addChild(element)
|
## Flexbox:addChild(element)
|
||||||
Adds a child element to the flexbox
|
Adds a child element to the flexbox
|
||||||
|
|||||||
@@ -8,19 +8,14 @@ This is the frame class. It serves as a grouping container for other elements.
|
|||||||
|draggable|boolean|false|Whether the frame is draggable
|
|draggable|boolean|false|Whether the frame is draggable
|
||||||
|draggingMap|table|{}|The map of dragging positions
|
|draggingMap|table|{}|The map of dragging positions
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Frame:init](#Frame:init)|Frame|Initializes the Frame instance
|
|Frame:init|Frame|Initializes the Frame instance
|
||||||
|[Frame:mouse_click](#Frame:mouse_click)|boolean|Handles mouse click events
|
|Frame:mouse_click|boolean|Handles mouse click events
|
||||||
|[Frame:mouse_drag](#Frame:mouse_drag)|boolean|Handles mouse drag events
|
|Frame:mouse_drag|boolean|Handles mouse drag events
|
||||||
|[Frame:mouse_up](#Frame:mouse_up)|boolean|Handles mouse release events
|
|Frame:mouse_up|boolean|Handles mouse release events
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,21 +13,21 @@ This is the base class for all graph elements. It is a point based graph.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Graph:addPoint](#Graph:addPoint)|Graph|Adds a point to a series
|
|[Graph:addPoint](#graph-addpoint)|Graph|Adds a point to a series
|
||||||
|[Graph:addSeries](#Graph:addSeries)|-|Adds a series to the graph
|
|[Graph:addSeries](#graph-addseries)|-|Adds a series to the graph
|
||||||
|[Graph:changeSeriesVisibility](#Graph:changeSeriesVisibility)|Graph|Changes the visibility of a series
|
|[Graph:changeSeriesVisibility](#graph-changeseriesvisibility)|Graph|Changes the visibility of a series
|
||||||
|[Graph:focusSeries](#Graph:focusSeries)|Graph|Focuses a series
|
|[Graph:focusSeries](#graph-focusseries)|Graph|Focuses a series
|
||||||
|[Graph:getSeries](#Graph:getSeries)|table?|Gets a series from the graph
|
|[Graph:getSeries](#graph-getseries)|table?|Gets a series from the graph
|
||||||
|[Graph:removeSeries](#Graph:removeSeries)|Graph|Removes a series from the graph
|
|[Graph:removeSeries](#graph-removeseries)|Graph|Removes a series from the graph
|
||||||
|[Graph:setSeriesPointCount](#Graph:setSeriesPointCount)|Graph|Sets the point count of a series
|
|[Graph:setSeriesPointCount](#graph-setseriespointcount)|Graph|Sets the point count of a series
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Graph:init](#Graph:init)|Graph|Initializes the Graph instance
|
|Graph:init|Graph|Initializes the Graph instance
|
||||||
|[Graph:render](#Graph:render)|-|Renders the graph
|
|Graph:render|-|Renders the graph
|
||||||
|
|
||||||
## Graph:addPoint(name, value)
|
## Graph:addPoint(name, value)
|
||||||
|
|
||||||
|
|||||||
@@ -23,30 +23,30 @@ See: https://github.com/SkyTheCodeMaster/bimg
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Image:addFrame](#Image:addFrame)|Image|Adds a new frame to the image
|
|[Image:addFrame](#image-addframe)|Image|Adds a new frame to the image
|
||||||
|[Image:getBg](#Image:getBg)|string|Gets the background color at the specified position
|
|[Image:getBg](#image-getbg)|string|Gets the background color at the specified position
|
||||||
|[Image:getFg](#Image:getFg)|string|Gets the foreground color at the specified position
|
|[Image:getFg](#image-getfg)|string|Gets the foreground color at the specified position
|
||||||
|[Image:getFrame](#Image:getFrame)|table|Gets the specified frame
|
|[Image:getFrame](#image-getframe)|table|Gets the specified frame
|
||||||
|[Image:getImageSize](#Image:getImageSize)|number|Gets the size of the image
|
|[Image:getImageSize](#image-getimagesize)|number|Gets the size of the image
|
||||||
|[Image:getMetadata](#Image:getMetadata)|table|Gets the metadata of the image
|
|[Image:getMetadata](#image-getmetadata)|table|Gets the metadata of the image
|
||||||
|[Image:getPixelData](#Image:getPixelData)|number?|Gets pixel information at position
|
|[Image:getPixelData](#image-getpixeldata)|number?|Gets pixel information at position
|
||||||
|[Image:getText](#Image:getText)|string|Gets the text at the specified position
|
|[Image:getText](#image-gettext)|string|Gets the text at the specified position
|
||||||
|[Image:nextFrame](#Image:nextFrame)|Image|Advances to the next frame in the animation
|
|[Image:nextFrame](#image-nextframe)|Image|Advances to the next frame in the animation
|
||||||
|[Image:resizeImage](#Image:resizeImage)|Image|Resizes the image to the specified width and height
|
|[Image:resizeImage](#image-resizeimage)|Image|Resizes the image to the specified width and height
|
||||||
|[Image:setBg](#Image:setBg)|Image|Sets the background color at the specified position
|
|[Image:setBg](#image-setbg)|Image|Sets the background color at the specified position
|
||||||
|[Image:setFg](#Image:setFg)|Image|Sets the foreground color at the specified position
|
|[Image:setFg](#image-setfg)|Image|Sets the foreground color at the specified position
|
||||||
|[Image:setMetadata](#Image:setMetadata)|Image|Sets the metadata of the image
|
|[Image:setMetadata](#image-setmetadata)|Image|Sets the metadata of the image
|
||||||
|[Image:setPixel](#Image:setPixel)|Image|Sets the pixel at the specified position
|
|[Image:setPixel](#image-setpixel)|Image|Sets the pixel at the specified position
|
||||||
|[Image:setText](#Image:setText)|Image|Sets the text at the specified position
|
|[Image:setText](#image-settext)|Image|Sets the text at the specified position
|
||||||
|[Image:updateFrame](#Image:updateFrame)|Image|Updates the specified frame with the provided data
|
|[Image:updateFrame](#image-updateframe)|Image|Updates the specified frame with the provided data
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Image:init](#Image:init)|Image|Initializes the Image instance
|
|Image:init|Image|Initializes the Image instance
|
||||||
|[Image:render](#Image:render)|-|Renders the Image
|
|Image:render|-|Renders the Image
|
||||||
|
|
||||||
## Image:addFrame()
|
## Image:addFrame()
|
||||||
Adds a new frame to the image
|
Adds a new frame to the image
|
||||||
|
|||||||
@@ -16,26 +16,27 @@ cursor movement, text manipulation, placeholder text, and input validation.
|
|||||||
|focusedForeground|color|white|Foreground color when input is focused
|
|focusedForeground|color|white|Foreground color when input is focused
|
||||||
|pattern|string?|nil|Regular expression pattern for input validation
|
|pattern|string?|nil|Regular expression pattern for input validation
|
||||||
|cursorColor|number|nil|Color of the cursor
|
|cursorColor|number|nil|Color of the cursor
|
||||||
|
|replaceChar|string|nil|Character to replace the input with (for password fields)
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Input:blur](#Input:blur)|-|
|
|[Input:blur](#input-blur)|-|
|
||||||
|[Input:focus](#Input:focus)|-|
|
|[Input:focus](#input-focus)|-|
|
||||||
|[Input:setCursor](#Input:setCursor)|-|
|
|[Input:setCursor](#input-setcursor)|-|
|
||||||
|[Input:updateViewport](#Input:updateViewport)|Input|Updates the input's viewport
|
|[Input:updateViewport](#input-updateviewport)|Input|Updates the input's viewport
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Input:char](#Input:char)|boolean|Handles char events
|
|Input:char|boolean|Handles char events
|
||||||
|[Input:init](#Input:init)|Input|Initializes the Input instance
|
|Input:init|Input|Initializes the Input instance
|
||||||
|[Input:key](#Input:key)|boolean|Handles key events
|
|Input:key|boolean|Handles key events
|
||||||
|[Input:mouse_click](#Input:mouse_click)|boolean|Handles mouse click events
|
|Input:mouse_click|boolean|Handles mouse click events
|
||||||
|[Input:render](#Input:render)|-|Renders the input element
|
|Input:render|-|Renders the input element
|
||||||
|
|
||||||
## Input:blur()
|
## Input:blur()
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ resizes its width based on the text content.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Label:getWrappedText](#Label:getWrappedText)|table|Gets the wrapped lines of the Label
|
|[Label:getWrappedText](#label-getwrappedtext)|table|Gets the wrapped lines of the Label
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Label:init](#Label:init)|Label|Initializes the Label instance
|
|Label:init|Label|Initializes the Label instance
|
||||||
|[Label:render](#Label:render)|-|Renders the Label by drawing its text content
|
|Label:render|-|Renders the Label by drawing its text content
|
||||||
|
|
||||||
## Label:getWrappedText()
|
## Label:getWrappedText()
|
||||||
Gets the wrapped lines of the Label
|
Gets the wrapped lines of the Label
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
# LineChart : Graph
|
# LineChart : Graph
|
||||||
This is the line chart class. It is based on the graph element. It draws lines between points.
|
This is the line chart class. It is based on the graph element. It draws lines between points.
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[LineChart:init](#LineChart:init)|LineChart|Initializes the LineChart instance
|
|LineChart:init|LineChart|Initializes the LineChart instance
|
||||||
|[LineChart:render](#LineChart:render)|-|Renders the LineChart
|
|LineChart:render|-|Renders the LineChart
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,24 +23,24 @@ custom item rendering, separators, and selection handling.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[List:addItem](#List:addItem)|List|Adds an item to the list
|
|[List:addItem](#list-additem)|List|Adds an item to the list
|
||||||
|[List:clear](#List:clear)|List|Clears all items from the list
|
|[List:clear](#list-clear)|List|Clears all items from the list
|
||||||
|[List:getSelectedItem](#List:getSelectedItem)|table?|Gets first selected item
|
|[List:getSelectedItem](#list-getselecteditem)|table?|Gets first selected item
|
||||||
|[List:getSelectedItems](#List:getSelectedItems)|table|Gets the currently selected items
|
|[List:getSelectedItems](#list-getselecteditems)|table|Gets the currently selected items
|
||||||
|[List:onSelect](#List:onSelect)|List|Registers a callback for the select event
|
|[List:onSelect](#list-onselect)|List|Registers a callback for the select event
|
||||||
|[List:removeItem](#List:removeItem)|List|Removes an item from the list
|
|[List:removeItem](#list-removeitem)|List|Removes an item from the list
|
||||||
|[List:scrollToBottom](#List:scrollToBottom)|List|Scrolls the list to the bottom
|
|[List:scrollToBottom](#list-scrolltobottom)|List|Scrolls the list to the bottom
|
||||||
|[List:scrollToTop](#List:scrollToTop)|List|Scrolls the list to the top
|
|[List:scrollToTop](#list-scrolltotop)|List|Scrolls the list to the top
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[List:init](#List:init)|List|Initializes the List instance
|
|List:init|List|Initializes the List instance
|
||||||
|[List:mouse_click](#List:mouse_click)|boolean|Handles mouse click events
|
|List:mouse_click|boolean|Handles mouse click events
|
||||||
|[List:mouse_scroll](#List:mouse_scroll)|boolean|Handles mouse scroll events
|
|List:mouse_scroll|boolean|Handles mouse scroll events
|
||||||
|[List:render](#List:render)|-|Renders the list
|
|List:render|-|Renders the list
|
||||||
|
|
||||||
## List:addItem(text)
|
## List:addItem(text)
|
||||||
Adds an item to the list
|
Adds an item to the list
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ Menu items are displayed in a single row and can have custom colors and callback
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Menu:setItems](#Menu:setItems)|Menu|Sets the menu items and calculates total width
|
|[Menu:setItems](#menu-setitems)|Menu|Sets the menu items and calculates total width
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Menu:init](#Menu:init)|Menu|Initializes the Menu instance
|
|Menu:init|Menu|Initializes the Menu instance
|
||||||
|[Menu:mouse_click](#Menu:mouse_click)|boolean|Handles mouse click events and item selection
|
|Menu:mouse_click|boolean|Handles mouse click events and item selection
|
||||||
|[Menu:render](#Menu:render)|-|Renders the menu horizontally with proper spacing and colors
|
|Menu:render|-|Renders the menu horizontally with proper spacing and colors
|
||||||
|
|
||||||
## Menu:setItems(items)
|
## Menu:setItems(items)
|
||||||
Sets the menu items
|
Sets the menu items
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ This is the program class. It provides a program that runs in a window.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Program:execute](#Program:execute)|Program|Executes a program
|
|[Program:execute](#program-execute)|Program|Executes a program
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Program:dispatchEvent](#Program:dispatchEvent)|any|Handles all incomming events
|
|Program:dispatchEvent|any|Handles all incomming events
|
||||||
|[Program:focus](#Program:focus)|-|Gets called when the element gets focused
|
|Program:focus|-|Gets called when the element gets focused
|
||||||
|[Program:init](#Program:init)|Program|Initializes the Program instance
|
|Program:init|Program|Initializes the Program instance
|
||||||
|[Program:render](#Program:render)|-|Renders the program
|
|Program:render|-|Renders the program
|
||||||
|
|
||||||
## Program:execute(path)
|
## Program:execute(path)
|
||||||
Executes a program
|
Executes a program
|
||||||
|
|||||||
@@ -10,17 +10,12 @@ with optional percentage display and customizable colors.
|
|||||||
|showPercentage|boolean|false|Whether to show the percentage text in the center
|
|showPercentage|boolean|false|Whether to show the percentage text in the center
|
||||||
|progressColor|color|lime|The color used for the filled portion of the progress bar
|
|progressColor|color|lime|The color used for the filled portion of the progress bar
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[ProgressBar:init](#ProgressBar:init)|ProgressBar|Initializes the ProgressBar instance
|
|ProgressBar:init|ProgressBar|Initializes the ProgressBar instance
|
||||||
|[ProgressBar:render](#ProgressBar:render)|-|Renders the progress bar with filled portion and optional percentage text
|
|ProgressBar:render|-|Renders the progress bar with filled portion and optional percentage text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,19 +25,19 @@ A scrollbar element that can be attached to other elements to control their scro
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Scrollbar:attach](#Scrollbar:attach)|Scrollbar|Attaches the scrollbar to an element's property
|
|[Scrollbar:attach](#scrollbar-attach)|Scrollbar|Attaches the scrollbar to an element's property
|
||||||
|[Scrollbar:updateAttachedElement](#Scrollbar:updateAttachedElement)|Scrollbar|Updates the attached element's property based on the scrollbar value
|
|[Scrollbar:updateAttachedElement](#scrollbar-updateattachedelement)|Scrollbar|Updates the attached element's property based on the scrollbar value
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Scrollbar:init](#Scrollbar:init)|Scrollbar|Initializes the Scrollbar instance
|
|Scrollbar:init|Scrollbar|Initializes the Scrollbar instance
|
||||||
|[Scrollbar:mouse_click](#Scrollbar:mouse_click)|boolean|Handles mouse click events
|
|Scrollbar:mouse_click|boolean|Handles mouse click events
|
||||||
|[Scrollbar:mouse_drag](#Scrollbar:mouse_drag)|boolean|Handles mouse drag events
|
|Scrollbar:mouse_drag|boolean|Handles mouse drag events
|
||||||
|[Scrollbar:mouse_scroll](#Scrollbar:mouse_scroll)|boolean|Handles mouse scroll events
|
|Scrollbar:mouse_scroll|boolean|Handles mouse scroll events
|
||||||
|[Scrollbar:render](#Scrollbar:render)|-|Renders the scrollbar
|
|Scrollbar:render|-|Renders the scrollbar
|
||||||
|
|
||||||
## Scrollbar:attach(element, config)
|
## Scrollbar:attach(element, config)
|
||||||
Attaches the scrollbar to an element's property
|
Attaches the scrollbar to an element's property
|
||||||
|
|||||||
@@ -22,17 +22,17 @@ with customizable colors and value ranges.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Slider:getValue](#Slider:getValue)|number|Gets the current value mapped to the max range
|
|[Slider:getValue](#slider-getvalue)|number|Gets the current value mapped to the max range
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Slider:init](#Slider:init)|Slider|Initializes the Slider instance
|
|Slider:init|Slider|Initializes the Slider instance
|
||||||
|[Slider:mouse_click](#Slider:mouse_click)|boolean|Updates slider position on mouse click
|
|Slider:mouse_click|boolean|Updates slider position on mouse click
|
||||||
|[Slider:mouse_scroll](#Slider:mouse_scroll)|boolean|Handles mouse release events
|
|Slider:mouse_scroll|boolean|Handles mouse release events
|
||||||
|[Slider:render](#Slider:render)|-|Renders the slider with track and handle
|
|Slider:render|-|Renders the slider with track and handle
|
||||||
|
|
||||||
## Slider:getValue()
|
## Slider:getValue()
|
||||||
Gets the current value of the slider
|
Gets the current value of the slider
|
||||||
|
|||||||
@@ -20,17 +20,17 @@ row selection, and scrolling capabilities.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Table:sortData](#Table:sortData)|Table|Sorts the table data by the specified column
|
|[Table:sortData](#table-sortdata)|Table|Sorts the table data by the specified column
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Table:init](#Table:init)|Table|Initializes the Table instance
|
|Table:init|Table|Initializes the Table instance
|
||||||
|[Table:mouse_click](#Table:mouse_click)|boolean|Handles header clicks for sorting and row selection
|
|Table:mouse_click|boolean|Handles header clicks for sorting and row selection
|
||||||
|[Table:mouse_scroll](#Table:mouse_scroll)|boolean|Handles scrolling through the table data
|
|Table:mouse_scroll|boolean|Handles scrolling through the table data
|
||||||
|[Table:render](#Table:render)|-|Renders the table with headers, data and scrollbar
|
|Table:render|-|Renders the table with headers, data and scrollbar
|
||||||
|
|
||||||
## Table:sortData(columnIndex)
|
## Table:sortData(columnIndex)
|
||||||
Sorts the table data by column
|
Sorts the table data by column
|
||||||
|
|||||||
@@ -18,22 +18,22 @@ A multi-line text editor component with cursor support and text manipulation fea
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[TextBox:addSyntaxPattern](#TextBox:addSyntaxPattern)|TextBox|Adds a new syntax highlighting pattern
|
|[TextBox:addSyntaxPattern](#textbox-addsyntaxpattern)|TextBox|Adds a new syntax highlighting pattern
|
||||||
|[TextBox:getText](#TextBox:getText)|string|Gets the text of the TextBox
|
|[TextBox:getText](#textbox-gettext)|string|Gets the text of the TextBox
|
||||||
|[TextBox:setText](#TextBox:setText)|TextBox|Sets the text of the TextBox
|
|[TextBox:setText](#textbox-settext)|TextBox|Sets the text of the TextBox
|
||||||
|[TextBox:updateViewport](#TextBox:updateViewport)|TextBox|Updates the viewport to keep the cursor in view
|
|[TextBox:updateViewport](#textbox-updateviewport)|TextBox|Updates the viewport to keep the cursor in view
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[TextBox:char](#TextBox:char)|boolean|Handles character input
|
|TextBox:char|boolean|Handles character input
|
||||||
|[TextBox:init](#TextBox:init)|TextBox|Initializes the TextBox instance
|
|TextBox:init|TextBox|Initializes the TextBox instance
|
||||||
|[TextBox:key](#TextBox:key)|boolean|Handles key events
|
|TextBox:key|boolean|Handles key events
|
||||||
|[TextBox:mouse_click](#TextBox:mouse_click)|boolean|Handles mouse click events
|
|TextBox:mouse_click|boolean|Handles mouse click events
|
||||||
|[TextBox:mouse_scroll](#TextBox:mouse_scroll)|boolean|Handles mouse scroll events
|
|TextBox:mouse_scroll|boolean|Handles mouse scroll events
|
||||||
|[TextBox:render](#TextBox:render)|-|Renders the TextBox with syntax highlighting
|
|TextBox:render|-|Renders the TextBox with syntax highlighting
|
||||||
|
|
||||||
## TextBox:addSyntaxPattern(pattern, color)
|
## TextBox:addSyntaxPattern(pattern, color)
|
||||||
Adds a new syntax highlighting pattern
|
Adds a new syntax highlighting pattern
|
||||||
|
|||||||
@@ -18,21 +18,21 @@ with support for selection and scrolling.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Tree:collapseNode](#Tree:collapseNode)|Tree|Collapses a node to hide its children
|
|[Tree:collapseNode](#tree-collapsenode)|Tree|Collapses a node to hide its children
|
||||||
|[Tree:expandNode](#Tree:expandNode)|Tree|Expands a node to show its children
|
|[Tree:expandNode](#tree-expandnode)|Tree|Expands a node to show its children
|
||||||
|[Tree:getNodeSize](#Tree:getNodeSize)|number|Gets the size of the tree
|
|[Tree:getNodeSize](#tree-getnodesize)|number|Gets the size of the tree
|
||||||
|[Tree:onSelect](#Tree:onSelect)|Tree|Registers a callback for when a node is selected
|
|[Tree:onSelect](#tree-onselect)|Tree|Registers a callback for when a node is selected
|
||||||
|[Tree:toggleNode](#Tree:toggleNode)|Tree|Toggles between expanded and collapsed state
|
|[Tree:toggleNode](#tree-togglenode)|Tree|Toggles between expanded and collapsed state
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Tree:init](#Tree:init)|Tree|Initializes the Tree instance
|
|Tree:init|Tree|Initializes the Tree instance
|
||||||
|[Tree:mouse_click](#Tree:mouse_click)|boolean|Handles mouse click events for node selection and expansion
|
|Tree:mouse_click|boolean|Handles mouse click events for node selection and expansion
|
||||||
|[Tree:mouse_scroll](#Tree:mouse_scroll)|boolean|Handles mouse scroll events for vertical scrolling
|
|Tree:mouse_scroll|boolean|Handles mouse scroll events for vertical scrolling
|
||||||
|[Tree:render](#Tree:render)|-|Renders the tree with nodes, selection and scrolling
|
|Tree:render|-|Renders the tree with nodes, selection and scrolling
|
||||||
|
|
||||||
## Tree:collapseNode(node)
|
## Tree:collapseNode(node)
|
||||||
Collapses a node
|
Collapses a node
|
||||||
|
|||||||
@@ -49,35 +49,35 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[VisualElement:calculatePosition](#VisualElement:calculatePosition)|number|Calculates the position of the element
|
|[VisualElement:calculatePosition](#visualelement-calculateposition)|number|Calculates the position of the element
|
||||||
|[VisualElement:getAbsolutePosition](#VisualElement:getAbsolutePosition)|number|Returns the absolute position of the element
|
|[VisualElement:getAbsolutePosition](#visualelement-getabsoluteposition)|number|Returns the absolute position of the element
|
||||||
|[VisualElement:getRelativePosition](#VisualElement:getRelativePosition)|number|Returns the relative position of the element
|
|[VisualElement:getRelativePosition](#visualelement-getrelativeposition)|number|Returns the relative position of the element
|
||||||
|[VisualElement:isInBounds](#VisualElement:isInBounds)|boolean|Checks if point is within bounds
|
|[VisualElement:isInBounds](#visualelement-isinbounds)|boolean|Checks if point is within bounds
|
||||||
|[VisualElement:prioritize](#VisualElement:prioritize)|VisualElement|Prioritizes the element by moving it to the top of its parent's children
|
|[VisualElement:prioritize](#visualelement-prioritize)|VisualElement|Prioritizes the element by moving it to the top of its parent's children
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[VisualElement:blit](#VisualElement:blit)|-|Draws text with both colors
|
|VisualElement:blit|-|Draws text with both colors
|
||||||
|[VisualElement:blur](#VisualElement:blur)|-|Handles a blur event
|
|VisualElement:blur|-|Handles a blur event
|
||||||
|[VisualElement:char](#VisualElement:char)|-|Handles a character event
|
|VisualElement:char|-|Handles a character event
|
||||||
|[VisualElement:focus](#VisualElement:focus)|-|Handles a focus event
|
|VisualElement:focus|-|Handles a focus event
|
||||||
|[VisualElement:init](#VisualElement:init)|-|Initializes a new visual element with properties
|
|VisualElement:init|-|Initializes a new visual element with properties
|
||||||
|[VisualElement:key](#VisualElement:key)|-|Handles a key event
|
|VisualElement:key|-|Handles a key event
|
||||||
|[VisualElement:key_up](#VisualElement:key_up)|-|Handles a key up event
|
|VisualElement:key_up|-|Handles a key up event
|
||||||
|[VisualElement:mouse_click](#VisualElement:mouse_click)|boolean|Handles a mouse click event
|
|VisualElement:mouse_click|boolean|Handles a mouse click event
|
||||||
|[VisualElement:mouse_drag](#VisualElement:mouse_drag)|boolean|Handles a mouse drag event
|
|VisualElement:mouse_drag|boolean|Handles a mouse drag event
|
||||||
|[VisualElement:mouse_move](#VisualElement:mouse_move)|boolean|Handles a mouse move event
|
|VisualElement:mouse_move|boolean|Handles a mouse move event
|
||||||
|[VisualElement:mouse_release](#VisualElement:mouse_release)|-|Handles a mouse release event
|
|VisualElement:mouse_release|-|Handles a mouse release event
|
||||||
|[VisualElement:mouse_scroll](#VisualElement:mouse_scroll)|boolean|Handles a mouse scroll event
|
|VisualElement:mouse_scroll|boolean|Handles a mouse scroll event
|
||||||
|[VisualElement:mouse_up](#VisualElement:mouse_up)|boolean|Handles a mouse up event
|
|VisualElement:mouse_up|boolean|Handles a mouse up event
|
||||||
|[VisualElement:multiBlit](#VisualElement:multiBlit)|-|Multi-character drawing with colors
|
|VisualElement:multiBlit|-|Multi-character drawing with colors
|
||||||
|[VisualElement:render](#VisualElement:render)|-|Renders the element
|
|VisualElement:render|-|Renders the element
|
||||||
|[VisualElement:setCursor](#VisualElement:setCursor)|VisualElement|Sets the cursor position
|
|VisualElement:setCursor|VisualElement|Sets the cursor position
|
||||||
|[VisualElement:textBg](#VisualElement:textBg)|-|Draws text with background color
|
|VisualElement:textBg|-|Draws text with background color
|
||||||
|[VisualElement:textFg](#VisualElement:textFg)|-|Draws text with foreground color
|
|VisualElement:textFg|-|Draws text with foreground color
|
||||||
|
|
||||||
## VisualElement:calculatePosition()
|
## VisualElement:calculatePosition()
|
||||||
Calculates the position of the element relative to its parent
|
Calculates the position of the element relative to its parent
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ This is Basalt's error handler. All the errors are handled by this module.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[errorHandler.error](#errorHandler.error)|-|
|
|[errorHandler.error](#errorhandler-error)|-|
|
||||||
|
|
||||||
|
|
||||||
## errorHandler.error(errMsg)
|
## errorHandler.error(errMsg)
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ Logger module for Basalt. Logs messages to the console and optionally to a file.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Log.debug](#Log.debug)|-|Sends a debug message
|
|[Log.debug](#log-debug)|-|Sends a debug message
|
||||||
|[Log.error](#Log.error)|-|Sends an error message
|
|[Log.error](#log-error)|-|Sends an error message
|
||||||
|[Log.info](#Log.info)|-|Sends an info message
|
|[Log.info](#log-info)|-|Sends an info message
|
||||||
|[Log.setEnabled](#Log.setEnabled)|-|Sets if the logger should log
|
|[Log.setEnabled](#log-setenabled)|-|Sets if the logger should log
|
||||||
|[Log.setLogToFile](#Log.setLogToFile)|-|Sets if the logger should log to a file
|
|[Log.setLogToFile](#log-setlogtofile)|-|Sets if the logger should log to a file
|
||||||
|[Log.warn](#Log.warn)|-|Sends a warning message
|
|[Log.warn](#log-warn)|-|Sends a warning message
|
||||||
|
|
||||||
|
|
||||||
## Log.debug(...)
|
## Log.debug(...)
|
||||||
|
|||||||
@@ -26,19 +26,19 @@ What this code does is it loads basalt into the project, and you can access it b
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[basalt.create](#basalt.create)|table|Creates a new UI element
|
|[basalt.create](#basalt-create)|table|Creates a new UI element
|
||||||
|[basalt.createFrame](#basalt.createFrame)|BaseFrame|Creates a new BaseFrame
|
|[basalt.createFrame](#basalt-createframe)|BaseFrame|Creates a new BaseFrame
|
||||||
|[basalt.getAPI](#basalt.getAPI)|table|Returns a Plugin API
|
|[basalt.getAPI](#basalt-getapi)|table|Returns a Plugin API
|
||||||
|[basalt.getActiveFrame](#basalt.getActiveFrame)|BaseFrame?|Returns the active frame
|
|[basalt.getActiveFrame](#basalt-getactiveframe)|BaseFrame?|Returns the active frame
|
||||||
|[basalt.getElementClass](#basalt.getElementClass)|table|Returns an element class
|
|[basalt.getElementClass](#basalt-getelementclass)|table|Returns an element class
|
||||||
|[basalt.getElementManager](#basalt.getElementManager)|table|Returns the element manager
|
|[basalt.getElementManager](#basalt-getelementmanager)|table|Returns the element manager
|
||||||
|[basalt.getMainFrame](#basalt.getMainFrame)|BaseFrame|Gets or creates the main frame
|
|[basalt.getMainFrame](#basalt-getmainframe)|BaseFrame|Gets or creates the main frame
|
||||||
|[basalt.removeSchedule](#basalt.removeSchedule)|boolean|Removes a scheduled update
|
|[basalt.removeSchedule](#basalt-removeschedule)|boolean|Removes a scheduled update
|
||||||
|[basalt.run](#basalt.run)|-|Starts the Basalt runtime
|
|[basalt.run](#basalt-run)|-|Starts the Basalt runtime
|
||||||
|[basalt.schedule](#basalt.schedule)|thread|Schedules a function to run in a coroutine
|
|[basalt.schedule](#basalt-schedule)|thread|Schedules a function to run in a coroutine
|
||||||
|[basalt.setActiveFrame](#basalt.setActiveFrame)|-|Sets the active frame
|
|[basalt.setActiveFrame](#basalt-setactiveframe)|-|Sets the active frame
|
||||||
|[basalt.stop](#basalt.stop)|-|Stops the Basalt runtime
|
|[basalt.stop](#basalt-stop)|-|Stops the Basalt runtime
|
||||||
|[basalt.update](#basalt.update)|-|Runs basalt once
|
|[basalt.update](#basalt-update)|-|Runs basalt once
|
||||||
|
|
||||||
|
|
||||||
## basalt.create(type, properties?)
|
## basalt.create(type, properties?)
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ with support for sequences, easing functions, and multiple animation types.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Animation.new](#Animation.new)|Animation|Creates a new animation
|
|[Animation.new](#animation-new)|Animation|Creates a new animation
|
||||||
|[Animation.registerAnimation](#Animation.registerAnimation)|-|Registers a custom animation type
|
|[Animation.registerAnimation](#animation-registeranimation)|-|Registers a custom animation type
|
||||||
|[Animation.registerEasing](#Animation.registerEasing)|-|Adds a custom easing function
|
|[Animation.registerEasing](#animation-registereasing)|-|Adds a custom easing function
|
||||||
|[Animation:addAnimation](#Animation:addAnimation)|-|Adds a new animation to the sequence
|
|[Animation:addAnimation](#animation-addanimation)|-|Adds a new animation to the sequence
|
||||||
|[Animation:event](#Animation:event)|-|The event handler for the animation
|
|[Animation:event](#animation-event)|-|The event handler for the animation
|
||||||
|[Animation:onComplete](#Animation:onComplete)|Animation|Registers a callback for the complete event
|
|[Animation:onComplete](#animation-oncomplete)|Animation|Registers a callback for the complete event
|
||||||
|[Animation:onStart](#Animation:onStart)|-|Registers a callback for the start event
|
|[Animation:onStart](#animation-onstart)|-|Registers a callback for the start event
|
||||||
|[Animation:onUpdate](#Animation:onUpdate)|Animation|Registers a callback for the update event
|
|[Animation:onUpdate](#animation-onupdate)|Animation|Registers a callback for the update event
|
||||||
|[Animation:sequence](#Animation:sequence)|Animation|Creates a new sequence
|
|[Animation:sequence](#animation-sequence)|Animation|Creates a new sequence
|
||||||
|[Animation:start](#Animation:start)|Animation|Starts the animation
|
|[Animation:start](#animation-start)|Animation|Starts the animation
|
||||||
|
|
||||||
|
|
||||||
## Animation.new(element)
|
## Animation.new(element)
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ This is the AnimationInstance class. It represents a single animation instance
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[AnimationInstance.new](#AnimationInstance.new)|AnimationInstance|Creates a new animation instance
|
|[AnimationInstance.new](#animationinstance-new)|AnimationInstance|Creates a new animation instance
|
||||||
|[AnimationInstance:complete](#AnimationInstance:complete)|-|Called when the animation is completed
|
|[AnimationInstance:complete](#animationinstance-complete)|-|Called when the animation is completed
|
||||||
|[AnimationInstance:start](#AnimationInstance:start)|AnimationInstance|Starts the animation
|
|[AnimationInstance:start](#animationinstance-start)|AnimationInstance|Starts the animation
|
||||||
|[AnimationInstance:update](#AnimationInstance:update)|boolean|Updates the animation
|
|[AnimationInstance:update](#animationinstance-update)|boolean|Updates the animation
|
||||||
|
|
||||||
|
|
||||||
## AnimationInstance.new(element, animType, args, duration, easing)
|
## AnimationInstance.new(element, animType, args, duration, easing)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Adds additional methods for VisualElement when adding animation plugin
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[VisualElement:animate](#VisualElement:animate)|Animation|Creates a new animation
|
|[VisualElement:animate](#visualelement-animate)|Animation|Creates a new animation
|
||||||
|
|
||||||
|
|
||||||
## VisualElement:animate()
|
## VisualElement:animate()
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ Benchmark API methods
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[API.clear](#API.clear)|-|Removes a benchmark's data
|
|[API.clear](#api-clear)|-|Removes a benchmark's data
|
||||||
|[API.clearAll](#API.clearAll)|-|Removes all custom benchmark data
|
|[API.clearAll](#api-clearall)|-|Removes all custom benchmark data
|
||||||
|[API.getStats](#API.getStats)|table?|Retrieves benchmark statistics
|
|[API.getStats](#api-getstats)|table?|Retrieves benchmark statistics
|
||||||
|[API.start](#API.start)|-|Starts timing a custom operation
|
|[API.start](#api-start)|-|Starts timing a custom operation
|
||||||
|[API.stop](#API.stop)|-|Stops timing and logs results
|
|[API.stop](#api-stop)|-|Stops timing and logs results
|
||||||
|
|
||||||
|
|
||||||
## API.clear(name)
|
## API.clear(name)
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ The following methods are available for BaseElement
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement:benchmark](#BaseElement:benchmark)|BaseElement|Enables performance measurement for a method
|
|[BaseElement:benchmark](#baseelement-benchmark)|BaseElement|Enables performance measurement for a method
|
||||||
|[BaseElement:endProfile](#BaseElement:endProfile)|BaseElement|Ends timing a method call and records statistics
|
|[BaseElement:endProfile](#baseelement-endprofile)|BaseElement|Ends timing a method call and records statistics
|
||||||
|[BaseElement:getBenchmarkStats](#BaseElement:getBenchmarkStats)|table?|Retrieves benchmark statistics for a method
|
|[BaseElement:getBenchmarkStats](#baseelement-getbenchmarkstats)|table?|Retrieves benchmark statistics for a method
|
||||||
|[BaseElement:logBenchmark](#BaseElement:logBenchmark)|BaseElement|Logs benchmark statistics for a method
|
|[BaseElement:logBenchmark](#baseelement-logbenchmark)|BaseElement|Logs benchmark statistics for a method
|
||||||
|[BaseElement:startProfile](#BaseElement:startProfile)|BaseElement|Starts timing a method call
|
|[BaseElement:startProfile](#baseelement-startprofile)|BaseElement|Starts timing a method call
|
||||||
|[BaseElement:stopBenchmark](#BaseElement:stopBenchmark)|BaseElement|Disables performance measurement for a method
|
|[BaseElement:stopBenchmark](#baseelement-stopbenchmark)|BaseElement|Disables performance measurement for a method
|
||||||
|
|
||||||
|
|
||||||
## BaseElement:benchmark(methodName)
|
## BaseElement:benchmark(methodName)
|
||||||
|
|||||||
44
docs/references/plugins/benchmark_Container_VisualElement.md
Normal file
44
docs/references/plugins/benchmark_Container_VisualElement.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Container : VisualElement
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
|
||||||
|
|Method|Returns|Description|
|
||||||
|
|---|---|---|
|
||||||
|
|[Container:benchmarkContainer](#container-benchmarkcontainer)|Container|Recursively enables benchmarking
|
||||||
|
|[Container:logContainerBenchmarks](#container-logcontainerbenchmarks)|Container|Recursively logs benchmark statistics
|
||||||
|
|[Container:stopContainerBenchmark](#container-stopcontainerbenchmark)|Container|Recursively stops benchmarking
|
||||||
|
|
||||||
|
|
||||||
|
## Container:benchmarkContainer(methodName)
|
||||||
|
Enables benchmarking for a container and all its children
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `methodName` `string` The method to benchmark
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `Container` `self` The container instance
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
```lua
|
||||||
|
container:benchmarkContainer("render")
|
||||||
|
```
|
||||||
|
|
||||||
|
## Container:logContainerBenchmarks(methodName)
|
||||||
|
Logs benchmark statistics for a container and all its children
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `methodName` `string` The method to log
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `Container` `self` The container instance
|
||||||
|
|
||||||
|
## Container:stopContainerBenchmark(methodName)
|
||||||
|
Stops benchmarking for a container and all its children
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `methodName` `string` The method to stop benchmarking
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `Container` `self` The container instance
|
||||||
|
|
||||||
|
|
||||||
@@ -5,8 +5,8 @@ No Description
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement.debug](#BaseElement.debug)|-|Enables debugging for this element
|
|[BaseElement.debug](#baseelement-debug)|-|Enables debugging for this element
|
||||||
|[BaseElement.dumpDebug](#BaseElement.dumpDebug)|-|Dumps debug information
|
|[BaseElement.dumpDebug](#baseelement-dumpdebug)|-|Dumps debug information
|
||||||
|
|
||||||
|
|
||||||
## BaseElement.debug(self, level)
|
## BaseElement.debug(self, level)
|
||||||
@@ -32,9 +32,9 @@ Dumps debug information for this element
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseFrame.hideDebugLog](#BaseFrame.hideDebugLog)|-|Hides the debug log frame
|
|[BaseFrame.hideDebugLog](#baseframe-hidedebuglog)|-|Hides the debug log frame
|
||||||
|[BaseFrame.showDebugLog](#BaseFrame.showDebugLog)|-|Shows the debug log frame
|
|[BaseFrame.showDebugLog](#baseframe-showdebuglog)|-|Shows the debug log frame
|
||||||
|[BaseFrame.toggleDebugLog](#BaseFrame.toggleDebugLog)|-|Toggles the debug log frame
|
|[BaseFrame.toggleDebugLog](#baseframe-toggledebuglog)|-|Toggles the debug log frame
|
||||||
|
|
||||||
|
|
||||||
## BaseFrame.hideDebugLog(self)
|
## BaseFrame.hideDebugLog(self)
|
||||||
@@ -65,7 +65,7 @@ Toggles the debug log frame
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Container.debugChildren](#Container.debugChildren)|-|Debug container and children
|
|[Container.debugChildren](#container-debugchildren)|-|Debug container and children
|
||||||
|
|
||||||
|
|
||||||
## Container.debugChildren(self, level)
|
## Container.debugChildren(self, level)
|
||||||
|
|||||||
@@ -2,10 +2,5 @@
|
|||||||
This module provides reactive functionality for elements, it adds no new functionality for elements.
|
This module provides reactive functionality for elements, it adds no new functionality for elements.
|
||||||
It is used to evaluate expressions in property values and update the element when the expression changes.
|
It is used to evaluate expressions in property values and update the element when the expression changes.
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ persistent states, computed states, and state sharing between elements.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement:computed](#BaseElement:computed)|BaseElement|Creates a computed state
|
|[BaseElement:computed](#baseelement-computed)|BaseElement|Creates a computed state
|
||||||
|[BaseElement:getState](#BaseElement:getState)|any|Gets a state value
|
|[BaseElement:getState](#baseelement-getstate)|any|Gets a state value
|
||||||
|[BaseElement:initializeState](#BaseElement:initializeState)|BaseElement|Initializes a new state
|
|[BaseElement:initializeState](#baseelement-initializestate)|BaseElement|Initializes a new state
|
||||||
|[BaseElement:onStateChange](#BaseElement:onStateChange)|BaseElement|Watches for state changes
|
|[BaseElement:onStateChange](#baseelement-onstatechange)|BaseElement|Watches for state changes
|
||||||
|[BaseElement:setState](#BaseElement:setState)|BaseElement|Sets a state value
|
|[BaseElement:setState](#baseelement-setstate)|BaseElement|Sets a state value
|
||||||
|[BaseElement:shareState](#BaseElement:shareState)|BaseElement|Shares state between elements
|
|[BaseElement:shareState](#baseelement-sharestate)|BaseElement|Shares state between elements
|
||||||
|
|
||||||
|
|
||||||
## BaseElement:computed(self, key, computeFn)
|
## BaseElement:computed(self, key, computeFn)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ with support for inheritance, named styles, and dynamic theme switching.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[BaseElement:applyTheme](#BaseElement:applyTheme)|BaseElement|Applies theme styles to the element
|
|[BaseElement:applyTheme](#baseelement-applytheme)|BaseElement|Applies theme styles to the element
|
||||||
|[BaseElement:getTheme](#BaseElement:getTheme)|table|Gets theme properties for the element
|
|[BaseElement:getTheme](#baseelement-gettheme)|table|Gets theme properties for the element
|
||||||
|
|
||||||
|
|
||||||
## BaseElement:applyTheme(self)
|
## BaseElement:applyTheme(self)
|
||||||
@@ -39,9 +39,9 @@ The Theme API provides methods for managing themes globally
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[ThemeAPI.getTheme](#ThemeAPI.getTheme)|table|Gets the current theme
|
|[ThemeAPI.getTheme](#themeapi-gettheme)|table|Gets the current theme
|
||||||
|[ThemeAPI.loadTheme](#ThemeAPI.loadTheme)|-|Loads theme from JSON file
|
|[ThemeAPI.loadTheme](#themeapi-loadtheme)|-|Loads theme from JSON file
|
||||||
|[ThemeAPI.setTheme](#ThemeAPI.setTheme)|-|Sets a new theme
|
|[ThemeAPI.setTheme](#themeapi-settheme)|-|Sets a new theme
|
||||||
|
|
||||||
|
|
||||||
## ThemeAPI.getTheme()
|
## ThemeAPI.getTheme()
|
||||||
|
|||||||
@@ -16,19 +16,19 @@ It also allows for properties to have custom getters and setters. This is the ba
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[PropertySystem.addSetterHook](#PropertySystem.addSetterHook)|-|Adds a setter hook to the PropertySystem
|
|[PropertySystem.addSetterHook](#propertysystem-addsetterhook)|-|Adds a setter hook to the PropertySystem
|
||||||
|[PropertySystem.blueprint](#PropertySystem.blueprint)|table|Creates a blueprint of an element class
|
|[PropertySystem.blueprint](#propertysystem-blueprint)|table|Creates a blueprint of an element class
|
||||||
|[PropertySystem.combineProperties](#PropertySystem.combineProperties)|-|Combines multiple properties
|
|[PropertySystem.combineProperties](#propertysystem-combineproperties)|-|Combines multiple properties
|
||||||
|[PropertySystem.createFromBlueprint](#PropertySystem.createFromBlueprint)|table|Creates an element from a blueprint
|
|[PropertySystem.createFromBlueprint](#propertysystem-createfromblueprint)|table|Creates an element from a blueprint
|
||||||
|[PropertySystem.defineProperty](#PropertySystem.defineProperty)|-|Defines a property for an element class
|
|[PropertySystem.defineProperty](#propertysystem-defineproperty)|-|Defines a property for an element class
|
||||||
|[PropertySystem:__init](#PropertySystem:__init)|table|Initializes the PropertySystem
|
|[PropertySystem:__init](#propertysystem-__init)|table|Initializes the PropertySystem
|
||||||
|[PropertySystem:_updateProperty](#PropertySystem:_updateProperty)|table|Update call for a property
|
|[PropertySystem:_updateProperty](#propertysystem-_updateproperty)|table|Update call for a property
|
||||||
|[PropertySystem:getPropertyConfig](#PropertySystem:getPropertyConfig)|table|Gets a property configuration
|
|[PropertySystem:getPropertyConfig](#propertysystem-getpropertyconfig)|table|Gets a property configuration
|
||||||
|[PropertySystem:instanceProperty](#PropertySystem:instanceProperty)|table|Adds a property to the PropertySystem on instance level
|
|[PropertySystem:instanceProperty](#propertysystem-instanceproperty)|table|Adds a property to the PropertySystem on instance level
|
||||||
|[PropertySystem:observe](#PropertySystem:observe)|table|Observers a property
|
|[PropertySystem:observe](#propertysystem-observe)|table|Observers a property
|
||||||
|[PropertySystem:removeAllObservers](#PropertySystem:removeAllObservers)|table|Removes all observers from a property
|
|[PropertySystem:removeAllObservers](#propertysystem-removeallobservers)|table|Removes all observers from a property
|
||||||
|[PropertySystem:removeObserver](#PropertySystem:removeObserver)|table|Removes an observer from a property
|
|[PropertySystem:removeObserver](#propertysystem-removeobserver)|table|Removes an observer from a property
|
||||||
|[PropertySystem:removeProperty](#PropertySystem:removeProperty)|table|Removes a property from the PropertySystem
|
|[PropertySystem:removeProperty](#propertysystem-removeproperty)|table|Removes a property from the PropertySystem
|
||||||
|
|
||||||
|
|
||||||
## PropertySystem.addSetterHook(hook)
|
## PropertySystem.addSetterHook(hook)
|
||||||
|
|||||||
@@ -18,23 +18,23 @@ functionality. It also has a buffer system to reduce the number of calls
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Render.new](#Render.new)|Render|
|
|[Render.new](#render-new)|Render|
|
||||||
|[Render:addDirtyRect](#Render:addDirtyRect)|Render|
|
|[Render:addDirtyRect](#render-adddirtyrect)|Render|
|
||||||
|[Render:bg](#Render:bg)|Render|
|
|[Render:bg](#render-bg)|Render|
|
||||||
|[Render:blit](#Render:blit)|Render|
|
|[Render:blit](#render-blit)|Render|
|
||||||
|[Render:clear](#Render:clear)|Render|
|
|[Render:clear](#render-clear)|Render|
|
||||||
|[Render:clearArea](#Render:clearArea)|Render|
|
|[Render:clearArea](#render-cleararea)|Render|
|
||||||
|[Render:fg](#Render:fg)|Render|
|
|[Render:fg](#render-fg)|Render|
|
||||||
|[Render:getSize](#Render:getSize)|number,|
|
|[Render:getSize](#render-getsize)|number,|
|
||||||
|[Render:mergeRects](#Render:mergeRects)|Render|
|
|[Render:mergeRects](#render-mergerects)|Render|
|
||||||
|[Render:multiBlit](#Render:multiBlit)|Render|
|
|[Render:multiBlit](#render-multiblit)|Render|
|
||||||
|[Render:rectOverlaps](#Render:rectOverlaps)|boolean|
|
|[Render:rectOverlaps](#render-rectoverlaps)|boolean|
|
||||||
|[Render:render](#Render:render)|Render|
|
|[Render:render](#render-render)|Render|
|
||||||
|[Render:setCursor](#Render:setCursor)|Render|
|
|[Render:setCursor](#render-setcursor)|Render|
|
||||||
|[Render:setSize](#Render:setSize)|Render|
|
|[Render:setSize](#render-setsize)|Render|
|
||||||
|[Render:text](#Render:text)|Render|
|
|[Render:text](#render-text)|Render|
|
||||||
|[Render:textBg](#Render:textBg)|Render|
|
|[Render:textBg](#render-textbg)|Render|
|
||||||
|[Render:textFg](#Render:textFg)|Render|
|
|[Render:textFg](#render-textfg)|Render|
|
||||||
|
|
||||||
|
|
||||||
## Render.new(terminal)
|
## Render.new(terminal)
|
||||||
|
|||||||
Reference in New Issue
Block a user