Skip to content

esferatec/ec-luart-widgetmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

ec-luart-widgetmanager

The project is a widget management module written in Lua. It defines a WidgetManager object that contains methods for managing widgets in LuaRT desktop applications.

LuaRT 2.1.0

Features

The project provides a modular and flexible way to manage widgets in desktop applications. It allows you to add, hide, show, disable and enable child widgets. Several widget managers can be used in one application.

Installation

  1. Create a folder called "ecluart" in your application.
  2. Copy the "wm.lua" file into this folder.
[application]
|
|----ecluart
|   |
|   |----wm.lua
|   |----...
|
|----app.wlua

Usage

The widget manager (wm) can be loaded using the function require():

local wm = require("ecluart.wm") 

Constructor

WidgetManager() -> object

Initializes a new widget manager instance.

Method - add

WidgetManager:add(widget: object, name: string) -> none

Adds a widget and name.

Method - hide

WidgetManager:hide() -> none

Hides all child widgets.

Method - show

WidgetManager:show() -> none

Shows all child widgets.

Method - disable

WidgetManager:disable() -> none

Disables all child widgets.

Method - enable

WidgetManager:enable() -> none

Enables all child widgets.

Method - change

WidgetManager:change(key: string, value: any) -> none

Changes a property for all child widgets.

Method - focus

WidgetManager:focus(name: string) -> none

Sets the focus to a specific child widget.

License

Copyright (c) 2023 by esferatec. It is open source, released under the MIT License. See full copyright notice in the LICENSE.md file.

About

virtual widget manager for LuaRT

Topics

Resources

License

Stars

Watchers

Forks

Languages