GTK+ GIMP Toolkit

Napisano na 12/28/2007 - 14:54, napisao _SchmRz_

GTK+ je toolkit za izradu korisnickog sucelja na raznim platformama ukljucujuci Linux i Windows.

Baziran je na:
- GLib
- Pango
- ATK

Skeleton GTK+-2.0 programa izgleda ovako:

#include <gtk/gtk.h>
int main(int argc, char *argv[]){
	GtkWidget *win;	
        gtk_init(&argc, &argv);
 
        win = gtk_window_new(GTK_WINDOW_TOPLEVEL)
	gtk_widget_show(win);
 
        gtk_main();	
	return 0;
}

Jednostavan GTK+-2.0 program izgleda ovako:

#include <gtk/gtk.h>
 
void msgbox(gchar *text){
	GtkWidget *dialog;
 
        dialog = gtk_message_dialog_new(NULL,
					GTK_DIALOG_DESTROY_WITH_PARENT,
					GTK_MESSAGE_INFO,
					GTK_BUTTONS_CLOSE,
					text);
	g_signal_connect(dialog, "response"
			,G_CALLBACK(gtk_widget_destroy)
			,dialog);
 
        gtk_dialog_run(GTK_DIALOG(dialog));
}
 
void btn_clicked(GtkWidget *my_widget, gpointer data){
	msgbox("HelloWorld");
}
 
int main(int argc, char *argv[]){
	GtkWidget *btn, *win;
	gtk_init(&argc, &argv);
 
        btn = gtk_button_new_with_label("Click me!");
	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	g_signal_connect(btn, "clicked"
			,G_CALLBACK(btn_clicked), NULL);
 
        gtk_container_add(GTK_CONTAINER(win), btn);
	gtk_widget_show(btn);
	gtk_widget_show(win);
 
        gtk_main();
	return 0;
}

Na *unix-u program kompajlirajte na slijedeci nacin:

gcc `pkg-config --libs --cflags gtk+-2.0` program.c

GTK Reference: www.gtk.org/api/
GTK Tutorial: www.gtk.org/tutorial/

GTK i Visual Studio

Jako lijepo. Treba naglasiti da je čak i lakši od Windows API-ja kad je riječ o izradi grafičkog sučelja. A prednost mu je i to što radi i na Windowsu i Linuxu koji je sve popularniji.

Evo jedan tutorijal za konfiguriranje Microsoft Visual Studioa za rad s GTK bibliotekom. Malo je stariji, ali nije loš: http://wolfpack.twu.net/docs/gtkwin32/

scompany avatar
Posted by scompany on Sub, 12/29/2007 - 15:29
Postoje puno profesionalnije

Postoje puno profesionalnije (a opet besplatne) alternative:
wxWidgets LINK
ili nesto fenomenalno poput Trolltech-ovog QT-a LINK

dIONEO avatar
Posted by dIONEO on Wed, 01/02/2008 - 15:45
dIONEO je napisao/laPostoje

dIONEO je napisao/la
Postoje puno profesionalnije (a opet besplatne) alternative:
wxWidgets LINK
ili nesto fenomenalno poput Trolltech-ovog QT-a LINK

Profesionalnije?? Zasto su wxWidgets profesionalnije rijesenje nego GTK+??

_SchmRz_ avatar
Posted by _SchmRz_ on Wed, 01/02/2008 - 19:47
pa imaju vecu podrsku i

pa imaju vecu podrsku i cijelu paletu pomocnih alata.
Meni su wx-i jako antipaticni, ali cinjenica je da ih masa ljudi koristi

dIONEO avatar
Posted by dIONEO on Thu, 01/03/2008 - 15:11
Po meni je GTK+

Po meni je GTK+ dokumentacija mnogo bolje uradena od drugih i dosta je "User Friendly". A sto se tice podrske, mislim da su svi oni tu negdje.

GNU za svoj GNOME projekat koristi samo GTK+ pa sada ti izracunaj koliko podrske mozes dobiti za GTK+

_SchmRz_ avatar
Posted by _SchmRz_ on Thu, 01/03/2008 - 16:00
Neka se moze birati.

A i zasto se prepirati i pregovarati?? Napisi i ti jedan clanak o wxWidgets-ima i QT-u pa neka ljudi biraju. dogovoreno?

_SchmRz_ avatar
Posted by _SchmRz_ on Thu, 01/03/2008 - 16:02
_SchmRz_ je napisao/laA i

_SchmRz_ je napisao/la
A i zasto se prepirati i pregovarati?? Napisi i ti jedan clanak o wxWidgets-ima i QT-u pa neka ljudi biraju. dogovoreno?

Pa ne prepiremo se :)
a sto se tice pisanja bloga, nemam vremena.

kazes gnome koristi gtk? Solidna referenca.

