summaryrefslogtreecommitdiff
path: root/indra/llui/lltooltip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltooltip.cpp')
-rw-r--r--indra/llui/lltooltip.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index a6552d4ff1..75fc86b226 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -154,7 +154,8 @@ LLToolTip::Params::Params()
text_color("text_color"),
time_based_media("time_based_media", false),
web_based_media("web_based_media", false),
- media_playing("media_playing", false)
+ media_playing("media_playing", false),
+ allow_paste_tooltip("allow_paste_tooltip", false)
{
changeDefault(chrome, true);
}
@@ -167,7 +168,8 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
mTextBox(NULL),
mInfoButton(NULL),
mPlayMediaButton(NULL),
- mHomePageButton(NULL)
+ mHomePageButton(NULL),
+ mIsTooltipPastable(p.allow_paste_tooltip)
{
LLTextBox::Params params;
params.name = params.initial_value().asString();
@@ -289,6 +291,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
mTextBox->setText(p.message());
}
+ mIsTooltipPastable = p.allow_paste_tooltip;
+
updateTextBox();
snapToChildren();
}
@@ -483,9 +487,9 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params)
}
-void LLToolTipMgr::show(const std::string& msg)
+void LLToolTipMgr::show(const std::string& msg, bool allow_paste_tooltip)
{
- show(LLToolTip::Params().message(msg));
+ show(LLToolTip::Params().message(msg).allow_paste_tooltip(allow_paste_tooltip));
}
void LLToolTipMgr::show(const LLToolTip::Params& params)
@@ -626,5 +630,13 @@ void LLToolTipMgr::getToolTipMessage(std::string & message)
}
}
+bool LLToolTipMgr::isTooltipPastable()
+{
+ if (toolTipVisible())
+ {
+ return mToolTip->isTooltipPastable();
+ }
+ return false;
+ }
// EOF