SYNTAX
wid=XSLabel(parent,x,y,width,height,buffer,option)
XSWidget *wid,*parent;
int x,y,width,height,option;
char *buffer;
DESCRIPTION
XSLabel create a label widget inside the selected parent, in the position x,y with size width,height with a text defined by buffer. This box can be decored by switches actived in option value.
Valid options are:
- XS_TEXT_CENTER: centralized text (default).
- XS_TEXT_LEFT: left aligned text.
- XS_TEXT_RIGHT: right aligned text.
- XS_TEXT_UP: up aligned text.
- XS_TEXT_DOWN: down alined text.
- XS_BOX_NONE: no box decoration (default).
- XS_BOX_UP: upbox decoration.
- XS_BOX_DOWN: downbox decoration.
- XS_BOX_UPDOWN: updown decoration.
- XS_BOX_HIDEONBORDER: hide decorations on parent border.
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,*l1;
d1=XSDesktop(getenv("DISPLAY"),argv,argc);
w1=XSWindow(d1,0,0,400,400,"label example");
l1=XSLabel(w1,8,8,-8,-40,"label example",XS_BOX_UPDOWN);
l1->font=d1->helvetica24b;
XSButton(w1,-8,-8,72,24,"Close",XSWindowClose);
while(XSCheckEvent(d1,XS_BLOCK));
return 0;
}