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

Go to the documentation of this file.
00001 /*
00002  *  TTextPopup.h
00003  *  Automat
00004  *
00005  *  Created by Stefan Kirch on Sun Jun 06 2004.
00006  *  Copyright (c) 2004 Stefan Kirch. All rights reserved.
00007  *
00008  */
00009 
00010 //  based on TImagePopup created by Chris Reed
00011 
00012 // -----------------------------------------------------------------------------
00013 
00014 #ifndef TTextPopup_H_
00015 #define TTextPopup_H_
00016 
00017 #include "TViewNoCompositingCompatible.h"
00018 
00019 // -----------------------------------------------------------------------------
00020 
00021 class TTextPopup:public TViewNoCompositingCompatible
00022 {
00023         AUGUIDefineControl(TTextPopup, TViewNoCompositingCompatible, "txtpop");
00024 
00025 public:
00026         // Control properties management
00027         virtual void SetProperty(OSType propID, double value);
00028         virtual void SetProperty(OSType propID, int32_t value);
00029         virtual void SetProperty(OSType propID, AUGUI::color_t &value);
00030         virtual void SetProperty(OSType propID, CFStringRef value);
00031         virtual void SetProperty(OSType propID, AUGUI::font_t & value);
00032         
00033         virtual bool GetProperty(OSType propID, double &value);
00034         virtual bool GetProperty(OSType propID, int32_t &value);
00035         virtual bool GetProperty(OSType propID, AUGUI::color_t &value);
00036         virtual bool GetProperty(OSType propID, CFStringRef &value);
00037         virtual bool GetProperty(OSType propID, AUGUI::font_t &value);
00038         
00039 protected:
00040         
00041         TTextPopup(HIViewRef inControl);
00042         virtual ~TTextPopup();
00043         
00044         virtual ControlKind             GetKind();
00045         
00046         virtual OSStatus                Initialize(TCarbonEvent& inEvent);
00047         
00048     virtual void                        DrawStaticBackground(RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing);
00049         virtual void                    CompatibleDraw(RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing);
00050         
00051         virtual ControlPartCode HitTest(const HIPoint&  inWhere);
00052         virtual OSStatus                HiliteChanged(ControlPartCode inOriginalPart, ControlPartCode inCurrentPart, RgnHandle inInvalRgn);
00053         virtual OSStatus                Track(TCarbonEvent& inEvent, ControlPartCode* outPart);
00054         
00055         virtual void                    TitleChanged();
00056         virtual void                    ValueChanged();
00057                 
00058         virtual OSStatus                SetData(OSType inTag, ControlPartCode inPart, Size inSize, const void* inPtr);
00059         virtual OSStatus                GetData(OSType inTag, ControlPartCode inPart, Size inSize, Size* outSize, void* inPtr);
00060         
00061 private:
00062         
00063         CGImageRef                      mBackImage;
00064         MenuRef                         mPopupMenu;
00065         CFStringRef                     mSelectedItemText;
00066         CFStringRef                     mFilenameBase;
00067         
00068         bool                            mDrawFrame;
00069         
00070         float                           mXoffset, mYoffset, mFontSize, mRed, mGreen, mBlue, mAlpha;
00071         int                                     mJustify;
00072         bool                            mSmoothFont;
00073         char                            mFontName[100];
00074 };
00075 
00076 #endif
00077 
00078 // -----------------------------------------------------------------------------
00079 





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

hosted on SourceForge.net Logo