~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/Xv/tw_label.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <stdio.h>
  4 #include <math.h>
  5 #include <tina/sys.h>
  6 #include <tina/math.h>
  7 #include <tina/tw.h>
  8 #include <tina/tv.h>
  9 #include <tina/tvfuncs.h>
 10 #include <tina/tv_screen.h>
 11 #include <xview/xview.h>
 12 #include <xview/frame.h>
 13 #include <xview/panel.h>
 14 #include <xview/textsw.h>
 15 #include <xview/font.h>
 16 #include <xview/canvas.h>
 17 #include <xview/cms.h>
 18 #include <xview/xv_xrect.h>
 19 #include <xview/openmenu.h>
 20 #include <tina/Xvfuncs.h>
 21 #include <tina/X11funcs.h>
 22 
 23 
 24 
 25 Window  tw_label(char *name)
 26 {
 27     Panel_item label;
 28     Panel   panel, tw_get_panel();
 29     Bool    newrow, tw_get_newrow();
 30     int     row;
 31 
 32     panel = tw_get_panel();
 33     newrow = tw_get_newrow();
 34     row = tw_get_row();
 35 
 36     label = xv_create(panel, PANEL_MESSAGE,
 37                       PANEL_LABEL_BOLD, TRUE,
 38                       PANEL_LABEL_STRING, name,
 39                       NULL);
 40 
 41     if (newrow)
 42     {
 43         xv_set(label,
 44                XV_X, xv_col(panel, 0),
 45                XV_Y, xv_row(panel, row),
 46                NULL);
 47         tw_set_newrow(false);
 48     }
 49     return (label);
 50 }
 51 
 52 void    tw_label_reset(Panel_item label, char *name)
 53 {
 54     xv_set(label, PANEL_LABEL_BOLD, TRUE,
 55                PANEL_LABEL_STRING, name,
 56                NULL);
 57 }
 58 
 59 Window  tw_icon_label(char *name,int w, int h,
 60                       short *image_bits)
 61 {
 62     Panel_item label;
 63     Panel   panel, tw_get_panel();
 64     Bool    newrow, tw_get_newrow();
 65     Server_image image;
 66     int     row;
 67 
 68     panel = tw_get_panel();
 69     newrow = tw_get_newrow();
 70     row = tw_get_row();
 71 
 72     image=(Server_image)xv_create((Frame)NULL,SERVER_IMAGE,
 73                                   XV_WIDTH, w,
 74                                   XV_HEIGHT, h,
 75                                   SERVER_IMAGE_BITS,image_bits,
 76                                   NULL);
 77     label = xv_create(panel, PANEL_MESSAGE,
 78                       PANEL_LABEL_IMAGE, image,
 79                       NULL);
 80 
 81     if (newrow)
 82     {
 83         xv_set(label,
 84                XV_X, xv_col(panel, 0),
 85                XV_Y, xv_row(panel, row),
 86                NULL);
 87         tw_set_newrow(false);
 88     }
 89     return (label);
 90 }
 91 
 92 void tw_label_reset_image(Panel_item pic,int w, int h,
 93                          short *image_bits)
 94 {
 95   Server_image image,old_image;
 96   image=(Server_image)xv_create((Frame)NULL,SERVER_IMAGE,
 97                                   XV_WIDTH, w,
 98                                   XV_HEIGHT, h,
 99                                   SERVER_IMAGE_BITS,image_bits,
100                                   NULL);
101   old_image=xv_get(pic,PANEL_LABEL_IMAGE,NULL);
102   xv_set(pic,PANEL_LABEL_IMAGE,image,NULL);
103   xv_destroy_safe(old_image);
104 }
105 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.