Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Creating GUI without an IDE

  1. #1
    Join Date
    Feb 2007
    Beans
    369
    Distro
    Ubuntu 7.04 Feisty Fawn

    Creating GUI without an IDE

    I've created several command line programs that will work regardless of what platform they are on, using a text editor and gcc as opposed to an IDE.

    Now I'm interested in creating a GUI, not anything too complicated, just maybe a window with a button to start with. I know that this is simple to do using an IDE such as Borland C++ Builder, but I'd like to learn how to do it myself, so that it doesn't use any APIs and therefore will give the same window whether it is executed on Windows or Linux.

    I don't have any idea of how to do this, so I'm wondering if anyone could help me get started.

    Thanks
    If M$ were doctors, we'd have to buy a Service Pack to avoid being killed by the common cold.

    ***BEFORE FLAMING/MOANING/TROLLING, READ HERE***

  2. #2
    Join Date
    Sep 2005
    Location
    Cedar Rapids, IA, USA
    Beans
    545
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Creating GUI without an IDE

    You could try WxWindows since it is cross platform. I'm sure there are many tutorials for WxWindows online that don't require an IDE to create. GTK and QT can also work on Windows.

    The only GUI stuff I've done was with Python and GTK+ and that was to interface to a C++ program I had already written.
    #399784 | Ubuntu User #287
    *** If you're going to program, install the damn build-essential package ***
    There is no such thing as Ubuntu specific programming
    Save the electrons - if you quote, trim!

  3. #3
    Join Date
    Jan 2006
    Beans
    961

    Re: Creating GUI without an IDE

    try http://www.gtk.org/tutorial/ .. you'll need:

    Code:
    sudo aptitude install gnome-core-devel build-essential
    edit:
    under windows you've got http://gladewin32.sourceforge.net/modules/news/ which contains the development libraries for gtk+ .. you can also use cygwin

  4. #4
    Join Date
    Apr 2007
    Location
    France
    Beans
    4
    Distro
    Ubuntu 6.10 Edgy

    Re: Creating GUI without an IDE

    To start, you can adapt your command line programs adding a GUI. The buttons can launch some functions of the program for instance.

    Concerning the API to choose, it depends on the language :
    C : GTK, ...
    C++ : Gtkmm, wxWidgets
    Python : pyGtk, wxPython ...

    You have to install the libraries (some are already on your system, such as tKinter/Python) , then use them in your program, and finally, compile with the good link options...

  5. #5
    Join Date
    Feb 2007
    Beans
    369
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Creating GUI without an IDE

    Thanks guys, I'll try that stuff and see what I can come up with
    If M$ were doctors, we'd have to buy a Service Pack to avoid being killed by the common cold.

    ***BEFORE FLAMING/MOANING/TROLLING, READ HERE***

  6. #6
    Join Date
    Dec 2006
    Beans
    57

    Re: Creating GUI without an IDE

    First, C++ Builder generates a lot of extra code.

    If you expect to develop a nice GUI I would recommend using at max something that layouts the widgets (or windows if you use wxWidgets terminology) and generate a clean code. But, you can also do all the layout yourself, it isn't hard.

    You may use QT, wxWidgets, GTK+ ... like others said.
    -- Guilherme H. Polo Goncalves <ggpolo@gmail.com>

  7. #7
    Join Date
    Feb 2007
    Beans
    369
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Creating GUI without an IDE

    OK, I've started with GTK+ using the tutorial lnostdal provided, but that's for C, and most of my programming is C++. Do I need to change anything for GTKmm, or are the libraries etc I have on my system now OK and can I just start using the tutorial on gtkmm.org?

    Also, what are the pros and cons of gtkmm and wxWidgets?

    Thanks
    If M$ were doctors, we'd have to buy a Service Pack to avoid being killed by the common cold.

    ***BEFORE FLAMING/MOANING/TROLLING, READ HERE***

  8. #8
    Join Date
    Feb 2007
    Location
    Michigan, United States
    Beans
    164
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Creating GUI without an IDE

    What about using Glade Interface Designer? That seems to do a lot of the work for you as well. It is available through the Add/Remove option as well.

  9. #9
    Join Date
    Dec 2006
    Location
    Australia
    Beans
    1,097
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: Creating GUI without an IDE

    Quote Originally Posted by M$LOL View Post
    OK, I've started with GTK+ using the tutorial lnostdal provided, but that's for C, and most of my programming is C++. Do I need to change anything for GTKmm, or are the libraries etc I have on my system now OK and can I just start using the tutorial on gtkmm.org?

    Also, what are the pros and cons of gtkmm and wxWidgets?

    Thanks
    If you want to use GTK+ with C++, then you need to go here:
    http://www.gtkmm.org/

  10. #10
    Join Date
    Feb 2007
    Beans
    369
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Creating GUI without an IDE

    OK, thanks.
    If M$ were doctors, we'd have to buy a Service Pack to avoid being killed by the common cold.

    ***BEFORE FLAMING/MOANING/TROLLING, READ HERE***

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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