This 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 »
- Articolo precedente: BlackBerry Bold ha problemi di surriscaldamento alla tastiera:le vendite in Giappone ,bloccate
- Articolo successivo: Aumentare o abbassare il volume sul computer semplicemente roteando la rotella del mouse.
SEGNALA / INVIA QUESTO POST:
Hai trovato questo articolo interessante? Iscriviti GRATIS ai nostri feeds!




