summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.h
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2025-04-10 17:57:16 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2025-04-18 19:59:09 +0300
commit90c7684112714fd5ca2c8d73d8ca9bef3fc1e5d6 (patch)
tree6f85fb1bb4085388f3839d9135eee354632336b5 /indra/llui/llurlentry.h
parent3d5f1541dd9980196ba0c8a3c3396c8ed3384d1e (diff)
#3758 add support for highlighted segments
Diffstat (limited to 'indra/llui/llurlentry.h')
-rw-r--r--indra/llui/llurlentry.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index fffee88496..af5b8f5d83 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -34,6 +34,7 @@
#include "llavatarname.h"
#include "llhost.h" // for resolving parcel name by parcel id
+#include "llurlmatch.h"
#include <boost/signals2.hpp>
#include <boost/regex.hpp>
@@ -85,7 +86,7 @@ public:
virtual std::string getIcon(const std::string &url);
/// Return the style to render the displayed text
- virtual LLStyle::Params getStyle() const;
+ virtual LLStyle::Params getStyle(const std::string &url) const;
/// Given a matched Url, return a tooltip string for the hyperlink
virtual std::string getTooltip(const std::string &string) const { return mTooltip; }
@@ -96,11 +97,12 @@ public:
/// Return the name of a SL location described by this Url, if any
virtual std::string getLocation(const std::string &url) const { return ""; }
- /// Should this link text be underlined only when mouse is hovered over it?
- virtual bool underlineOnHoverOnly(const std::string &string) const { return false; }
+ virtual LLUrlMatch::EUnderlineLink getUnderline(const std::string& string) const { return LLUrlMatch::EUnderlineLink::UNDERLINE_ALWAYS; }
virtual bool isTrusted() const { return false; }
+ virtual bool getSkipProfileIcon(const std::string& string) const { return false; }
+
virtual LLUUID getID(const std::string &string) const { return LLUUID::null; }
bool isLinkDisabled() const;
@@ -109,6 +111,8 @@ public:
virtual bool isSLURLvalid(const std::string &url) const { return true; };
+ static void setAgentID(const LLUUID& id) { sAgentID = id; }
+
protected:
std::string getIDStringFromUrl(const std::string &url) const;
std::string escapeUrl(const std::string &url) const;
@@ -130,6 +134,8 @@ protected:
std::string mMenuName;
std::string mTooltip;
std::multimap<std::string, LLUrlEntryObserver> mObservers;
+
+ static LLUUID sAgentID;
};
///
@@ -224,9 +230,12 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getIcon(const std::string &url);
/*virtual*/ std::string getTooltip(const std::string &string) const;
- /*virtual*/ LLStyle::Params getStyle() const;
+ /*virtual*/ LLStyle::Params getStyle(const std::string &url) const;
/*virtual*/ LLUUID getID(const std::string &string) const;
- /*virtual*/ bool underlineOnHoverOnly(const std::string &string) const;
+
+ LLUrlMatch::EUnderlineLink getUnderline(const std::string& string) const;
+ bool getSkipProfileIcon(const std::string& string) const;
+
protected:
/*virtual*/ void callObservers(const std::string &id, const std::string &label, const std::string& icon);
private:
@@ -257,7 +266,7 @@ public:
mAvatarNameCacheConnections.clear();
}
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
- /*virtual*/ LLStyle::Params getStyle() const;
+ /*virtual*/ LLStyle::Params getStyle(const std::string &url) const;
protected:
// override this to pull out relevant name fields
virtual std::string getName(const LLAvatarName& avatar_name) = 0;
@@ -339,7 +348,7 @@ class LLUrlEntryGroup : public LLUrlEntryBase
public:
LLUrlEntryGroup();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
- /*virtual*/ LLStyle::Params getStyle() const;
+ /*virtual*/ LLStyle::Params getStyle(const std::string &url) const;
/*virtual*/ LLUUID getID(const std::string &string) const;
private:
void onGroupNameReceived(const LLUUID& id, const std::string& name, bool is_group);
@@ -411,17 +420,15 @@ public:
// Processes parcel label and triggers notifying observers.
static void processParcelInfo(const LLParcelData& parcel_data);
- // Next 4 setters are used to update agent and viewer connection information
+ // Next setters are used to update agent and viewer connection information
// upon events like user login, viewer disconnect and user changing region host.
// These setters are made public to be accessible from newview and should not be
// used in other cases.
- static void setAgentID(const LLUUID& id) { sAgentID = id; }
static void setSessionID(const LLUUID& id) { sSessionID = id; }
static void setRegionHost(const LLHost& host) { sRegionHost = host; }
static void setDisconnected(bool disconnected) { sDisconnected = disconnected; }
private:
- static LLUUID sAgentID;
static LLUUID sSessionID;
static LLHost sRegionHost;
static bool sDisconnected;
@@ -486,7 +493,7 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getUrl(const std::string &string) const;
/*virtual*/ std::string getTooltip(const std::string &string) const;
- /*virtual*/ bool underlineOnHoverOnly(const std::string &string) const;
+ LLUrlMatch::EUnderlineLink getUnderline(const std::string& string) const;
};
///
@@ -510,7 +517,7 @@ public:
LLUrlEntryNoLink();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getUrl(const std::string &string) const;
- /*virtual*/ LLStyle::Params getStyle() const;
+ /*virtual*/ LLStyle::Params getStyle(const std::string &url) const;
};
///