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         virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_ICON; }
00055         virtual LLString getWidgetTag() const { return LL_ICON_CTRL_TAG; }
00056 
00057         // llview overrides
00058         virtual void    draw();
00059 
00060         void                    setImage(const LLUUID &image_id);
00061         const LLUUID    &getImage() const                                               { return mImageID; }
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 protected:
00073         LLColor4                mColor;
00074         LLString                mImageName;
00075         LLUUID                  mImageID;
00076         LLPointer<LLImageGL>    mImagep;
00077 };
00078 
00079 #endif

Generated on Thu Jul 1 06:08:43 2010 for Second Life Viewer by  doxygen 1.4.7