Allegro.cc - Online Community

Allegro.cc Forums » The Depot » DUI Beta Release! -- Need Testers

This thread is locked; no one can reply to it. rss feed Print
DUI Beta Release! -- Need Testers
ImLeftFooted
Member #3,935
October 2003
avatar

Hello! Below is the release of my XML to GUI project. It uses Allegro 4.2 so you must have that installed to continue. The project ofcourse has a click and drag style GUI editor.

I need you (the reader) to download, compile and test the code base. Post the debug output of the example program along with your bug report here.

DOWNLOAD NOW RC 1
DOWNLOAD NOW RC 2.

Also vote for my project on sourceforge.

For the tech savvy, Here is a bunch of example code and screenshots:

<clear/>
<ctext dp="Hello World" x=400 y=300/>

#SelectExpand
1#include <dui.h> 2#include <allegro.h> 3#include <iostream> 4#include <fstream> 5using namespace std; 6 7int main(int, char**) 8{ 9 allegro_init(); 10 install_keyboard(); 11 install_mouse(); 12 set_color_depth(desktop_color_depth()); 13 set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0); 14 enable_hardware_cursor(); 15 show_mouse(screen); 16 17 Dialog d("exbasic.dui"); 18 19 d.doDialog(); 20 21 return 0; 22} 23END_OF_MAIN()

{"name":"599708","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/27fc7300fbf96757b4a605c46d096d7a.png","w":802,"h":628,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/27fc7300fbf96757b4a605c46d096d7a"}599708

#SelectExpand
1<prefs theme="Win95"/> 2<agup_clear/> 3 4<agup_window dp="Activation Wizard" x=0 y=0 w=800 h=600/> 5 6<agup_rtext dp="Street Address:" x=390 y=130/> 7<edit id="street" focus=1 h="45" w="300" x="400" y="130" 8onchange="useCur();setCurAttr(dp);attrToReg(0)"/> 9 10<agup_button dp="Generate Code" h=45 w=300 x=400 y=230 11onchange=" 12 reload(); 13 updateCode(0, computerCode); 14 useLookup(); 15 setlKey(id); 16 setlVal(street); 17 setCurAttr(focus); 18 setAttr(0); 19 setlVal(code); 20 setCurAttr(focus); 21 setAttr(1); 22"/> 23 24<agup_rtext id="helpText" dp="Your Computer Code:" x=390 y=330/> 25<agup_textbox id="computerCode" h="45" w="300" x="400" y="330"/> 26 27<agup_rtext dp="Enter Activation Code:" x=390 y=430/> 28<edit id="code" h=45 w=300 x=400 y=430 29onchange="useCur();setCurAttr(dp);attrToReg(1)"/> 30 31<agup_button dp="Quit" flags="EXIT" h="80" key="" w="150" x="200" y="500"/> 32<agup_button dp="Confirm" h="80" key="" w="150" x="450" y="500" 33onchange="activate(0, 1)"/>

#SelectExpand
1#include <dui.h> 2#include <allegro.h> 3#include <winalleg.h> 4#include <iostream> 5using namespace std; 6using namespace Xml; 7 8int activate(Dialog::CallbackData cd) 9{ 10 /* .. code removed .. */ 11 12 return D_O_K; 13} 14 15int updateCode(Dialog::CallbackData cd) 16{ 17 int reg = 0; 18 string id = cd.parameters[1]; 19 20 istringstream(cd.parameters[0]) >> reg; 21 22 string address = Dialog::registry(reg); 23 24 Dialog *d = Dialog::getActiveDialog(); 25 26 string code = /* .. code removed .. */ 27 28 Xml::find(d->xmlCache, "id", id)[0]->attr["dp"].str = code; 29 30 return D_O_K; 31} 32 33int main(int argc, char **argv) 34{ 35 (void)argc; 36 (void)argv; 37 38 allegro_init(); 39 install_mouse(); 40 install_keyboard(); 41 set_color_depth(desktop_color_depth()); 42 set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0); 43 enable_hardware_cursor(); 44 show_mouse(screen); 45 46 FONT *oldFont = font; 47 font = load_font ("verdena.pcx", NULL, NULL); 48 49 Dialog d("duis/activate.dui"); 50 51 d.setCallback("activate", activate); 52 d.setCallback("updateCode", updateCode); 53 54 d.doDialog(); 55 56 destroy_font(font); 57 font = oldFont; 58 59 return 0; 60} 61END_OF_MAIN()

{"name":"599707","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/a\/fa96dd6ce5ac8c6e689b1b8a149924fd.png","w":804,"h":629,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/a\/fa96dd6ce5ac8c6e689b1b8a149924fd"}599707

Audric
Member #907
January 2001

gcc version 4.3.3 (4.3.3-tdm-1 mingw32)
Compiles fine for the C part, but in C++ I get:

g++ -Iinclude -Iinclude/dui -DALLEGRO_STATICLINK -W -Wall -Wno-unused-function -O2 -s -o obj/release/dialog.o -c src/dialog.cpp
src/dialog.cpp: In member function 'MENU* Dialog::loadMenu(XmlNodes&, bool)':
src/dialog.cpp:576: warning: deprecated conversion from string constant to 'char *'
src/dialog.cpp:592: warning: deprecated conversion from string constant to 'char *'
src/dialog.cpp: In function 'SpecialCallbackFuncsparseSpecialCallbackFunc(const
 std::string&)':
src/dialog.cpp:1202: error: 'transform' was not declared in this scope
src/dialog.cpp: In function 'char* helpListCallback(int, int*)':
src/dialog.cpp:1212: warning: deprecated conversion from string constant to 'char*'
MINGW3~1.EXE: *** [obj/release/dialog.o] Error 1

Probably my C++ headers are too old to recognize this STL. I never compile C++ usually.

After commenting out the trimming, all compiles fine including the examples.
exbasic is ... basic, and the editor seems to work though a lot of controls seem unimplemented.

ImLeftFooted
Member #3,935
October 2003
avatar

They're nearly all implemented (even complex ones like text_list and menu). It's the editor that is buggy.

Thanks for the report :)

edit For example: The editor is written in DUI code! 8-)

edit Those compiler errors should be fixed. Let me know if RC 2 compiles for you. RC 2 also fixes a bunch of bugs. The XML format can do all allegro widgets and most agup widgets. The editor can do the same minus text_list and menu.

Audric
Member #907
January 2001

RC2 compiles without warnings, and runs fine.

Ron Novy
Member #6,982
March 2006
avatar

Time to get me a DUI...

Oh wait... It's a User Interface...

Looks good... ;D

----
Oh... Bieber! I thought everyone was chanting Beaver... Now it doesn't make any sense at all. :-/

BAF
Member #2,981
December 2002
avatar

The project ofcourse has a click and drag style GUI editor.

You mean a WYSIWYG GUI editor?

ImLeftFooted
Member #3,935
October 2003
avatar

Go to: