#include <Form.h>
Inheritance diagram for Form:

| Public Methods | |
| Form (UInt16 id) FORM_SECTION2 | |
| The form constructor. More... | |
| virtual | ~Form () FORM_SECTION2 | 
| destructor- unregisters the form. More... | |
| Boolean | getSaved () | 
| returns the saved attribute. More... | |
| void | setSaved (Boolean b) | 
| sets the saved attribute. More... | |
| void | setCallerFormId (UInt16 t) | 
| sets the caller id attribute. More... | |
| virtual FormPtr | getFormPointer () | 
| use this to obtail the form pointer (to the actual form, not to the object. More... | |
| virtual void | popup () FORM_SECTION2 | 
| executes popup for the current form. More... | |
| virtual void | popup (Form *form) FORM_SECTION2 | 
| executes popup for another form, setting the caller_form_id for the popedup form to the id of the current form. More... | |
| UInt16 | doDialog (FormPtr parent_form=NULL) FORM_SECTION2 | 
| executes the form as a dialog. More... | |
| virtual Boolean | handleEvent (EventPtr) FORM_SECTION2 | 
| event handler for the form; this function calls automatically the other handle* functions. More... | |
| UInt16 | getObjectIndex (UInt16 object_id) FORM_SECTION2 | 
| wrapper for FrmGetObjectIndex. More... | |
| virtual Boolean | handleLoadEvent () FORM_SECTION2 | 
| this function is called when the form is loaded. More... | |
| virtual Boolean | handleCloseEvent () FORM_SECTION2 | 
| this function is called when the form is closed. More... | |
| Protected Methods | |
| virtual Boolean | handleKeyDownEvent (WChar key_id, UInt16 modifiers) FORM_SECTION2 | 
| called when key down event occurs. More... | |
| virtual Boolean | handleOpenEvent () FORM_SECTION2 | 
| called when form open event occurs. More... | |
| virtual Boolean | handleCtlSelectEvent (UInt16 control_id) FORM_SECTION2 | 
| called when ctl select event occurs. More... | |
| virtual Boolean | handleTblSelectEvent (tblSelect &tbl_select) FORM_SECTION2 | 
| called when a table select event occurs. More... | |
| virtual Boolean | handleLstSelectEvent (UInt16 item) FORM_SECTION2 | 
| called when a list select event occurs. More... | |
| virtual Boolean | handleMenuEvent (UInt16 menu_item_id) FORM_SECTION2 | 
| called when a menu event occurs. More... | |
| virtual Boolean | handleUpdateEvent (UInt16 update_code) FORM_SECTION2 | 
| called when a form update event occurs. More... | |
| virtual Boolean | handlePenDownEvent (Int16 x_coord, Int16 y_coord) FORM_SECTION2 | 
| handles events generated by the pen up. More... | |
| virtual Boolean | handlePopSelect (popSelect &pop_select) FORM_SECTION2 | 
| handles events generated by item selection in popup. More... | |
| virtual Boolean | handleFldChangedEvent () FORM_SECTION2 | 
| handles events generated when field are changed. More... | |
| virtual Boolean | handleSclRepeatEvent (UInt16 new_value, UInt16 value) FORM_SECTION2 | 
| handles events generated by the scrollbar. More... | |
| Protected Attributes | |
| FormPtr | frm | 
| pointer to the form. More... | |
| Boolean | saved | 
| true if the form was saved, false otherwise. More... | |
| UInt16 | caller_form_id | 
| the id of the caller form; can be used to enable returning to the correct caller after finishing. More... | |
| UInt16 | form_id | 
| the id of the form resource. More... | |
If the same form is used in several other forms (with no changes) then it may be best to implement that form as a singleton and use the reference from other forms. If the form (say A) is used only once in another form (say B), that an A object can be created inside B. Note that if you use forms with popup() the A has to be alive for roughly the same amount of time as B.
However, if you use a dialog form (i.e. form closes and returns as soon as a button is pressed) you can define the form object local to the section it is needed in.
When defining a new form you need to make sure that the Form constructor is called with your form's resource id as a parameter. This registers the form with the FormManager. If you overload the destructor, you need to call FormManager::instance()->deregisterForm(form_id);
Definition at line 40 of file Form.h.
| 
 | 
| The form constructor. 
 
 
 | 
| 
 | 
| destructor- unregisters the form. 
 | 
| 
 | 
| executes the form as a dialog. 
 
 Reimplemented in GenericInputForm. | 
| 
 | 
| use this to obtail the form pointer (to the actual form, not to the object. 
 
 Definition at line 81 of file Form.h. References frm. | 
| 
 | 
| wrapper for FrmGetObjectIndex. 
 
 
 | 
| 
 | 
| returns the saved attribute. 
 Definition at line 69 of file Form.h. References saved. | 
| 
 | 
| this function is called when the form is closed. 
 Reimplemented in AccountsForm. | 
| 
 | 
| called when ctl select event occurs. 
 
 Reimplemented in AccountsForm. | 
| 
 | 
| event handler for the form; this function calls automatically the other handle* functions. 
 
 
 | 
| 
 | 
| handles events generated when field are changed. 
 Reimplemented in NoteForm. | 
| 
 | ||||||||||||
| called when key down event occurs. 
 Reimplemented in AccountsForm. | 
| 
 | 
| this function is called when the form is loaded. 
 | 
| 
 | 
| called when a list select event occurs. 
 
 Reimplemented in CurrencyListForm. | 
| 
 | 
| called when a menu event occurs. 
 Reimplemented in AccountsForm. | 
| 
 | 
| called when form open event occurs. 
 Reimplemented in AccountsForm. | 
| 
 | ||||||||||||
| handles events generated by the pen up. 
 Reimplemented in AccountsForm. | 
| 
 | 
| handles events generated by item selection in popup. 
 
 Reimplemented in AccountsForm. | 
| 
 | ||||||||||||
| handles events generated by the scrollbar. 
 Reimplemented in NoteForm. | 
| 
 | 
| called when a table select event occurs. 
 
 Reimplemented in AccountsForm. | 
| 
 | 
| called when a form update event occurs. 
 
 Reimplemented in AccountsForm. | 
| 
 | 
| executes popup for another form, setting the caller_form_id for the popedup form to the id of the current form. 
 
 | 
| 
 | 
| executes popup for the current form. 
 | 
| 
 | 
| sets the caller id attribute. 
 
 Definition at line 77 of file Form.h. References caller_form_id. | 
| 
 | 
| sets the saved attribute. 
 
 Definition at line 73 of file Form.h. References saved. | 
| 
 | 
| the id of the caller form; can be used to enable returning to the correct caller after finishing. 
 Definition at line 116 of file Form.h. Referenced by setCallerFormId. | 
| 
 | 
| the id of the form resource. 
 | 
| 
 | 
| pointer to the form. 
 Definition at line 112 of file Form.h. Referenced by getFormPointer. | 
| 
 | 
| true if the form was saved, false otherwise. 
 | 
 1.2.14 written by Dimitri van Heesch,
 © 1997-2002
1.2.14 written by Dimitri van Heesch,
 © 1997-2002