The defclass command

defclass classname classbody
Define a new class named classname. A namespace for class-specific data and procedure is created in the global scope, and an object construction procedure with the same name as the class is created in the calling scope. The body, classbody, can contain the following:
constructor arglist body
Declare the object constructor, which is called automatically when a new object is created. This class, or one of its superclasses, must have a constructor. (If the class inherits directly or indirectly from Object, then this will be the case.) Superclass constructors are not called automatically -- you have to do this with super if you want it (like Java rather than like Itcl.)
destructor body
Declare the object destructor, which is called automatically when the object is deleted. As for the constructor, this class or a superclass must have a destructor, and the superclass destructors must be called explicitly.
inherit parent
Specifies that the class inherits from parent. Generally, you will probably want your classes to be somewhere underneath the Object class, but this is not compulsory. (Inheritance from Object is not automatic -- you have to write it if you want it.) The inherit must come before anything else.
method name arglist body
Declare a method named name. All methods are "public." Within any method (including the constructor and destructor), the current object can be accessed as $this. When calling another method within the same object, you need to use $this in either one of two ways:
    $this callmyself argument
or
    callmyself $this argument
option name ?initial?
Declare an option variable. The name should start with a leading dash to be compatible with Tcl/Tk style. The initial vale is optional. Option variables are accessed within a method as elements of the _options array. For example, the declaration option -bar 42 would mean that the option could be accessed as _options(-bar). Externally, option variables can be accessed with the cget and configure methods of Object.
variable name ?initial?
Declare an instance variable. Instance variables are accessed within methods just by.. uh.. accessing them. For example, the declaration variable foo declares an uninitialized variable that can be written as set foo "A value" and read as usual: set bar $foo. All instance variables are "protected."