VDrawBoxOrButton


 
Name
  VDrawBoxOrButton - draws a three-dimesional box or button in any window.
 
Synopsis
  VDrawBoxOrButton(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
  VDrawBoxOrButton draws a three-dimesional box or button in any 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 buttons created by VDrawBoxOrButton are very simple and they differ
from the buttons created by VAddButton and VDisplayPanel by not having any
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 VDrawBoxOrButton prints an
error message to the standard error stream, produces a core dump file and
exits from the current process.
 
Related Functions
VDrawColoredBoxOrButton, VDrawXorBoxOrButton, VBlinkBoxOrButton.