diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-11 22:55:32 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-11 22:55:32 +0200 |
commit | db3991ca235f3ceefe888d03758cac5eccf1b552 (patch) | |
tree | c4712870f33c4b0fdcc13959ba2f940aa396b6b2 /indra/llui/lltooltip.h | |
parent | 2fd51b4c711aa7ab70da6d7e7dfcb380b87cbedf (diff) | |
parent | b34ee7f9f405e25ac606a16435ed49c7187387d8 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/lltooltip.h')
-rw-r--r-- | indra/llui/lltooltip.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index 774ca507c1..8c8fdf0a4c 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -37,6 +37,7 @@ #include "llsingleton.h" #include "llinitparam.h" #include "llpanel.h" +#include "llstyle.h" // // Classes @@ -65,11 +66,19 @@ public: class LLToolTip : public LLPanel { public: + + struct StyledText : public LLInitParam::Block<StyledText> + { + Mandatory<std::string> text; + Optional<LLStyle::Params> style; + }; + struct Params : public LLInitParam::Block<Params, LLPanel::Params> { typedef boost::function<void(void)> click_callback_t; - Mandatory<std::string> message; + Optional<std::string> message; + Multiple<StyledText> styled_message; Optional<LLCoordGL> pos; Optional<F32> delay_time, @@ -85,8 +94,8 @@ public: Optional<click_callback_t> click_callback, click_playmedia_callback, click_homepage_callback; - Optional<S32> max_width; - Optional<S32> padding; + Optional<S32> max_width, + padding; Optional<bool> wrap; Params(); @@ -94,7 +103,6 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - /*virtual*/ void setValue(const LLSD& value); /*virtual*/ void setVisible(BOOL visible); bool isFading(); @@ -102,6 +110,7 @@ public: bool hasClickCallback(); LLToolTip(const Params& p); + void initFromParams(const LLToolTip::Params& params); private: class LLTextBox* mTextBox; @@ -111,7 +120,6 @@ private: LLFrameTimer mFadeTimer; LLFrameTimer mVisibleTimer; - S32 mMaxWidth; bool mHasClickCallback; S32 mPadding; // pixels }; |