subsubsection3_8_1_1.html
section3_8.html
section3_8.html
tableofcontents3_1.html
Next:
subsubsection3_8_1_1.html
Widget Classes and
Up:
section3_8.html
Tix Object Oriented
Previous:
section3_8.html
Tix Object Oriented
Introduction to Tix Object Oriented Programming
Tix comes with a simple object oriented programming (OOP) framework,
the
Tix Intrinsics
, for writing mega-widgets. The Tix
Intrinsics is not a general purpose OOP system and it does not
support some features found in general purpose OOP systems such as
[incr Tcl]
. However, the Tix Intrinsics is specially designed
for writing mega-widgets. It provides a simple and efficient
interface for creating mega-widgets so that you can avoid the
complexity and overheads of the general purpose OOP extensions to
Tcl.
The hard thing about programming with mega-widgets is to make sure
that each instance you create can handle its own activities.  Events
must be directed to the right widget, procedures must act on data
that is internal to that widget, and users should be able to change
the options associated with the widget.  For instance, we'll show an
arrow widget that needs to know what direction it's pointing; this
requires each instance of the widget to have its own variable.
Furthermore, each widget should respond properly to changes
requested by the application programmer during the program's run.
The whole reason people use Tcl/Tk is because they can alter things
on the fly.
The advantage of an object-oriented programming system is that you
can easily associate a widget with its own data and procedures
(methods).  This chapter shows how to do that, and how to configure
data both at the time the widget is initialized and later during the
program.
subsubsection3_8_1_1.html#SECTION00081100000000000000
Widget Classes and Widget Instances
subsubsection3_8_1_2.html#SECTION00081200000000000000
What is in a Widget Instance
subsubsectionstar3_8_1_3.html#SECTION00081300000000000000
Variables
subsubsectionstar3_8_1_4.html#SECTION00081400000000000000
Methods
subsubsectionstar3_8_1_5.html#SECTION00081500000000000000
Component Widgets
http://tix.sourceforge.net
http://tix.sourceforge.net
