The Pre-list Application
In the interest of time, we will start with an application which can edit check
fields, but has no list capabilities. When a user presses the "Add" or "Edit"
buttons, the check editing window is displayed, and the user may manipulate
check values in this window. However, the list is not being maintained at this
In this application's source code, we have defined two new data types:
- CheckWindState, an enumerated type with three values: NOT_SHOWN,
ADD_STATE, and EDIT_STATE. We declare one variable of type CheckWindState:
wind_state. wind_state is set to NOT_SHOWN when the check edit window
is not displayed, ADD_STATE when the window was displayed because the user
pressed "Add", and EDIT_STATE when the user pressed "Edit". When we implement
the scrolling list, the application will look at wind_state to determine what
to do when the check edit window is cleared.
- CheckType, a structure with members number, payee, and
amount. A check is stored internally as a CheckType. We declare one
variable of type CheckType: edit_check. edit_check's fields are
manipulated in the check edit window.
This application uses GIL's basic window, button, and field capabilities. If
you have questions about this application, you may want to look at
giltest, a sample GIL application which is distributed with GIL, and the
The Pre-list Source Code
The source code
for the version which does not support lists are