/Users/airy/Sources/augui/AUGUIFramework/Controls/TKnobControl.h

Go to the documentation of this file.
00001 /*
00002  *  TKnobControl.h
00003  *  AUStk
00004  *
00005  *  Created by Airy André on Sun Oct 20 2002.
00006  *  Copyright (c) 2002 Airy André. All rights reserved.
00007  *
00008  */
00009 
00010 #ifndef TKnobControl_H_
00011 #define TKnobControl_H_
00012 
00013 #include "TViewNoCompositingCompatible.h"
00014 
00015 class TKnobControl
00016 : public TViewNoCompositingCompatible
00017 {
00018         AUGUIDefineControl(TKnobControl, TViewNoCompositingCompatible, "knob");
00019 public:
00020         // Control properties management
00021         virtual void SetProperty(OSType propID, double value);
00022         virtual void SetProperty(OSType propID, int32_t value);
00023         virtual void SetProperty(OSType propID, AUGUI::color_t &value);
00024         virtual void SetProperty(OSType propID, CFStringRef value);
00025         virtual bool GetProperty(OSType propID, double &value);
00026         virtual bool GetProperty(OSType propID, int32_t &value);
00027         virtual bool GetProperty(OSType propID, AUGUI::color_t &value);
00028         virtual bool GetProperty(OSType propID, CFStringRef &value);
00029 
00030         static const OSType kKnobControlBackgroundImageTag = 'BkIm';
00031 protected:
00032         // Constructor/Destructor
00033         TKnobControl(HIViewRef inControl);
00034     virtual ~TKnobControl();
00035 
00036     virtual ControlKind         GetKind();
00037         
00038         virtual bool UseNonblockingTracking() { return true; }
00039 
00040     virtual OSStatus            Initialize( TCarbonEvent& inEvent );
00041     virtual OSStatus            StillTracking(TCarbonEvent&inEvent, HIPoint& from);
00042     virtual void                DrawStaticBackground(RgnHandle  inLimitRgn, CGContextRef inContext, bool  inCompositing );
00043     virtual void                CompatibleDraw(RgnHandle        inLimitRgn, CGContextRef inContext,bool  inCompositing );
00044     virtual void                TitleChanged();
00045     virtual void                ValueChanged();
00046 
00047         virtual OSStatus                SetData(OSType inTag, ControlPartCode inPart, Size inSize, const void* inPtr);
00048 
00049 protected:
00050     CGImageRef mImage;
00051     CGImageRef mBackImage;
00052     float mXOffset, mYOffset; // offset for knob on background
00053     float mMinAngle, mMaxAngle;
00054         bool mEndless;
00055         
00056         CFStringRef mImageName;
00057 };
00058 
00059 #endif // TKnobControl





Generated on Sat Jul 8 13:02:18 2006 for AUGUI Framework by doxygen1.4.6

hosted on SourceForge.net Logo