HEW - Humpty's Easy Widgets
A GUI Framework
The purpose of this project is for the easy building of the graphic user interface for apps on Android using RFO-Basic. HEW is put in the Public Domain.
It is the hope that by relieving the programmer of the complexity of the GUI, then he/she can concentrate more on the actual core of the application.
The framework consists of the following components;
Themes: Theme mananger. Sets colors, changes themes.
Event Loop : Main event loop (waits for events)
Init : Screen initialisation, set global variables.
ISR : Interrupt handling code. (interrupt service routines).
The term 'widget' here is not the same as an android widget. A hew widget is a graphical u.i control ( e.g a clickable button). A hew widget will try to re-use graphic objects whenever possible, this is because rfo-basic objects cannot be deleted, so some memory will be saved especially if the widget is used frequently.
Most widgets have a 'make' function (constructor) and a common callback function so it can respond when called by the main loop or by other functions.
All widgets have a 'bundle' of data that saves the current state of the widget. This bundle is returned by the constructor.
Some callbacks will have a 'command' parameter if it needs to handle more than one command.
If using the themes module, gr.color calls must be manually replaced with theme_color().
All widgets uses themes.bas to get colors. This is done by calling theme_color() instead of gr.color().
The theme manager can also change themes and colors for formfill.css.
The group manager's task is to relieve the programmer of positioning widgets. Each widget can be assigned to a group (a row), the group manager evenly distributes each widget in a group and each group on the screen, If the screen dimensions change, the group manager re-positions everything. Widgets are ordered in a group according to when they are assigned.
At the moment Formfill (an html form filler) supports HEW themes. It does this by wrapping it's colors with CSS comments.
The Theme manager can then replace these colors by overwriting the CSS file with new colors.
Write your first app with HEW !. click here.
Pics & Demos examples
Examples of HEW in use ;
The full change.log.txt is here
( What's Old? )
The rfo-basic forum is hosted on freeforums.org.
Paul Laughton - RFO Basic (named after "The Dr. Richard Feynman Observatory")