diff options
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 204b8b9984..4e961a0a18 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -398,18 +398,18 @@ bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash, bool forc if (it != mButtonMap.end()) { command_button = it->second; - command_button->setFlashing((BOOL)(flash),(BOOL)(force_flashing)); + command_button->setFlashing((bool)(flash),(bool)(force_flashing)); } } return (command_button != NULL); } -BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +bool LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) { LLRect button_panel_rect; mButtonPanel->localRectToOtherView(mButtonPanel->getLocalRect(), &button_panel_rect, this); - BOOL handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y); + bool handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y); if (handle_it_here) { @@ -443,9 +443,9 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) return handle_it_here; } -BOOL LLToolBar::isSettingChecked(const LLSD& userdata) +bool LLToolBar::isSettingChecked(const LLSD& userdata) { - BOOL retval = FALSE; + bool retval = false; const std::string setting_name = userdata.asString(); @@ -784,8 +784,8 @@ void LLToolBar::updateLayoutAsNeeded() if (!mButtons.empty()) { - mButtonPanel->setVisible(TRUE); - mButtonPanel->setMouseOpaque(TRUE); + mButtonPanel->setVisible(true); + mButtonPanel->setMouseOpaque(true); } // don't clear flag until after we've resized ourselves, to avoid laying out every frame @@ -797,13 +797,13 @@ void LLToolBar::draw() { if (mButtons.empty()) { - mButtonPanel->setVisible(FALSE); - mButtonPanel->setMouseOpaque(FALSE); + mButtonPanel->setVisible(false); + mButtonPanel->setMouseOpaque(false); } else { - mButtonPanel->setVisible(TRUE); - mButtonPanel->setMouseOpaque(TRUE); + mButtonPanel->setVisible(true); + mButtonPanel->setMouseOpaque(true); } // Update enable/disable state and highlight state for editable toolbars @@ -841,7 +841,7 @@ void LLToolBar::draw() } LLIconCtrl* caret = mCaretIcon; - caret->setVisible(FALSE); + caret->setVisible(false); if (mDragAndDropTarget && !mButtonCommands.empty()) { LLRect caret_rect = caret->getRect(); @@ -859,15 +859,15 @@ void LLToolBar::draw() mDragx+mDragGirth, mDragy-caret_rect.getHeight()/2)); } - caret->setVisible(TRUE); + caret->setVisible(true); } LLUICtrl::draw(); - caret->setVisible(FALSE); + caret->setVisible(false); mDragAndDropTarget = false; } -void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLToolBar::reshape(S32 width, S32 height, bool called_from_parent) { LLUICtrl::reshape(width, height, called_from_parent); mNeedsLayout = true; @@ -1042,14 +1042,14 @@ boost::signals2::connection LLToolBar::setButtonRemoveCallback(const button_sign return connectSignal(mButtonRemoveSignal, cb); } -BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { // If we have a drop callback, that means that we can handle the drop - BOOL handled = (mHandleDropCallback ? TRUE : FALSE); + bool handled = (mHandleDropCallback ? true : false); // if drop is set, it's time to call the callback to get the operation done if (handled && drop) @@ -1083,7 +1083,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } else { - handled = FALSE; + handled = false; } } @@ -1121,16 +1121,16 @@ LLToolBarButton::~LLToolBarButton() delete mIsStartingSignal; } -BOOL LLToolBarButton::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLToolBarButton::handleMouseDown(S32 x, S32 y, MASK mask) { mMouseDownX = x; mMouseDownY = y; return LLButton::handleMouseDown(x, y, mask); } -BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask) +bool LLToolBarButton::handleHover(S32 x, S32 y, MASK mask) { - BOOL handled = FALSE; + bool handled = false; S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY); static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3); @@ -1142,7 +1142,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask) { mStartDragItemCallback(x, y, this); mIsDragged = true; - handled = TRUE; + handled = true; } else { @@ -1164,7 +1164,7 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask) // Always highlight toolbar buttons, even if they are disabled if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this) { - mNeedsHighlight = TRUE; + mNeedsHighlight = true; } LLToolBar* parent_toolbar = getParentByType<LLToolBar>(); @@ -1200,12 +1200,12 @@ void LLToolBarButton::onCommit() } } -void LLToolBarButton::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLToolBarButton::reshape(S32 width, S32 height, bool called_from_parent) { LLButton::reshape(mWidthRange.clamp(width), height, called_from_parent); } -void LLToolBarButton::setEnabled(BOOL enabled) +void LLToolBarButton::setEnabled(bool enabled) { if (enabled) { |