
//
//  pqRotaryKnob.h
//  plasqKit
//
//  Created by Robert Grant on Thu Oct 03 2002.
//
/*
*  Copyright 2006 plasq. All rights reserved.
*/

#import <AppKit/AppKit.h>

@interface NSWindow(TooltipLike)
+ (NSWindow *)arrowWindowWithContentRect:(NSRect)someRect;
@end

@interface pqRotaryKnob : NSControl {

    id m_target;
    SEL m_action;
    NSBezierPath* m_knob;
    NSBezierPath* m_tick;
    NSBezierPath* m_marker;
    NSColor* m_knobColor;
    NSColor* m_markerColor;
    double m_min;
    double m_max;
    double m_value;
    double m_delta;
    NSPoint m_offset;
    NSPoint downPoint;
    NSPoint m_downPoint;
    BOOL m_showEndpoints;
    int	m_tickCount;
    BOOL m_logarithmic;
    double m_logMin;
    double m_logMax;
    BOOL   m_showRedLimit;
    NSTimer*    m_timer;
    BOOL    m_panStyle;
}

- (void)setMinValue:(double)minValue;
- (double)minValue;

- (void)setMaxValue:(double)maxValue;
- (double)maxValue;

- (void)setDoubleValue:(double)value;
- (double)doubleValue;

- (void)setKnobColor:(NSColor*)color;
- (NSColor*)knobColor;

- (void)setMarkerColor:(NSColor*)color;
- (NSColor*)markerColor;

- (void)setLogarithmic:(BOOL)log;
- (BOOL)logarithmic;

- (void)showEndpoints:(BOOL)endpoints;
- (BOOL)endpoints;

- (void)setNumberOfTickMarks:(int)tickCount;
- (int)numberOfTickMarks;

- (void)setPanStyle: (BOOL)panStyle;

@end

@interface NSObject (pqRotaryKnobActionNotification)

    - (void)beginAction:(pqRotaryKnob*)knob;
    - (void)endAction:(pqRotaryKnob*)knob;

@end
