list from file; 2 or 3 columns; callback.
Values may have blanks ..
Fileformat: csv ..
Input:
o_par parentBox
fNam filename of list to display; mode=nr of vals; NULL = none.
mode "2" selection returns 2 words;
"3" selection returns 3 words;
titLst 2 or 3 headertitles or NULL = no headers
funcnam callback - returns the selected line (as list of words)
opts options; (HorSiz,VertSiz)
HorSiz,VertSiz: size in characters; default is automatic size.
negative values: size in pixels.
'e' = expand widget; default is fixed size.
Examples: "" or "10" or "10e,e"
"10e,e" horiz. size 10 chars, hor. and vert. expandable.
funcnam prototype:
int funcnam (void *parent, void **data);
1=mouseButtonNr or keyCode GUI_DATA_I1
2=colNr(1|2) GUI_DATA_I2
Cursorkeys (up,down), page-keys (up,down) provide a usercall of type
MousButtonClicks or the Enter-key provide a usercall of type
TYP_EventPress;
GUI_DATA_I1 gives the mouseButtonNr (1|2|3) or DoubleClick (4) or
ReturnKey (13).
DoubleClick provides 3 userCalls of type TYP_EventPress; first and second
with mouseButton 1, the third call with mouseButton=4.
Example:
GUI_list2__ (Box, "list3.csv", "3", NULL, cb_list_sel, "60,10");
..
int cb_list_sel (
MemObj *mo,
void **data) {
printf(" mouseButtNr=%d selColNr=%d\n",GUI_DATA_I1,GUI_DATA_I2);
}
Example with titles:
char *tiTab[] = {"ID","Value","Info"};
GUI_list2__ (Box,
"list2.dat",
"3", tiTab, cbl,
"60,10");
list from file; 2 or 3 columns; callback.
Values may have blanks ..
Fileformat: csv ..
Input:
o_par parentBox
fNam filename of list to display; mode=nr of vals; NULL = none.
mode "2" selection returns 2 words;
"3" selection returns 3 words;
titLst 2 or 3 headertitles or NULL = no headers
funcnam callback - returns the selected line (as list of words)
opts options; (HorSiz,VertSiz)
HorSiz,VertSiz: size in characters; default is automatic size.
negative values: size in pixels.
'e' = expand widget; default is fixed size.
Examples: "" or "10" or "10e,e"
"10e,e" horiz. size 10 chars, hor. and vert. expandable.
funcnam prototype:
int funcnam (void *parent, void **data);
1=mouseButtonNr or keyCode GUI_DATA_I1
2=colNr(1|2) GUI_DATA_I2
Cursorkeys (up,down), page-keys (up,down) provide a usercall of type
MousButtonClicks or the Enter-key provide a usercall of type
TYP_EventPress;
GUI_DATA_I1 gives the mouseButtonNr (1|2|3) or DoubleClick (4) or
ReturnKey (13).
DoubleClick provides 3 userCalls of type TYP_EventPress; first and second
with mouseButton 1, the third call with mouseButton=4.
Example:
GUI_list2__ (Box, "list3.csv", "3", NULL, cb_list_sel, "60,10");
..
int cb_list_sel (
MemObj *mo,
void **data) {
printf(" mouseButtNr=%d selColNr=%d\n",GUI_DATA_I1,GUI_DATA_I2);
}
Example with titles:
char *tiTab[] = {"ID","Value","Info"};
GUI_list2__ (Box,
"list2.dat",
"3", tiTab, cbl,
"60,10");