Create text-inputfiled. Gtk-2: siza cannot be smaller than ~10 characters ..
ltxt: Labeltext; NULL or "" for none
etxt: Text in Entryfield; NULL oder "" for none
funcnam: callback-function for Keypress & FocusIn-Events (none: NULL)
data get this (static) data from the callbackfunktion; NULL for none
opts options; must have correct sequence (Frame Side HorSiz VertSiz)
Frame: 'f' make a frameless inputfield; default = with frame.
Side: 'r' labeltext is right of inputfield; default is left.
HorSiz,VertSiz: size in characters; default is automatic size.
'e' = expand widget; default is fixed size.
Examples: "f,20" or "r" or "r,10" or "10e,e"
"r" label right of inputfield; defaults.
"r,10" label right, horiz. size 10 chars, vert. size autom.
"10e,e" horiz. size 10 chars, hor. and vert. expandable.
prototyp funcnam:
int funcnam (MemObj *mo, void **data);
GUI_DATA_EVENT =*(int*)data[0]=TYP_EventEnter|
TYP_EventPress|
TYP_EventRelease
GUI_DATA_S1 =(char*)data[1]=userdata
GUI_DATA_I2 =*(int*)data[2]=keyvalue; eg 'a'
GUI_DATA_I3 =*(int*)data[3]=state of modifierkeys;
see ../gui/gui_types.h GUI_Modif_*
&1=shift; &4=ctrl; &8=alt.
&256=MB1; &512=MB2; &1024=MB3.
Returncodes: 0=continue with defaultOperations for this key.
1=do no defaultOperations; skip handling this key
Example without callback-function:
we1 =
GUI_entry__ (&box1,
"0.0",
"sum", NULL, NULL,
"");
Example with callback-function:
we2 =
GUI_entry__ (&box1,
"0.0",
"sum", went_cb, NULL,
"10");
..
int we2_cb (MemObj *mo, void **data) {
printf(
" event=%d typ=%d\n",GUI_DATA_EVENT,
GUI_OBJ_TYP(mo));
if(GUI_DATA_I2 == GUI_KeyCurDown) return 1;
if(GUI_DATA_EVENT != TYP_EventRelease) return 0;
..
}