diff options
author | Merov Linden <merov@lindenlab.com> | 2012-02-07 22:46:04 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-02-07 22:46:04 -0800 |
commit | ee3c3c15b714f8f68e98a2d4064afaec665bd64a (patch) | |
tree | a75780d299d9cff782186107bebc7e193046de11 /indra/llui/llclipboard.h | |
parent | c744603af9b53c6bc73fefbd56de68cf2778ed70 (diff) |
EXP-1841 : Final deep scrub on LLClipboard API, clean up the use of copy and cut everywhere.
Diffstat (limited to 'indra/llui/llclipboard.h')
-rw-r--r-- | indra/llui/llclipboard.h | 44 |
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 |