This is HistogramView.h in view mode; [Download] [Up]
// By Judy D. Halchin, Educational Computing Services, Allegheny College.
// You may freely copy, distribute and reuse this code.
// Allegheny College and the author disclaim any warranty of any kind,
// expressed or implied, as to its fitness for any particular use.
// This work was partially supported by a Teacher Preparation grant from the
// National Science Foundation.
#define HISTOGRAM 0
#define SIMPLEHISTOGRAM 1
#define BARCHART 2
#define NONE 3
#import <appkit/View.h>
#define PLAIN 0
#define STAGGERED 1
#define SIDEWAYS 2
#define SOLID 0
#define FILLED 1
@interface HistogramView:View
{
char *horizAxisTitle, *vertAxisTitle, *graphTitle;
float barWidth;
int barStyle;
}
- initFrame:(const NXRect *)frameRect;
- drawHistogramNumBars:(int)numBars frequencies:(float *)frequencies
labels:(char **)barLabels;
- drawHistogramNumBars:(int)numBars boundaries:(float *)boundaries
accuracy:(int)numDecPlaces frequencies:(float *)frequencies;
- drawBarChartNumBars:(int)numBars frequencies:(float *)frequencies
labels:(char **)barLabels;
- calculateAndDrawHistogram;
- calculateAndDrawSimpleHistogram;
- calculateAndDrawBarChart;
- setHorizAxisTitle:(char *)horizTitle;
- setVertAxisTitle:(char *)vertTitle;
- setGraphTitle:(char *)title;
- setBarWidth:(float)width;
- setBarStyle:(int)style;
- drawSelf:(const NXRect *)rects :(int)rectCount;
- calculateTicksForMaxValue:(float)maximum maxTick:(float *)maxTick;
- chooseLabelFormat;
- drawLabels;
- sizeTo:(NXCoord)width :(NXCoord)height;
- setFrame:(const NXRect *)frameRect;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.