diff --git a/docs/references/elementManager.md b/docs/references/elementManager.md index 9f02420..e124d42 100644 --- a/docs/references/elementManager.md +++ b/docs/references/elementManager.md @@ -11,6 +11,7 @@ and then applies the plugins to the elements. It also provides a way to get elem |[ElementManager.getElementList](#ElementManager.getElementList)|table| |[ElementManager.loadElement](#ElementManager.loadElement)|-| + ## ElementManager.getAPI(name) Gets an Plugin API by name diff --git a/docs/references/elements/BaseElement.md b/docs/references/elements/BaseElement.md index 3acabb2..e06735a 100644 --- a/docs/references/elements/BaseElement.md +++ b/docs/references/elements/BaseElement.md @@ -29,6 +29,7 @@ The base class for all UI elements in Basalt. This class provides basic properti |[BaseElement:registerCallback](#BaseElement:registerCallback)|table|Registers a callback function |[BaseElement:updateRender](#BaseElement:updateRender)|-|Requests a render update for this element + ## BaseElement.defineEvent() ## BaseElement.new(props, basalt) diff --git a/docs/references/elements/BaseFrame.md b/docs/references/elements/BaseFrame.md index 4fcbda5..7cbdc8d 100644 --- a/docs/references/elements/BaseFrame.md +++ b/docs/references/elements/BaseFrame.md @@ -27,6 +27,7 @@ This is the base frame class. It is the root element of all elements and the onl |[BaseFrame:textBg](#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.new() Creates a new Frame instance diff --git a/docs/references/elements/Button.md b/docs/references/elements/Button.md index b2bf6b6..8eecbd3 100644 --- a/docs/references/elements/Button.md +++ b/docs/references/elements/Button.md @@ -21,6 +21,7 @@ The Button is a standard button element with click handling and state management |[Button:init](#Button:init)|-|Initializes the Button instance |[Button:render](#Button:render)|-|Renders the Button + ## Button.new() Creates a new Button instance diff --git a/docs/references/elements/Checkbox.md b/docs/references/elements/Checkbox.md index f3f92c4..6c7345c 100644 --- a/docs/references/elements/Checkbox.md +++ b/docs/references/elements/Checkbox.md @@ -19,6 +19,7 @@ The Checkbox is a visual element that can be checked. |[Checkbox:mouse_click](#Checkbox:mouse_click)|boolean|Handles mouse click events |[Checkbox:render](#Checkbox:render)|-|Renders the Checkbox + ## Checkbox.new() Creates a new Checkbox instance diff --git a/docs/references/elements/Container.md b/docs/references/elements/Container.md index 76eb293..71e6b5c 100644 --- a/docs/references/elements/Container.md +++ b/docs/references/elements/Container.md @@ -52,6 +52,7 @@ like Frames, BaseFrames, and more. |[Container:textFg](#Container:textFg)|Container|Draws a line of text and fg as color |[Container:unregisterChildEvent](#Container:unregisterChildEvent)|Container|Unregisters the children events of the container + ## Container.new() Creates a new Container instance diff --git a/docs/references/elements/Dropdown.md b/docs/references/elements/Dropdown.md index e5ef42c..bdaea07 100644 --- a/docs/references/elements/Dropdown.md +++ b/docs/references/elements/Dropdown.md @@ -19,6 +19,7 @@ This is the dropdown class. It is a visual element that can show a list of selec |[Dropdown:mouse_click](#Dropdown:mouse_click)|boolean|Handles mouse click events |[Dropdown:render](#Dropdown:render)|-|Renders the Dropdown + ## Dropdown.new() Creates a new Dropdown instance diff --git a/docs/references/elements/Flexbox.md b/docs/references/elements/Flexbox.md index 774e004..e66d54a 100644 --- a/docs/references/elements/Flexbox.md +++ b/docs/references/elements/Flexbox.md @@ -22,6 +22,7 @@ This is the Flexbox class. It is a container that arranges its children in a fle |[Flexbox:removeChild](#Flexbox:removeChild)|Flexbox|Removes a child element from the flexbox |[Flexbox:render](#Flexbox:render)|Flexbox|Renders the flexbox and its children + ## Flexbox.new() Creates a new Flexbox instance diff --git a/docs/references/elements/Frame.md b/docs/references/elements/Frame.md index 118e4d5..81718ff 100644 --- a/docs/references/elements/Frame.md +++ b/docs/references/elements/Frame.md @@ -8,6 +8,7 @@ This is the frame class. It serves as a grouping container for other elements. |[Frame.new](#Frame.new)|Frame|Creates a new Frame instance |[Frame:init](#Frame:init)|Frame|Initializes the Frame instance + ## Frame.new() Creates a new Frame instance diff --git a/docs/references/elements/Image.md b/docs/references/elements/Image.md index 9b91d8b..e73468e 100644 --- a/docs/references/elements/Image.md +++ b/docs/references/elements/Image.md @@ -26,6 +26,7 @@ See: https://github.com/SkyTheCodeMaster/bimg |[Image:setFg](#Image:setFg)|-| |[Image:setPixel](#Image:setPixel)|-| + ## Image.new() ## Image:getPixelData(x, y) diff --git a/docs/references/elements/Input.md b/docs/references/elements/Input.md index d572889..322a627 100644 --- a/docs/references/elements/Input.md +++ b/docs/references/elements/Input.md @@ -30,6 +30,7 @@ cursor movement, text manipulation, placeholder text, and input validation. |[Input:render](#Input:render)|-|Renders the input element |[Input:updateViewport](#Input:updateViewport)|-|Updates the input's viewport + ## Input.new() Creates a new Input instance diff --git a/docs/references/elements/Label.md b/docs/references/elements/Label.md index 3bc9614..8665127 100644 --- a/docs/references/elements/Label.md +++ b/docs/references/elements/Label.md @@ -18,6 +18,7 @@ resizes its width based on the text content. |[Label:init](#Label:init)|Label|Initializes the Label instance |[Label:render](#Label:render)|-|Renders the Label by drawing its text content + ## Label.new() Creates a new Label instance diff --git a/docs/references/elements/List.md b/docs/references/elements/List.md index 34b3883..c6db771 100644 --- a/docs/references/elements/List.md +++ b/docs/references/elements/List.md @@ -36,6 +36,7 @@ custom item rendering, separators, and selection handling. |[List:scrollToBottom](#List:scrollToBottom)|List|Scrolls the list to the bottom |[List:scrollToTop](#List:scrollToTop)|List|Scrolls the list to the top + ## List.new() Creates a new List instance diff --git a/docs/references/elements/Menu.md b/docs/references/elements/Menu.md index e2ebe49..b4c57ab 100644 --- a/docs/references/elements/Menu.md +++ b/docs/references/elements/Menu.md @@ -18,6 +18,7 @@ Menu items are displayed in a single row and can have custom colors and callback |[Menu:render](#Menu:render)|-|Renders the menu horizontally with proper spacing and colors |[Menu:setItems](#Menu:setItems)|Menu|Sets the menu items and calculates total width + ## Menu.new() Creates a new Menu instance diff --git a/docs/references/elements/Program.md b/docs/references/elements/Program.md index b43bc74..f0cf482 100644 --- a/docs/references/elements/Program.md +++ b/docs/references/elements/Program.md @@ -20,6 +20,7 @@ This is the program class. It provides a program that runs in a window. |[Program:init](#Program:init)|Program|Initializes the Program instance |[Program:render](#Program:render)|-|Renders the program + ## Program.new() Creates a new Program instance diff --git a/docs/references/elements/ProgressBar.md b/docs/references/elements/ProgressBar.md index f28a618..b785527 100644 --- a/docs/references/elements/ProgressBar.md +++ b/docs/references/elements/ProgressBar.md @@ -18,6 +18,7 @@ with optional percentage display and customizable colors. |[ProgressBar:init](#ProgressBar:init)|ProgressBar|Initializes the ProgressBar instance |[ProgressBar:render](#ProgressBar:render)|-|Renders the progress bar with filled portion and optional percentage text + ## ProgressBar.new() Creates a new ProgressBar instance diff --git a/docs/references/elements/Scrollbar.md b/docs/references/elements/Scrollbar.md index cec5f6f..ebcecb5 100644 --- a/docs/references/elements/Scrollbar.md +++ b/docs/references/elements/Scrollbar.md @@ -34,6 +34,7 @@ A scrollbar element that can be attached to other elements to control their scro |[Scrollbar:render](#Scrollbar:render)|-|Renders the scrollbar |[Scrollbar:updateAttachedElement](#Scrollbar:updateAttachedElement)|Scrollbar|Updates the attached element's property based on the scrollbar value + ## Scrollbar.new() Creates a new Scrollbar instance diff --git a/docs/references/elements/Slider.md b/docs/references/elements/Slider.md index 05fb1cb..1d92a9c 100644 --- a/docs/references/elements/Slider.md +++ b/docs/references/elements/Slider.md @@ -29,6 +29,7 @@ with customizable colors and value ranges. |[Slider:mouse_scroll](#Slider:mouse_scroll)|boolean|Handles mouse release events |[Slider:render](#Slider:render)|-|Renders the slider with track and handle + ## Slider.new() Creates a new Slider instance diff --git a/docs/references/elements/Table.md b/docs/references/elements/Table.md index 2bd0672..c0d7578 100644 --- a/docs/references/elements/Table.md +++ b/docs/references/elements/Table.md @@ -27,6 +27,7 @@ row selection, and scrolling capabilities. |[Table:render](#Table:render)|-|Renders the table with headers, data and scrollbar |[Table:sortData](#Table:sortData)|Table|Sorts the table data by the specified column + ## Table.new() Creates a new Table instance diff --git a/docs/references/elements/TextBox.md b/docs/references/elements/TextBox.md index 9ed4280..dfa87b1 100644 --- a/docs/references/elements/TextBox.md +++ b/docs/references/elements/TextBox.md @@ -30,6 +30,7 @@ A multi-line text editor component with cursor support and text manipulation fea |[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.new() Creates a new TextBox instance diff --git a/docs/references/elements/Tree.md b/docs/references/elements/Tree.md index b40d113..69dd327 100644 --- a/docs/references/elements/Tree.md +++ b/docs/references/elements/Tree.md @@ -29,6 +29,7 @@ with support for selection and scrolling. |[Tree:render](#Tree:render)|-|Renders the tree with nodes, selection and scrolling |[Tree:toggleNode](#Tree:toggleNode)|Tree|Toggles between expanded and collapsed state + ## Tree.new() Creates a new Tree instance diff --git a/docs/references/elements/VisualElement.md b/docs/references/elements/VisualElement.md index 6ddc500..04f486c 100644 --- a/docs/references/elements/VisualElement.md +++ b/docs/references/elements/VisualElement.md @@ -70,6 +70,7 @@ and provides core functionality for positioning, sizing, colors, and rendering. |[VisualElement:textBg](#VisualElement:textBg)|-|Draws text with background color |[VisualElement:textFg](#VisualElement:textFg)|-|Draws text with foreground color + ## VisualElement.new(props, basalt) Creates a new VisualElement instance diff --git a/docs/references/errorManager.md b/docs/references/errorManager.md index 0a72f7d..b27bc0c 100644 --- a/docs/references/errorManager.md +++ b/docs/references/errorManager.md @@ -14,6 +14,7 @@ This is Basalt's error handler. All the errors are handled by this module. |---|---|---| |[errorHandler.error](#errorHandler.error)|-| + ## errorHandler.error(errMsg) Handles an error diff --git a/docs/references/log.md b/docs/references/log.md index c78d88d..2178f4c 100644 --- a/docs/references/log.md +++ b/docs/references/log.md @@ -22,6 +22,7 @@ Logger module for Basalt. Logs messages to the console and optionally 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.debug(...) Sends a debug message to the logger. diff --git a/docs/references/main.md b/docs/references/main.md index 15a72b8..159baa0 100644 --- a/docs/references/main.md +++ b/docs/references/main.md @@ -37,6 +37,7 @@ What this code does is it loads basalt into the project, and you can access it b |[basalt.stop](#basalt.stop)|-|Stops the Basalt runtime |[basalt.update](#basalt.update)|-|Runs basalt once + ## basalt.create(type, properties?) Creates and returns a new UI element of the specified type. diff --git a/docs/references/plugins/animation.md b/docs/references/plugins/animation.md index 0714771..9bbdadb 100644 --- a/docs/references/plugins/animation.md +++ b/docs/references/plugins/animation.md @@ -17,6 +17,7 @@ with support for sequences, easing functions, and multiple animation types. |[Animation:sequence](#Animation:sequence)|Animation|Creates a new sequence |[Animation:start](#Animation:start)|Animation|Starts the animation + ## Animation.new(element) Creates a new Animation diff --git a/docs/references/plugins/animation_AnimationInstance.md b/docs/references/plugins/animation_AnimationInstance.md index df00ed7..22f0222 100644 --- a/docs/references/plugins/animation_AnimationInstance.md +++ b/docs/references/plugins/animation_AnimationInstance.md @@ -23,6 +23,7 @@ This is the AnimationInstance class. It represents a single animation instance |[AnimationInstance:start](#AnimationInstance:start)|AnimationInstance|Starts the animation |[AnimationInstance:update](#AnimationInstance:update)|boolean|Updates the animation + ## AnimationInstance.new(element, animType, args, duration, easing) Creates a new AnimationInstance diff --git a/docs/references/plugins/animation_VisualElement.md b/docs/references/plugins/animation_VisualElement.md index 4d2ae2c..550cf77 100644 --- a/docs/references/plugins/animation_VisualElement.md +++ b/docs/references/plugins/animation_VisualElement.md @@ -7,6 +7,7 @@ Adds additional methods for VisualElement when adding animation plugin |---|---|---| |[VisualElement:animate](#VisualElement:animate)|Animation|Creates a new animation + ## VisualElement:animate() Creates a new Animation Object diff --git a/docs/references/plugins/benchmark.md b/docs/references/plugins/benchmark.md index dabd471..c075aa8 100644 --- a/docs/references/plugins/benchmark.md +++ b/docs/references/plugins/benchmark.md @@ -11,6 +11,7 @@ Benchmark API methods |[API.start](#API.start)|-|Starts timing a custom operation |[API.stop](#API.stop)|-|Stops timing and logs results + ## API.clear(name) Clears a specific benchmark diff --git a/docs/references/plugins/benchmark_BaseElement.md b/docs/references/plugins/benchmark_BaseElement.md index 31e8c0b..7e40a60 100644 --- a/docs/references/plugins/benchmark_BaseElement.md +++ b/docs/references/plugins/benchmark_BaseElement.md @@ -14,6 +14,7 @@ The following methods are available for BaseElement |[BaseElement:startProfile](#BaseElement:startProfile)|BaseElement|Starts timing a method call |[BaseElement:stopBenchmark](#BaseElement:stopBenchmark)|BaseElement|Disables performance measurement for a method + ## BaseElement:benchmark(methodName) Enables benchmarking for a method diff --git a/docs/references/plugins/benchmark_Container.md b/docs/references/plugins/benchmark_Container.md index 2f91981..6657f65 100644 --- a/docs/references/plugins/benchmark_Container.md +++ b/docs/references/plugins/benchmark_Container.md @@ -9,6 +9,7 @@ Container benchmarking methods |[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 diff --git a/docs/references/plugins/debug.md b/docs/references/plugins/debug.md index 729cae6..d2cdf27 100644 --- a/docs/references/plugins/debug.md +++ b/docs/references/plugins/debug.md @@ -8,6 +8,7 @@ No Description |[BaseElement.debug](#BaseElement.debug)|-|Enables debugging for this element |[BaseElement.dumpDebug](#BaseElement.dumpDebug)|-|Dumps debug information + ## BaseElement.debug(self, level) Enables debugging for this element @@ -35,6 +36,7 @@ Dumps debug information for this element |[BaseFrame.showDebugLog](#BaseFrame.showDebugLog)|-|Shows the debug log frame |[BaseFrame.toggleDebugLog](#BaseFrame.toggleDebugLog)|-|Toggles the debug log frame + ## BaseFrame.hideDebugLog(self) Hides the debug log frame @@ -65,6 +67,7 @@ Toggles the debug log frame |---|---|---| |[Container.debugChildren](#Container.debugChildren)|-|Debug container and children + ## Container.debugChildren(self, level) Enables debugging for this container and all its children diff --git a/docs/references/plugins/reactive.md b/docs/references/plugins/reactive.md index f8eabdc..e46a0d2 100644 --- a/docs/references/plugins/reactive.md +++ b/docs/references/plugins/reactive.md @@ -8,3 +8,4 @@ It is used to evaluate expressions in property values and update the element whe |---|---|---| + diff --git a/docs/references/plugins/state.md b/docs/references/plugins/state.md index 433a26f..29d64bb 100644 --- a/docs/references/plugins/state.md +++ b/docs/references/plugins/state.md @@ -13,6 +13,7 @@ persistent states, computed states, and state sharing between elements. |[BaseElement:setState](#BaseElement:setState)|BaseElement|Sets a state value |[BaseElement:shareState](#BaseElement:shareState)|BaseElement|Shares state between elements + ## BaseElement:computed(self, key, computeFn) Creates a computed state that derives its value from other states diff --git a/docs/references/plugins/theme.md b/docs/references/plugins/theme.md index 676a867..79d8357 100644 --- a/docs/references/plugins/theme.md +++ b/docs/references/plugins/theme.md @@ -9,6 +9,7 @@ with support for inheritance, named styles, and dynamic theme switching. |[BaseElement:applyTheme](#BaseElement:applyTheme)|BaseElement|Applies theme styles to the element |[BaseElement:getTheme](#BaseElement:getTheme)|table|Gets theme properties for the element + ## BaseElement:applyTheme(self) Applies the current theme to this element @@ -42,6 +43,7 @@ The Theme API provides methods for managing themes globally |[themeAPI.loadTheme](#themeAPI.loadTheme)|-|Loads theme from JSON file |[themeAPI.setTheme](#themeAPI.setTheme)|-|Sets a new theme + ## themeAPI.getTheme() Gets the current theme configuration diff --git a/docs/references/plugins/xml.md b/docs/references/plugins/xml.md index 40e036f..a61b550 100644 --- a/docs/references/plugins/xml.md +++ b/docs/references/plugins/xml.md @@ -7,6 +7,7 @@ The XML plugin provides XML parsing and UI creation from XML markup |---|---|---| |[BaseElement:fromXML](#BaseElement:fromXML)|BaseElement|Creates element from XML node + ## BaseElement:fromXML(self, node) Creates an element from an XML node @@ -29,6 +30,7 @@ Creates an element from an XML node |---|---|---| |[Container:loadXML](#Container:loadXML)|Container|Loads UI from XML string + ## Container:loadXML(self, content, scope?) Loads and creates UI elements from XML content local xml = [[ diff --git a/docs/references/propertySystem.md b/docs/references/propertySystem.md index f6ab236..03364e3 100644 --- a/docs/references/propertySystem.md +++ b/docs/references/propertySystem.md @@ -30,6 +30,7 @@ It also allows for properties to have custom getters and setters. This is the ba |[PropertySystem:removeObserver](#PropertySystem:removeObserver)|table| |[PropertySystem:removeProperty](#PropertySystem:removeProperty)|table|Removes a property from the PropertySystem + ## PropertySystem.addSetterHook(hook) Adds a setter hook to the PropertySystem. Setter hooks are functions that are called before a property is set. diff --git a/docs/references/render.md b/docs/references/render.md index 5cd76d8..6876da9 100644 --- a/docs/references/render.md +++ b/docs/references/render.md @@ -36,6 +36,7 @@ functionality. It also has a buffer system to reduce the number of calls |[Render:textBg](#Render:textBg)|Render| |[Render:textFg](#Render:textFg)|Render| + ## Render.new(terminal) Creates a new Render object