4 * [Generated from listbox, 25 September 1996]
7 #if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
11 #pragma include_only_once
12 #pragma force_top_level
21 /*----- Overview ----------------------------------------------------------*
42 /* --- lb_create --- *
44 * On entry: R0 == pointer to list manager description block
45 * R1 == pointer to the list
46 * R2 == pointer to a width function
47 * R3 == The height of each item
48 * R4 == parent window handle or
49 * pointer to window block if R5 == -1
50 * R5 == parent icon handle or -1 if not a pane
52 * On exit: R0 == listbox handle
53 * R1 == window handle of list box
54 * May return an error (R1 corrupted)
57 extern routine lb_create;
59 /* --- lb_destroy --- *
61 * On entry: R0 == listbox handle
65 * Use: Destroys the given listbox.
68 extern routine lb_destroy;
70 /* --- lb_eventHandler --- *
72 * On entry: R0 == listbox handle
73 * R1 == handler function
74 * R2 == R10 value to pass
75 * R3 == R12 value to pass
79 * Use: Registers an event handler for the given listbox.
82 extern routine lb_eventHandler;
84 /* --- lb_plotString --- *
86 * On entry: R0 == pointer to a string
87 * R1 == pointer to the list item
88 * R2-R5 == window coordinates to plot it
89 * R10 == pointer to the listbox
93 * Use: Plots a list item consisting of a single string. It assumes
94 * the default selection model.
97 extern routine lb_plotString;
99 /* --- lb_update --- *
101 * On entry: R0 == listbox handle
103 * On exit: May return an error
105 * Use: Updates the entire listbox prettily
108 extern routine lb_update;
110 /* --- lb_updateItem --- *
112 * On entry: R0 == list box handle
113 * R1 == list item handle
117 * Use: Redraws a list item to reflect a change in its state.
120 extern routine lb_updateItem;
122 /* --- lb_select --- *
124 * On entry: R0 == listbox handle
126 * R2 == 0 to unselect, 1 to select, or 2 to toggle
130 * Use: Selects or deselects a listbox item, nicely and without
134 extern routine lb_select;
136 /* --- lb_isSelected --- *
138 * On entry: R0 == listbox handle
141 * On exit: CS if item is selected, else CC
143 * Use: Informs you whether an item is selected.
146 extern routine lb_isSelected;
148 /* --- lb_clearSelection --- *
150 * On entry: R0 == listbox handle
151 * R1 == item handle of item to ignore (or 0 for none)
155 * Use: Deselects all items in the listbox.
158 extern routine lb_clearSelection;
160 /* --- lb_clickS --- *
162 * On entry: R0 == listbox handle
163 * R1 == pointer to list item
164 * R3 == mouse button status
168 * Use: Provides a default action for clicking on an item in a
171 * Only one selection is possible at any one time.
174 extern routine lb_clickS;
176 /* --- lb_clickM --- *
178 * On entry: R0 == listbox handle
179 * R1 == pointer to list item
180 * R3 == mouse button status
184 * Use: Provides a default action for clicking on an item in a
187 * The multiple selection model is used.
190 extern routine lb_clickM;
194 * On entry: R1 == pointer to list item
195 * R2 == window relative y position
196 * R3 == mouse button status
197 * R10 == listbox handle
201 * Use: Starts a drag operation to allow for easy multiple
205 extern routine lb_drag;
207 /* --- lb_inserted --- *
209 * On entry: R0 == pointer to the listbox
210 * R1 == pointer to the new item
214 * Use: Informs the listbox that an item has been inserted,
215 * and causes a flicker free insert to occur if possible.
218 extern routine lb_inserted;
220 /* --- lb_removed --- *
222 * On entry: R0 == pointer to the listbox
223 * R1 == index of item removed
227 * Use: Informs the listbox that an item has been removed, and
228 * causes a flicker free remove to occur, if possible.
231 extern routine lb_removed;
233 /* --- lb_window --- *
235 * On entry: R0 == listbox handle
237 * On exit: R0 == window handle
239 * Use: Returns the window handle of the listbox
242 extern routine lb_window;
250 * Use: Initialises the listbox unit.
253 extern routine lb_init;
255 /*----- List events -------------------------------------------------------*/
257 #define lbEvent_close 0
259 #define lbEvent_redraw 1
260 #define lbEvent_click 2
261 #define lbEvent_menu 3
262 #define lbEvent_drag 4
263 #define lbEvent_help 5
264 #define lbEvent_drop 6
266 #define lbDrop_load 0
267 #define lbDrop_save 1
269 /*----- That's all, folks -------------------------------------------------*/