pazi tko svoje aplikacije rati u QT-u, i koje aplikacije.
Impresivno zar ne?

dIONEO avatar
Posted by dIONEO on Pet, 01/04/2008 - 13:50
Da vidjeo sam to.

Da vidjeo sam to. Impresivno, nema sta.

_SchmRz_ avatar
Posted by _SchmRz_ on Pet, 01/04/2008 - 15:34
Kao sto je GNOME baziran na

Kao sto je GNOME baziran na GTK tako je KDE baziran na QT :D

_SchmRz_ avatar
Posted by _SchmRz_ on Pon, 01/07/2008 - 21:57
GTK+ is a highly usable,

GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. GTK+ it is written in C domain names, but has bindings to many other popular programming languages such as C++, Python and C# among others. GTK+ is licensed under the GNU LGPL 2.1 allowing development of both free and proprietary software with GTK+ without any license fees or royalties web site design.

jason avatar
Posted by jason on Pon, 07/20/2009 - 17:00
Philosophy of education is

Philosophy of education is the philosophical merchant account study of the purpose, process, nature and ideals of education. Philosophy of education can naturally be high speed internet service considered a branch of both philosophy and education. Philosophy of education is commonly housed in colleges and departments of education, yet it is applied philosophy, drawing from the traditional fields of philosophy hard drive recovery(ontology, ethics, epistemology, etc.) and approaches (speculative, prescriptive, and/or analytic) to address questions regarding education policy, human development, education research methodology, and curriculum theory, cheap web hosting to name a few.

Adi avatar
Posted by Adi on Thu, 12/17/2009 - 12:02
linda Brand, quality, rarity

linda
Brand, quality, rarity all play a role in how we valuate prestige products and experiences. As everyone derives value Cheap MBT Shoes, there are three main criteria that help us decide whether a luxury product or service is worth it. Everyone perceives Gucci Shoes Sale and service value differently. You've likely been in Gucci or dunk low and said, really? A shoe-shaped Michael Jordan Shoes key ring is $170. Really? For some shox shoes , it's worth it. “We see nike shox shoes as the ultimate experts on Air Jordan Shoes prestige and this year they are voting on the entire perceived Air Jordans equation of the brand as well as ugg classic boots,” said Milton Pedraza, Coach Handbags of the Cheap Jordans Institute.

libe avatar
Posted by libe on Wed, 08/04/2010 - 01:32
Women in summer would like to

Women in summer would like to become beautiful. Everything can grab other's eyes is their best friends.Products make them beauty and confident is their favourite. Look in the street,you can see many different types of make up to show women's personality.

Welcome to the shop, the following is our products, free shipping.

Soccer Shoes Cheap Soccer Shoes Nike Soccer Shoes Adidas Soccer Shoes Nike Soccer Shoes sale Adidas Soccer Shoes sale UGG UGGs UGG Boot UGG Boots UGG Boots Sale Cheap UGG Boots UGG Boots Cheap Women UGG boots ugg boots cardy ugg cardy boots Nike Air Nike Air Max Nike Air Max Shoes Nike SB Nike Dunk Nike Dunk SB Nike Dunk SB Shoes Nike Shox Nike Shox Shoes Timberland Timberland sale Timberland boots Timberland boots online Timberland on sale New timberland boots Women Bags Women Bags Sale Women Handbags Women Handbags Sale Women New Bags Cheap Bags Cheap Bags On Sale UGG UGG boots UGG boots sale UGG boots short Short ugg Short ugg boots Ugg boots tall New women bags New women bags sale New women bags sale online Louis Vuitton Handbags Gucci bags Nike Nike Shoes Nike Shoes Sale Nike running Nike running shoes Nike trainers Nike trainers shoes Timberland Timberland boots Timberland boots sale Timberland boot Timberland boot sale Timberland boots cheap Men timberlands MBT MBT Shoes MBT Chapa GTX MBT Men Shoes MBT Women Shoes Discount MBT Shoes LV Handbags Gucci Handbags Chanel Handbags Chloe Handbags D&G Handbags Dior Handbags Fendi Handbags Hermes Handbags Jimmy Choo Bags Marc Jacobs Bags Miu Miu Handbags Mulberry Bags Prada Handbags Versace Handbags Yves Saint Laurent Balenciaga Bags Burberry Handbags LV Handbags Gucci Handbags Chanel Handbags Chloe Handbags D&G Handbags Dior Handbags Fendi Handbags Hermes Handbags Jimmy Choo Bags Marc Jacobs Bags Miu Miu Handbags Mulberry Bags Prada Handbags Versace Handbags Yves Saint Laurent Balenciaga Bags Burberry Handbags

Those who want to become most beautiful in the world should try them. Just ones can make you different. Girls who want to grab your boyfriends's heart is necessary to use them.

quentina avatar
Posted by quentina on Thu, 08/19/2010 - 09:18