SXML GUI

Started by
29 comments, last by frankmail007 17 years, 9 months ago
I've found a very interesting stuff in this forum which is a simple opengl system - SXML GUI. I like it very much. But I have a few questions about it: 1. How can I compile it under MINGW32? There is a post regarding this. But obviously it's obsolete since the line number in that post is not correctly at all. 2. There is a library called SXML Engine. Does it include the latest SXML GUI library or it's a seperated library?
frank
Advertisement
Since I am the author of the said GUI package, let me answer some of your questions ^_^
1-I have never tried compiling anything under MINGW32 but I know for fact that my sources files compile successfully under both Linux (g++) and Windows (Visual Studio).
2-SXML Engine was my first attempt at creating a rendering engine and it does indeed include SXML GUI, however I would recommend sticking with the stand alone GUI package rather then digging deep into the Engine because of comlpexity issues.
You can grab the latest source files here.. Enjoy =-)
PS: For further details look over here.
JCD, mingw is effectively a Windows port of gcc-2.95 and up.

I like your GUI stuff, and if it works on OS X I'll probably use it. What are your licensing demands?
You know I have been meaning to include the licensing terms into the package for the longest time but I guess I am too lazy to do it :'(
Anyway, it's the zlib license which could be found here.
JCD, thanks for your reply. I managed to compile it under mingw32 and I rewrite your sample with wxWidgets. It works fine except some minor issue for window resize. I modified a bit in MathUtils.cpp which seems use __asm which I don't know how mingw32 supports it. And I also modify some source code in your tool directory so glee,tinyxml and glpng will be compiled seperately. And finally I create a Codeblocks project to compile your SXML GUI as a library.

By the way, can I use your library in a comercial software?
frank
How do you specify the x,y position of widgets. I've check the Guilayout.xml and your sample program. I can't find information for x,y position.

Another question. I tried to use setPosition function, but it seems not work. Can you explain on how it works. Thanks

[Edited by - frankmail007 on June 24, 2006 2:28:21 AM]
frank
You can set the position through XML via the Position tag:
<Position x = "10" y = "10"/>
Or if you wish to do so during runtime, you may use the GUIRectangle member function setPosition, just remember to set the update flag to true through the function forceUpdate.
void mouseClicked(int button, int state, int x, int y){    button  =   (button == GLUT_LEFT_BUTTON ) ? MB_BUTTON1 :                (button == GLUT_RIGHT_BUTTON) ? MB_BUTTON2 : MB_BUTTON3;    MouseEvent event = MouseEvent(MB_BUTTON1, x, y, guiFrame.getHeight() - y);    guiFrame.checkMouseEvents(event, (state == GLUT_DOWN) ? ME_CLICKED: ME_RELEASED);    GUIRectangle *recPtr =    guiFrame.getWidgetByCallbackString("Color Sliders Group");    if(recPtr)    {        recPtr->setPosition(x, y);        recPtr->forceUpdate(true);    }}
Quote:Original post by frankmail007
JCD, thanks for your reply. I managed to compile it under mingw32 and I rewrite your sample with wxWidgets. It works fine except some minor issue for window resize. I modified a bit in MathUtils.cpp which seems use __asm which I don't know how mingw32 supports it. And I also modify some source code in your tool directory so glee,tinyxml and glpng will be compiled seperately. And finally I create a Codeblocks project to compile your SXML GUI as a library.

By the way, can I use your library in a comercial software?


Good job =-)
Of course you can use it in a commercial software. =-)
Thanks JCD. It works.

But I'd like to ask for more. Is there any documentation for the xml file format? What I'm trying to do now is to display the "main frame" with a background color. But I failed if I added drawbackground="true" in "main fram" panel. Can you show me how to do this?

By the way can you explain the following element or attribute in xml file:

1. Layout
2. TexCoordsDesc

Sorry for the trouble. It would be better if somebody help to write a document for your library.

Thank you again.
frank
I found openglui in sourceforge. Is it the same project as SXML GUI or a branch or it? I downloaded it from svn. But unfortunately I can't compile it. The error message is:

D:/Tools/Development/CodeBlocks/include/alleggl.h:465: error: `BITMAP' was not declared in this scope

Since it's using Allegro which I don't like. So I change the flag to "CUSTOM" and reuse my own main.cpp. Again I couldn't compile since the Image class is not declared. I accept to use preprocessor to select window manager such as sdl, allegro or glut. But why don't just keep the old image class so that we don't need to stick to allegro or sdl. In my case, I'll use wxWidget as window manager.

The only thing I like in this project is it's using namespace.

JDC, are you working at this OpenGlui project or it's done by somebody else?

[Edited by - frankmail007 on June 26, 2006 2:08:35 AM]
frank

This topic is closed to new replies.

Advertisement