From 06d5706cdcc690c713dcd832a878e830afbb4a59 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 1 Dec 2009 22:30:04 +0200 Subject: Implemented normal sub-task EXT-2478(Implement a chiclet for the llGiveInventory() processing) --HG-- branch : product-engine --- indra/newview/llchiclet.h | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ed4bcbc6ac..c75ad2b546 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -147,6 +147,39 @@ protected: std::string mDefaultIcon; }; +/** + * Class for displaying icon in inventory offer chiclet. + */ +class LLChicletInvOfferIconCtrl : public LLChicletAvatarIconCtrl +{ +public: + + struct Params : + public LLInitParam::Block + { + Optional default_icon; + + Params() + : default_icon("default_icon", "Generic_Object_Small") + { + avatar_id = LLUUID::null; + }; + }; + + /** + * Sets icon, if value is LLUUID::null - default icon will be set. + */ + virtual void setValue(const LLSD& value ); + +protected: + + LLChicletInvOfferIconCtrl(const Params& p); + friend class LLUICtrlFactory; + +private: + std::string mDefaultIcon; +}; + /** * Class for displaying of speaker's voice indicator */ @@ -584,6 +617,45 @@ private: LLIconCtrl* mChicletIconCtrl; }; +/** + * Chiclet for inventory offer script floaters. + */ +class LLInvOfferChiclet: public LLIMChiclet +{ +public: + + struct Params : public LLInitParam::Block + { + Optional icon; + + Params(); + }; + + /*virtual*/ void setSessionId(const LLUUID& session_id); + + /*virtual*/ void setCounter(S32 counter){} + + /*virtual*/ S32 getCounter() { return 0; } + + /** + * Toggle script floater + */ + /*virtual*/ void onMouseDown(); + + /** + * Override default handler + */ + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + + +protected: + LLInvOfferChiclet(const Params&); + friend class LLUICtrlFactory; + +private: + LLChicletInvOfferIconCtrl* mChicletIconCtrl; +}; + /** * Implements Group chat chiclet. */ -- cgit v1.2.3