Every scrolling list must have 5 functions associated with it:
- Text function: takes a GSsclistHandle and a slot number as
parameters. Sets text size and color. In Checkbook, the text function makes
"red" the current color if the slot is in the current check.
- Label function: takes a slot number as a parameter. Returns a
character string to be displayed in the list. In Checkbook, the label function
converts the number and amount to strings.
- Click function: takes a slot number as a parameter. Called when a
list item is clicked. In Checkbook, the click function sets cur_item,
adjusts the "Edit" and "Delete" buttons, and redraws the former and current
checks in the list.
- In function and out function: these functions are called when the
mouse is inside or outside, respectively, of the list area. In Checkbook,
these functions do nothing.