CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: linux

  1. #1
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    linux

    hi i want to start GUI programming for linux that is also compatible with windows.
    IS there a library that can create GUI's thats portable to linux and windows?
    And what is the quality and performance of this library?
    Also is it compatible with opengl?
    I want to start 3d programming and probally want to make a 3d editor. but i dont know that just yet.

    thanks alot.

  2. #2
    Join Date
    Apr 1999
    Posts
    50

    Re: linux

    There is a list at:

    http://www.geocities.com/SiliconVall...4/guitool.html

    Hope that helps.

  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: linux

    Quote Originally Posted by Mitsukai
    hi i want to start GUI programming for linux that is also compatible with windows.
    IS there a library that can create GUI's thats portable to linux and windows?
    http://www.wxwidgets.org/

    Regards,

    Paul McKenzie

  4. #4
    Join Date
    Feb 2005
    Location
    Normandy in France
    Posts
    4,590

    Re: linux

    The most portable one (with native look & feel):
    http://wxwidgets.org/docs/faqgen.htm
    Not only is very portable, but you can even choose the underlying widgets system.
    For instance, you can compile it for native X11 usage if you want it to be fast & simple, or GTK if you want it to be slow but beautiful & themable.
    There seems to be a wxGLCanvas.
    The OO Mechanism is similar to the one used by MFC : With macros for declaration of event tables.
    So, at first view it is rather ugly... But, in fact, the message dispatching system is very powerful.
    Unicode support.

    FLTK (Fast, with OpenGL support):
    http://fltk.easysw.com/
    Very small size & speed overhead. It can be statically linked to your program without bloating the executable.
    But the look & feel is not native, instead it draws itself the lines around widgets... The look is similar to Windows 95. You can like it, or not.
    FLUID (a RAD tool) let you create your classes, drawing widgets with the mouse..
    It generates a sufficiently small enough amount of code, so you can easily understand what it does under the hood.
    There is no ugly macro : Only regular functions & methods.
    The message system (via callbacks) is simple and easy to understand... No macro. And it gives much design freedom. Very good if you like to design things like you love.
    AFAIK, there were a version modified, with unicode support, but latest versions have no unicode support.

    FOX toolkit:
    http://www.fox-toolkit.org/
    Share several ideas with FLTK : Lightweight, drawing itself the borders... No native look.
    No unicode support.
    OpenGL support (FLTK has also a good OpenGL support).
    Very powerful messaging system, but with a few macros.
    The best license.
    Much less portable than wxWidgets : Only UNIX/X11 and Windows.
    It has a very Windows95-like look... You can download xfe & adie to see how it look.

    GTK:
    http://www.gtk.org/
    Very popular in the GNU world.
    Heavy, but themable.
    It has been ported to Windows and MacOS X. But it lacks native look & feel under Windows.
    The interface uses GObject... Typically designed to be used with C (no classes, but a strange object-based feel).
    There is a clean C++ wrapper : GTK-- (aka GTKMM).
    I have not really used it, but it seems a good C++ interface, perhaps cleaner than Qt.
    Unicode support.

    Qt:
    http://www.trolltech.com/products/qt/index.html
    Heavy & themable, like GTK.
    It has a C++ interface... AFAIK, there is a special preprocessor required.
    Well... There is an eternal war Qt vs GTK.
    I think that now, it is under LGPL even under Windows, but I'm not sure.
    Good documentation... Theorically very easy to use.
    Unicode support.

    If you have a high respect for users, I suggest you choose wxWidgets or FLTK.
    wxWidgets for a native look & feel, or FLTK for a statically linked, lightweight environment.
    For me, the main flaw of FLTK is his lack of a good unicode support.
    FOX, is very similar to FLTK from a user point-of-view.

    There are other toolkits... Motif (very very ugly look) for instance.
    "inherit to be reused by code that uses the base class, not to reuse base class code", Sutter and Alexandrescu, C++ Coding Standards.
    Club of lovers of the C++ typecasts cute syntax: Only recorded member.

    Out of memory happens! Handle it properly!
    Say no to g_new()!

  5. #5
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    wxwidgets was cool untill i red:

    OpenGL integration
    A wxGLCanvas package is available to allow wxWidgets applications (currently GTK and Windows only) to support OpenGL. Very few changes need to be made to existing OpenGL applications.

    Isn't it more efficient to use pure GTK+ or Motif or WIN32 or...?

    There may be some areas where there is a slight performance penalty for using wxWidgets

  6. #6
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588

    Re: linux

    Well, that's Linux and Windows, so isn't that what you need? Unless of course if you need OSX etc. as well.

    I have tested both wxWidget and QT (QT was definitely not LGPL for Windows back then). wxWidget is nice, but lacks a good Unicode editing control (like the Richedit for Windows).
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  7. #7
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    wow what a dilemma ...
    i really like wxWidgets, and with X11 subsystem sounds good.
    though to bad the wxglcanvas only supports linux and windows, though it was my aim more os's would be cool.

  8. #8
    Join Date
    Feb 2005
    Location
    Normandy in France
    Posts
    4,590

    Re: linux

    Quote Originally Posted by Mitsukai

    A wxGLCanvas package is available to allow wxWidgets applications (currently GTK and Windows only) to support OpenGL. Very few changes need to be made to existing OpenGL applications.
    Unfortunately... This means that you can't use the X11 or Motif subsystem with OpenGL.
    In that case, FLTK could be used. But it has no correct Unicode support and is less portable.
    Well, that's a real dilemma.

    Quote Originally Posted by Mitsukai
    There may be some areas where there is a slight performance penalty for using wxWidgets
    The performance penalty is probably slight... Anyway GTK+ is already bloated.
    Motif is not bloated, so the performance penalty will probably be more visible.
    Personally, I would prefer X11 over Motif, because Motif is far too ugly for me.
    "inherit to be reused by code that uses the base class, not to reuse base class code", Sutter and Alexandrescu, C++ Coding Standards.
    Club of lovers of the C++ typecasts cute syntax: Only recorded member.

    Out of memory happens! Handle it properly!
    Say no to g_new()!

  9. #9
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588

    Re: linux

    Actually, from the docs on wxWidgets, I read:
    There are wrappers for OpenGL on Windows, and GTK+ and Motif.
    So you could go with Motif if you wanted, if I understand this right.
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  10. #10
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    well i dont really need opengl wrappers as long as i can assign the opengl to the window buffer it should be alright.

  11. #11
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    well i geuss im kind off stuck here than...

  12. #12
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    i could also use GLUT with OGL. and create my own visual controls. will be alot of work but might also look alot nicer.

  13. #13
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: linux

    just wondering how does linux create applications are they using GTK+?

  14. #14
    Join Date
    Feb 2005
    Location
    Normandy in France
    Posts
    4,590

    Re: linux

    just wondering how does linux create applications are they using GTK+?
    Linux doesn't create applications... Application developers do create applications.

    Anyway, under Linux, there are a lot of developers and all the toolkits available on this system are used by at least a few developers.
    GTK+ is much used in the GNOME community.
    Qt is much used in the KDE community.
    I like a few cute applications which use FOX.
    Many old (and not too old) applications use Motif.
    A number of applications use GNUStep.
    Tk is used in a number of TCL scripts.
    Xt was mainly used for very lightweight applications.

    And, finally, many applications are directly using the XLib API... Which is only a X11 client library.
    "inherit to be reused by code that uses the base class, not to reuse base class code", Sutter and Alexandrescu, C++ Coding Standards.
    Club of lovers of the C++ typecasts cute syntax: Only recorded member.

    Out of memory happens! Handle it properly!
    Say no to g_new()!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured