home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscCircularSliderCell.h -- a SliderCell for circular sliders
- // Written by Vince DeMarco and Don Yacktman, (c) 1994 by Vince DeMarco.
- // Version 1.0 All rights reserved.
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- // This was created by modifying Vince's CircularSliderCell class and
- // merging it with Don's RotationSliderCell class. Here's the info
- // from the original files.
- /*
- * Filename: CircularSliderCell.h
- * Created : Sun Oct 18 16:56:22 1992
- * Author : Vince DeMarco
- * <vince@whatnxt.cuc.ab.ca>
- * LastEditDate was "Sun Oct 25 13:47:43 1992"
- */
- // RotationSliderCell.h -- written by Don Yacktman
- // Copyright 1993 by Don Yacktman. All rights reserved.
-
- #import <appkit/SliderCell.h>
-
- typedef enum _MiscCircularSliderStyle {
- MISC_PIECHART_STYLE = 0, // this is obvious: a pie chart.
- MISC_SLIDER_STYLE, // this looks NeXT-like (ring shape)
- MISC_DIAL_STYLE, // raised circle with a radial line
- MISC_SHUTTLEWHEEL_STYLE // raised circle with a dimple
- } MiscCircularSliderStyle;
-
- @interface MiscCircularSliderCell:SliderCell
- {
- MiscCircularSliderStyle style; // which rendering style is being used
- BOOL jumpToMousePoint; // Does the position indicator jump to the
- // location of the first mouse down event or does it
- // move in relation to the mouse dragging?
- BOOL hidden; // Is the Cell Hidden?
- float radius; // The smallest radius of the Cell
- float sliderPathWidth; // width of ring if MISC_SLIDER_STYLE
- NXPoint center; // The center point of the Cell--x,y coordinates
- @private
- BOOL imFlipped; // we need to keep track of our flippedness...
- float _offsetAng;
- NXRect _lastFrame;
- id disabledBezelImage, enabledBezelImage, tempImage, knobImage; // caches
- }
-
- - init;
- - setSliderPathWidth:(float)val;
- - (float)sliderPathWidth;
- - setSliderStyle:(MiscCircularSliderStyle)aBOOL;
- - (MiscCircularSliderStyle)sliderStyle;
- - renderAll;
- - setJumpToMousePoint:(BOOL)aBOOL;
- - (BOOL)jumpToMousePoint;
- - setHidden:(BOOL)flag;
- - (BOOL)hidden;
- - read:(NXTypedStream *)stream;
- - write:(NXTypedStream *)stream;
-
- @end
-