summaryrefslogtreecommitdiff
path: root/indra/llui/llclipboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llclipboard.h')
-rw-r--r--indra/llui/llclipboard.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index 8e417a490d..608ea246a7 100644
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -48,34 +48,38 @@ public:
LLClipboard();
~LLClipboard();
- /* We support two flavors of clipboard. The default is the explicitly
- copy-and-pasted clipboard. The second is the so-called 'primary' clipboard
- which is implicitly copied upon selection on platforms which expect this
- (i.e. X11/Linux). */
-
- // Text strings and single item management
- bool copyToClipboard(const LLWString& src, S32 pos, S32 len, bool use_primary = false);
- bool copyToClipboard(const LLUUID& src, const LLAssetType::EType type = LLAssetType::AT_NONE);
- bool pasteFromClipboard(LLWString& dst, bool use_primary = false);
- bool isTextAvailable(bool use_primary = false) const;
+ // Text strings management:
+ // ------------------------
+ // We support two flavors of text clipboards. The default is the explicitly
+ // copy-and-pasted clipboard. The second is the so-called 'primary' clipboard
+ // which is implicitly copied upon selection on platforms which expect this
+ // (i.e. X11/Linux, Mac).
+ bool copyToClipboard(const LLWString& src, S32 pos, S32 len, bool use_primary = false);
+ bool addToClipboard(const LLWString& src, S32 pos, S32 len, bool use_primary = false);
+ bool pasteFromClipboard(LLWString& dst, bool use_primary = false);
+ bool isTextAvailable(bool use_primary = false) const;
- // Object list management
- void add(const LLUUID& object); // Adds to the current list of objects on the clipboard
- void store(const LLUUID& object); // Stores a single inventory object
- void store(const LLDynamicArray<LLUUID>& inventory_objects); // Stores an array of objects
- void cut(const LLUUID& object); // Adds to the current list of cut objects on the clipboard
- void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const; // Gets a copy of the objects on the clipboard
- void reset(); // Clears the clipboard
+ // Object list management:
+ // -----------------------
+ // Clears the clipboard
+ void reset();
+ // Clears and adds one single object to the clipboard
+ bool copyToClipboard(const LLUUID& src, const LLAssetType::EType type = LLAssetType::AT_NONE);
+ // Adds one object to the current list of objects on the clipboard
+ bool addToClipboard(const LLUUID& src, const LLAssetType::EType type = LLAssetType::AT_NONE);
+ // Gets a copy of the objects on the clipboard
+ bool pasteFromClipboard(LLDynamicArray<LLUUID>& inventory_objects) const;
- BOOL hasContents() const; // true if the clipboard has something pasteable in it
+ bool hasContents() const; // True if the clipboard has pasteable objects
+ bool isOnClipboard(const LLUUID& object) const; // True if the input object uuid is on the clipboard
+
bool isCutMode() const { return mCutMode; }
void setCutMode(bool mode) { mCutMode = mode; }
- bool isOnClipboard(const LLUUID& object) const;
private:
LLDynamicArray<LLUUID> mObjects;
- bool mCutMode;
LLWString mString;
+ bool mCutMode; // This is a convenience flag for the viewer. It has no influence on the cliboard management.
};
#endif // LL_LLCLIPBOARD_H