home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / Palettes / Chart / Source / PieChart.h < prev    next >
Encoding:
Text File  |  1994-06-07  |  2.7 KB  |  84 lines

  1. // -------------------------------------------------------------------------------------
  2. // Pie Chart view
  3. // Martin D. Flynn, NeXT Computer, Inc.
  4. // -------------------------------------------------------------------------------------
  5.  
  6. #import <sys/types.h>
  7.  
  8. // -------------------------------------------------------------------------------------
  9. @interface      PieChart : View
  10. {
  11.  
  12.   // archived variables
  13.   id            currentFont;            // current font id
  14.   NXColor        backgroundColor;        // background color
  15.   NXColor        outlineColor;            // pie outline color
  16.   NXColor        labelColor;                // pie label (& tick) color
  17.   id            sliceColors;            // slice color table
  18.   int            dftSliceCount;            // default number of slices
  19.   
  20.   struct _pieFlags {
  21.     u_short        transparent:1;            // background transparent
  22.     u_short        showPercent:1;            // show percent values for slice
  23.     u_short        useCellTags:1;            // use matrix cell tags for slice number
  24.     u_short        drawOutline:1;            // draw pie slice outline
  25.     u_short        drawLabels:1;            // draw labels
  26.     u_short        drawInColor:1;            // draw in color if true
  27.     u_short        acceptColor:1;            // accept color from color panel
  28.     u_short        _RESERVED:9;            // future use
  29.   }             pFlags;                    // pie flags
  30.  
  31.   // work variables
  32.   id            delegate;                // pie chart delegate
  33.   id            dataId;                    // dataset storage
  34.   id            labelMatrix;            // outlet: matrix holding labels
  35.   id            valueMatrix;            // outlet: matrix holding values
  36.   id            outputPercent;            // outlet: matrix to send percent output to
  37.   id            actionMatrix;            // outlet: slice selection action matrix
  38.   BOOL            isFirstResponder;        // first responder flag
  39.   NXPoint        pieCenter;                // pie center
  40.   float            pieRadius;                // pie radius
  41.  
  42. }
  43.  
  44. // -------------------------------------------------------------------------------------
  45.  
  46. - setValue:(float)value forSlice:(int)slice;
  47. - setValue:(float)value andLabel:(const char*)label forSlice:(int)slice;
  48.  
  49. - setBackgroundTransparent:(BOOL)flag;
  50. - (BOOL)backgroundTransparent;
  51. - setBackgroundGray:(float)aGray;
  52. - (float)backgroundGray;
  53. - setBackgroundColor:(NXColor)aColor;
  54. - (NXColor)backgroundColor;
  55. - setOutlineGray:(float)aGray;
  56. - (float)outlineGray;
  57. - setLabelGray:(float)aGray;
  58. - (float)labelGray;
  59. - setSliceColor:(NXColor)color at:(int)slice;
  60. - (NXColor)sliceColorAt:(int)slice;
  61. - setAcceptColor:(BOOL)flag;
  62. - setDelegate:aDelegate;
  63. - delegate;
  64.  
  65. - setShowPercent:(BOOL)flag;
  66. - (BOOL)showPercent;
  67. - setDrawSliceOutline:(BOOL)flag;
  68. - (BOOL)drawSliceOutline;
  69. - setDrawLabels:(BOOL)flag;
  70. - (BOOL)drawLabels;
  71. - setDefaultSliceCount:(int)count;
  72. - (int)defaultSliceCount;
  73.  
  74. - update:sender;
  75. - setLabelMatrix:anObject;
  76. - setValueMatrix:anObject;
  77. - setFormMatrix:anObject;
  78. - setPercentMatrix:anObject;
  79.  
  80. /* delegate methods */
  81. - selectedPieSlice:(int)slice;
  82.  
  83. @end
  84.