Author Topic: GUI library experiences  (Read 3018 times)

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
GUI library experiences
« on: June 07, 2015, 11:30:40 AM »
I was unable to compile FLTK on OSX (because clang error about x86_64 architecture) and also in Windows, because make gives error "makeinclude: no such file or directory". So I can't even get started with FLTK. I don't know, is it too much to release compiled libraries to Windows? The source code of FLTK looks horrible by the way, there are memsets and macros all over the place in C++ classes. When compiling in OSX the compiler gave couple of warnings about crappy code, can't describe it otherwise.

The other library I took a brief look was wxWidgets, but it's just too large and complex library and programming it seems to be similar C++ experience with macros and all that crap. Why they had to use C++ (wrap in classes) if it's badly written C?

I just need a GUI library with basic dialogs, especially a file dialog and menus etc.

mushroom patch

  • Protector of the @
  • *****
  • Posts: 548
    • View Profile
Re: GUI library experiences
« Reply #1 on: June 07, 2015, 09:30:13 PM »
Hm, I've used curses. It's pretty good.

TheCreator

  • High Priest
  • ****
  • Posts: 363
    • View Profile
    • Fame
    • Email
Re: GUI library experiences
« Reply #2 on: June 08, 2015, 06:02:19 AM »
The other library I took a brief look was wxWidgets, but it's just too large and complex library and programming it seems to be similar C++ experience with macros and all that crap. Why they had to use C++ (wrap in classes) if it's badly written C?

I just need a GUI library with basic dialogs, especially a file dialog and menus etc.

wxWidgets was born in the 1990s, when everyone was thinking that macros were OK, nobody had ever heard of design patterns and OOP was considered just that -- C with classes. I agree that it is overloaded with features you will probably never use and carries a lot of legacy crap. Not a good choice for games or small RAD tools.

I had the same problem about 10 years ago when I was looking for a GUI library for my game. Eventually I chose something that wasn't quite a GUI library (Irrlicht) and modified it to suit my needs. It's not really great as GUI, but it has one major kick-ass advantage: it's simple. Whenever I need to extend it, I can do it. Whenever something breaks, I'm able to debug it and I actually understand the code behind the GUI, because it is simple. This simplicity, of course, contributes to tiny size of the source code. And there are no macros -- well, almost :).
Fame (Untitled) - my game. Everything is a roguelike.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #3 on: June 08, 2015, 06:07:47 AM »
I need a GUI library for tool development which means menus, file dialogs and all that boring stuff. Otherwise I would use SDL1 or 2 as I have used this far. I went through the list in wiki of free GUIs and looks like they all suck one way or another. I don't know why FLTK (the library itself) doesn't compile on Windows, maybe I should try to solve that problem and then try again.

I think it's odd to live in a world of technology and innovations, but when you look at these GUIs..
« Last Edit: June 08, 2015, 06:17:05 AM by Krice »

TheCreator

  • High Priest
  • ****
  • Posts: 363
    • View Profile
    • Fame
    • Email
Re: GUI library experiences
« Reply #4 on: June 08, 2015, 06:32:04 AM »
The library I'm talking about does have menus and file dialogs and I actually use it in some tools like map editor.
Fame (Untitled) - my game. Everything is a roguelike.

tuturto

  • High Priest
  • ****
  • Posts: 259
    • View Profile
    • pyherc
Re: GUI library experiences
« Reply #5 on: June 09, 2015, 06:53:21 AM »
Qt isn't bad choice either in my experience. Very easy to get started and create applications with default controls. And when they aren't enough, you can always write your own (although this is something I haven't had to do).
Everyone you will ever meet knows something you don't.
 - Bill Nye

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #6 on: June 09, 2015, 10:21:01 AM »
The library I'm talking about does have menus and file dialogs and I actually use it in some tools like map editor.

Yes. I'm going to try that. The release zip had everything included (over 3000 files) which was kind of not very cool, but the library itself seems to be compact. Now I just need to rebuild my motivation to do any programming.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #7 on: June 09, 2015, 11:12:48 AM »
It was quite easy to set up Irrlicht, you just do not use the ready template of Code::Blocks, but create an empty project and set up library yourself. However when running I get this message:

The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll.

I guess it's some kind of.. well.. not sure what it is. Probably something gcc related. I do have the latest gcc that was included with latest stable Code::Blocks release. I could maybe google that "personality".

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #8 on: June 09, 2015, 12:14:49 PM »
..something gcc related.

Looks like there are two types of exception handling built-in in different gcc installations. Great. And Irrlicht seems to be using dw2 instead of sljllsldl-something. One suggested fix was rebuild Irrlicht. Grrreat.. I may just try it if I don't have anything else to do.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #9 on: June 10, 2015, 08:00:41 AM »
It was much easier to set up Irrlicht with Visual Studio, but I noticed right away that the executable takes constant 50% processor time even with completely empty loop running (not even drawing anything). For games it's ok I guess if everything is on anyway, but for tool programs it's not acceptable. So.. time to look for the next GUI library..

TheCreator

  • High Priest
  • ****
  • Posts: 363
    • View Profile
    • Fame
    • Email
Re: GUI library experiences
« Reply #10 on: June 10, 2015, 08:13:00 AM »
You give up so easily that I doubt you'll ever accomplish any programming task. Come on, this is a trivial problem and it exists in any modern graphics library. A million of people has already solved it. Stop complaining and use Google. "Next library" won't help you if you expect it to solve every problem you can possibly encounter.
« Last Edit: June 10, 2015, 08:14:48 AM by TheCreator »
Fame (Untitled) - my game. Everything is a roguelike.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #11 on: June 10, 2015, 09:44:11 AM »
Now that you reminded me SDL has same kind of problem in default event handling. The reason I give up easily is over 20 years of programming. You get sensitive to certain things.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #12 on: June 10, 2015, 06:04:08 PM »
I'm actually going to try to program that file dialog for SDL. It's the only GUI part missing, with addition of a working slider implementation. It's probably easier than re-writing everything to another GUI library, although with SDL you are restricted to 7-bit characters (=ascii) in filenames.

chooseusername

  • High Priest
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: GUI library experiences
« Reply #13 on: June 12, 2015, 11:56:35 PM »
Now that you reminded me SDL has same kind of problem in default event handling. The reason I give up easily is over 20 years of programming. You get sensitive to certain things.
Getting a library to not hog the cpu is generally a matter of the person using the library doing it wrong and needing to learn some fundamentals.  A call to SDL_Delay in your main loop if none of the API you are using is blocking, at judicious lengths, is I suspect somewhat standard.

Krice

  • Protector of the @
  • *****
  • Posts: 2059
    • View Profile
    • Email
Re: GUI library experiences
« Reply #14 on: August 07, 2016, 04:16:20 PM »
"Next library" won't help you if you expect it to solve every problem you can possibly encounter.

Well I'd like to get the library fucking work in the first place so I could even try to do something. And I realized I would really like to use something else than SDL2 for 2D painting program (need menus, icons and stuff like that). I guess I have to wait until someone makes that library, because current libraries are from anal depths.