W3Input is an abstract W3Kit base class for interactive elements of an HTML Fill-Out Form.
Each such class defines "essential" and "inessential" state. Essential state means those parameters of your object that you never want to lose to default values, even if the application interface has no explicit input for that parameter. The amount of essential state should be minimized.
Only the essential state is archived with read: and write: for secret insertion into the Fill-Out Form. The rest of the state may or may not arrive in the form of enterStringValue: or enterIntPointValue: messages during the simulated event loop that is run when the app restarts (if no event is in the queue for an object, it receives instead a call to enterImpliedValue). The event messages are sent in order of htmlID, which is by default the order that the input widgets are created.
Note that the W3Input init and awake methods both automatically call the reset method to reinitialize the non-essential state. Keep this in mind if you subclass these two methods; for example, you should only subclass init in order to initialize new essential state.
- init; - read:(TypedStream *)stream; - write:(TypedStream *)stream;
The reset and free messages are intended for subclassing. The event messages are intended to be overridden. (Note: the raw event point is given in pixel coords, with the origin at the upper left origin and the y-axis pointing downward.)
- reset; - free; - enterStringValue:(const char *)aString; - enterIntPointValue:(const IntPoint *)aPoint; - enterImpliedValue;
The printHtml method must use beginPrintHtml and endPrintHtml to define the HTML tag, with any extra parameter settings in between. Other text may surround the HTML tag.
The doesTriggerReturn method should be YES if events in this element can cause the form data to be sent back to the server. The willReturnValue method should be YES if the value of this element will always be present in the form data sent back to the server.
- printHtml; - (const char *)inputType; - (const char *)inputTag; - (BOOL)doesTriggerReturn; - (BOOL)willReturnValue;Required header and trailer for printing (do not override):
- beginPrintHtml; - endPrintHtml;Event dispatch hooks (do not override):
+ inputForHtmlID:(int)anHtmlID; - (int)htmlID; - resetHtmlID;
Author: Paul Burchard
Comments to: firstname.lastname@example.org
Created: Apr 18 1994 --- Last modified: Tue Jun 18 10:42:57 1996