VisualQB will be library for qbasic. It will have Gui engine and Virtual Machine that runs script files.
GUI Kernel - will provide most of the common gui controls/widgets such as buttons, textboxes, menus, checkboxes, textareas and so on. All controls will be hihgly costomizible both in appearance and in the way they work. However it will not have movable windows (at least at first, but maybe added with later releases), cause if to be honest it is not needed in qbasic.
Virtual Machine - will be single tasking script runner. Scripts will be compiled into byte code for the maximum perfomence. But it will be possible to pause/stop/restart/switch any script.
Script language - Will probably have C -like syntax, because it is both very flexible, but also is a lot easier to parse then QB like syntax. If everything works out it will have following things what C language have: Do, While, If, elseif and for, struct -structures, arrays,full C-like functions, preprocessor stataments like #include, #define, same comparison system as in C (a==0) could be (!a) and so on...
System - every gui control what GUI kernel provide will be both possible to acces and control from script language, but also from inside of Qbasic program. Here's small mockup of the code:
void init(void)
{
int but1, but2; //define some variables
//create new standard buttons, xpos, ypos, xsize, ysize, name
but1=Set_button(100, 100, 100, 20, "Button"); //qb controlled button
but2=Set_button(100, 130, 100, 20, "Exit"); // and direct script control -see below
}
void shutdown(void) //function what close gui
{
destroy_object(all_objects);
shutdown_system();
reset_screen();
end;
}
void main(void)
{
init();
while (1)
if (buttonevent) { //if button is pressed buttonevent variable is >0
if (buttonevent==but2)
shutdown(); //if button was pressed execute shutdown function
else if(buttonevent==but1); //do nothing- is qb controllod
if (systemevent) { // also can trace system events
if (systemevent==exitgui)
shutdown();
else if (systemevent==erase) //let's say we want to erase button 1
destroy_object (destroy); //and let's say that destroy is but1
}
}
}
But there also will be a visualQB IDE. It will be like Visual Basic, what will allow people to nicely design layouts or virtual windows. And don't have to mess with the script at all, unless of course he wants. Well mostly that is all, for now.