Next: What is in Up: Introduction to Tix Previous: Introduction to Tix


Widget Classes and Widget Instances 

All the mega-widget classes in Tix, such as TixComboBox and TixControl, are implemented in the Tix Intrinsics framework. Also, you can write new widget classes with the Tix Intrinsics. In the next section, I'll go through all the steps of creating a new widget class in Tix. I'll illustrate the idea using a new class ``TixArrowButton'' as an example. TixArrowButton is essentially a button that can display an arrow in one of the for directions (see figure 6-1).

Once you have defined your classes, you can create widget instances of these classes. For example, the following code will create four instances of your new TixArrowButton class:

tixArrowButton .up -direction n
tixArrowButton .left -direction e
tixArrowButton .right -direction w
tixArrowButton .down -direction s