Thread: basic GTK concepts help

  1. #1
    Registered User
    Join Date
    Aug 2015
    Posts
    26

    basic GTK concepts help

    So, my (Gr. 9) IT teacher wants me to try and take my program and give it a "skin" (by which I'm assuming he means a GUI and despite the fact that my knowledge of C isn't all that in-depth). And wherever I search for 'C GUI libraries' I see GTK as the main recommendation (with using Glade for RAD), so I've started reading some stuff but still can't get my head around it atm, my IT teacher doesn't fully understand how varying in complexness programming can be so he expects me to be able to do it well before I think I'll be able to. However, zenmap's GUI has a tab that just displays everything that is being shown on the terminal, but that doesn't use glade so I can't just tinker with it. Is there anyone who could help me in making a glade file that I can reuse in any other programs I do, or at least help me understand general GUI programming better (I get how it's based around events and the user doing things but not much more)? (linked my C file below)

    Any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    Quote Originally Posted by YayIguess View Post
    a "skin" (by which I'm assuming he means a GUI and despite the fact that my knowledge of C isn't all that in-depth).
    First thing is to clarify the assignment. You've said you assume he wants a GUI. But it could be that he just wants a simple text-based menu. You have to ask exactly what it should look like.

    I see GTK as the main recommendation (with using Glade for RAD), so I've started reading some stuff but still can't get my head around it atm
    In your position I think GTK's own tutorial would be more appropriate. For example, the first section is "Hello, world" and each subsequent section is small enough in scope. And there is an explanation behind signals and callbacks which are used pretty much with any GUI system.

    https://developer.gnome.org/gtk-tutorial/stable/

    The way to read tutorials is to read through each section and then physically try it out on your own computer. Physically type in the source code into your own editor, don't copy and paste it. But don't copy the comments; instead add in your own comments - those are your notes. After you get a working example program, save it somewhere and refer back to it later when you have a question.

    You can't ask the people here to write a Glade file for your program or anything like that. You have to go through whatever you're learning whether it is a Glade tutorial or basic GTK tutorial, try the examples out (i.e. actually type them into your editor, compile them yourself and run them on your computer), try out your own changes, etc. and when you get stuck come here with specific code and questions of how to fix it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Concepts of memory
    By Lesshardtofind in forum C++ Programming
    Replies: 39
    Last Post: 12-11-2012, 01:36 AM
  2. Some basic C++ concepts
    By tx1988 in forum C++ Programming
    Replies: 12
    Last Post: 09-15-2007, 08:16 PM
  3. basic Mathmatics and Algebraic concepts
    By incubusnb in forum C++ Programming
    Replies: 8
    Last Post: 05-22-2005, 06:53 PM
  4. Basic 2d Programming Concepts
    By JoshG in forum Game Programming
    Replies: 4
    Last Post: 05-17-2002, 05:54 AM

Tags for this Thread