Writing a GtkWidget

27 febbraio 2009 - Fonte: http://ubuntuland.nireblog.com Lascia il tuo commento »
E' la tua prima volta qui? Allora iscriviti GRATIS ai nostri feeds! 

gtk.pngThis chapter describes how to write a new GtkWidget. A widget is any GtkObject that derives from GtkWidget

Widgets are easy to create; you only need to cut-and-paste the usual GtkObject boilerplate (instance and class initializers, a get_type() function, and so on), and then implement your widget’s functionality. Writing new widgets is an important appliation development technique.

After a brief overview, this chapter jumps straight to the implementation of a very simple widget called GtkEv. Then it takes a step back, describing widget implementation more systematically. It ends with more examples, taken from GTK+ itself. (It pays to become familiar with the GTK+ source code: often the easiest way to implement a widget is to subclass or slightly modify the most similar stock GTK+ widget.

Of course, you must comply with the terms of GTK+’s license if you cut-and-paste code from the library.)

...

Leggi il seguito »






SEGNALA / INVIA QUESTO POST:  Share
Hai trovato questo articolo interessante? Iscriviti GRATIS ai nostri feeds! 

Lascia un Commento