SYNTAX
wid=XSEdit(parent,x,y,width,height,buffer,size,flags) XSWidget *wid,*parent; int x,y,width,height,size,flags; char *buffer;
DESCRIPTION
XSEdit create a editbox widget inside the selected parent, in the position x,y with size width,height. When active, the text stored in buffer string can be edited in any way, with character insertion limited by size value, and others flags (like text align and single line property).
All operations of XSEdit in the X server are delayed until XSCheckEvent is executed.
Example
#include <xstep.h> #include <stdlib.h> int main(int argc,char **argv) { XSWidget *d1,*w1; char buffer[256]="XSEdit:\n\n\tEdit your text here!"; d1=XSDesktop(getenv("DISPLAY"),argv,argc); w1=XSWindow(d1,0,0,400,400,"edit example"); XSEdit(w1,8,8,-8,-40,buffer,256,XS_TEXT_LEFT|XS_TEXT_UP); XSButton(w1,-8,-8,72,24,"Close",XSWindowClose); while(XSCheckEvent(d1,XS_BLOCK)); return 0; }