LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2005, 12:45 AM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
What is Glade's role in GUI program development?


Hi i want to start prototyping GUI interfaces to learn more about the process but confused about what Glade's (or similar programs) purpose in the development was. I know that at the core you have the normal code that does all the work. or backend if im using the term correctly. Then i knowyou need a gui library like QT or GTK for programming. now to use Glade to make a gui program would you need glade and the libraries or does Glade generate the code from the libraries. Is it similar to something like Dreamweaver for web development? I also have another question related to Glade but not related to the topic. i've heard it is good to know C if you plan on using Glade. why is that? thanks for any replies in advance.
 
Old 07-17-2005, 06:56 AM   #2
clausi
Member
 
Registered: Mar 2004
Distribution: Debian
Posts: 48

Rep: Reputation: 15
Glade is an interface (GUI) designer. So, yes, there are similarities to Dreamweaver, I guess.

With Glade you make a glade file -- basically an XML desciption of the GUI.

You can then either generate the source code from the glade file or you can use the glade file directly by using libglade in your application. The second way is recommended.

You don't need C. There are language bindings for libglade, and source code generators for C, C++, Python, and probably others as well.

Simple google for "glade tutorial" to find more resources. One that is easy to read can be found here.

Enjoy!
 
Old 07-17-2005, 05:22 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Clausi is exactly right. Let me elaborate:

1. Glade (or, the current release, "glade2") is a GUI builder. Nothing more, nothing less. And a very, very good one at that!

2. It's used with the GTK+ libraries (as in "the Gimp ToolKit). GTK+ libraries are available for C (GTK+ itself), C++ (gtkmm), Python, Java, and many other languages. The original architect of GTK+, Miquel de Icaza, has become involved in an Open Source version of .Net (the "Mono" project) in recent years, so you can also use Glade with C#. On Linux or Windows!

3. Personally, I prefer the C interface: it's intuitive, robust, flexible, and it performs well (IMHO).

4. You can read the Glade XML from your GTK+ program and render your GUI programmatically via "libglade". This is the recommended approach to using Glade2.

5. Personally, I prefer to use the Glade GUI builder and C (not C++) code generator to do the "grunt work", then I cut/paste the C glade code into my own C++ UI classes in my own application. It certainly works for me; I'm not sure I'd necessarily advocate it to anybody else.

'Hope that helps .. PSM
 
Old 07-17-2005, 07:19 PM   #4
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
Quote:
Originally posted by clausi
With Glade you make a glade file -- basically an XML desciption of the GUI.

You can then either generate the source code from the glade file or you can use the glade file directly by using libglade in your application. The second way is recommended.
Enjoy!
so then it would be possible to use libglade and use the same glade file for another project that might have a similar interface?
 
Old 07-17-2005, 08:23 PM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Yes. That's the idea. The XML UI definition makes it reusable.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI development options in Linux sureshkellemane Linux - General 7 08-12-2005 02:05 AM
Cross Platform GUI development Artik Programming 15 06-29-2005 06:36 PM
I need a C++ program with GUI. amer_58 Linux - Newbie 5 03-11-2005 01:32 PM
GUI development from scratch bertlef Programming 4 01-17-2005 11:37 AM
GUI development tool mathew_geo Programming 1 05-27-2004 08:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration