Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TSliderControl.h

Go to the documentation of this file.
00001 /* 00002 * TSliderControl.h 00003 * Ritmo 00004 * 00005 * Created by Chris Reed on Mon Feb 03 2003. 00006 * Copyright (c) 2003 Chris Reed. All rights reserved. 00007 * 00008 */ 00009 00010 #if !defined(_TSliderControl_h_) 00011 #define _TSliderControl_h_ 00012 00013 #include "TViewNoCompositingCompatible.h" 00014 00016 #define kSliderControlDetentValueTag FOUR_CHAR_CODE('CDet') 00017 00020 #define kSliderControlDetentRangeTag FOUR_CHAR_CODE('RDet') 00021 00023 #define kSliderControlUseDetentTag FOUR_CHAR_CODE('UDet') 00024 00075 class TSliderControl : public TViewNoCompositingCompatible 00076 { 00077 friend class TViewNoCompositingCompatible; 00078 public: 00079 static CFStringRef GetControlName() { return CFSTR("slider"); } 00080 protected: 00081 // Contstructor/Destructor 00082 TSliderControl(HIViewRef inControl); 00083 virtual ~TSliderControl(); 00084 00085 virtual ControlKind GetKind(); 00086 00087 virtual bool UseNonblockingTracking() { return true; } 00088 00089 virtual OSStatus Initialize(TCarbonEvent& inEvent); 00090 virtual OSStatus StillTracking(TCarbonEvent&inEvent, HIPoint& from); 00091 virtual OSStatus StartTracking(TCarbonEvent&inEvent, HIPoint& from); 00092 virtual void DrawStaticBackground(RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing ); 00093 virtual void CompatibleDraw(RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing); 00094 virtual void TitleChanged(); 00095 virtual void ValueChanged(); 00096 virtual UInt32 GetBehaviors() { return TViewNoCompositingCompatible::GetBehaviors() | kControlSupportsEmbedding | kControlHasSpecialBackground; } 00097 00098 virtual OSStatus SetData(OSType inTag, ControlPartCode inPart, Size inSize, const void* inPtr); 00099 virtual OSStatus GetData(OSType inTag, ControlPartCode inPart, Size inSize, Size* outSize, void* inPtr); 00100 00101 protected: 00102 typedef enum { 00103 kHorizontalOrientation, 00104 kVerticalOrientation 00105 } SliderOrientation; 00106 00107 CGImageRef mThumbImage; 00108 CGImageRef mBackImage; 00109 float mXInset; 00110 float mTopInset; 00111 float mBottomInset; 00112 SliderOrientation mImageOrientation; 00113 bool mUseDetent; 00114 SInt32 mDetentValue; 00115 SInt32 mDetentRange; 00116 float mTotalDetentMoved; 00117 00118 virtual float ScaleX(); 00119 virtual float ScaleY(); 00120 SliderOrientation OrientationForRect(const TRect& theRect); 00121 TRect ScaledThumbBounds(); 00122 }; 00123 00124 00125 #endif // _TSliderControl_h_





Generated on Sun May 23 19:32:00 2004 for AUGUI Framework by doxygen1.3.7

hosted on SourceForge.net Logo