VDrawColoredBoxOrButton


 
Name
  VDrawColoredBoxOrButton - draws three-dimensional box or button in a window.
 
Synopsis
  VDrawColoredBoxOrButton(win, gc, xloc, yloc, width, height,
        button_flag, scrollbar_flag, rightscrollbar_width, click)
  Window win;
  GC gc;  
  int xloc, yloc, width, height;
  int button_flag, scrollbar_flag, rightscrollbar_width;
  ScrollbarClickInfo *click;            /*RETURN*/
 
Description
  VDrawColoredBoxOrButton draws a three-dimensional box or button in a window.
When a box is created, it can be created with a scrollbar. If a scrollbar is
desired, then the top and bottom click points of the scroll bar are
returned. The box/button is colored in the highlight color. The buttons
created by VDrawColoredBoxOrButton are similar to the ones created by
VDrawBoxOrButton, except they have a different color. However these buttons
are different from the button created by calling VAddButton and VDisplayPanel
because they are much simpler and do not have call back procedure. 
 
Structures
  typedef struct {
        short top_x,top_y;      /*the top-left cood of top Click button*/
        short top_width;        /*the width of the top Click button*/
        short top_height;       /*the height of the top Click button*/
        short bottom_x,bottom_y;/*the top-left cood of botton Click button*/
        short bottom_width;     /*the width of the bottom Click button*/
        short bottom_height;    /*the height of the bottom Click button*/
  } ScrollbarClickInfo;

Return Value
  0 - work successfully.
  281 - could not create box or button.
  282 - scrollbar click point was not created.
 
Parameters
  win - the ID of the window to draw the box or button.
  gc - the GC to be used to draw the same; if no GC is passed it is obtained
        from the window ID.
  xloc, yloc - the xloc,yloc of the box/button with respect to the window.
  width, height - the width and height of the box/button with respect to the
        window.
  button_flag - to indicate that it is a button.
  scrollbar_flag - flag to indicate that a scroll bar is needed.
  rightscrollbar_width - the width of the  scrollbar. If no width is
        specified then a default is used. The scrollbar is always created on
        the right side.
  click - the structure which is returned with the coordinates of the click
        point with respect to the window.
 
Side Effects
  None.
 
Entry Conditions
  VCreateColormap should be called earlier,else VDrawColoredBoxOrButton
prints an error message to the standard error stream, produces a core dump
file and exits from the current process.
 
Related Functions
VDrawBoxOrButton, VBlinkBoxOrButton, VDrawXorBoxOrButton, VCreateThreedImageSubwindow.