lliconctrl.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLICONCTRL_H
00033 #define LL_LLICONCTRL_H
00034 
00035 #include "lluuid.h"
00036 #include "v4color.h"
00037 #include "lluictrl.h"
00038 #include "stdenums.h"
00039 #include "llimagegl.h"
00040 
00041 class LLTextBox;
00042 class LLUICtrlFactory;
00043 
00044 //
00045 // Classes
00046 //
00047 class LLIconCtrl
00048 : public LLUICtrl
00049 {
00050 public:
00051         LLIconCtrl(const LLString& name, const LLRect &rect, const LLUUID &image_id);
00052         LLIconCtrl(const LLString& name, const LLRect &rect, const LLString &image_name);
00053         virtual ~LLIconCtrl();
00054 
00055         // llview overrides
00056         virtual void    draw();
00057 
00058         void                    setImage(const LLString& image_name);
00059         void                    setImage(const LLUUID& image_name);
00060         const LLUUID    &getImage() const                                               { return mImageID; }
00061         LLString                getImageName() const                                            { return mImageName; }
00062 
00063         // Takes a UUID, wraps get/setImage
00064         virtual void    setValue(const LLSD& value );
00065         virtual LLSD    getValue() const;
00066 
00067         void                    setColor(const LLColor4& color) { mColor = color; }
00068 
00069         virtual LLXMLNodePtr getXML(bool save_children = true) const;
00070         static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
00071 
00072 private:
00073         LLColor4                mColor;
00074         LLString                mImageName;
00075         LLUUID                  mImageID;
00076         LLPointer<LLUIImage>    mImagep;
00077 };
00078 
00079 #endif

Generated on Fri May 16 08:32:52 2008 for SecondLife by  doxygen 1.5.5