home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume19 / xfig / part02 / w_indpanel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-27  |  3.0 KB  |  92 lines

  1. /*
  2.  * FIG : Facility for Interactive Generation of figures
  3.  * Copyright (c) 1991 by Paul King
  4.  *
  5.  * "Permission to use, copy, modify, distribute, and sell this software and its
  6.  * documentation for any purpose is hereby granted without fee, provided that
  7.  * the above copyright notice appear in all copies and that both the copyright
  8.  * notice and this permission notice appear in supporting documentation. 
  9.  * No representations are made about the suitability of this software for 
  10.  * any purpose.  It is provided "as is" without express or implied warranty."
  11.  */
  12.  
  13. /* indicator button selection */
  14.  
  15. #define I_ANGLEGEOM    0x000001
  16. #define I_VALIGN    0x000002
  17. #define I_HALIGN    0x000004
  18. #define I_GRIDMODE    0x000008
  19. #define I_POINTPOSN    0x000010
  20. #define I_FILLSTYLE    0x000020
  21. #define I_BOXRADIUS    0x000040
  22. #define I_LINEWIDTH    0x000080
  23. #define I_LINESTYLE    0x000100
  24. #define I_ARROWMODE    0x000200
  25. #define I_TEXTJUST    0x000400
  26. #define I_FONTSIZE    0x000800
  27. #define I_FONT        0x001000
  28. #define I_TEXTSTEP    0x002000
  29. #define I_ZOOM        0x004000
  30. #define I_ROTNANGLE    0x008000
  31. #define I_NUMSIDES    0x010000
  32. #define I_COLOR        0x020000
  33. #define I_LINKMODE    0x040000
  34. #define I_DEPTH        0x080000
  35. #define I_ELLTEXTANGLE    0x100000
  36. #define I_TEXTFLAGS    0x200000
  37.  
  38. #define I_NONE        0x000000
  39. #define I_ALL        0x3fffff
  40. #define I_MIN1        (I_GRIDMODE | I_ZOOM)
  41. #define I_MIN2        (I_MIN1 | I_POINTPOSN)
  42. #define I_MIN3        (I_MIN2 | I_LINKMODE)
  43. #define I_ADDMOVPT    (I_MIN2 | I_ANGLEGEOM)
  44. #define I_TEXT0        (I_TEXTJUST | I_FONT | I_FONTSIZE | I_COLOR | \
  45.                 I_DEPTH | I_ELLTEXTANGLE | I_TEXTFLAGS)
  46. #define I_TEXT        (I_MIN2 | I_TEXTSTEP | I_TEXT0)
  47. #define I_LINE0        (I_FILLSTYLE | I_LINESTYLE | I_LINEWIDTH | \
  48.                 I_COLOR | I_DEPTH)
  49. #define I_BOX        (I_MIN2 | I_LINE0 | I_DEPTH)
  50. #define I_ELLIPSE    (I_MIN2 | I_LINE0 | I_DEPTH | I_ELLTEXTANGLE)
  51. #define I_ARC        (I_BOX | I_ARROWMODE)
  52. #define I_REGPOLY    (I_BOX | I_NUMSIDES)
  53. #define I_CLOSED    (I_BOX | I_ANGLEGEOM)
  54. #define I_OPEN        (I_CLOSED | I_ARROWMODE)
  55. #define I_ARCBOX    (I_BOX | I_BOXRADIUS)
  56. #define I_EPSOBJ    (I_MIN2 | I_DEPTH)
  57. #define I_OBJECT    (I_MIN1 | I_TEXT0 | I_LINE0 | I_ARROWMODE | \
  58.                 I_BOXRADIUS | I_DEPTH)
  59. #define I_ALIGN        (I_MIN1 | I_HALIGN | I_VALIGN)
  60. #define I_ROTATE    (I_MIN1 | I_ROTNANGLE)
  61. /* for checking which parts to update */
  62. #define I_UPDATEMASK    (I_OBJECT & ~I_GRIDMODE & ~I_ZOOM)
  63.  
  64. typedef struct choice_struct {
  65.     int            value;
  66.     PIXRECT        icon;
  67.     Pixmap        normalPM,blackPM;
  68. }        choice_info;
  69.  
  70. typedef struct ind_sw_struct {
  71.     int            type;    /* one of I_CHOICE .. I_FVAL */
  72.     int            func;
  73.     char        line1[14], line2[6];
  74.     int            sw_width;
  75.     int           *i_varadr;
  76.     float       *f_varadr;
  77.     int            (*inc_func) ();
  78.     int            (*dec_func) ();
  79.     int            (*show_func) ();
  80.     choice_info       *choices;    /* specific to I_CHOICE */
  81.     int            numchoices; /* specific to I_CHOICE */
  82.     int            sw_per_row; /* specific to I_CHOICE */
  83.     Bool        update;    /* whether this object component is updated by update */
  84.     TOOL        button;
  85.     TOOL        formw;
  86.     TOOL        updbut;
  87.     Pixmap        normalPM;
  88. }        ind_sw_info;
  89.  
  90. #define ZOOM_SWITCH_INDEX    0    /* used by w_zoom.c */
  91. extern ind_sw_info ind_switches[];
  92.