summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp222
1 files changed, 111 insertions, 111 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 62d3fa28bf..c70121364c 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -147,12 +147,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
LLUUID image_asset_id,
LLUUID default_image_asset_id,
LLUUID blank_image_asset_id,
- BOOL tentative,
- BOOL allow_no_texture,
+ bool tentative,
+ bool allow_no_texture,
const std::string& label,
PermissionMask immediate_filter_perm_mask,
PermissionMask dnd_filter_perm_mask,
- BOOL can_apply_immediately,
+ bool can_apply_immediately,
LLUIImagePtr fallback_image,
EPickInventoryType pick_type)
: LLFloater(LLSD()),
@@ -167,12 +167,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mLabel(label),
mTentativeLabel(NULL),
mResolutionLabel(NULL),
- mActive( TRUE ),
+ mActive( true ),
mFilterEdit(NULL),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mDnDFilterPermMask(dnd_filter_perm_mask),
mContextConeOpacity(0.f),
- mSelectedItemPinned( FALSE ),
+ mSelectedItemPinned( false ),
mCanApply(true),
mCanPreview(true),
mLimitsSet(false),
@@ -183,12 +183,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mOnFloaterCloseCallback(NULL),
mSetImageAssetIDCallback(NULL),
mOnUpdateImageStatsCallback(NULL),
- mBakeTextureEnabled(FALSE),
+ mBakeTextureEnabled(false),
mInventoryPickType(pick_type)
{
mCanApplyImmediately = can_apply_immediately;
buildFromFile("floater_texture_ctrl.xml");
- setCanMinimize(FALSE);
+ setCanMinimize(false);
}
LLFloaterTexturePicker::~LLFloaterTexturePicker()
@@ -199,7 +199,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
{
if( ((mImageAssetID != image_id) || mTentative) && mActive)
{
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
mImageAssetID = image_id;
@@ -241,7 +241,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
}
if (item_id.isNull())
{
- item_id = findItemID(mImageAssetID, FALSE);
+ item_id = findItemID(mImageAssetID, false);
}
if (item_id.isNull())
{
@@ -253,8 +253,8 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
// no copy texture
- getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
- mNoCopyTextureSelected = TRUE;
+ getChild<LLUICtrl>("apply_immediate_check")->setValue(false);
+ mNoCopyTextureSelected = true;
}
}
@@ -277,7 +277,7 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo
setImageID(asset_id, set_selection);
}
-void LLFloaterTexturePicker::setActive( BOOL active )
+void LLFloaterTexturePicker::setActive( bool active )
{
if (!active && getChild<LLUICtrl>("Pipette")->getValue().asBoolean())
{
@@ -286,7 +286,7 @@ void LLFloaterTexturePicker::setActive( BOOL active )
mActive = active;
}
-void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b)
+void LLFloaterTexturePicker::setCanApplyImmediately(bool b)
{
mCanApplyImmediately = b;
@@ -414,14 +414,14 @@ bool LLFloaterTexturePicker::updateImageStats()
}
// virtual
-BOOL LLFloaterTexturePicker::handleDragAndDrop(
+bool LLFloaterTexturePicker::handleDragAndDrop(
S32 x, S32 y, MASK mask,
- BOOL drop,
+ bool drop,
EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
bool is_mesh = cargo_type == DAD_MESH;
bool is_texture = cargo_type == DAD_TEXTURE;
@@ -445,9 +445,9 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
{
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+ bool copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ bool mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
PermissionMask item_perm_mask = 0;
@@ -476,13 +476,13 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
*accept = ACCEPT_NO;
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << LL_ENDL;
return handled;
}
-BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
{
LLFolderView* root_folder = mInventoryPanel->getRootFolder();
@@ -497,23 +497,23 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
LLFolderViewItem* itemp = mInventoryPanel->getItemByID(gInventory.getRootFolderID());
if (itemp)
{
- root_folder->setSelection(itemp, FALSE, FALSE);
+ root_folder->setSelection(itemp, false, false);
}
}
root_folder->scrollToShowSelection();
// move focus to inventory proper
- mInventoryPanel->setFocus(TRUE);
+ mInventoryPanel->setFocus(true);
// treat this as a user selection of the first filtered result
commitIfImmediateSet();
- return TRUE;
+ return true;
}
if (mInventoryPanel->hasFocus() && key == KEY_UP)
{
- mFilterEdit->focusFirstItem(TRUE);
+ mFilterEdit->focusFirstItem(true);
}
}
@@ -540,7 +540,7 @@ void LLFloaterTexturePicker::onClose(bool app_quitting)
}
// virtual
-BOOL LLFloaterTexturePicker::postBuild()
+bool LLFloaterTexturePicker::postBuild()
{
LLFloater::postBuild();
@@ -593,7 +593,7 @@ BOOL LLFloaterTexturePicker::postBuild()
// Disable auto selecting first filtered item because it takes away
// selection from the item set by LLTextureCtrl owning this floater.
- mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE);
+ mInventoryPanel->getRootFolder()->setAutoSelectOverride(true);
// Commented out to scroll to currently selected texture. See EXT-5403.
// // store this filter as the default one
@@ -607,7 +607,7 @@ BOOL LLFloaterTexturePicker::postBuild()
if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
{
- mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+ mInventoryPanel->setSelection(findItemID(mImageAssetID, false), TAKE_FOCUS_NO);
}
}
@@ -619,7 +619,7 @@ BOOL LLFloaterTexturePicker::postBuild()
mLocalScrollCtrl->setCommitCallback(onLocalScrollCommit, this);
refreshLocalList();
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
getChild<LLUICtrl>("apply_immediate_check")->setValue(mCanApplyImmediately && gSavedSettings.getBOOL("TextureLivePreview"));
childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this);
@@ -629,14 +629,14 @@ BOOL LLFloaterTexturePicker::postBuild()
childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this);
childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this);
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1));
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
- setBakeTextureEnabled(TRUE);
- return TRUE;
+ setBakeTextureEnabled(true);
+ return true;
}
// virtual
@@ -655,7 +655,7 @@ void LLFloaterTexturePicker::draw()
mPipetteBtn->setEnabled(mActive);
mPipetteBtn->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
- //BOOL allow_copy = FALSE;
+ //bool allow_copy = false;
if( mOwner )
{
mTexturep = NULL;
@@ -695,7 +695,7 @@ void LLFloaterTexturePicker::draw()
if (mTentativeLabel)
{
- mTentativeLabel->setVisible( FALSE );
+ mTentativeLabel->setVisible( false );
}
mDefaultBtn->setEnabled(mImageAssetID != mDefaultImageAssetID || mTentative);
@@ -711,7 +711,7 @@ void LLFloaterTexturePicker::draw()
// Border
LLRect border = getChildView("preview_widget")->getRect();
- gl_rect_2d( border, LLColor4::black, FALSE );
+ gl_rect_2d( border, LLColor4::black, false );
// Interior
@@ -748,7 +748,7 @@ void LLFloaterTexturePicker::draw()
}
else
{
- gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, true );
// Draw X
gl_draw_x(interior, LLColor4::black );
@@ -757,7 +757,7 @@ void LLFloaterTexturePicker::draw()
// Draw Tentative Label over the image
if( mTentative && !mViewModel->isDirty() )
{
- mTentativeLabel->setVisible( TRUE );
+ mTentativeLabel->setVisible( true );
drawChild(mTentativeLabel);
}
@@ -773,19 +773,19 @@ void LLFloaterTexturePicker::draw()
// After inventory panel filter is applied we have to update
// constraint rect for the selected item because of folder view
- // AutoSelectOverride set to TRUE. We force PinningSelectedItem
- // flag to FALSE state and setting filter "dirty" to update
+ // AutoSelectOverride set to true. We force PinningSelectedItem
+ // flag to false state and setting filter "dirty" to update
// scroll container to show selected item (see LLFolderView::doIdle()).
if (!is_filter_active && !mSelectedItemPinned)
{
folder_view->setPinningSelectedItem(mSelectedItemPinned);
folder_view->getViewModelItem()->dirtyFilter();
- mSelectedItemPinned = TRUE;
+ mSelectedItemPinned = true;
}
}
}
-const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
+const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library)
{
if (asset_id.isNull())
{
@@ -1019,7 +1019,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
void LLFloaterTexturePicker::onBtnPipette()
{
- BOOL pipette_active = getChild<LLUICtrl>("Pipette")->getValue().asBoolean();
+ bool pipette_active = getChild<LLUICtrl>("Pipette")->getValue().asBoolean();
pipette_active = !pipette_active;
if (pipette_active)
{
@@ -1031,13 +1031,13 @@ void LLFloaterTexturePicker::onBtnPipette()
}
}
-void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action)
{
if (items.size())
{
LLFolderViewItem* first_item = items.front();
LLInventoryItem* itemp = gInventory.getItem(static_cast<LLFolderViewModelItemInventory*>(first_item->getViewModelItem())->getUUID());
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
if (itemp)
{
if (!mTextureSelectedCallback.empty())
@@ -1046,7 +1046,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
}
if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
- mNoCopyTextureSelected = TRUE;
+ mNoCopyTextureSelected = true;
}
setImageIDFromItem(itemp, false);
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
@@ -1110,7 +1110,7 @@ void LLFloaterTexturePicker::onBtnRemove(void* userdata)
LLScrollListItem* list_item = *iter;
if (list_item)
{
- LLSD data = self->mLocalScrollCtrl->getFirstSelected()->getValue();
+ LLSD data = list_item->getValue();
LLUUID tracking_id = data["id"];
S32 asset_type = data["type"].asInteger();
@@ -1328,7 +1328,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
return;
}
- mSavedFolderState.setApply(TRUE);
+ mSavedFolderState.setApply(true);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
// add folder with current item to list of previously opened folders
LLOpenFoldersWithSelection opener;
@@ -1341,7 +1341,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
// first letter in search term, save existing folder open state
if (!mInventoryPanel->getFilter().isNotDefault())
{
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
}
}
@@ -1353,19 +1353,19 @@ void LLFloaterTexturePicker::changeMode()
{
int index = mModeSelector->getValue().asInteger();
- mDefaultBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mBlankBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mNoneBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mFilterEdit->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mInventoryPanel->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
+ mDefaultBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mBlankBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mNoneBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mFilterEdit->setVisible(index == PICKER_INVENTORY ? true : false);
+ mInventoryPanel->setVisible(index == PICKER_INVENTORY ? true : false);
- getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
+ getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL ? true : false);
- getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? TRUE : FALSE);
- getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
+ getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? true : false);
+ getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// index == 2 ? true : false);
bool pipette_visible = (index == PICKER_INVENTORY)
&& (mInventoryPickType != PICK_MATERIAL);
@@ -1423,7 +1423,7 @@ void LLFloaterTexturePicker::changeMode()
val = 10;
}
- getChild<LLComboBox>("l_bake_use_texture_combo_box")->setSelectedByValue(val, TRUE);
+ getChild<LLComboBox>("l_bake_use_texture_combo_box")->setSelectedByValue(val, true);
}
}
@@ -1469,14 +1469,14 @@ void LLFloaterTexturePicker::refreshInventoryFilter()
mInventoryPanel->setFilterTypes(filter_types);
}
-void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled)
+void LLFloaterTexturePicker::setLocalTextureEnabled(bool enabled)
{
mModeSelector->setEnabledByValue(1, enabled);
}
-void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
+void LLFloaterTexturePicker::setBakeTextureEnabled(bool enabled)
{
- BOOL changed = (enabled != mBakeTextureEnabled);
+ bool changed = (enabled != mBakeTextureEnabled);
mBakeTextureEnabled = enabled;
mModeSelector->setEnabledByValue(2, enabled);
@@ -1584,10 +1584,10 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& fi
void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
{
- LLUUID inventory_item_id = findItemID(te.getID(), TRUE);
+ LLUUID inventory_item_id = findItemID(te.getID(), true);
if (inventory_item_id.notNull())
{
- LLToolPipette::getInstance()->setResult(TRUE, "");
+ LLToolPipette::getInstance()->setResult(true, "");
if (mInventoryPickType == PICK_MATERIAL)
{
// tes have no data about material ids
@@ -1600,20 +1600,20 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
setImageID(te.getID());
}
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
// no copy texture
- mNoCopyTextureSelected = TRUE;
+ mNoCopyTextureSelected = true;
}
commitIfImmediateSet();
}
else
{
- LLToolPipette::getInstance()->setResult(FALSE, LLTrans::getString("InventoryNoTexture"));
+ LLToolPipette::getInstance()->setResult(false, LLTrans::getString("InventoryNoTexture"));
}
}
@@ -1631,12 +1631,12 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mOnSelectCallback(NULL),
mBorderColor( p.border_color() ),
mAllowNoTexture( p.allow_no_texture ),
- mAllowLocalTexture( TRUE ),
+ mAllowLocalTexture( true ),
mImmediateFilterPermMask( PERM_NONE ),
- mCanApplyImmediately( FALSE ),
- mNeedsRawImageData( FALSE ),
- mValid( TRUE ),
- mShowLoadingPlaceholder( TRUE ),
+ mCanApplyImmediately( false ),
+ mNeedsRawImageData( false ),
+ mValid( true ),
+ mShowLoadingPlaceholder( true ),
mOpenTexPreview(false),
mBakeTextureEnabled(true),
mInventoryPickType(PICK_TEXTURE),
@@ -1697,7 +1697,7 @@ LLTextureCtrl::~LLTextureCtrl()
closeDependentFloater();
}
-void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder)
+void LLTextureCtrl::setShowLoadingPlaceholder(bool showLoadingPlaceholder)
{
mShowLoadingPlaceholder = showLoadingPlaceholder;
}
@@ -1707,7 +1707,7 @@ void LLTextureCtrl::setCaption(const std::string& caption)
mCaption->setText( caption );
}
-void LLTextureCtrl::setCanApplyImmediately(BOOL b)
+void LLTextureCtrl::setCanApplyImmediately(bool b)
{
mCanApplyImmediately = b;
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
@@ -1743,7 +1743,7 @@ void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask)
setDnDFilterPermMask(mask);
}
-void LLTextureCtrl::setVisible( BOOL visible )
+void LLTextureCtrl::setVisible( bool visible )
{
if( !visible )
{
@@ -1752,7 +1752,7 @@ void LLTextureCtrl::setVisible( BOOL visible )
LLUICtrl::setVisible( visible );
}
-void LLTextureCtrl::setEnabled( BOOL enabled )
+void LLTextureCtrl::setEnabled( bool enabled )
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( floaterp )
@@ -1778,7 +1778,7 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
LLView::setEnabled( enabled );
}
-void LLTextureCtrl::setValid(BOOL valid )
+void LLTextureCtrl::setValid(bool valid )
{
mValid = valid;
if (!valid)
@@ -1786,7 +1786,7 @@ void LLTextureCtrl::setValid(BOOL valid )
LLFloaterTexturePicker* pickerp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (pickerp)
{
- pickerp->setActive(FALSE);
+ pickerp->setActive(false);
}
}
}
@@ -1804,7 +1804,7 @@ void LLTextureCtrl::setLabel(const std::string& label)
mCaption->setText(label);
}
-void LLTextureCtrl::showPicker(BOOL take_focus)
+void LLTextureCtrl::showPicker(bool take_focus)
{
// show hourglass cursor when loading inventory window
// because inventory construction is slooow
@@ -1867,7 +1867,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
if (take_focus)
{
- floaterp->setFocus(TRUE);
+ floaterp->setFocus(true);
}
}
@@ -1878,7 +1878,7 @@ void LLTextureCtrl::closeDependentFloater()
if( floaterp && floaterp->isInVisibleChain())
{
floaterp->setOwner(NULL);
- floaterp->setVisible(FALSE);
+ floaterp->setVisible(false);
floaterp->closeFloater();
}
}
@@ -1897,22 +1897,22 @@ public:
}
};
-BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(mBorder->parentPointInView(x,y) ? UI_CURSOR_HAND : UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
-BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleMouseDown( x, y , mask );
+ bool handled = LLUICtrl::handleMouseDown( x, y , mask );
if (!handled && mBorder->parentPointInView(x, y))
{
if (!mOpenTexPreview)
{
- showPicker(FALSE);
+ showPicker(false);
if (mInventoryPickType == PICK_MATERIAL)
{
//grab materials first...
@@ -1928,7 +1928,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLInventoryModelBackgroundFetch::instance().start();
}
- handled = TRUE;
+ handled = true;
}
else
{
@@ -1983,7 +1983,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co
if(floaterp->isDirty() || asset_id.notNull()) // mModelView->setDirty does not work.
{
- setTentative( FALSE );
+ setTentative( false );
switch(source)
{
@@ -2004,7 +2004,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co
break;
case PICKER_UNKNOWN:
default:
- mImageItemID = floaterp->findItemID(asset_id, FALSE);
+ mImageItemID = floaterp->findItemID(asset_id, false);
mImageAssetID = asset_id;
mLocalTrackingID.setNull();
break;
@@ -2094,12 +2094,12 @@ void LLTextureCtrl::setInventoryPickType(EPickInventoryType type)
}
}
-BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+bool LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
// this downcast may be invalid - but if the second test below
// returns true, then the cast was valid, and we can perform
@@ -2135,7 +2135,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
// This removes the 'Multiple' overlay, since
// there is now only one texture selected.
- setTentative( FALSE );
+ setTentative( false );
onCommit();
}
}
@@ -2147,7 +2147,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
*accept = ACCEPT_NO;
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL;
return handled;
@@ -2188,7 +2188,7 @@ void LLTextureCtrl::draw()
}
else
{
- texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
texture->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
texture->forceToSaveRawImage(0);
}
@@ -2203,7 +2203,7 @@ void LLTextureCtrl::draw()
// Border
LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL );
- gl_rect_2d( border, mBorderColor.get(), FALSE );
+ gl_rect_2d( border, mBorderColor.get(), false );
// Interior
LLRect interior = border;
@@ -2227,7 +2227,7 @@ void LLTextureCtrl::draw()
}
else
{
- gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, true );
// Draw X
gl_draw_x( interior, LLColor4::black );
@@ -2240,7 +2240,7 @@ void LLTextureCtrl::draw()
// fully loaded.
if (mTexturep.notNull() &&
(!mTexturep->isFullyLoaded()) &&
- (mShowLoadingPlaceholder == TRUE))
+ (mShowLoadingPlaceholder == true))
{
U32 v_offset = 25;
LLFontGL* font = LLFontGL::getFontSansSerif();
@@ -2286,11 +2286,11 @@ void LLTextureCtrl::draw()
LLUICtrl::draw();
}
-BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg)
+bool LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg)
{
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+ bool copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ bool mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
PermissionMask item_perm_mask = 0;
@@ -2307,7 +2307,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type
}
else
{
- return TRUE;
+ return true;
}
}
else
@@ -2318,16 +2318,16 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type
{
tooltip_msg.assign(LLTrans::getString("TooltipTextureRestrictedDrop"));
}
- return FALSE;
+ return false;
}
}
-BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
+bool LLTextureCtrl::doDrop(LLInventoryItem* item)
{
// call the callback if it exists.
if(mDropCallback)
{
- // if it returns TRUE, we return TRUE, and therefore the
+ // if it returns true, we return true, and therefore the
// commit is called above.
return mDropCallback(this, item);
}
@@ -2343,15 +2343,15 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
setImageAssetID(asset_id);
mImageItemID = item->getUUID();
- return TRUE;
+ return true;
}
-BOOL LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if( ' ' == uni_char )
{
- showPicker(TRUE);
- return TRUE;
+ showPicker(true);
+ return true;
}
return LLUICtrl::handleUnicodeCharHere(uni_char);
}