O'Reilly logo

Foundations of GTK+ Development by Andrew Krause

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required