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 328d36c6e1..bea46f4a6f 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();
}
@@ -489,9 +493,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)
@@ -632,5 +636,13 @@ void LLToolTipMgr::getToolTipMessage(std::string & message)
}
}
+bool LLToolTipMgr::isTooltipPastable()
+{
+ if (toolTipVisible())
+ {
+ return mToolTip->isTooltipPastable();
+ }
+ return false;
+ }
// EOF