|
Concepts
The goal of AbsTK is producing wizard-like applications that can run with and without a desktop environment (DE). It's worth it for machines that don't have any DE installed, but also, for instance, installers in which you may prefer a light-weight text-mode (curses) interface, instead of using a GUI.
Although the toolkit focus is on building Wizards, individual Screens can also be produced. Actually, building Screens is the main part of building a Wizard. Wizards are no much more than a group of ordered Screens.
The routine is really minimalistic, but, as stated in the previous paragraph, has two modes. To create a Screen, you initialize it and populate it with widgets. If your UI is a single Screen, just run it. If it's a Wizard, repeat the first process to produce all the Screens. When done, simply create the Wizard, populate it with the Screens and run the Wizard.
local abstk = require 'abstk' abstk.set_mode(...) local scr = abstk.new_screen("Register Form") scr:add_label('label', "Fill the fields to register") scr:add_text_input('email', "E-mail") scr:add_text_input('user', "Username") scr:add_password('pswrd', "Password") scr:add_checkbox('news', "Send me newsletter") local data = scr:run()