DrCode: Which gui system?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Telemachos

DrCode: Which gui system?

Post by Telemachos »

Hi guys,

I have a few questions regarding the GUI system you have used for all the windows and dialogs in Exult studio: First of all what library is it? Is it KDE only or is it cross-platform (would it work on a windows platform too?).
And also - is there a visual tool for designing the windows and is that tool easy/good to use? Finally how is the interfacing between the GUI and program code?

- Telemachos
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by wjp »

We used glade to generate a GUI. This produces a GTK interface, which should theoretically be portable, since GTK has been ported to windows. (Btw, it has nothing to do with KDE)
Glade is a visual tool that apparently does a pretty good job at making building user interfaces easy. (I haven't used it personally, though)

Glade generates C code that you can just insert in your program, if I understand things correctly, so you just have a standard GTK interface. I haven't used GTK much, but IIRC it uses callback functions for events.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by wjp »

Small follow-up: I meant GTK+ not GTK. Also, more info on glade can be found here: http://glade.gnome.org/
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by drcode »

Some more info:

I decided not to use KDE/QT because it isn't free (as in $0) for Windows.

While Glade will output C code, ExultStudio uses a package called 'libglade' which reads in the XML file generated by Glade directly into the program. It's a very simple and elegant solution.

Glade is a bit tricky to get used to, as it relies on the layout methods used in GTK+. So instead of placing a button at a fixed spot, you create a vertical or horizontal box with a given # of slots, and then stick the button in one of them. If you've used Java/Swing, this will be really familiar. The benefit is that the dialog will look correct regardless of the user's screen resolution or font size.
Telemachos

Re: DrCode: Which gui system?

Post by Telemachos »

Ok thanks, I'll take a look at glade. If it gives me too much trouble I know where to ask (he heh :)

- Telemachos
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by nadir »

An addendum (which might go into the FAQ, hint hint Dominus).

Currently, portability of GTK+ 1.2 (the stable version, and the version we use) is fairly limited to U*ix platforms.
This has changed a lot in the development version of GTK+ (1.3 to be released as 2.0), which has support for Win32 and MacOS included in the standard distribution.
So, if you want to use ExultStudio now, the only way is to use X-Window under some U*ix variant. Otherwise, just wait a few more months for GTK+ 2.0 to come out. This also gives us time to get Exult to a more usable, less developer-oriented state.

Please, bear with us: you won't be disappointed :)
Karlos
Posts: 149
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by Karlos »

Well, that's good news about GTK+ going truly cross-platform, and the possibility of Exult Studio on alternate platforms. I guess the only remaining issue would be the drag and drop into the Exult window.


-Karl
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by drcode »

There's already a work-around for that. Select a shape in EStudio, then hold the shift key down when you click in Exult to add the shape. If that's acceptable, I could implement the same thing for chunks.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by Dominus »

hm, that doesn't work in Kirben's port yet.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: DrCode: Which gui system?

Post by Colourless »

Windows doesn't support the communications method used by Exult and ExultStudio. A *nix specific method is used.

-Colourless Dragon
Locked