summaryrefslogtreecommitdiff
path: root/indra/llui/lliconctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lliconctrl.h')
-rw-r--r--indra/llui/lliconctrl.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index 50778cf226..ad0f6f563f 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -45,35 +45,37 @@ class LLUICtrlFactory;
//
// Classes
//
+
+//
class LLIconCtrl
: public LLUICtrl
{
public:
- LLIconCtrl(const std::string& name, const LLRect &rect, const LLUUID &image_id);
- LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name);
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<LLUIImage*> image;
+ Optional<LLUIColor> color;
+ Deprecated scale_image;
+ Params();
+ };
+protected:
+ LLIconCtrl(const Params&);
+ friend class LLUICtrlFactory;
+public:
virtual ~LLIconCtrl();
// llview overrides
virtual void draw();
- void setImage(const std::string& image_name);
- void setImage(const LLUUID& image_name);
- const LLUUID &getImage() const { return mImageID; }
- std::string getImageName() const { return mImageName; }
-
- // Takes a UUID, wraps get/setImage
+ // lluictrl overrides
virtual void setValue(const LLSD& value );
- virtual LLSD getValue() const;
- void setColor(const LLColor4& color) { mColor = color; }
+ std::string getImageName() const;
- virtual LLXMLNodePtr getXML(bool save_children = true) const;
- static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+ void setColor(const LLColor4& color) { mColor = color; }
private:
- LLColor4 mColor;
- std::string mImageName;
- LLUUID mImageID;
+ LLUIColor mColor;
LLPointer<LLUIImage> mImagep;
};