Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / What GUI toolkits do you use in C++

Author
Message
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 10th Sep 2010 11:15
Hello all you fine C++ coders!

I need some kind of GUI creation toolkit as I'm going to start a new project by creating a fairly limited scenario editor program. For this what would be ideal is a GUI toolkit that I can use to set up the user interface of the scenario editor without having to do absolutely everything by scratch.

I'm wondering what you guys might be using in this regard.

Cheers

Philip

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Sep 2010 14:18 Edited at: 11th Sep 2010 14:34
Alternatives that I know of:

TechLord has been developing a user interface toolkit called MAUI which is currently being integrated into the Dark GDK open-source project. You can ask him in the DOSP thread about its status and how you can use it for your project:

http://forum.thegamecreators.com/?m=forum_view&t=155919&b=22


Dark Forms, a simple but good-looking interface with source code:

http://forum.thegamecreators.com/?m=forum_view&t=166159&b=22


There is always the Windows API, warmly recommended for masochists with a lot of time . However, you can use Windows GUI elements around your graphic window but not inside it, so if you need to mix user interface elements with the graphic, then it's not such a good choice.


EDIT: I think the Jegas toolkit also has a GUI part but it's a much larger system than that:

http://forum.thegamecreators.com/?m=forum_view&t=175197&b=5
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 12th Sep 2010 05:56
Quote: "However, you can use Windows GUI elements around your graphic window but not inside it, so if you need to mix user interface elements with the graphic, then it's not such a good choice.
"


Really? We can use Windows GUI? Can you either point me to an example of using it with GDK or provide a quick sample? Or am I completely misunderstanding your point?

I'm looking for a way to add GDK inside a window's data application (VIEW in DOC/VIEW app) specifically to display images with zoom and mouse-click recognition. Can I add GDK in such a fashion?

Thanks,
JTK
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 12th Sep 2010 13:58 Edited at: 12th Sep 2010 14:04
Using Windows API, it is possible to attach a menu to the top of the GDK window and it is possible pop up message boxes and to display dialog boxes, both modal and modeless, which appear as separate windows and can contain any other standard controls. Mista has even wizarded a Dark GDK window into a child window of an MDI application which may be similar to what you want to do.

What is not possible is to put Windows GUI elements inside the DirectX surface which is controlled by Dark GDK since its drawing mechanism is different. Also, if you need to write a message loop which uses GetMessage (this is needed for tabbing in modeless dialogs and to use hot keys) then you will have a problem with the frame rate because GetMessage hangs the application update. So far the only workaround I know for this is to pump timer messages into the queue which helps somewhat. If you can do without hot keys and tabs then it's no problem.

From this thread you can download the Sephnroth's tutorial which shows you how to attach a menu:

http://forum.thegamecreators.com/?m=forum_view&t=137633&b=22

Mista's MDI application:

http://forum.thegamecreators.com/?m=forum_view&t=152825&b=22

The rest is standard Windows API usage, for which I studied the "Forger's" tutorial (http://www.winprog.org/tutorial/), the MSDN site and several forums for code examples but I'm still far from being an expert - or even comfortable - with it.

Does that help? I didn't quite understand what you mean with zoom and mouse-click recognition.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Sep 2010 15:04
Quote: "What is not possible is to put Windows GUI elements inside the DirectX surface which is controlled by Dark GDK since its drawing mechanism is different."


It's easy to do that, just add the style WS_CLIPCHILDREN to the DBPro main window, and everything will work correctly

[b]
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 12th Sep 2010 16:26 Edited at: 12th Sep 2010 16:26
It won't work because as soon as the DirectX surface is updated (dbSync), it overwrites the Windows controls, so they will disappear. I've tested in a simple project with the WS_CLIPCHILDREN setting you recommended but the result is the same. If you know how to make it work then please show an example.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Sep 2010 18:14 Edited at: 13th Sep 2010 18:14
@Mireben
Check out any of the windows GUI systems for DBPro. They all use the WS_CLIPCHILDREN style to let you add GUI elements to the DBPro window. When the DX surface is updated, the regions containing any controls are not altered.

I've used this functionality myself in both DarkGDK and DBPro, although I don't have an example to hand at the moment, but this is essentially what you do:


[b]
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th Sep 2010 19:04
@Diggsey - Did I read somewhere that you are working on a windows GUI plugin for GDK/dbPro?

Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 13th Sep 2010 20:47
@Diggsey: Wow it works! Thank you very much. Yesterday I tested something similar but didn't write the command exactly, and I also had to place it after all other window initialization. I've learned something again.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Sep 2010 21:34
@matty halewood
I was a while ago, it was going to be called DarkForms, but I couldn't resolve the incompatibilities between winforms and DBPro, and someone else has used the name DarkForms now anyway

[b]
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 13th Sep 2010 22:43
Just by including "windows.h"...

U can acces everything with that ...

3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 14th Sep 2010 01:05
Acually i use windows know for what i need you can link windows to a lib that you make in c++. Making it less dependent on one program in fact i put how to program win32 on sg3e sight but you have too join to look at code.

Go through yourself at a wall.
Neco
15
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 25th Sep 2010 05:29
I would think something like wxForms would be a potential solution?

wxFormbuilders outputs C++ code and is a visual design tool for your forms. All you really have to do is fill in the blanks to link your program functions with the GUI forms if I'm not mistaken..

(I briefly looked into wxForms for Python, but they didn't have Python code generation at that time)

Login to post a reply

Server time is: 2024-07-02 08:37:38
Your offset time is: 2024-07-02 08:37:38