summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltooldraganddrop.h')
-rw-r--r--indra/newview/lltooldraganddrop.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 5d10daca4d..ad6402c4ad 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -48,15 +48,15 @@ public:
typedef boost::signals2::signal<void ()> enddrag_signal_t;
// overridden from LLTool
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleKey(KEY key, MASK mask) override;
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleKey(KEY key, MASK mask) override;
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask) override;
virtual void onMouseCaptureLost() override;
virtual void handleDeselect() override;
void setDragStart( S32 x, S32 y ); // In screen space
- BOOL isOverThreshold( S32 x, S32 y ); // In screen space
+ bool isOverThreshold( S32 x, S32 y ); // In screen space
enum ESource
{
@@ -87,14 +87,14 @@ public:
void setCargoCount(U32 count) { mCargoCount = count; }
void resetCargoCount() { mCargoCount = 0; }
- U32 getCargoCount() const { return (mCargoCount > 0) ? mCargoCount : mCargoIDs.size(); }
+ U32 getCargoCount() const { return (mCargoCount > 0) ? mCargoCount : static_cast<S32>(mCargoIDs.size()); }
S32 getCargoIndex() const { return mCurItemIndex; }
static S32 getOperationId() { return sOperationId; }
- // deal with permissions of object, etc. returns TRUE if drop can
- // proceed, otherwise FALSE.
- static BOOL handleDropMaterialProtections(LLViewerObject* hit_obj,
+ // deal with permissions of object, etc. returns true if drop can
+ // proceed, otherwise false.
+ static bool handleDropMaterialProtections(LLViewerObject* hit_obj,
LLInventoryItem* item,
LLToolDragAndDrop::ESource source,
const LLUUID& src_id);
@@ -112,14 +112,14 @@ protected:
protected:
// dragOrDrop3dImpl points to a member of LLToolDragAndDrop that
- // takes parameters (LLViewerObject* obj, S32 face, MASK, BOOL
- // drop) and returns a BOOL if drop is ok
+ // takes parameters (LLViewerObject* obj, S32 face, MASK, bool
+ // drop) and returns a bool if drop is ok
typedef EAcceptance (LLToolDragAndDrop::*dragOrDrop3dImpl)
- (LLViewerObject*, S32, MASK, BOOL);
+ (LLViewerObject*, S32, MASK, bool);
- void dragOrDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ void dragOrDrop(S32 x, S32 y, MASK mask, bool drop,
EAcceptance* acceptance);
- void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop,
+ void dragOrDrop3D(S32 x, S32 y, MASK mask, bool drop,
EAcceptance* acceptance);
static void pickCallback(const LLPickInfo& pick_info);
@@ -146,7 +146,7 @@ protected:
ECursorType mCursor;
EAcceptance mLastAccept;
- BOOL mDrop;
+ bool mDrop;
S32 mCurItemIndex;
std::string mToolTipMsg;
std::string mCustomMsg;
@@ -155,57 +155,57 @@ protected:
protected:
// 3d drop functions. these call down into the static functions
- // named drop<ThingToDrop> if drop is TRUE and permissions allow
+ // named drop<ThingToDrop> if drop is true and permissions allow
// that behavior.
- EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, BOOL);
+ EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, bool);
EAcceptance dad3dRezObjectOnLand(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezObjectOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezCategoryOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezScript(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dTextureObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dMaterialObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dMeshObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
// EAcceptance dad3dTextureSelf(LLViewerObject* obj, S32 face,
-// MASK mask, BOOL drop);
+// MASK mask, bool drop);
EAcceptance dad3dWearItem(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dWearCategory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dUpdateInventory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dUpdateInventoryCategory(LLViewerObject* obj,
S32 face,
MASK mask,
- BOOL drop);
+ bool drop);
EAcceptance dad3dGiveInventoryObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dGiveInventory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dGiveInventoryCategory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezFromObjectOnLand(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezFromObjectOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezAttachmentFromInv(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dCategoryOnLand(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dAssetOnLand(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dActivateGesture(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
// helper called by methods above to handle "application" of an item
// to an object (texture applied to face, mesh applied to shape, etc.)
- EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type);
+ EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type);
// set the LLToolDragAndDrop's cursor based on the given acceptance
@@ -222,9 +222,9 @@ protected:
// LLViewerInventoryItem::item_array_t& items);
void dropObject(LLViewerObject* raycast_target,
- BOOL bypass_sim_raycast,
- BOOL from_task_inventory,
- BOOL remove_from_inventory);
+ bool bypass_sim_raycast,
+ bool from_task_inventory,
+ bool remove_from_inventory);
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
@@ -232,15 +232,15 @@ protected:
public:
// helper functions
- static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); }
+ static bool isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); }
- BOOL dadUpdateInventory(LLViewerObject* obj, BOOL drop);
- BOOL dadUpdateInventoryCategory(LLViewerObject* obj, BOOL drop);
+ bool dadUpdateInventory(LLViewerObject* obj, bool drop);
+ bool dadUpdateInventoryCategory(LLViewerObject* obj, bool drop);
// methods that act on the simulator state.
static void dropScript(LLViewerObject* hit_obj,
LLInventoryItem* item,
- BOOL active,
+ bool active,
ESource source,
const LLUUID& src_id);
static void dropTexture(LLViewerObject* hit_obj,
@@ -291,7 +291,7 @@ public:
ESource source,
const LLUUID& src_id);
- static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, BOOL drop,
+ static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,