CHAPTER 11Creating Custom Widgets
By now, you have learned a great deal about GTK+ and its supporting libraries. You have enough knowledge to use the widgets provided by GTK+ to create complex applications of your own.
However, one thing that you have not yet learned is how to create your own widgets. Therefore, this chapter is dedicated to deriving new classes from GObject
. You will be guided through three examples.
The first example derives a new widget called MyIPAddress
from the GtkEntry
widget. This widget allows the user to enter an IP address, controlling the placement of the cursor accordingly. The second example creates a new custom GtkWidget
class called MyMarquee
that scrolls a message at a specified speed. Lastly, you will learn ...
Get Foundations of GTK+ Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.