NOTE:
This project is no longer being maintained: it was developed for my masters thesis, which was completed in early 1997. I still, however, welcome any questions or comments that people may have.

[Home] [ToC] [Prev] [Next]


iHTML Python Language

Standard ihApp Module

The ihApp module provides a standard interface for embedded applications, i.e. programs connected to a HTML document through an <OBJECT> tag occurring in the document's <BODY>. These programs will typically be written as a subclass of this class, named ihEmbed.


Exported Values


There are no global values defined by this module.


Exported Exceptions


There are no global exceptions defined by this module.


Exported Functions


There are no global functions defined by this module.


Exported Types


There are no global types defined by this module.


Exported Classes


Application

The Application is the main definition for an embedded program. Based on the lower-level Widget class, it provides the program with its own environment within the larger document in which to interact with the user, and a well-defined interface between the two.

Hierarchy

Superclass
Widget
Subclasses
none.

Methods

__init__(self, ...)

Summary
Initialize the application.
Arguments
The class should be passed the argument dictionary as given to ihMain. This dictionary contains all of the values supplied through the <PARAM> tags, along with other private entries used by the internal implementation. In addition, the following attributes from the <OBJECT> tag are recognized:
Width
The WIDTH attribute, which is the initial width of the application in pixels. If not supplied the document's ViewWidth is used.
Height
The HEIGHT attribute, which is the initial height of the application in pixels. If not supplied the document's ViewHeight is used.
Name
The NAME attribute, which is the name of the object, if it is part of a form.
Result
A new instance of the class.
Bugs
The arguments should probably be first passed as a list, so that multiple parameters with the same name and positional dependencies can be handled.
See Also
Widget class, Embedding tutorial.
Description
When a new Application instance is created, this initialization method does the low-level setup required by the iHTML library. When the user's ihEmbed is called with the startup argument dictionary, the dictionary must be passed up to this initialization function. This is typically accomplished with a program structure such as:
class ihEmbed(ihApp.Application):

    def __init__(self,**args):

        apply(ihApp.Application.__init__,(self,),args)
	      

In all cases, this superclass initialization must be performed before any other widget-based actions are executed.

Members

This class defines no member variables.

Description

Being a subclass of a Widget, along with having its own application environment this class provides a top-level view in which other widgets may be placed. Subclasses may thus use it in one of two ways: they may either draw directly into their application area using the superclass widget's drawing functions, or they may create and place additional widgets within their application area that then perform the user interaction work.


[Home] [ToC] [Prev] [Next]

_________.oo_Q_Q_oo.____________________________________________
Dianne Kyra Hackborn <hackbod@angryredplanet.com>
Last modified: Thu Oct 17 21:23:35 PDT 1996

This web page and all material contained herein is Copyright (c) 1997 Dianne Hackborn, unless otherwise noted. All rights reserved.