1d_list_proc(3)                  Allegro manual                  d_list_proc(3)
2
3
4

NAME

6       d_list_proc  - Dialog procedure implementing a list box object. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int d_list_proc(int msg, DIALOG *d, int c);
14

DESCRIPTION

16       A list box object. This will allow the user to scroll through a list of
17       items  and  to  select  one  by clicking or with the arrow keys. If the
18       D_EXIT flag is set, double clicking on a list item will close the  dia‐
19       log.  The index of the selected item is held in the d1 field, and d2 is
20       used to store how far it has scrolled through the list.  The  dp  field
21       points  to  a function which will be called to obtain information about
22       the contents of the list. This should follow the form:
23
24          char *foobar(int index, int *list_size);
25
26       If index is zero or positive, the function should return a  pointer  to
27       the  string  which is to be displayed at position index in the list. If
28       index is negative, it should return NULL and list_size should be set to
29       the number of items in the list.
30
31       To  create  a multiple selection listbox, set the dp2 field to an array
32       of byte flags indicating the selection state of each  list  item  (non-
33       zero  for  selected entries). This table must be at least as big as the
34       number of objects in the list!
35
36

SEE ALSO

38       exgui(3)
39
40
41
42Allegro                          version 4.4.2                  d_list_proc(3)
Impressum