diff options
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 314 |
1 files changed, 157 insertions, 157 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index bc9469cfad..76d926f922 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -128,18 +128,18 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mSuffixNeedsRefresh(false), mLabelPaddingRight(DEFAULT_LABEL_PADDING_RIGHT), mParentFolder( NULL ), - mIsSelected( FALSE ), - mIsCurSelection( FALSE ), - mSelectPending(FALSE), + mIsSelected( false ), + mIsCurSelection( false ), + mSelectPending(false), mIsItemCut(false), mCutGeneration(0), mLabelStyle( LLFontGL::NORMAL ), - mHasVisibleChildren(FALSE), + mHasVisibleChildren(false), mLocalIndentation(p.folder_indentation), mIndentation(0), mItemHeight(p.item_height), mControlLabelRotation(0.f), - mDragAndDropTarget(FALSE), + mDragAndDropTarget(false), mLabel(p.name), mRoot(p.root), mViewModelItem(p.listener), @@ -185,7 +185,7 @@ LLFolderViewItem::~LLFolderViewItem() gFocusMgr.removeKeyboardFocusWithoutCallback(this); } -BOOL LLFolderViewItem::postBuild() +bool LLFolderViewItem::postBuild() { LLFolderViewModelItem& vmi = *getViewModelItem(); // getDisplayName() is expensive (due to internal getLabelSuffix() and name building) @@ -203,7 +203,7 @@ BOOL LLFolderViewItem::postBuild() // while LLFolderViewItem::arrange() updates visual part mSuffixNeedsRefresh = true; mLabelWidthDirty = true; - return TRUE; + return true; } LLFolderView* LLFolderViewItem::getRoot() @@ -216,21 +216,21 @@ const LLFolderView* LLFolderViewItem::getRoot() const return mRoot; } // Returns true if this object is a child (or grandchild, etc.) of potential_ancestor. -BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor ) +bool LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor ) { LLFolderViewItem* root = this; while( root->mParentFolder ) { if( root->mParentFolder == potential_ancestor ) { - return TRUE; + return true; } root = root->mParentFolder; } - return FALSE; + return false; } -LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children) +LLFolderViewItem* LLFolderViewItem::getNextOpenNode(bool include_children) { if (!mParentFolder) { @@ -252,7 +252,7 @@ LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children) return itemp; } -LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) +LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(bool include_children) { if (!mParentFolder) { @@ -276,19 +276,19 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) return itemp; } -BOOL LLFolderViewItem::passedFilter(S32 filter_generation) +bool LLFolderViewItem::passedFilter(S32 filter_generation) { return getViewModelItem()->passedFilter(filter_generation); } -BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation) +bool LLFolderViewItem::isPotentiallyVisible(S32 filter_generation) { if (filter_generation < 0) { filter_generation = getFolderViewModel()->getFilter().getFirstSuccessGeneration(); } LLFolderViewModelItem* model = getViewModelItem(); - BOOL visible = model->passedFilter(filter_generation); + bool visible = model->passedFilter(filter_generation); if (model->getMarkedDirtyGeneration() >= filter_generation) { // unsure visibility state @@ -348,8 +348,8 @@ void LLFolderViewItem::refreshSuffix() } // Utility function for LLFolderView -void LLFolderViewItem::arrangeAndSet(BOOL set_selection, - BOOL take_keyboard_focus) +void LLFolderViewItem::arrangeAndSet(bool set_selection, + bool take_keyboard_focus) { LLFolderView* root = getRoot(); if (getParentFolder()) @@ -358,7 +358,7 @@ void LLFolderViewItem::arrangeAndSet(BOOL set_selection, } if(set_selection) { - getRoot()->setSelection(this, TRUE, take_keyboard_focus); + getRoot()->setSelection(this, true, take_keyboard_focus); if(root) { root->scrollToShowSelection(); @@ -373,7 +373,7 @@ std::set<LLFolderViewItem*> LLFolderViewItem::getSelectionList() const return selection; } -// addToFolder() returns TRUE if it succeeds. FALSE otherwise +// addToFolder() returns true if it succeeds. false otherwise void LLFolderViewItem::addToFolder(LLFolderViewFolder* folder) { folder->addItem(this); @@ -443,7 +443,7 @@ S32 LLFolderViewItem::getTextPad() // means 'deselect' for a leaf item. Do this optimization after // multiple selection is implemented to make sure it all plays nice // together. -BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) +bool LLFolderViewItem::setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus) { if (selection == this && !mIsSelected) { @@ -456,7 +456,7 @@ BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, return mIsSelected; } -BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected) +bool LLFolderViewItem::changeSelection(LLFolderViewItem* selection, bool selected) { if (selection == this) { @@ -468,31 +468,31 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte { selectItem(); } - return TRUE; + return true; } - return FALSE; + return false; } void LLFolderViewItem::deselectItem(void) { - mIsSelected = FALSE; + mIsSelected = false; } void LLFolderViewItem::selectItem(void) { - if (mIsSelected == FALSE) + if (mIsSelected == false) { - mIsSelected = TRUE; + mIsSelected = true; getViewModelItem()->selectItem(); } } -BOOL LLFolderViewItem::isMovable() +bool LLFolderViewItem::isMovable() { return getViewModelItem()->isItemMovable(); } -BOOL LLFolderViewItem::isRemovable() +bool LLFolderViewItem::isRemovable() { return getViewModelItem()->isItemRemovable(); } @@ -511,12 +511,12 @@ void LLFolderViewItem::destroyView() // Call through to the viewed object and return true if it can be // removed. -//BOOL LLFolderViewItem::removeRecursively(BOOL single_item) -BOOL LLFolderViewItem::remove() +//bool LLFolderViewItem::removeRecursively(bool single_item) +bool LLFolderViewItem::remove() { if(!isRemovable()) { - return FALSE; + return false; } return getViewModelItem()->removeItem(); } @@ -550,21 +550,21 @@ const std::string& LLFolderViewItem::getName( void ) const } // LLView functionality -BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask ) +bool LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask ) { if(!mIsSelected) { - getRoot()->setSelection(this, FALSE); + getRoot()->setSelection(this, false); } make_ui_sound("UISndClick"); - return TRUE; + return true; } -BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) +bool LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) { if (LLView::childrenHandleMouseDown(x, y, mask)) { - return TRUE; + return true; } // No handler needed for focus lost since this class has no @@ -583,7 +583,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) } else { - getRoot()->setSelection(this, FALSE); + getRoot()->setSelection(this, false); } make_ui_sound("UISndClick"); } @@ -591,15 +591,15 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) { // If selected, we reserve the decision of deselecting/reselecting to the mouse up moment. // This is necessary so we maintain selection consistent when starting a drag. - mSelectPending = TRUE; + mSelectPending = true; } mDragStartX = x; mDragStartY = y; - return TRUE; + return true; } -BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) +bool LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::getInstance()->mSettingGroups["config"],"DragAndDropDistanceThreshold", 3); @@ -616,7 +616,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { // RN: when starting drag and drop, clear out last auto-open root->autoOpenTest(NULL); - root->setShowSelectionContext(TRUE); + root->setShowSelectionContext(true); // Release keyboard focus, so that if stuff is dropped into the // world, pressing the delete key won't blow away the inventory @@ -631,31 +631,31 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) } root->clearHoveredItem(); - return TRUE; + return true; } else { LLFolderView* pRoot = getRoot(); pRoot->setHoveredItem(this); - pRoot->setShowSelectionContext(FALSE); + pRoot->setShowSelectionContext(false); getWindow()->setCursor(UI_CURSOR_ARROW); // let parent handle this then... - return FALSE; + return false; } } -BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask ) +bool LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask ) { openItem(); - return TRUE; + return true; } -BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) +bool LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) { if (LLView::childrenHandleMouseUp(x, y, mask)) { - return TRUE; + return true; } // if mouse hasn't moved since mouse down... @@ -672,21 +672,21 @@ BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) } else { - getRoot()->setSelection(this, FALSE); + getRoot()->setSelection(this, false); } } - mSelectPending = FALSE; + mSelectPending = false; if( hasMouseCapture() ) { if (getRoot()) { - getRoot()->setShowSelectionContext(FALSE); + getRoot()->setShowSelectionContext(false); } gFocusMgr.setMouseCapture( NULL ); } - return TRUE; + return true; } void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask) @@ -701,18 +701,18 @@ void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask) } } -BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFolderViewItem::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 accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); + bool handled = false; + bool accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); handled = accepted; if (accepted) { - mDragAndDropTarget = TRUE; + mDragAndDropTarget = true; *accept = ACCEPT_YES_MULTI; } else @@ -773,7 +773,7 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L return mIsItemCut; } -void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, +void LLFolderViewItem::drawHighlight(const bool showContent, const bool hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &focusOutlineColor, const LLUIColor &mouseOverColor) { const S32 focus_top = getRect().getHeight(); @@ -787,7 +787,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo //--------------------------------------------------------------------------------// // Draw highlight for selected items // Note: Always render "current" item or flashing item, only render other selected - // items if mShowSingleSelection is FALSE. + // items if mShowSingleSelection is false. // if (isHighlightAllowed()) @@ -831,7 +831,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo focus_top, getRect().getWidth() - 2, focus_bottom, - focusOutlineColor, FALSE); + focusOutlineColor, false); } if (folder_open) @@ -840,14 +840,14 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo focus_bottom + 1, // overlap with bottom edge of above rect getRect().getWidth() - 2, 0, - focusOutlineColor, FALSE); + focusOutlineColor, false); if (showContent && !isFlashing()) { gl_rect_2d(FOCUS_LEFT, focus_bottom + 1, getRect().getWidth() - 2, 0, - bgColor, TRUE); + bgColor, true); } } } @@ -857,7 +857,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo focus_top, getRect().getWidth() - 2, focus_bottom, - mouseOverColor, FALSE); + mouseOverColor, false); } //--------------------------------------------------------------------------------// @@ -870,16 +870,16 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo focus_top, getRect().getWidth() - 2, focus_bottom, - bgColor, FALSE); + bgColor, false); if (folder_open) { gl_rect_2d(FOCUS_LEFT, focus_bottom + 1, // overlap with bottom edge of above rect getRect().getWidth() - 2, 0, - bgColor, FALSE); + bgColor, false); } - mDragAndDropTarget = FALSE; + mDragAndDropTarget = false; } } @@ -890,13 +890,13 @@ void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y // font->renderUTF8(mLabel, 0, x, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, /*use_ellipses*/TRUE); + S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, /*use_ellipses*/true); } void LLFolderViewItem::draw() { - const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); - const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled + const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false); + const bool filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : false); // If we have keyboard focus, draw selection filled const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); const S32 TOP_PAD = default_params.item_top_pad; @@ -1069,8 +1069,8 @@ bool LLFolderViewItem::isInSelection() const LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): LLFolderViewItem( p ), - mIsOpen(FALSE), - mExpanderHighlighted(FALSE), + mIsOpen(false), + mExpanderHighlighted(false), mCurHeight(0.f), mTargetHeight(0.f), mAutoOpenCountdown(0.f), @@ -1105,7 +1105,7 @@ LLFolderViewFolder::~LLFolderViewFolder( void ) gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() } -// addToFolder() returns TRUE if it succeeds. FALSE otherwise +// addToFolder() returns true if it succeeds. false otherwise void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) { folder->addFolder(this); @@ -1265,7 +1265,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) > ll_round(mCurHeight) + mMaxFolderItemOverlap) { // hide if beyond current folder height - (*fit)->setVisible(FALSE); + (*fit)->setVisible(false); } } @@ -1277,7 +1277,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) if (getRect().getHeight() - (*iit)->getRect().mBottom > ll_round(mCurHeight) + mMaxFolderItemOverlap) { - (*iit)->setVisible(FALSE); + (*iit)->setVisible(false); } } } @@ -1295,7 +1295,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) return ll_round(mTargetHeight); } -BOOL LLFolderViewFolder::needsArrange() +bool LLFolderViewFolder::needsArrange() { return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); } @@ -1307,17 +1307,17 @@ bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation) // Passes selection information on to children and record selection // information if necessary. -BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus) +bool LLFolderViewFolder::setSelection(LLFolderViewItem* selection, bool openitem, + bool take_keyboard_focus) { - BOOL rv = FALSE; + bool rv = false; if (selection == this) { if (!isSelected()) { selectItem(); } - rv = TRUE; + rv = true; } else { @@ -1325,9 +1325,9 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem { deselectItem(); } - rv = FALSE; + rv = false; } - BOOL child_selected = FALSE; + bool child_selected = false; for (folders_t::iterator iter = mFolders.begin(); iter != mFolders.end();) @@ -1335,8 +1335,8 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem folders_t::iterator fit = iter++; if((*fit)->setSelection(selection, openitem, take_keyboard_focus)) { - rv = TRUE; - child_selected = TRUE; + rv = true; + child_selected = true; } } for (items_t::iterator iter = mItems.begin(); @@ -1345,13 +1345,13 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem items_t::iterator iit = iter++; if((*iit)->setSelection(selection, openitem, take_keyboard_focus)) { - rv = TRUE; - child_selected = TRUE; + rv = true; + child_selected = true; } } if(openitem && child_selected && !mSingleFolderMode) { - setOpenArrangeRecursively(TRUE); + setOpenArrangeRecursively(true); } return rv; } @@ -1359,15 +1359,15 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem // This method is used to change the selection of an item. // Recursively traverse all children; if 'selection' is 'this' then change // the select status if necessary. -// Returns TRUE if the selection state of this folder, or of a child, was changed. -BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selected) +// Returns true if the selection state of this folder, or of a child, was changed. +bool LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, bool selected) { - BOOL rv = FALSE; + bool rv = false; if(selection == this) { if (isSelected() != selected) { - rv = TRUE; + rv = true; if (selected) { selectItem(); @@ -1385,7 +1385,7 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec folders_t::iterator fit = iter++; if((*fit)->changeSelection(selection, selected)) { - rv = TRUE; + rv = true; } } for (items_t::iterator iter = mItems.begin(); @@ -1394,7 +1394,7 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec items_t::iterator iit = iter++; if((*iit)->changeSelection(selection, selected)) { - rv = TRUE; + rv = true; } } return rv; @@ -1578,7 +1578,7 @@ void LLFolderViewFolder::gatherChildRangeExclusive(LLFolderViewItem* start, LLFo void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) { - if (getRoot()->getAllowMultiSelect() == FALSE) return; + if (getRoot()->getAllowMultiSelect() == false) return; LLFolderViewItem* cur_selected_item = getRoot()->getCurSelectedItem(); if (cur_selected_item == NULL) @@ -1627,7 +1627,7 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) LLFolderView* root = getRoot(); - BOOL selection_reverse = new_selection->isSelected(); //indication that some elements are being deselected + bool selection_reverse = new_selection->isSelected(); //indication that some elements are being deselected // array always go from 'will be selected' to ' will be unselected', iterate // in opposite direction to simplify identification of 'point of origin' in @@ -1637,12 +1637,12 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) ++it) { LLFolderViewItem* item = *it; - BOOL selected = item->isSelected(); + bool selected = item->isSelected(); if (!selection_reverse && selected) { // it is our 'point of origin' where we shift/expand from // don't deselect it - selection_reverse = TRUE; + selection_reverse = true; } else { @@ -1653,11 +1653,11 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) if (selection_reverse) { // at some point we reversed selection, first element should be deselected - root->changeSelection(last_selected_item_from_cur, FALSE); + root->changeSelection(last_selected_item_from_cur, false); } // element we expand to should always be selected - root->changeSelection(new_selection, TRUE); + root->changeSelection(new_selection, true); } @@ -1715,11 +1715,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item, bool deparent_mode removeChild(item); } -BOOL LLFolderViewFolder::isMovable() +bool LLFolderViewFolder::isMovable() { if( !(getViewModelItem()->isItemMovable()) ) { - return FALSE; + return false; } for (items_t::iterator iter = mItems.begin(); @@ -1728,7 +1728,7 @@ BOOL LLFolderViewFolder::isMovable() items_t::iterator iit = iter++; if(!(*iit)->isMovable()) { - return FALSE; + return false; } } @@ -1738,18 +1738,18 @@ BOOL LLFolderViewFolder::isMovable() folders_t::iterator fit = iter++; if(!(*fit)->isMovable()) { - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLFolderViewFolder::isRemovable() +bool LLFolderViewFolder::isRemovable() { if( !(getViewModelItem()->isItemRemovable()) ) { - return FALSE; + return false; } for (items_t::iterator iter = mItems.begin(); @@ -1758,7 +1758,7 @@ BOOL LLFolderViewFolder::isRemovable() items_t::iterator iit = iter++; if(!(*iit)->isRemovable()) { - return FALSE; + return false; } } @@ -1768,10 +1768,10 @@ BOOL LLFolderViewFolder::isRemovable() folders_t::iterator fit = iter++; if(!(*fit)->isRemovable()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLFolderViewFolder::destroyRoot() @@ -1791,7 +1791,7 @@ void LLFolderViewFolder::addItem(LLFolderViewItem* item) mItems.push_back(item); item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); - item->setVisible(FALSE); + item->setVisible(false); addChild(item); @@ -1814,7 +1814,7 @@ void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) mFolders.push_back(folder); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); - folder->setVisible(FALSE); + folder->setVisible(false); // rearrange all descendants too, as our indentation level might have changed //folder->requestArrange(); //requestSort(); @@ -1845,7 +1845,7 @@ void LLFolderViewFolder::toggleOpen() } // Force a folder open or closed -void LLFolderViewFolder::setOpen(BOOL openitem) +void LLFolderViewFolder::setOpen(bool openitem) { if(mSingleFolderMode) { @@ -1862,9 +1862,9 @@ void LLFolderViewFolder::setOpen(BOOL openitem) } } -void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) +void LLFolderViewFolder::setOpenArrangeRecursively(bool openitem, ERecurseType recurse) { - BOOL was_open = isOpen(); + bool was_open = isOpen(); mIsOpen = openitem; if(!was_open && openitem) { @@ -1899,17 +1899,17 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r } } -BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, - BOOL drop, +bool LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, + bool drop, EDragAndDropType c_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL accepted = mViewModelItem->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg); + bool accepted = mViewModelItem->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg); if (accepted) { - mDragAndDropTarget = TRUE; + mDragAndDropTarget = true; *accept = ACCEPT_YES_MULTI; } else @@ -1920,7 +1920,7 @@ BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, // drag and drop to child item, so clear pending auto-opens getRoot()->autoOpenTest(NULL); - return TRUE; + return true; } void LLFolderViewFolder::openItem( void ) @@ -1963,14 +1963,14 @@ void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor) } // LLView functionality -BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, +bool LLFolderViewFolder::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; if (isOpen()) { @@ -1984,11 +1984,11 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << LL_ENDL; } - return TRUE; + return true; } -BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, - BOOL drop, +bool LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1998,14 +1998,14 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, { *accept = ACCEPT_NO; tooltip_msg = LLTrans::getString("TooltipOutboxCannotDropOnRoot"); - return TRUE; + return true; } - BOOL accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); + bool accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); if (accepted) { - mDragAndDropTarget = TRUE; + mDragAndDropTarget = true; *accept = ACCEPT_YES_MULTI; } else @@ -2018,13 +2018,13 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, getRoot()->autoOpenTest(this); } - return TRUE; + return true; } -BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) +bool LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( isOpen() ) { @@ -2038,11 +2038,11 @@ BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) } -BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) +bool LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) { mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); - BOOL handled = LLView::handleHover(x, y, mask); + bool handled = LLView::handleHover(x, y, mask); if (!handled) { @@ -2053,9 +2053,9 @@ BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) return handled; } -BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) +bool LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( isOpen() ) { handled = childrenHandleMouseDown(x,y,mask) != NULL; @@ -2066,7 +2066,7 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) && !mSingleFolderMode) { toggleOpen(); - handled = TRUE; + handled = true; } else { @@ -2078,9 +2078,9 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) return handled; } -BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) +bool LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if(mSingleFolderMode) { static LLUICachedControl<bool> double_click_new_window("SingleModeDoubleClickOpenWindow", false); @@ -2097,7 +2097,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) getViewModelItem()->navigateToFolder(false); }); } - return TRUE; + return true; } if( isOpen() ) @@ -2112,12 +2112,12 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) if (double_click_action == 1) { getViewModelItem()->navigateToFolder(true); - return TRUE; + return true; } if (double_click_action == 2) { getViewModelItem()->navigateToFolder(false, true); - return TRUE; + return true; } } if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad) @@ -2128,10 +2128,10 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) } else { - getRoot()->setSelection(this, FALSE); + getRoot()->setSelection(this, false); toggleOpen(); } - handled = TRUE; + handled = true; } return handled; } @@ -2148,19 +2148,19 @@ void LLFolderViewFolder::draw() LLView::draw(); } - mExpanderHighlighted = FALSE; + mExpanderHighlighted = false; } // this does prefix traversal, as folders are listed above their contents -LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children ) +LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, bool include_children ) { - BOOL found_item = FALSE; + bool found_item = false; LLFolderViewItem* result = NULL; // when not starting from a given item, start at beginning if(item == NULL) { - found_item = TRUE; + found_item = true; } // find current item among children @@ -2178,16 +2178,16 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, { if(item == (*fit)) { - found_item = TRUE; + found_item = true; // if we are on downwards traversal if (include_children && (*fit)->isOpen()) { // look for first descendant - return (*fit)->getNextFromChild(NULL, TRUE); + return (*fit)->getNextFromChild(NULL, true); } // otherwise advance to next folder ++fit; - include_children = TRUE; + include_children = true; break; } } @@ -2199,7 +2199,7 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, { if(item == (*iit)) { - found_item = TRUE; + found_item = true; // point to next item ++iit; break; @@ -2212,7 +2212,7 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, { // you should never call this method with an item that isn't a child // so we should always find something - llassert(FALSE); + llassert(false); return NULL; } @@ -2250,22 +2250,22 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, { // If there are no siblings or children to go to, recurse up one level in the tree // and skip children for this folder, as we've already discounted them - result = mParentFolder->getNextFromChild(this, FALSE); + result = mParentFolder->getNextFromChild(this, false); } return result; } // this does postfix traversal, as folders are listed above their contents -LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children ) +LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, bool include_children ) { - BOOL found_item = FALSE; + bool found_item = false; LLFolderViewItem* result = NULL; // when not starting from a given item, start at end if(item == NULL) { - found_item = TRUE; + found_item = true; } // find current item among children @@ -2283,7 +2283,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it { if(item == (*iit)) { - found_item = TRUE; + found_item = true; // point to next item ++iit; break; @@ -2297,7 +2297,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it { if(item == (*fit)) { - found_item = TRUE; + found_item = true; // point to next folder ++fit; break; @@ -2310,7 +2310,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it { // you should never call this method with an item that isn't a child // so we should always find something - llassert(FALSE); + llassert(false); return NULL; } |