diff options
661 files changed, 4742 insertions, 4788 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index a5417d054e..d88e1a1f11 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -103,7 +103,7 @@ void LLAccordionCtrl::draw() } //--------------------------------------------------------------------------------- -BOOL LLAccordionCtrl::postBuild() +bool LLAccordionCtrl::postBuild() { static LLUICachedControl<S32> scrollbar_size("UIScrollbarSize", 0); @@ -127,7 +127,7 @@ BOOL LLAccordionCtrl::postBuild() mScrollbar = LLUICtrlFactory::create<LLScrollbar>(sbparams); LLView::addChild(mScrollbar); - mScrollbar->setVisible(FALSE); + mScrollbar->setVisible(false); mScrollbar->setFollowsRight(); mScrollbar->setFollowsTop(); mScrollbar->setFollowsBottom(); @@ -167,7 +167,7 @@ BOOL LLAccordionCtrl::postBuild() updateNoTabsHelpTextVisibility(); - return TRUE; + return true; } @@ -179,7 +179,7 @@ LLAccordionCtrl::~LLAccordionCtrl() //--------------------------------------------------------------------------------- -void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLAccordionCtrl::reshape(S32 width, S32 height, bool called_from_parent) { // adjust our rectangle LLRect rcLocal = getRect(); @@ -243,7 +243,7 @@ void LLAccordionCtrl::showScrollbar(S32 width, S32 height) { bool was_visible = mScrollbar->getVisible(); - mScrollbar->setVisible(TRUE); + mScrollbar->setVisible(true); static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); @@ -265,9 +265,9 @@ void LLAccordionCtrl::showScrollbar(S32 width, S32 height) void LLAccordionCtrl::hideScrollbar(S32 width, S32 height) { - if (mScrollbar->getVisible() == FALSE) + if (mScrollbar->getVisible() == false) return; - mScrollbar->setVisible(FALSE); + mScrollbar->setVisible(false); static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); @@ -391,7 +391,7 @@ void LLAccordionCtrl::updateNoTabsHelpTextVisibility() } } - mNoVisibleTabsHelpText->setVisible(visible_exists ? FALSE : TRUE); + mNoVisibleTabsHelpText->setVisible(visible_exists ? false : true); } void LLAccordionCtrl::arrangeSingle() @@ -407,7 +407,7 @@ void LLAccordionCtrl::arrangeSingle() { LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]); - if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs + if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs continue; if (!accordion_tab->isExpanded() ) { @@ -421,7 +421,7 @@ void LLAccordionCtrl::arrangeSingle() { LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]); - if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs + if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs continue; if (!accordion_tab->isExpanded() ) { @@ -469,7 +469,7 @@ void LLAccordionCtrl::arrangeMultiple() { LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]); - if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs + if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs continue; if (!accordion_tab->isExpanded() ) @@ -561,15 +561,15 @@ bool LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) return false; } -BOOL LLAccordionCtrl::handleKeyHere(KEY key, MASK mask) +bool LLAccordionCtrl::handleKeyHere(KEY key, MASK mask) { if (mScrollbar->getVisible() && mScrollbar->handleKeyHere(key, mask)) - return TRUE; + return true; return LLPanel::handleKeyHere(key, mask); } -BOOL LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, +bool LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -577,17 +577,17 @@ BOOL LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, { // Scroll folder view if needed. Never accepts a drag or drop. *accept = ACCEPT_NO; - BOOL handled = autoScroll(x, y); + bool handled = autoScroll(x, y); if (!handled) { handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL; } - return TRUE; + return true; } -BOOL LLAccordionCtrl::autoScroll(S32 x, S32 y) +bool LLAccordionCtrl::autoScroll(S32 x, S32 y) { static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); @@ -624,7 +624,7 @@ BOOL LLAccordionCtrl::autoScroll(S32 x, S32 y) } } - return scrolling ? TRUE : FALSE; + return scrolling ? true : false; } void LLAccordionCtrl::updateLayout(S32 width, S32 height) @@ -819,11 +819,11 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info) } else if (info.has("child_visibility_change")) { - BOOL new_visibility = info["child_visibility_change"]; + bool new_visibility = info["child_visibility_change"]; if (new_visibility) { // there is at least one visible tab - mNoVisibleTabsHelpText->setVisible(FALSE); + mNoVisibleTabsHelpText->setVisible(false); } else { diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index ba5a45759f..871c0a8f56 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -88,12 +88,12 @@ public: LLAccordionCtrl(); virtual ~LLAccordionCtrl(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual bool handleRightMouseDown ( S32 x, S32 y, MASK mask); virtual bool handleScrollWheel ( S32 x, S32 y, S32 clicks ); - virtual BOOL handleKeyHere (KEY key, MASK mask); - virtual BOOL handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleKeyHere (KEY key, MASK mask); + virtual bool handleDragAndDrop (S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -101,7 +101,7 @@ public: // // Call reshape after changing splitter's size - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); void addCollapsibleCtrl(LLView* view); void removeCollapsibleCtrl(LLView* view); @@ -159,7 +159,7 @@ private: void showScrollbar (S32 width, S32 height); void hideScrollbar (S32 width, S32 height); - BOOL autoScroll (S32 x, S32 y); + bool autoScroll (S32 x, S32 y); /** * An adaptor for LLTabComparator diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index c3787acec2..c8f75a1af2 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -64,9 +64,9 @@ public: virtual void draw(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); - virtual BOOL postBuild(); + virtual bool postBuild(); std::string getTitle(); void setTitle(const std::string& title, const std::string& hl); @@ -79,8 +79,8 @@ public: virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -150,9 +150,9 @@ LLAccordionCtrlTab::LLAccordionCtrlTabHeader::~LLAccordionCtrlTabHeader() { } -BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild() +bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild() { - return TRUE; + return true; } std::string LLAccordionCtrlTab::LLAccordionCtrlTabHeader::getTitle() @@ -202,7 +202,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() S32 height = getRect().getHeight(); F32 alpha = getCurrentTransparency(); - gl_rect_2d(0, 0, width - 1, height - 1, mHeaderBGColor.get() % alpha, TRUE); + gl_rect_2d(0, 0, width - 1, height - 1, mHeaderBGColor.get() % alpha, true); LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent()); bool collapsible = parent && parent->getCollapsible(); @@ -245,7 +245,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() LLUICtrl::draw(); } -void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { S32 header_height = mHeaderTextbox->getTextPixelHeight(); @@ -276,7 +276,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::onMouseLeave(S32 x, S32 y, MA mAutoOpenTimer.stop(); } -BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, bool called_from_parent) { if ((key == KEY_LEFT || key == KEY_RIGHT) && mask == MASK_NONE) { @@ -286,8 +286,8 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, return LLUICtrl::handleKey(key, mask, called_from_parent); } -BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, +bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -303,7 +303,7 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 { parent->changeOpenClose(false); mAutoOpenTimer.stop(); - return TRUE; + return true; } } else @@ -380,7 +380,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p) LLFocusableElement::setFocusLostCallback(boost::bind(&LLAccordionCtrlTab::deselectOnFocusLost, this)); } - reshape(100, 200,FALSE); + reshape(100, 200,false); } LLAccordionCtrlTab::~LLAccordionCtrlTab() @@ -407,11 +407,11 @@ void LLAccordionCtrlTab::setDisplayChildren(bool display) else { if (mScrollbar) - mScrollbar->setVisible(FALSE); + mScrollbar->setVisible(false); } } -void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLAccordionCtrlTab::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { LLRect headerRect; @@ -439,14 +439,14 @@ void LLAccordionCtrlTab::changeOpenClose(bool is_open) mExpandedHeight = getRect().getHeight(); setDisplayChildren(!is_open); - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); + reshape(getRect().getWidth(), getRect().getHeight(), false); if (mCommitSignal) { (*mCommitSignal)(this, getDisplayChildren()); } } -void LLAccordionCtrlTab::onVisibilityChange(BOOL new_visibility) +void LLAccordionCtrlTab::onVisibilityChange(bool new_visibility) { LLUICtrl::onVisibilityChange(new_visibility); @@ -643,14 +643,14 @@ void LLAccordionCtrlTab::setHeaderVisible(bool value) if (mHeader) { - mHeader->setVisible(value ? TRUE : FALSE); + mHeader->setVisible(value ? true : false); } - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); + reshape(getRect().getWidth(), getRect().getHeight(), false); }; //virtual -BOOL LLAccordionCtrlTab::postBuild() +bool LLAccordionCtrlTab::postBuild() { if (mHeader) { @@ -812,7 +812,7 @@ S32 LLAccordionCtrlTab::notify(const LLSD& info) return 0; } -BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLAccordionCtrlTab::handleKey(KEY key, MASK mask, bool called_from_parent) { if (!mHeader->hasFocus()) return LLUICtrl::handleKey(key, mask, called_from_parent); @@ -992,10 +992,10 @@ void LLAccordionCtrlTab::hideScrollbar(const LLRect& child_rect) if (!mContainerPanel || !mScrollbar) return; - if (mScrollbar->getVisible() == FALSE) + if (mScrollbar->getVisible() == false) return; - mScrollbar->setVisible(FALSE); + mScrollbar->setVisible(false); mScrollbar->setDocPos(0); //shrink child panel diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 161f5c6361..8a1d90feac 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -134,7 +134,7 @@ public: void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close;}; bool canOpenClose() const { return mCanOpenClose; }; - virtual BOOL postBuild(); + virtual bool postBuild(); S32 notifyParent(const LLSD& info); S32 notify(const LLSD& info); @@ -153,19 +153,19 @@ protected: public: // Call reshape after changing size - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); /** * Raises notifyParent event with "child_visibility_change" = new_visibility */ - void onVisibilityChange(BOOL new_visibility); + void onVisibilityChange(bool new_visibility); virtual void onUpdateScrollToChild(const LLUICtrl * cntrl); // Changes expand/collapse state and triggers expand/collapse callbacks virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); virtual bool handleToolTip(S32 x, S32 y, MASK mask); virtual bool handleScrollWheel( S32 x, S32 y, S32 clicks ); diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 589b75ab5b..f404b2e03b 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -36,7 +36,7 @@ static LLDefaultChildRegistry::Register<LLBadge> r("badge"); static const S32 BADGE_OFFSET_NOT_SPECIFIED = 0x7FFFFFFF; // Compiler optimization, generate extern template -template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const; +template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const; LLBadge::Params::Params() @@ -237,7 +237,7 @@ void LLBadge::draw() S32 badge_char_length = S32_MAX; S32 badge_pixel_length = S32_MAX; F32 *right_position_out = NULL; - BOOL do_not_use_ellipses = false; + bool do_not_use_ellipses = false; F32 badge_width = (2.0f * mPaddingHoriz) + mGLFont->getWidthF32(badge_label_wstring.c_str(), badge_label_begin_offset, badge_char_length); diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h index 55f92e6e34..d6d74bcd0b 100644 --- a/indra/llui/llbadge.h +++ b/indra/llui/llbadge.h @@ -171,7 +171,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLBADGE_CPP -extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const; +extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const; #endif #endif // LL_LLBADGE_H diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index d8589444fb..b0737c8238 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -56,7 +56,7 @@ static LLDefaultChildRegistry::Register<LLButton> r("button"); // Compiler optimization, generate extern template template class LLButton* LLView::getChild<class LLButton>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; // globals loaded from settings.xml S32 LLBUTTON_H_PAD = 0; @@ -122,10 +122,10 @@ LLButton::LLButton(const LLButton::Params& p) LLBadgeOwner(getHandle()), mMouseDownFrame(0), mMouseHeldDownCount(0), - mBorderEnabled( FALSE ), - mFlashing( FALSE ), + mBorderEnabled( false ), + mFlashing( false ), mCurGlowStrength(0.f), - mNeedsHighlight(FALSE), + mNeedsHighlight(false), mUnselectedLabel(p.label()), mSelectedLabel(p.label_selected()), mGLFont(p.font), @@ -167,7 +167,7 @@ LLButton::LLButton(const LLButton::Params& p) mHoverGlowStrength(p.hover_glow_amount), mCommitOnReturn(p.commit_on_return), mCommitOnCaptureLost(p.commit_on_capture_lost), - mFadeWhenDisabled(FALSE), + mFadeWhenDisabled(false), mForcePressedState(false), mDisplayPressedState(p.display_pressed_state), mLastDrawCharsCount(0), @@ -220,7 +220,7 @@ LLButton::LLButton(const LLButton::Params& p) if (p.image_disabled() == default_params.image_disabled() ) { mImageDisabled = p.image_unselected; - mFadeWhenDisabled = TRUE; + mFadeWhenDisabled = true; } if (p.image_pressed_selected == default_params.image_pressed_selected) @@ -236,7 +236,7 @@ LLButton::LLButton(const LLButton::Params& p) if (p.image_disabled_selected() == default_params.image_disabled_selected()) { mImageDisabledSelected = p.image_selected; - mFadeWhenDisabled = TRUE; + mFadeWhenDisabled = true; } if (p.image_pressed == default_params.image_pressed) @@ -384,7 +384,7 @@ boost::signals2::connection LLButton::setHeldDownCallback( button_callback_t cb, return setHeldDownCallback(boost::bind(cb, data)); } -BOOL LLButton::postBuild() +bool LLButton::postBuild() { autoResize(); @@ -411,9 +411,9 @@ bool LLButton::handleUnicodeCharHere(llwchar uni_char) return handled; } -BOOL LLButton::handleKeyHere(KEY key, MASK mask ) +bool LLButton::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( mCommitOnReturn && KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { if (mIsToggle) @@ -421,7 +421,7 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask ) toggleState(); } - handled = TRUE; + handled = true; LLUICtrl::onCommit(); } @@ -579,7 +579,7 @@ void LLButton::onMouseLeave(S32 x, S32 y, MASK mask) { LLUICtrl::onMouseLeave(x, y, mask); - mNeedsHighlight = FALSE; + mNeedsHighlight = false; } void LLButton::setHighlight(bool b) @@ -630,7 +630,7 @@ void LLButton::draw() static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::getInstance()->mSettingGroups["config"], "EnableButtonFlashing", true); F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency(); - bool pressed_by_keyboard = FALSE; + bool pressed_by_keyboard = false; if (hasFocus()) { pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN)); @@ -652,7 +652,7 @@ void LLButton::draw() || mForcePressedState; bool selected = getToggleState(); - bool use_glow_effect = FALSE; + bool use_glow_effect = false; LLColor4 highlighting_color = LLColor4::white; LLColor4 glow_color = LLColor4::white; LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA; @@ -684,7 +684,7 @@ void LLButton::draw() else { imagep = mImageSelected; - use_glow_effect = TRUE; + use_glow_effect = true; } } else @@ -696,7 +696,7 @@ void LLButton::draw() else { imagep = mImageUnselected; - use_glow_effect = TRUE; + use_glow_effect = true; } } } @@ -738,7 +738,7 @@ void LLButton::draw() if (mFlashingTimer) { LLColor4 flash_color = mFlashBgColor.get(); - use_glow_effect = TRUE; + use_glow_effect = true; glow_type = LLRender::BT_ALPHA; // blend the glow if (mFlashingTimer->isCurrentlyHighlighted() || !mFlashingTimer->isFlashingInProgress()) @@ -759,7 +759,7 @@ void LLButton::draw() if (mNeedsHighlight && !imagep) { - use_glow_effect = TRUE; + use_glow_effect = true; } // Figure out appropriate color for the text @@ -847,7 +847,7 @@ void LLButton::draw() // no image LL_DEBUGS() << "No image for button " << getName() << LL_ENDL; // draw it in pink so we can find it - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, FALSE); + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, false); } // let overlay image and text play well together @@ -981,12 +981,12 @@ void LLButton::drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size) } } -BOOL LLButton::getToggleState() const +bool LLButton::getToggleState() const { return getValue().asBoolean(); } -void LLButton::setToggleState(BOOL b) +void LLButton::setToggleState(bool b) { if( b != getToggleState() ) { @@ -1013,7 +1013,7 @@ void LLButton::setFlashing(bool b, bool force_flashing/* = false */) } } -BOOL LLButton::toggleState() +bool LLButton::toggleState() { bool flipped = ! getToggleState(); setToggleState(flipped); @@ -1028,11 +1028,11 @@ void LLButton::setLabel( const LLStringExplicit& label ) } //virtual -BOOL LLButton::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLButton::setLabelArg( const std::string& key, const LLStringExplicit& text ) { mUnselectedLabel.setArg(key, text); mSelectedLabel.setArg(key, text); - return TRUE; + return true; } void LLButton::setLabelUnselected( const LLStringExplicit& label ) @@ -1137,14 +1137,14 @@ void LLButton::setImageDisabled(LLPointer<LLUIImage> image) { mImageDisabled = image; mDisabledImageColor = mImageColor; - mFadeWhenDisabled = TRUE; + mFadeWhenDisabled = true; } void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image) { mImageDisabledSelected = image; mDisabledImageColor = mImageColor; - mFadeWhenDisabled = TRUE; + mFadeWhenDisabled = true; } void LLButton::setImagePressed(LLPointer<LLUIImage> image) @@ -1237,11 +1237,11 @@ void LLButton::addImageAttributeToXML(LLXMLNodePtr node, { if( !image_name.empty() ) { - node->createChild(xml_tag_name.c_str(), TRUE)->setStringValue(image_name); + node->createChild(xml_tag_name.c_str(), true)->setStringValue(image_name); } else if( image_id != LLUUID::null ) { - node->createChild((xml_tag_name + "_id").c_str(), TRUE)->setUUIDValue(image_id); + node->createChild((xml_tag_name + "_id").c_str(), true)->setUUIDValue(image_id); } } diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 0c99f6a343..d3cdad874f 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -156,7 +156,7 @@ public: void addImageAttributeToXML(LLXMLNodePtr node, const std::string& imageName, const LLUUID& imageID,const std::string& xmlTagName) const; virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleHover(S32 x, S32 y, MASK mask); @@ -164,7 +164,7 @@ public: virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask); virtual void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseCaptureLost(); @@ -173,7 +173,7 @@ public: void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; } void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; } - void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; } + void setUseEllipses( bool use_ellipses ) { mUseEllipses = use_ellipses; } boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb); @@ -198,13 +198,13 @@ public: F32 getHeldDownTime() const { return mMouseDownTimer.getElapsedTimeF32(); } - BOOL toggleState(); - BOOL getToggleState() const; - void setToggleState(BOOL b); + bool toggleState(); + bool getToggleState() const; + void setToggleState(bool b); void setHighlight(bool b); void setFlashing( bool b, bool force_flashing = false ); - BOOL getFlashing() const { return mFlashing; } + bool getFlashing() const { return mFlashing; } LLFlashTimer* getFlashTimer() {return mFlashingTimer;} void setFlashColor(const LLUIColor &color) { mFlashBgColor = color; }; @@ -239,7 +239,7 @@ public: void autoResize(); // resize with label of current btn state void resize(LLUIString label); // resize with label input void setLabel( const LLStringExplicit& label); - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); void setLabelUnselected(const LLStringExplicit& label); void setLabelSelected(const LLStringExplicit& label); void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; } @@ -253,12 +253,12 @@ public: bool labelIsTruncated() const; const LLUIString& getCurrentLabel() const; - void setScaleImage(BOOL scale) { mScaleImage = scale; } - BOOL getScaleImage() const { return mScaleImage; } + void setScaleImage(bool scale) { mScaleImage = scale; } + bool getScaleImage() const { return mScaleImage; } - void setDropShadowedText(BOOL b) { mDropShadowedText = b; } + void setDropShadowedText(bool b) { mDropShadowedText = b; } - void setBorderEnabled(BOOL b) { mBorderEnabled = b; } + void setBorderEnabled(bool b) { mBorderEnabled = b; } void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; } @@ -271,8 +271,8 @@ public: void setImageFlash(LLPointer<LLUIImage> image); void setImagePressed(LLPointer<LLUIImage> image); - void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } - BOOL getCommitOnReturn() const { return mCommitOnReturn; } + void setCommitOnReturn(bool commit) { mCommitOnReturn = commit; } + bool getCommitOnReturn() const { return mCommitOnReturn; } static void onHeldDown(void *userdata); // to be called by gIdleCallbacks static void toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname); @@ -395,7 +395,7 @@ protected: // Build time optimization, generate once in .cpp file #ifndef LLBUTTON_CPP extern template class LLButton* LLView::getChild<class LLButton>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif // LL_LLBUTTON_H diff --git a/indra/llui/llchat.h b/indra/llui/llchat.h index b4fd5f60aa..102889867e 100644 --- a/indra/llui/llchat.h +++ b/indra/llui/llchat.h @@ -83,7 +83,7 @@ public: mSourceType(CHAT_SOURCE_AGENT), mChatType(CHAT_TYPE_NORMAL), mAudible(CHAT_AUDIBLE_FULLY), - mMuted(FALSE), + mMuted(false), mTime(0.0), mTimeStr(), mPosAgent(), @@ -100,7 +100,7 @@ public: EChatSourceType mSourceType; EChatType mChatType; EChatAudible mAudible; - BOOL mMuted; // pass muted chat to maintain list of chatters + bool mMuted; // pass muted chat to maintain list of chatters F64 mTime; // viewer only, seconds from viewer start std::string mTimeStr; LLVector3 mPosAgent; diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp index c506576126..e7b7874b4b 100644 --- a/indra/llui/llchatentry.cpp +++ b/indra/llui/llchatentry.cpp @@ -176,9 +176,9 @@ void LLChatEntry::onFocusLost() LLUICtrl::onFocusLost(); } -BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) +bool LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { - BOOL handled = FALSE; + bool handled = false; LLTextEditor::handleSpecialKey(key, mask); @@ -203,7 +203,7 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; @@ -227,7 +227,7 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h index 3f13691a30..06d9d462b4 100644 --- a/indra/llui/llchatentry.h +++ b/indra/llui/llchatentry.h @@ -84,7 +84,7 @@ private: */ void updateHistory(); - BOOL handleSpecialKey(const KEY key, const MASK mask); + bool handleSpecialKey(const KEY key, const MASK mask); // Fired when text height expanded to mExpandLinesCount diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 362fe0c19e..171ef1b51b 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -45,7 +45,7 @@ static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box"); // Compiler optimization, generate extern template template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; void LLCheckBoxCtrl::WordWrap::declareValues() { @@ -77,7 +77,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p) static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0); // must be big enough to hold all children - setUseBoundingRect(TRUE); + setUseBoundingRect(true); // *HACK Get rid of this with SL-55508... // this allows blank check boxes and radio boxes for now @@ -160,13 +160,13 @@ void LLCheckBoxCtrl::onCommit() { if( getEnabled() ) { - setTentative(FALSE); + setTentative(false); setControlValue(getValue()); LLUICtrl::onCommit(); } } -void LLCheckBoxCtrl::setEnabled(BOOL b) +void LLCheckBoxCtrl::setEnabled(bool b) { LLView::setEnabled(b); @@ -182,10 +182,10 @@ void LLCheckBoxCtrl::setEnabled(BOOL b) void LLCheckBoxCtrl::clear() { - setValue( FALSE ); + setValue( false ); } -void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLCheckBoxCtrl::reshape(S32 width, S32 height, bool called_from_parent) { LLRect rect = getRect(); S32 delta_width = width - rect.getWidth(); @@ -205,10 +205,10 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) LLRect label_rect = mLabel->getRect(); S32 new_width = rect.getWidth() - label_rect.mLeft; - mLabel->reshape(new_width, label_rect.getHeight(), TRUE); + mLabel->reshape(new_width, label_rect.getHeight(), true); S32 label_top = label_rect.mTop; - mLabel->reshapeToFitText(TRUE); + mLabel->reshapeToFitText(true); label_rect = mLabel->getRect(); if (label_top != label_rect.mTop && mWordWrap == WRAP_DOWN) @@ -247,13 +247,13 @@ LLSD LLCheckBoxCtrl::getValue() const } //virtual -void LLCheckBoxCtrl::setTentative(BOOL b) +void LLCheckBoxCtrl::setTentative(bool b) { mButton->setTentative(b); } //virtual -BOOL LLCheckBoxCtrl::getTentative() const +bool LLCheckBoxCtrl::getTentative() const { return mButton->getTentative(); } @@ -261,7 +261,7 @@ BOOL LLCheckBoxCtrl::getTentative() const void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label ) { mLabel->setText( label ); - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); + reshape(getRect().getWidth(), getRect().getHeight(), false); } std::string LLCheckBoxCtrl::getLabel() const @@ -269,10 +269,10 @@ std::string LLCheckBoxCtrl::getLabel() const return mLabel->getText(); } -BOOL LLCheckBoxCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLCheckBoxCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - BOOL res = mLabel->setTextArg(key, text); - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); + bool res = mLabel->setTextArg(key, text); + reshape(getRect().getWidth(), getRect().getHeight(), false); return res; } @@ -283,14 +283,14 @@ void LLCheckBoxCtrl::setControlName(const std::string& control_name, LLView* con } -// virtual Returns TRUE if the user has modified this control. -BOOL LLCheckBoxCtrl::isDirty() const +// virtual Returns true if the user has modified this control. +bool LLCheckBoxCtrl::isDirty() const { if ( mButton ) { return mButton->isDirty(); } - return FALSE; // Shouldn't get here + return false; // Shouldn't get here } diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index eb5bd5b6da..71b7d27629 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -36,8 +36,8 @@ // Constants // -const BOOL RADIO_STYLE = TRUE; -const BOOL CHECK_STYLE = FALSE; +const bool RADIO_STYLE = true; +const bool CHECK_STYLE = false; // // Classes @@ -87,28 +87,28 @@ protected: public: // LLView interface - virtual void setEnabled( BOOL b ); + virtual void setEnabled( bool b ); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - BOOL get() { return (BOOL)getValue().asBoolean(); } - void set(BOOL value) { setValue(value); } + bool get() { return (bool)getValue().asBoolean(); } + void set(bool value) { setValue(value); } - virtual void setTentative(BOOL b); - virtual BOOL getTentative() const; + virtual void setTentative(bool b); + virtual bool getTentative() const; - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); virtual void clear(); virtual void onCommit(); // LLCheckBoxCtrl interface - virtual BOOL toggle() { return mButton->toggleState(); } // returns new state + virtual bool toggle() { return mButton->toggleState(); } // returns new state - void setBtnFocus() { mButton->setFocus(TRUE); } + void setBtnFocus() { mButton->setFocus(true); } void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; } void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; } @@ -121,7 +121,7 @@ public: virtual void setControlName(const std::string& control_name, LLView* context); - virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control. + virtual bool isDirty() const; // Returns true if the user has modified this control. virtual void resetDirty(); // Clear dirty state protected: @@ -151,7 +151,7 @@ protected: // Build time optimization, generate once in .cpp file #ifndef LLCHECKBOXCTRL_CPP extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif // LL_LLCHECKBOXCTRL_H diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 81031508ec..07d1be3762 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -171,13 +171,13 @@ void LLComboBox::initFromParams(const LLComboBox::Params& p) } // virtual -BOOL LLComboBox::postBuild() +bool LLComboBox::postBuild() { if (mControlVariable) { setValue(mControlVariable->getValue()); // selects the appropriate item } - return TRUE; + return true; } @@ -210,16 +210,16 @@ void LLComboBox::onCommit() // we have selected an existing item, blitz the manual text entry with // the properly capitalized item mTextEntry->setValue(getSimple()); - mTextEntry->setTentative(FALSE); + mTextEntry->setTentative(false); } setControlValue(getValue()); LLUICtrl::onCommit(); } // virtual -BOOL LLComboBox::isDirty() const +bool LLComboBox::isDirty() const { - BOOL grubby = FALSE; + bool grubby = false; if ( mList ) { grubby = mList->isDirty(); @@ -242,7 +242,7 @@ bool LLComboBox::itemExists(const std::string& name) } // add item "name" to menu -LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOOL enabled) +LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, bool enabled) { LLScrollListItem* item = mList->addSimpleElement(name, pos); item->setEnabled(enabled); @@ -261,7 +261,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOO } // add item "name" with a unique id to menu -LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAddPosition pos, bool enabled ) { LLScrollListItem* item = mList->addSimpleElement(name, pos, id); item->setEnabled(enabled); @@ -280,7 +280,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAd } // add item "name" with attached userdata -LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddPosition pos, bool enabled ) { LLScrollListItem* item = mList->addSimpleElement(name, pos); item->setEnabled(enabled); @@ -300,7 +300,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddP } // add item "name" with attached generic data -LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, bool enabled ) { LLScrollListItem* item = mList->addSimpleElement(name, pos, value); item->setEnabled(enabled); @@ -323,17 +323,17 @@ LLScrollListItem* LLComboBox::addSeparator(EAddPosition pos) return mList->addSeparator(pos); } -void LLComboBox::sortByName(BOOL ascending) +void LLComboBox::sortByName(bool ascending) { mList->sortOnce(0, ascending); } // Choose an item with a given name in the menu. -// Returns TRUE if the item was found. -BOOL LLComboBox::setSimple(const LLStringExplicit& name) +// Returns true if the item was found. +bool LLComboBox::setSimple(const LLStringExplicit& name) { - BOOL found = mList->selectItemByLabel(name, FALSE); + bool found = mList->selectItemByLabel(name, false); if (found) { @@ -347,7 +347,7 @@ BOOL LLComboBox::setSimple(const LLStringExplicit& name) // virtual void LLComboBox::setValue(const LLSD& value) { - BOOL found = mList->selectByValue(value); + bool found = mList->selectByValue(value); if (found) { LLScrollListItem* item = mList->getFirstSelected(); @@ -404,9 +404,9 @@ void LLComboBox::setLabel(const LLStringExplicit& name) if ( mTextEntry ) { mTextEntry->setText(name); - if (mList->selectItemByLabel(name, FALSE)) + if (mList->selectItemByLabel(name, false)) { - mTextEntry->setTentative(FALSE); + mTextEntry->setTentative(false); mLastSelectedIndex = mList->getFirstSelectedIndex(); } else @@ -428,7 +428,7 @@ void LLComboBox::updateLabel() if (mTextEntry) { mTextEntry->setText(getSelectedItemLabel()); - mTextEntry->setTentative(FALSE); + mTextEntry->setTentative(false); } // If combo box doesn't allow text entry update @@ -439,9 +439,9 @@ void LLComboBox::updateLabel() } } -BOOL LLComboBox::remove(const std::string& name) +bool LLComboBox::remove(const std::string& name) { - BOOL found = mList->selectItemByLabel(name); + bool found = mList->selectItemByLabel(name); if (found) { @@ -456,15 +456,15 @@ BOOL LLComboBox::remove(const std::string& name) return found; } -BOOL LLComboBox::remove(S32 index) +bool LLComboBox::remove(S32 index) { if (index < mList->getItemCount()) { mList->deleteSingleItem(index); setLabel(getSelectedItemLabel()); - return TRUE; + return true; } - return FALSE; + return false; } // Keyboard focus lost. @@ -480,7 +480,7 @@ void LLComboBox::onFocusLost() LLUICtrl::onFocusLost(); } -void LLComboBox::setButtonVisible(BOOL visible) +void LLComboBox::setButtonVisible(bool visible) { static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0); @@ -494,13 +494,13 @@ void LLComboBox::setButtonVisible(BOOL visible) text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button; } //mTextEntry->setRect(text_entry_rect); - mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); + mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), true); } } -BOOL LLComboBox::setCurrentByIndex( S32 index ) +bool LLComboBox::setCurrentByIndex( S32 index ) { - BOOL found = mList->selectNthItem( index ); + bool found = mList->selectNthItem( index ); if (found) { setLabel(getSelectedItemLabel()); @@ -519,7 +519,7 @@ S32 LLComboBox::getCurrentIndex() const return -1; } -void LLComboBox::setEnabledByValue(const LLSD& value, BOOL enabled) +void LLComboBox::setEnabledByValue(const LLSD& value, bool enabled) { LLScrollListItem *found = mList->getItem(value); if (found) @@ -538,7 +538,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p) S32 shadow_size = drop_shadow_button; mButton->setRect(LLRect( getRect().getWidth() - llmax(8,arrow_width) - 2 * shadow_size, rect.mTop, rect.mRight, rect.mBottom)); - mButton->setTabStop(FALSE); + mButton->setTabStop(false); mButton->setHAlign(LLFontGL::HCENTER); LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); @@ -556,7 +556,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p) params.label(mLabel); mTextEntry = LLUICtrlFactory::create<LLLineEditor> (params); mTextEntry->setText(cur_label); - mTextEntry->setIgnoreTab(TRUE); + mTextEntry->setIgnoreTab(true); addChild(mTextEntry); // clear label on button @@ -571,7 +571,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p) if (mTextEntry) { - mTextEntry->setVisible(FALSE); + mTextEntry->setVisible(false); } } } @@ -675,15 +675,15 @@ void LLComboBox::showList() // NB: this call will trigger the focuslost callback which will hide the list, so do it first // before finally showing the list - mList->setFocus(TRUE); + mList->setFocus(true); // Show the list and push the button down - mButton->setToggleState(TRUE); - mList->setVisible(TRUE); + mButton->setToggleState(true); + mList->setVisible(true); LLUI::getInstance()->addPopup(this); - setUseBoundingRect(TRUE); + setUseBoundingRect(true); // updateBoundingRect(); } @@ -702,11 +702,11 @@ void LLComboBox::hideList() else if(mLastSelectedIndex >= 0) mList->selectNthItem(mLastSelectedIndex); - mButton->setToggleState(FALSE); - mList->setVisible(FALSE); + mButton->setToggleState(false); + mList->setVisible(false); mList->mouseOverHighlightNthItem(-1); - setUseBoundingRect(FALSE); + setUseBoundingRect(false); LLUI::getInstance()->removePopup(this); // updateBoundingRect(); } @@ -732,7 +732,7 @@ void LLComboBox::onButtonMouseDown() showList(); } - setFocus( TRUE ); + setFocus( true ); // pass mouse capture on to list if button is depressed if (mButton->hasMouseCapture()) @@ -806,16 +806,16 @@ bool LLComboBox::handleToolTip(S32 x, S32 y, MASK mask) return true; } -BOOL LLComboBox::handleKeyHere(KEY key, MASK mask) +bool LLComboBox::handleKeyHere(KEY key, MASK mask) { - BOOL result = FALSE; + bool result = false; if (hasFocus()) { if (mList->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE) { hideList(); - return TRUE; + return true; } //give list a chance to pop up and handle key LLScrollListItem* last_selected_item = mList->getLastSelectedItem(); @@ -838,7 +838,7 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask) // don't show list and don't eat key input when committing // free-form text entry with RETURN since user already knows // what they are trying to select - return FALSE; + return false; } // if selection has changed, pop open list else if (mList->getLastSelectedItem() != last_selected_item @@ -881,12 +881,12 @@ void LLComboBox::setTextEntry(const LLStringExplicit& text) if (mTextEntry) { mTextEntry->setText(text); - mHasAutocompletedText = FALSE; + mHasAutocompletedText = false; updateSelection(); } } -void LLComboBox::setKeystrokeOnEsc(BOOL enable) +void LLComboBox::setKeystrokeOnEsc(bool enable) { if (mTextEntry) { @@ -905,9 +905,9 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor) if (key == KEY_BACKSPACE || key == KEY_DELETE) { - if (mList->selectItemByLabel(line_editor->getText(), FALSE)) + if (mList->selectItemByLabel(line_editor->getText(), false)) { - line_editor->setTentative(FALSE); + line_editor->setTentative(false); mLastSelectedIndex = mList->getFirstSelectedIndex(); } else @@ -942,7 +942,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor) } } line_editor->selectAll(); - line_editor->setTentative(FALSE); + line_editor->setTentative(false); } else if (key == KEY_UP) { @@ -957,7 +957,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor) } } line_editor->selectAll(); - line_editor->setTentative(FALSE); + line_editor->setTentative(false); } else { @@ -986,20 +986,20 @@ void LLComboBox::updateSelection() prearrangeList(mTextEntry->getText()); } - if (mList->selectItemByLabel(full_string, FALSE)) + if (mList->selectItemByLabel(full_string, false)) { - mTextEntry->setTentative(FALSE); + mTextEntry->setTentative(false); mLastSelectedIndex = mList->getFirstSelectedIndex(); } - else if (mList->selectItemByPrefix(left_wstring, FALSE)) + else if (mList->selectItemByPrefix(left_wstring, false)) { LLWString selected_item = utf8str_to_wstring(getSelectedItemLabel()); LLWString wtext = left_wstring + selected_item.substr(left_wstring.size(), selected_item.size()); mTextEntry->setText(wstring_to_utf8str(wtext)); mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size()); mTextEntry->endSelection(); - mTextEntry->setTentative(FALSE); - mHasAutocompletedText = TRUE; + mTextEntry->setTentative(false); + mHasAutocompletedText = true; mLastSelectedIndex = mList->getFirstSelectedIndex(); } else // no matching items found @@ -1007,7 +1007,7 @@ void LLComboBox::updateSelection() mList->deselectAllItems(); mTextEntry->setText(wstring_to_utf8str(user_wstring)); // removes text added by autocompletion mTextEntry->setTentative(mTextEntryTentative); - mHasAutocompletedText = FALSE; + mHasAutocompletedText = false; mLastSelectedIndex = -1; } } @@ -1020,7 +1020,7 @@ void LLComboBox::onTextCommit(const LLSD& data) mTextEntry->selectAll(); } -void LLComboBox::setFocus(BOOL b) +void LLComboBox::setFocus(bool b) { LLUICtrl::setFocus(b); @@ -1029,7 +1029,7 @@ void LLComboBox::setFocus(BOOL b) mList->clearSearchString(); if (mList->getVisible()) { - mList->setFocus(TRUE); + mList->setFocus(true); } } } @@ -1097,7 +1097,7 @@ void LLComboBox::imageLoaded() { LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * drop_shadow_button; - mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); + mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), true); } } } @@ -1142,7 +1142,7 @@ void LLComboBox::clearRows() mList->clearRows(); } -void LLComboBox::sortByColumn(const std::string& name, BOOL ascending) +void LLComboBox::sortByColumn(const std::string& name, bool ascending) { mList->sortByColumn(name, ascending); } @@ -1150,9 +1150,9 @@ void LLComboBox::sortByColumn(const std::string& name, BOOL ascending) //============================================================================ //LLCtrlSelectionInterface functions -BOOL LLComboBox::setCurrentByID(const LLUUID& id) +bool LLComboBox::setCurrentByID(const LLUUID& id) { - BOOL found = mList->selectByID( id ); + bool found = mList->selectByID( id ); if (found) { @@ -1167,9 +1167,9 @@ LLUUID LLComboBox::getCurrentID() const { return mList->getStringUUIDSelectedItem(); } -BOOL LLComboBox::setSelectedByValue(const LLSD& value, BOOL selected) +bool LLComboBox::setSelectedByValue(const LLSD& value, bool selected) { - BOOL found = mList->setSelectedByValue(value, selected); + bool found = mList->setSelectedByValue(value, selected); if (found) { setLabel(getSelectedItemLabel()); @@ -1182,32 +1182,32 @@ LLSD LLComboBox::getSelectedValue() return mList->getSelectedValue(); } -BOOL LLComboBox::isSelected(const LLSD& value) const +bool LLComboBox::isSelected(const LLSD& value) const { return mList->isSelected(value); } -BOOL LLComboBox::operateOnSelection(EOperation op) +bool LLComboBox::operateOnSelection(EOperation op) { if (op == OP_DELETE) { mList->deleteSelectedItems(); - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLComboBox::operateOnAll(EOperation op) +bool LLComboBox::operateOnAll(EOperation op) { if (op == OP_DELETE) { clearRows(); - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLComboBox::selectItemRange( S32 first, S32 last ) +bool LLComboBox::selectItemRange( S32 first, S32 last ) { return mList->selectItemRange(first, last); } diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index d87ce9189e..97ac6653d5 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -94,7 +94,7 @@ public: virtual ~LLComboBox(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); protected: friend class LLUICtrlFactory; @@ -112,17 +112,17 @@ public: virtual void onFocusLost(); virtual bool handleToolTip(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); // LLUICtrl interface virtual void clear(); // select nothing virtual void onCommit(); - virtual BOOL acceptsTextInput() const { return mAllowTextEntry; } - virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control. + virtual bool acceptsTextInput() const { return mAllowTextEntry; } + virtual bool isDirty() const; // Returns true if the user has modified this control. virtual void resetDirty(); // Clear dirty state - virtual void setFocus(BOOL b); + virtual void setFocus(bool b); // Selects item by underlying LLSD value, using LLSD::asString() matching. // For simple items, this is just the name of the label. @@ -133,21 +133,21 @@ public: virtual LLSD getValue() const; void setTextEntry(const LLStringExplicit& text); - void setKeystrokeOnEsc(BOOL enable); + void setKeystrokeOnEsc(bool enable); - LLScrollListItem* add(const std::string& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu - LLScrollListItem* add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); - LLScrollListItem* add(const std::string& name, void* userdata, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); - LLScrollListItem* add(const std::string& name, LLSD value, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* add(const std::string& name, EAddPosition pos = ADD_BOTTOM, bool enabled = true); // add item "name" to menu + LLScrollListItem* add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, bool enabled = true); + LLScrollListItem* add(const std::string& name, void* userdata, EAddPosition pos = ADD_BOTTOM, bool enabled = true); + LLScrollListItem* add(const std::string& name, LLSD value, EAddPosition pos = ADD_BOTTOM, bool enabled = true); LLScrollListItem* addSeparator(EAddPosition pos = ADD_BOTTOM); - BOOL remove( S32 index ); // remove item by index, return TRUE if found and removed + bool remove( S32 index ); // remove item by index, return true if found and removed void removeall() { clearRows(); } bool itemExists(const std::string& name); - void sortByName(BOOL ascending = TRUE); // Sort the entries in the combobox by name + void sortByName(bool ascending = true); // Sort the entries in the combobox by name - // Select current item by name using selectItemByLabel. Returns FALSE if not found. - BOOL setSimple(const LLStringExplicit& name); + // Select current item by name using selectItemByLabel. Returns false if not found. + bool setSimple(const LLStringExplicit& name); // Get name of current item. Returns an empty string if not found. const std::string getSimple() const; // Get contents of column x of selected row @@ -160,12 +160,12 @@ public: // Updates the combobox label to match the selected list item. void updateLabel(); - BOOL remove(const std::string& name); // remove item "name", return TRUE if found and removed + bool remove(const std::string& name); // remove item "name", return true if found and removed - BOOL setCurrentByIndex( S32 index ); + bool setCurrentByIndex( S32 index ); S32 getCurrentIndex() const; - void setEnabledByValue(const LLSD& value, BOOL enabled); + void setEnabledByValue(const LLSD& value, bool enabled); void createLineEditor(const Params&); @@ -183,21 +183,21 @@ public: virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD()); virtual void clearRows(); - virtual void sortByColumn(const std::string& name, BOOL ascending); + virtual void sortByColumn(const std::string& name, bool ascending); // LLCtrlSelectionInterface functions - virtual BOOL getCanSelect() const { return TRUE; } - virtual BOOL selectFirstItem() { return setCurrentByIndex(0); } - virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); } - virtual BOOL selectItemRange( S32 first, S32 last ); + virtual bool getCanSelect() const { return true; } + virtual bool selectFirstItem() { return setCurrentByIndex(0); } + virtual bool selectNthItem( S32 index ) { return setCurrentByIndex(index); } + virtual bool selectItemRange( S32 first, S32 last ); virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); } - virtual BOOL setCurrentByID( const LLUUID& id ); + virtual bool setCurrentByID( const LLUUID& id ); virtual LLUUID getCurrentID() const; // LLUUID::null if no items in menu - virtual BOOL setSelectedByValue(const LLSD& value, BOOL selected); + virtual bool setSelectedByValue(const LLSD& value, bool selected); virtual LLSD getSelectedValue(); - virtual BOOL isSelected(const LLSD& value) const; - virtual BOOL operateOnSelection(EOperation op); - virtual BOOL operateOnAll(EOperation op); + virtual bool isSelected(const LLSD& value) const; + virtual bool operateOnSelection(EOperation op); + virtual bool operateOnAll(EOperation op); //======================================================================== @@ -214,7 +214,7 @@ public: */ boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); } - void setButtonVisible(BOOL visible); + void setButtonVisible(bool visible); void onButtonMouseDown(); void onListMouseUp(); @@ -234,13 +234,13 @@ protected: EPreferredPosition mListPosition; LLPointer<LLUIImage> mArrowImage; LLUIString mLabel; - BOOL mHasAutocompletedText; + bool mHasAutocompletedText; private: - BOOL mAllowTextEntry; - BOOL mAllowNewValues; + bool mAllowTextEntry; + bool mAllowNewValues; S32 mMaxChars; - BOOL mTextEntryTentative; + bool mTextEntryTentative; commit_callback_t mPrearrangeCallback; commit_callback_t mTextEntryCallback; commit_callback_t mTextChangedCallback; diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 8fc2978bdd..c9d5f0bf80 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -77,7 +77,7 @@ void LLConsole::setLinePersistTime(F32 seconds) mFadeTime = mLinePersistTime - FADE_DURATION; } -void LLConsole::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLConsole::reshape(S32 width, S32 height, bool called_from_parent) { S32 new_width = llmax(50, llmin(getRect().getWidth(), width)); S32 new_height = llmax(llfloor(mFont->getLineHeight()) + 15, llmin(getRect().getHeight(), height)); diff --git a/indra/llui/llconsole.h b/indra/llui/llconsole.h index 04f5e71609..2b144f03de 100644 --- a/indra/llui/llconsole.h +++ b/indra/llui/llconsole.h @@ -132,7 +132,7 @@ public: // each line lasts this long after being added void setLinePersistTime(F32 seconds); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, bool called_from_parent = true); // -1 = monospace, 0 means small, font size = 1 means big void setFontSize(S32 size_index); diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp index 415cdced4d..c2fee0871c 100644 --- a/indra/llui/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -57,11 +57,11 @@ LLContainerView::~LLContainerView() // Children all cleaned up by default view destructor. } -BOOL LLContainerView::postBuild() +bool LLContainerView::postBuild() { setDisplayChildren(mDisplayChildren); - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); - return TRUE; + reshape(getRect().getWidth(), getRect().getHeight(), false); + return true; } bool LLContainerView::addChild(LLView* child, S32 tab_group) @@ -91,7 +91,7 @@ bool LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask) if( mShowLabel && (y >= getRect().getHeight() - 10) ) { setDisplayChildren(!mDisplayChildren); - reshape(getRect().getWidth(), getRect().getHeight(), FALSE); + reshape(getRect().getWidth(), getRect().getHeight(), false); handled = true; } } @@ -128,7 +128,7 @@ void LLContainerView::draw() } -void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLContainerView::reshape(S32 width, S32 height, bool called_from_parent) { LLRect scroller_rect; scroller_rect.setOriginAndSize(0, 0, width, height); @@ -159,7 +159,7 @@ void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent) } } -void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent) +void LLContainerView::arrange(S32 width, S32 height, bool called_from_parent) { // Determine the sizes and locations of all contained views S32 total_height = 0; @@ -242,7 +242,7 @@ void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent) { if (getParent()) { - getParent()->reshape(getParent()->getRect().getWidth(), getParent()->getRect().getHeight(), FALSE); + getParent()->reshape(getParent()->getRect().getWidth(), getParent()->getRect().getHeight(), false); } } @@ -288,7 +288,7 @@ void LLContainerView::setLabel(const std::string& label) mLabel = label; } -void LLContainerView::setDisplayChildren(const BOOL displayChildren) +void LLContainerView::setDisplayChildren(const bool displayChildren) { mDisplayChildren = displayChildren; for (child_list_const_iter_t child_iter = getChildList()->begin(); diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h index f439689ceb..82e7384676 100644 --- a/indra/llui/llcontainerview.h +++ b/indra/llui/llcontainerview.h @@ -49,8 +49,8 @@ public: Optional<bool> display_children; Params() : label("label"), - show_label("show_label", FALSE), - display_children("display_children", TRUE) + show_label("show_label", false), + display_children("display_children", true) { changeDefault(mouse_opaque, false); } @@ -65,7 +65,7 @@ protected: public: ~LLContainerView(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); @@ -73,22 +73,22 @@ public: /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. void setLabel(const std::string& label); - void showLabel(BOOL show) { mShowLabel = show; } - void setDisplayChildren(const BOOL displayChildren); - BOOL getDisplayChildren() { return mDisplayChildren; } + void showLabel(bool show) { mShowLabel = show; } + void setDisplayChildren(const bool displayChildren); + bool getDisplayChildren() { return mDisplayChildren; } void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;} private: LLScrollContainer* mScrollContainer; - void arrange(S32 width, S32 height, BOOL called_from_parent = TRUE); - BOOL mShowLabel; + void arrange(S32 width, S32 height, bool called_from_parent = true); + bool mShowLabel; protected: - BOOL mDisplayChildren; + bool mDisplayChildren; std::string mLabel; }; #endif // LL_CONTAINERVIEW_ diff --git a/indra/llui/llctrlselectioninterface.cpp b/indra/llui/llctrlselectioninterface.cpp index 7e886aff48..87d52da187 100644 --- a/indra/llui/llctrlselectioninterface.cpp +++ b/indra/llui/llctrlselectioninterface.cpp @@ -33,14 +33,14 @@ LLCtrlSelectionInterface::~LLCtrlSelectionInterface() { } -BOOL LLCtrlSelectionInterface::selectByValue(LLSD value) +bool LLCtrlSelectionInterface::selectByValue(LLSD value) { - return setSelectedByValue(value, TRUE); + return setSelectedByValue(value, true); } -BOOL LLCtrlSelectionInterface::deselectByValue(LLSD value) +bool LLCtrlSelectionInterface::deselectByValue(LLSD value) { - return setSelectedByValue(value, FALSE); + return setSelectedByValue(value, false); } diff --git a/indra/llui/llctrlselectioninterface.h b/indra/llui/llctrlselectioninterface.h index a7b089c8f9..0907b58b5c 100644 --- a/indra/llui/llctrlselectioninterface.h +++ b/indra/llui/llctrlselectioninterface.h @@ -47,29 +47,29 @@ public: OP_DESELECT, }; - virtual BOOL getCanSelect() const = 0; + virtual bool getCanSelect() const = 0; virtual S32 getItemCount() const = 0; - virtual BOOL selectFirstItem() = 0; - virtual BOOL selectNthItem( S32 index ) = 0; - virtual BOOL selectItemRange( S32 first, S32 last ) = 0; + virtual bool selectFirstItem() = 0; + virtual bool selectNthItem( S32 index ) = 0; + virtual bool selectItemRange( S32 first, S32 last ) = 0; virtual S32 getFirstSelectedIndex() const = 0; // TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function - virtual BOOL setCurrentByID( const LLUUID& id ) = 0; + virtual bool setCurrentByID( const LLUUID& id ) = 0; virtual LLUUID getCurrentID() const = 0; - BOOL selectByValue(const LLSD value); - BOOL deselectByValue(const LLSD value); - virtual BOOL setSelectedByValue(const LLSD& value, BOOL selected) = 0; + bool selectByValue(const LLSD value); + bool deselectByValue(const LLSD value); + virtual bool setSelectedByValue(const LLSD& value, bool selected) = 0; virtual LLSD getSelectedValue() = 0; - virtual BOOL isSelected(const LLSD& value) const = 0; + virtual bool isSelected(const LLSD& value) const = 0; - virtual BOOL operateOnSelection(EOperation op) = 0; - virtual BOOL operateOnAll(EOperation op) = 0; + virtual bool operateOnSelection(EOperation op) = 0; + virtual bool operateOnAll(EOperation op) = 0; }; class LLCtrlListInterface : public LLCtrlSelectionInterface @@ -88,7 +88,7 @@ public: virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos, const LLSD& id) = 0; virtual void clearRows() = 0; - virtual void sortByColumn(const std::string& name, BOOL ascending) = 0; + virtual void sortByColumn(const std::string& name, bool ascending) = 0; }; class LLCtrlScrollInterface diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index c937d190c6..4495986d81 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -40,9 +40,9 @@ void LLDockableFloater::init(LLDockableFloater* thiz) thiz->resetInstance(); // all dockable floaters should have close, dock and minimize buttons - thiz->setCanClose(TRUE); + thiz->setCanClose(true); thiz->setCanDock(true); - thiz->setCanMinimize(TRUE); + thiz->setCanMinimize(true); thiz->setOverlapsScreenChannel(false); thiz->mForceDocking = false; } @@ -74,7 +74,7 @@ LLDockableFloater::~LLDockableFloater() { } -BOOL LLDockableFloater::postBuild() +bool LLDockableFloater::postBuild() { // Remember we should force docking when the floater is opened for the first time if (mIsDockedStateForcedCallback != NULL && mIsDockedStateForcedCallback()) @@ -108,14 +108,14 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname) // if floater undocked else if (instance != NULL) { - instance->setMinimized(FALSE); + instance->setMinimized(false); if (instance->getVisible()) { - instance->setVisible(FALSE); + instance->setVisible(false); } else { - instance->setVisible(TRUE); + instance->setVisible(true); gFloaterView->bringToFront(instance); } } @@ -127,13 +127,13 @@ void LLDockableFloater::resetInstance() { if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked()) { - sInstanceHandle.get()->setVisible(FALSE); + sInstanceHandle.get()->setVisible(false); } sInstanceHandle = getHandle(); } } -void LLDockableFloater::setVisible(BOOL visible) +void LLDockableFloater::setVisible(bool visible) { // Force docking if requested if (visible && mForceDocking) @@ -160,12 +160,12 @@ void LLDockableFloater::setVisible(BOOL visible) LLFloater::setVisible(visible); } -void LLDockableFloater::setMinimized(BOOL minimize) +void LLDockableFloater::setMinimized(bool minimize) { if(minimize && isDocked()) { // minimizing a docked floater just hides it - setVisible(FALSE); + setVisible(false); } else { @@ -185,14 +185,14 @@ LLView * LLDockableFloater::getDockWidget() void LLDockableFloater::onDockHidden() { - setCanDock(FALSE); + setCanDock(false); } void LLDockableFloater::onDockShown() { if (!isMinimized()) { - setCanDock(TRUE); + setCanDock(true); } } diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 5d90b3ef4e..03b8be39a6 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -81,7 +81,7 @@ public: * If descendant class overrides postBuild() in order to perform specific * construction then it must still invoke its superclass' implementation. */ - /* virtula */BOOL postBuild(); + /* virtula */bool postBuild(); /* virtual */void setDocked(bool docked, bool pop_on_undock = true); /* virtual */void draw(); @@ -89,13 +89,13 @@ public: * If descendant class overrides setVisible() then it must still invoke its * superclass' implementation. */ - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); /** * If descendant class overrides setMinimized() then it must still invoke its * superclass' implementation. */ - /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void setMinimized(bool minimize); LLView * getDockWidget(); @@ -129,7 +129,7 @@ protected: // Checks if docking should be forced. // It may be useful e.g. if floater created in mouselook mode (see EXT-5609) - boost::function<BOOL ()> mIsDockedStateForcedCallback; + boost::function<bool ()> mIsDockedStateForcedCallback; private: std::unique_ptr<LLDockControl> mDockControl; diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index b2e342411c..d3b4dd2bd3 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -57,7 +57,7 @@ LLDragHandle::LLDragHandle(const LLDragHandle::Params& p) mLastMouseScreenY( 0 ), mTitleBox( NULL ), mMaxTitleWidth( 0 ), - mForeground( TRUE ), + mForeground( true ), mDragHighlightColor(p.drag_highlight_color()), mDragShadowColor(p.drag_shadow_color()) @@ -79,7 +79,7 @@ void LLDragHandle::initFromParams(const LLDragHandle::Params& p) setTitle( p.label ); } -void LLDragHandle::setTitleVisible(BOOL visible) +void LLDragHandle::setTitleVisible(bool visible) { if(mTitleBox) { @@ -160,7 +160,7 @@ void LLDragHandleTop::draw() LLRect title_rect = mTitleBox->getRect(); S32 title_right = title_rect.mLeft + mTitleWidth; - BOOL show_right_side = title_right < getRect().getWidth(); + bool show_right_side = title_right < getRect().getWidth(); for( S32 i=0; i<4; i++ ) { @@ -211,7 +211,7 @@ void LLDragHandleLeft::draw() // no titles yet //LLRect title_rect = mTitleBox->getRect(); //S32 title_right = title_rect.mLeft + mTitleWidth; - //BOOL show_right_side = title_right < getRect().getWidth(); + //bool show_right_side = title_right < getRect().getWidth(); S32 line = left; for( S32 i=0; i<4; i++ ) @@ -256,13 +256,13 @@ void LLDragHandleTop::reshapeTitleBox() mTitleBox->setShape( title_rect ); } -void LLDragHandleTop::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLDragHandleTop::reshape(S32 width, S32 height, bool called_from_parent) { LLView::reshape(width, height, called_from_parent); reshapeTitleBox(); } -void LLDragHandleLeft::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLDragHandleLeft::reshape(S32 width, S32 height, bool called_from_parent) { LLView::reshape(width, height, called_from_parent); } diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h index 7f6ae47201..bb5ee43a70 100644 --- a/indra/llui/lldraghandle.h +++ b/indra/llui/lldraghandle.h @@ -61,13 +61,13 @@ public: virtual void setValue(const LLSD& value); - void setForeground(BOOL b) { mForeground = b; } - BOOL getForeground() const { return mForeground; } + void setForeground(bool b) { mForeground = b; } + bool getForeground() const { return mForeground; } void setMaxTitleWidth(S32 max_width) {mMaxTitleWidth = llmin(max_width, mMaxTitleWidth); } S32 getMaxTitleWidth() const { return mMaxTitleWidth; } void setButtonsRect(const LLRect& rect){ mButtonsRect = rect; } LLRect getButtonsRect() { return mButtonsRect; } - void setTitleVisible(BOOL visible); + void setTitleVisible(bool visible); virtual void setTitle( const std::string& title ) = 0; virtual std::string getTitle() const = 0; @@ -93,7 +93,7 @@ private: LLUIColor mDragHighlightColor; LLUIColor mDragShadowColor; S32 mMaxTitleWidth; - BOOL mForeground; + bool mForeground; // Pixels near the edge to snap floaters. static S32 sSnapMargin; @@ -111,7 +111,7 @@ public: virtual void setTitle( const std::string& title ); virtual std::string getTitle() const; virtual void draw(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); private: void reshapeTitleBox(); @@ -129,7 +129,7 @@ public: virtual void setTitle( const std::string& title ); virtual std::string getTitle() const; virtual void draw(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); }; diff --git a/indra/llui/lleditmenuhandler.h b/indra/llui/lleditmenuhandler.h index cd4fea8c52..32e9aac20b 100644 --- a/indra/llui/lleditmenuhandler.h +++ b/indra/llui/lleditmenuhandler.h @@ -35,29 +35,29 @@ public: virtual ~LLEditMenuHandler(); virtual void undo() {}; - virtual BOOL canUndo() const { return FALSE; } + virtual bool canUndo() const { return false; } virtual void redo() {}; - virtual BOOL canRedo() const { return FALSE; } + virtual bool canRedo() const { return false; } virtual void cut() {}; - virtual BOOL canCut() const { return FALSE; } + virtual bool canCut() const { return false; } virtual void copy() {}; - virtual BOOL canCopy() const { return FALSE; } + virtual bool canCopy() const { return false; } virtual void paste() {}; - virtual BOOL canPaste() const { return FALSE; } + virtual bool canPaste() const { return false; } // "delete" is a keyword virtual void doDelete() {}; - virtual BOOL canDoDelete() const { return FALSE; } + virtual bool canDoDelete() const { return false; } virtual void selectAll() {}; - virtual BOOL canSelectAll() const { return FALSE; } + virtual bool canSelectAll() const { return false; } virtual void deselect() {}; - virtual BOOL canDeselect() const { return FALSE; } + virtual bool canDeselect() const { return false; } // TODO: Instead of being a public data member, it would be better to hide it altogether // and have a "set" method and then a bunch of static versions of the cut, copy, paste diff --git a/indra/llui/llfiltereditor.cpp b/indra/llui/llfiltereditor.cpp index d62874d793..6488bd3941 100644 --- a/indra/llui/llfiltereditor.cpp +++ b/indra/llui/llfiltereditor.cpp @@ -33,7 +33,7 @@ LLFilterEditor::LLFilterEditor(const LLFilterEditor::Params& p) : LLSearchEditor(p) { - setCommitOnFocusLost(FALSE); // we'll commit on every keystroke, don't re-commit when we take focus away (i.e. we go to interact with the actual results!) + setCommitOnFocusLost(false); // we'll commit on every keystroke, don't re-commit when we take focus away (i.e. we go to interact with the actual results!) } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 460bd0945b..85fda7928c 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -48,7 +48,7 @@ LLFlatListView::Params::Params() no_items_text("no_items_text") {}; -void LLFlatListView::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLFlatListView::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { S32 delta = height - getRect().getHeight(); LLScrollContainer::reshape(width, height, called_from_parent); @@ -528,7 +528,7 @@ void LLFlatListView::draw() } // virtual -BOOL LLFlatListView::postBuild() +bool LLFlatListView::postBuild() { setTabStop(true); return LLScrollContainer::postBuild(); @@ -610,7 +610,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) return; } - setFocus(TRUE); + setFocus(true); bool select_item = !isSelected(item_pair); @@ -714,10 +714,10 @@ void LLFlatListView::onItemRightMouseClick(item_pair_t* item_pair, MASK mask) onItemMouseClick(item_pair, mask); } -BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) +bool LLFlatListView::handleKeyHere(KEY key, MASK mask) { - BOOL reset_selection = (mask != MASK_SHIFT); - BOOL handled = FALSE; + bool reset_selection = (mask != MASK_SHIFT); + bool handled = false; switch (key) { case KEY_RETURN: @@ -725,7 +725,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) if (mSelectedItemPairs.size() && mask == MASK_NONE) { mOnReturnSignal(this, getValue()); - handled = TRUE; + handled = true; } break; } @@ -753,7 +753,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) { if (mask == MASK_NONE) { - setFocus(FALSE); // pass focus to the game area (EXT-8357) + setFocus(false); // pass focus to the game area (EXT-8357) } break; } @@ -779,7 +779,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) localRectToScreen(selected_rc, &screen_rc); notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue()));*/ - handled = TRUE; + handled = true; } return handled ? handled : LLScrollContainer::handleKeyHere(key, mask); @@ -1040,7 +1040,7 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti return false; } -BOOL LLFlatListView::canSelectAll() const +bool LLFlatListView::canSelectAll() const { return 0 != size() && mAllowSelection && mMultipleSelection; } @@ -1198,14 +1198,14 @@ void LLFlatListView::onFocusReceived() { if (size()) { - mSelectedItemsBorder->setVisible(TRUE); + mSelectedItemsBorder->setVisible(true); } gEditMenuHandler = this; } // virtual void LLFlatListView::onFocusLost() { - mSelectedItemsBorder->setVisible(FALSE); + mSelectedItemsBorder->setVisible(false); // Route menu back to the default if (gEditMenuHandler == this) { diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index d47c1cf333..a19413efa0 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -113,7 +113,7 @@ public: }; // disable traversal when finding widget to hand focus off to - /*virtual*/ BOOL canFocusChildren() const { return FALSE; } + /*virtual*/ bool canFocusChildren() const { return false; } /** * Connects callback to signal called when Return key is pressed. @@ -121,7 +121,7 @@ public: boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); } /** Overridden LLPanel's reshape, height is ignored, the list sets its height to accommodate all items */ - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); /** Returns full rect of child panel */ const LLRect& getItemsRect() const; @@ -345,7 +345,7 @@ protected: virtual bool selectNextItemPair(bool is_up_direction, bool reset_selection); - virtual BOOL canSelectAll() const; + virtual bool canSelectAll() const; virtual void selectAll(); virtual bool isSelected(item_pair_t* item_pair) const; @@ -363,9 +363,9 @@ protected: */ void notifyParentItemsRectChanged(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onFocusReceived(); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index e90dab1a99..3a6ee50a68 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -117,7 +117,7 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] = }; LLMultiFloater* LLFloater::sHostp = NULL; -BOOL LLFloater::sQuitting = FALSE; // Flag to prevent storing visibility controls while quitting +bool LLFloater::sQuitting = false; // Flag to prevent storing visibility controls while quitting LLFloaterView* gFloaterView = NULL; @@ -260,15 +260,15 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mHeaderHeight(p.header_height), mLegacyHeaderHeight(p.legacy_header_height), mDefaultRectForGroup(true), - mMinimized(FALSE), - mForeground(FALSE), - mFirstLook(TRUE), + mMinimized(false), + mForeground(false), + mFirstLook(true), mButtonScale(1.0f), - mAutoFocus(TRUE), // automatically take focus when opened + mAutoFocus(true), // automatically take focus when opened mCanDock(false), mDocked(false), mTornOff(false), - mHasBeenDraggedWhileMinimized(FALSE), + mHasBeenDraggedWhileMinimized(false), mPreviousMinimizedBottom(0), mPreviousMinimizedLeft(0), mDefaultRelativeX(p.rel_x), @@ -280,10 +280,10 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) // mNotificationContext = new LLFloaterNotificationContext(getHandle()); // Clicks stop here. - setMouseOpaque(TRUE); + setMouseOpaque(true); // Floaters always draw their background, unlike every other panel. - setBackgroundVisible(TRUE); + setBackgroundVisible(true); // Floaters start not minimized. When minimized, they save their // prior rectangle to be used on restore. @@ -306,28 +306,28 @@ void LLFloater::initFloater(const Params& p) // Close button. if (mCanClose) { - mButtonsEnabled[BUTTON_CLOSE] = TRUE; + mButtonsEnabled[BUTTON_CLOSE] = true; } // Help button: '?' //SL-14050 Disable all Help question marks - mButtonsEnabled[BUTTON_HELP] = FALSE; + mButtonsEnabled[BUTTON_HELP] = false; // Minimize button only for top draggers if ( !mDragOnLeft && mCanMinimize ) { - mButtonsEnabled[BUTTON_MINIMIZE] = TRUE; + mButtonsEnabled[BUTTON_MINIMIZE] = true; } if(mCanDock) { - mButtonsEnabled[BUTTON_DOCK] = TRUE; + mButtonsEnabled[BUTTON_DOCK] = true; } buildButtons(p); // Floaters are created in the invisible state - setVisible(FALSE); + setVisible(false); if (!getParent()) { @@ -529,7 +529,7 @@ LLFloater::~LLFloater() // This is important so that floaters with persistent rects (i.e., those // created with rect control rather than an LLRect) are restored in their // correct, non-minimized positions. - setMinimized( FALSE ); + setMinimized( false ); delete mDragHandle; for (S32 i = 0; i < 4; i++) @@ -597,12 +597,12 @@ LLControlGroup* LLFloater::getControlGroup() return LLUI::getInstance()->mSettingGroups["account"]; } -void LLFloater::setVisible( BOOL visible ) +void LLFloater::setVisible( bool visible ) { LLPanel::setVisible(visible); // calls onVisibilityChange() if( visible && mFirstLook ) { - mFirstLook = FALSE; + mFirstLook = false; } if( !visible ) @@ -631,7 +631,7 @@ void LLFloater::setVisible( BOOL visible ) } -void LLFloater::setIsSingleInstance(BOOL is_single_instance) +void LLFloater::setIsSingleInstance(bool is_single_instance) { mSingleInstance = is_single_instance; if (!mIsReuseInitialized) @@ -642,12 +642,12 @@ void LLFloater::setIsSingleInstance(BOOL is_single_instance) // virtual -void LLFloater::onVisibilityChange ( BOOL new_visibility ) +void LLFloater::onVisibilityChange ( bool new_visibility ) { if (new_visibility) { if (getHost()) - getHost()->setFloaterFlashing(this, FALSE); + getHost()->setFloaterFlashing(this, false); } LLPanel::onVisibilityChange ( new_visibility ); } @@ -680,7 +680,7 @@ void LLFloater::openFloater(const LLSD& key) if (getHost() != NULL) { - getHost()->setMinimized(FALSE); + getHost()->setMinimized(false); getHost()->setVisibleAndFrontmost(mAutoFocus); getHost()->showFloater(this); } @@ -692,7 +692,7 @@ void LLFloater::openFloater(const LLSD& key) floater_to_stack = LLFloaterReg::getLastFloaterCascading(); } applyControlsAndPosition(floater_to_stack); - setMinimized(FALSE); + setMinimized(false); setVisibleAndFrontmost(mAutoFocus); } @@ -713,7 +713,7 @@ void LLFloater::closeFloater(bool app_quitting) // Always unminimize before trying to close. // Most of the time the user will never see this state. - setMinimized(FALSE); + setMinimized(false); if (canClose()) { @@ -745,7 +745,7 @@ void LLFloater::closeFloater(bool app_quitting) LLFloater* dependee = mDependeeHandle.get(); if (dependee && !dependee->isDead()) { - dependee->setFocus(TRUE); + dependee->setFocus(true); } } } @@ -787,11 +787,11 @@ void LLFloater::closeFloater(bool app_quitting) // Hide the instance if (getHost()) { - getHost()->setVisible(FALSE); + getHost()->setVisible(false); } else { - setVisible(FALSE); + setVisible(false); if (!mReuseInstance) { destroy(); @@ -800,7 +800,7 @@ void LLFloater::closeFloater(bool app_quitting) } else { - setVisible(FALSE); // hide before destroying (so onVisibilityChange() gets called) + setVisible(false); // hide before destroying (so onVisibilityChange() gets called) if (!mReuseInstance) { destroy(); @@ -824,7 +824,7 @@ void LLFloater::closeHostedFloater() } /*virtual*/ -void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloater::reshape(S32 width, S32 height, bool called_from_parent) { LLPanel::reshape(width, height, called_from_parent); } @@ -833,7 +833,7 @@ void LLFloater::releaseFocus() { LLUI::getInstance()->removePopup(this); - setFocus(FALSE); + setFocus(false); if( gFocusMgr.childHasMouseCapture( this ) ) { @@ -1107,12 +1107,12 @@ std::string LLFloater::getShortTitle() const } } -BOOL LLFloater::canSnapTo(const LLView* other_view) +bool LLFloater::canSnapTo(const LLView* other_view) { if (NULL == other_view) { LL_WARNS() << "other_view is NULL" << LL_ENDL; - return FALSE; + return false; } if (other_view != getParent()) @@ -1123,7 +1123,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view) && mDependents.find(other_floaterp->getHandle()) != mDependents.end()) { // this is a dependent that is already snapped to us, so don't snap back to it - return FALSE; + return false; } } @@ -1213,16 +1213,16 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user) else { // If minimized, and origin has changed, set - // mHasBeenDraggedWhileMinimized to TRUE + // mHasBeenDraggedWhileMinimized to true if ((new_rect.mLeft != old_rect.mLeft) || (new_rect.mBottom != old_rect.mBottom)) { - mHasBeenDraggedWhileMinimized = TRUE; + mHasBeenDraggedWhileMinimized = true; } } } -void LLFloater::setMinimized(BOOL minimize) +void LLFloater::setMinimized(bool minimize) { const LLFloater::Params& default_params = LLFloater::getDefaultParams(); S32 floater_header_size = default_params.header_height; @@ -1238,7 +1238,7 @@ void LLFloater::setMinimized(BOOL minimize) if (minimize) { // minimized flag should be turned on before release focus - mMinimized = TRUE; + mMinimized = true; mExpandedRect = getRect(); // If the floater has been dragged while minimized in the @@ -1257,11 +1257,11 @@ void LLFloater::setMinimized(BOOL minimize) if (mButtonsEnabled[BUTTON_MINIMIZE]) { - mButtonsEnabled[BUTTON_MINIMIZE] = FALSE; - mButtonsEnabled[BUTTON_RESTORE] = TRUE; + mButtonsEnabled[BUTTON_MINIMIZE] = false; + mButtonsEnabled[BUTTON_RESTORE] = true; } - setBorderVisible(TRUE); + setBorderVisible(true); for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); @@ -1272,11 +1272,11 @@ void LLFloater::setMinimized(BOOL minimize) { if (floaterp->isMinimizeable()) { - floaterp->setMinimized(TRUE); + floaterp->setMinimized(true); } else if (!floaterp->isMinimized()) { - floaterp->setVisible(FALSE); + floaterp->setVisible(false); } } } @@ -1288,16 +1288,16 @@ void LLFloater::setMinimized(BOOL minimize) { if (mResizeBar[i] != NULL) { - mResizeBar[i]->setEnabled(FALSE); + mResizeBar[i]->setEnabled(false); } if (mResizeHandle[i] != NULL) { - mResizeHandle[i]->setEnabled(FALSE); + mResizeHandle[i]->setEnabled(false); } } // Reshape *after* setting mMinimized - reshape( minimized_width, floater_header_size, TRUE); + reshape( minimized_width, floater_header_size, true); } else { @@ -1313,8 +1313,8 @@ void LLFloater::setMinimized(BOOL minimize) setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom ); if (mButtonsEnabled[BUTTON_RESTORE]) { - mButtonsEnabled[BUTTON_MINIMIZE] = TRUE; - mButtonsEnabled[BUTTON_RESTORE] = FALSE; + mButtonsEnabled[BUTTON_MINIMIZE] = true; + mButtonsEnabled[BUTTON_RESTORE] = false; } // show dependent floater @@ -1325,8 +1325,8 @@ void LLFloater::setMinimized(BOOL minimize) LLFloater* floaterp = dependent_it->get(); if (floaterp) { - floaterp->setMinimized(FALSE); - floaterp->setVisible(TRUE); + floaterp->setMinimized(false); + floaterp->setVisible(true); } } @@ -1342,10 +1342,10 @@ void LLFloater::setMinimized(BOOL minimize) } } - mMinimized = FALSE; + mMinimized = false; setFrontmost(); // Reshape *after* setting mMinimized - reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); + reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), true ); } make_ui_sound("UISndWindowClose"); @@ -1353,7 +1353,7 @@ void LLFloater::setMinimized(BOOL minimize) applyTitle (); } -void LLFloater::setFocus( BOOL b ) +void LLFloater::setFocus( bool b ) { if (b && getIsChrome()) { @@ -1361,7 +1361,7 @@ void LLFloater::setFocus( BOOL b ) } LLView* last_focus = gFocusMgr.getLastFocusForGroup(this); // a descendent already has focus - BOOL child_had_focus = hasFocus(); + bool child_had_focus = hasFocus(); // give focus to first valid descendent LLPanel::setFocus(b); @@ -1384,7 +1384,7 @@ void LLFloater::setFocus( BOOL b ) last_focus->isInVisibleChain()) { // *FIX: should handle case where focus doesn't stick - last_focus->setFocus(TRUE); + last_focus->setFocus(true); } } updateTransparency(b ? TT_ACTIVE : TT_INACTIVE); @@ -1399,15 +1399,15 @@ void LLFloater::setRect(const LLRect &rect) } // virtual -void LLFloater::setIsChrome(BOOL is_chrome) +void LLFloater::setIsChrome(bool is_chrome) { // chrome floaters don't take focus at all if (is_chrome) { // remove focus if we're changing to chrome - setFocus(FALSE); + setFocus(false); // can't Ctrl-Tab to "chrome" floaters - setFocusRoot(FALSE); + setFocusRoot(false); mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome))); } @@ -1415,7 +1415,7 @@ void LLFloater::setIsChrome(BOOL is_chrome) } // Change the draw style to account for the foreground state. -void LLFloater::setForeground(BOOL front) +void LLFloater::setForeground(bool front) { if (front != mForeground) { @@ -1460,13 +1460,13 @@ void LLFloater::setHost(LLMultiFloater* host) // add tear off button if (mCanTearOff) { - mButtonsEnabled[BUTTON_TEAR_OFF] = TRUE; + mButtonsEnabled[BUTTON_TEAR_OFF] = true; } } else if (!mHostHandle.isDead() && !host) { mButtonScale = 1.f; - //mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE; + //mButtonsEnabled[BUTTON_TEAR_OFF] = false; } if (host) { @@ -1501,7 +1501,7 @@ void LLFloater::moveResizeHandlesToFront() } /*virtual*/ -BOOL LLFloater::isFrontmost() +bool LLFloater::isFrontmost() { LLFloaterView* floater_view = getParentByType<LLFloaterView>(); return getVisible() @@ -1509,7 +1509,7 @@ BOOL LLFloater::isFrontmost() && floater_view->getFrontmost() == this); } -void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition) +void LLFloater::addDependentFloater(LLFloater* floaterp, bool reposition) { mDependents.insert(floaterp->getHandle()); floaterp->mDependeeHandle = getHandle(); @@ -1519,7 +1519,7 @@ void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition) floaterp->setRect(gFloaterView->findNeighboringPosition(this, floaterp)); floaterp->setSnapTarget(getHandle()); } - gFloaterView->adjustToFitScreen(floaterp, FALSE, TRUE); + gFloaterView->adjustToFitScreen(floaterp, false, true); if (floaterp->isFrontmost()) { // make sure to bring self and sibling floaters to front @@ -1527,7 +1527,7 @@ void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition) } } -void LLFloater::addDependentFloater(LLHandle<LLFloater> dependent, BOOL reposition) +void LLFloater::addDependentFloater(LLHandle<LLFloater> dependent, bool reposition) { LLFloater* dependent_floaterp = dependent.get(); if(dependent_floaterp) @@ -1542,7 +1542,7 @@ void LLFloater::removeDependentFloater(LLFloater* floaterp) floaterp->mDependeeHandle = LLHandle<LLFloater>(); } -BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index) +bool LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index) { if( mButtonsEnabled[index] ) { @@ -1555,10 +1555,10 @@ BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index my_butt->handleMouseDown(local_x, local_y, mask)) { // the button handled it - return TRUE; + return true; } } - return FALSE; + return false; } bool LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks) @@ -1652,23 +1652,23 @@ void LLFloater::bringToFront( S32 x, S32 y ) // virtual -void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key) +void LLFloater::setVisibleAndFrontmost(bool take_focus,const LLSD& key) { LLUIUsage::instance().logFloater(getInstanceName()); LLMultiFloater* hostp = getHost(); if (hostp) { - hostp->setVisible(TRUE); + hostp->setVisible(true); hostp->setFrontmost(take_focus); } else { - setVisible(TRUE); + setVisible(true); setFrontmost(take_focus); } } -void LLFloater::setFrontmost(BOOL take_focus, BOOL restore) +void LLFloater::setFrontmost(bool take_focus, bool restore) { LLMultiFloater* hostp = getHost(); if (hostp) @@ -1703,7 +1703,7 @@ void LLFloater::setCanDock(bool b) } else { - mButtonsEnabled[BUTTON_DOCK] = FALSE; + mButtonsEnabled[BUTTON_DOCK] = false; } } updateTitleButtons(); @@ -1718,7 +1718,7 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock) if (mDocked) { - setMinimized(FALSE); + setMinimized(false); mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; } @@ -1760,9 +1760,9 @@ void LLFloater::onClickTearOff(LLFloater* self) new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - floater_header_size - 5, self->getRect().getWidth(), self->getRect().getHeight()); self->setRect(new_rect); } - gFloaterView->adjustToFitScreen(self, FALSE); + gFloaterView->adjustToFitScreen(self, false); // give focus to new window to keep continuity for the user - self->setFocus(TRUE); + self->setFocus(true); self->setTornOff(true); } else //Attach to parent. @@ -1774,7 +1774,7 @@ void LLFloater::onClickTearOff(LLFloater* self) { self->storeRectControl(); } - self->setMinimized(FALSE); // to reenable minimize button if it was minimized + self->setMinimized(false); // to reenable minimize button if it was minimized new_host->showFloater(self); // make sure host is visible new_host->openFloater(new_host->getKey()); @@ -1906,7 +1906,7 @@ void LLFloater::draw() const LLFontGL* font = LLFontGL::getFontSansSerif(); LLRect r = getRect(); gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - font->getLineHeight() - 1, - titlebar_focus_color % alpha, 0, TRUE); + titlebar_focus_color % alpha, 0, true); } } } @@ -1919,13 +1919,13 @@ void LLFloater::draw() { LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); // is this button a direct descendent and not a nested widget (e.g. checkbox)? - BOOL focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this; + bool focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this; // only enable default button when current focus is not a button getDefaultButton()->setBorderEnabled(!focus_is_child_button); } else { - getDefaultButton()->setBorderEnabled(FALSE); + getDefaultButton()->setBorderEnabled(false); } } if (isMinimized()) @@ -1934,7 +1934,7 @@ void LLFloater::draw() { drawChild(mButtons[i]); } - drawChild(mDragHandle, 0, 0, TRUE); + drawChild(mDragHandle, 0, 0, true); } else { @@ -1949,7 +1949,7 @@ void LLFloater::draw() LLFloater* old_host = mLastHostHandle.get(); if (!old_host) { - setCanTearOff(FALSE); + setCanTearOff(false); } } } @@ -1999,14 +1999,14 @@ void LLFloater::updateTransparency(ETypeTransparency transparency_type) updateTransparency(this, transparency_type); } -void LLFloater::setCanMinimize(BOOL can_minimize) +void LLFloater::setCanMinimize(bool can_minimize) { // if removing minimize/restore button programmatically, // go ahead and unminimize floater mCanMinimize = can_minimize; if (!can_minimize) { - setMinimized(FALSE); + setMinimized(false); } mButtonsEnabled[BUTTON_MINIMIZE] = can_minimize && !isMinimized(); @@ -2015,7 +2015,7 @@ void LLFloater::setCanMinimize(BOOL can_minimize) updateTitleButtons(); } -void LLFloater::setCanClose(BOOL can_close) +void LLFloater::setCanClose(bool can_close) { mCanClose = can_close; mButtonsEnabled[BUTTON_CLOSE] = can_close; @@ -2023,7 +2023,7 @@ void LLFloater::setCanClose(BOOL can_close) updateTitleButtons(); } -void LLFloater::setCanTearOff(BOOL can_tear_off) +void LLFloater::setCanTearOff(bool can_tear_off) { mCanTearOff = can_tear_off; mButtonsEnabled[BUTTON_TEAR_OFF] = mCanTearOff && !mHostHandle.isDead(); @@ -2032,23 +2032,23 @@ void LLFloater::setCanTearOff(BOOL can_tear_off) } -void LLFloater::setCanResize(BOOL can_resize) +void LLFloater::setCanResize(bool can_resize) { mResizable = can_resize; enableResizeCtrls(can_resize); } -void LLFloater::setCanDrag(BOOL can_drag) +void LLFloater::setCanDrag(bool can_drag) { // if we delete drag handle, we no longer have access to the floater's title // so just enable/disable it if (!can_drag && mDragHandle->getEnabled()) { - mDragHandle->setEnabled(FALSE); + mDragHandle->setEnabled(false); } else if (can_drag && !mDragHandle->getEnabled()) { - mDragHandle->setEnabled(TRUE); + mDragHandle->setEnabled(true); } } @@ -2126,13 +2126,13 @@ void LLFloater::updateTitleButtons() buttons_rect.mLeft = btn_rect.mLeft; } mButtons[i]->setRect(btn_rect); - mButtons[i]->setVisible(TRUE); + mButtons[i]->setVisible(true); // the restore button should have a tab stop so that it takes action when you Ctrl-Tab to a minimized floater mButtons[i]->setTabStop(i == BUTTON_RESTORE); } else { - mButtons[i]->setVisible(FALSE); + mButtons[i]->setVisible(false); } } if (mDragHandle) @@ -2326,7 +2326,7 @@ static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view"); LLFloaterView::LLFloaterView (const Params& p) : LLUICtrl (p), - mFocusCycleMode(FALSE), + mFocusCycleMode(false), mMinimizePositionVOffset(0), mSnapOffsetBottom(0), mSnapOffsetRight(0), @@ -2336,7 +2336,7 @@ LLFloaterView::LLFloaterView (const Params& p) } // By default, adjust vertical. -void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterView::reshape(S32 width, S32 height, bool called_from_parent) { LLView::reshape(width, height, called_from_parent); @@ -2406,7 +2406,7 @@ void LLFloaterView::restoreAll() LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it); if (floaterp) { - floaterp->setMinimized(FALSE); + floaterp->setMinimized(false); } } @@ -2481,7 +2481,7 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF } -void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore) +void LLFloaterView::bringToFront(LLFloater* child, bool give_focus, bool restore) { if (!child) return; @@ -2490,7 +2490,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore { if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { - child->setFocus(TRUE); + child->setFocus(true); } return; } @@ -2543,7 +2543,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore // always unminimize dependee, but allow dependents to stay minimized if (!floaterp->isDependent()) { - floaterp->setMinimized(FALSE); + floaterp->setMinimized(false); } } floaters_to_move.clear(); @@ -2568,12 +2568,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore if(restore) { - child->setMinimized(FALSE); + child->setMinimized(false); } if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { - child->setFocus(TRUE); + child->setFocus(true); // floater did not take focus, so relinquish focus to world if (!child->hasFocus()) { @@ -2594,7 +2594,7 @@ void LLFloaterView::highlightFocusedFloater() continue; } - BOOL floater_or_dependent_has_focus = gFocusMgr.childHasKeyboardFocus(floater); + bool floater_or_dependent_has_focus = gFocusMgr.childHasKeyboardFocus(floater); for(LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin(); dependent_it != floater->mDependents.end(); ++dependent_it) @@ -2602,7 +2602,7 @@ void LLFloaterView::highlightFocusedFloater() LLFloater* dependent_floaterp = dependent_it->get(); if (dependent_floaterp && gFocusMgr.childHasKeyboardFocus(dependent_floaterp)) { - floater_or_dependent_has_focus = TRUE; + floater_or_dependent_has_focus = true; } } @@ -2648,7 +2648,7 @@ void LLFloaterView::unhighlightFocusedFloater() { LLFloater *floater = (LLFloater *)(*child_it); - floater->setForeground(FALSE); + floater->setForeground(false); } } @@ -2657,7 +2657,7 @@ void LLFloaterView::focusFrontFloater() LLFloater* floaterp = getFrontmost(); if (floaterp) { - floaterp->setFocus(TRUE); + floaterp->setFocus(true); } } @@ -2677,7 +2677,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom) row -= floater_header_size ) //loop rows { - bool foundGap = TRUE; + bool foundGap = true; for(child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) //loop floaters @@ -2694,7 +2694,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom) { // needs the check for off grid. can't drag, // but window resize makes them off - foundGap = FALSE; + foundGap = false; break; } } @@ -2796,7 +2796,7 @@ void LLFloaterView::showHiddenFloaters() mHiddenFloaters.clear(); } -BOOL LLFloaterView::allChildrenClosed() +bool LLFloaterView::allChildrenClosed() { // see if there are any visible floaters (some floaters "close" // by setting themselves invisible) @@ -2830,7 +2830,7 @@ void LLFloaterView::refresh() LLRect snap_rect = getSnapRect(); if (snap_rect != mLastSnapRect) { - reshape(getRect().getWidth(), getRect().getHeight(), TRUE); + reshape(getRect().getWidth(), getRect().getHeight(), true); } // Constrain children to be entirely on the screen @@ -2845,7 +2845,7 @@ void LLFloaterView::refresh() } } -void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars/* = false*/) +void LLFloaterView::adjustToFitScreen(LLFloater* floater, bool allow_partial_outside, bool snap_in_toolbars/* = false*/) { if (floater->getParent() != this) { @@ -3025,7 +3025,7 @@ void LLFloaterView::syncFloaterTabOrder() if( !gFocusMgr.childHasKeyboardFocus( modal_dialog ) ) { - modal_dialog->setFocus(TRUE); + modal_dialog->setFocus(true); } if( !gFocusMgr.childHasMouseCapture( modal_dialog ) ) @@ -3041,7 +3041,7 @@ void LLFloaterView::syncFloaterTabOrder() LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it); if (gFocusMgr.childHasKeyboardFocus(floaterp)) { - bringToFront(floaterp, FALSE); + bringToFront(floaterp, false); break; } } @@ -3081,7 +3081,7 @@ S32 LLFloaterView::getZOrder(LLFloater* child) return rv; } -void LLFloaterView::pushVisibleAll(BOOL visible, const skip_list_t& skip_list) +void LLFloaterView::pushVisibleAll(bool visible, const skip_list_t& skip_list) { for (child_list_const_iter_t child_iter = getChildList()->begin(); child_iter != getChildList()->end(); ++child_iter) @@ -3294,7 +3294,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str setupParamsForExport(output_params, parent); output_node->setName(node->getName()->mString); parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params); - return TRUE; + return true; } LLUICtrlFactory::instance().pushFileName(xml_filename); @@ -3303,7 +3303,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str { LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; - return FALSE; + return false; } Params referenced_params; @@ -3373,7 +3373,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str setRect(rect); } - BOOL result; + bool result; result = postBuild(); if (!result) @@ -3382,7 +3382,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str } applyRectControl(); // If we have a saved rect control, apply it - gFloaterView->adjustToFitScreen(this, FALSE); // Floaters loaded from XML should all fit on screen + gFloaterView->adjustToFitScreen(this, false); // Floaters loaded from XML should all fit on screen moveResizeHandlesToFront(); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 99ec77fa4d..bc315785d3 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -46,20 +46,20 @@ class LLMultiFloater; class LLFloater; -const BOOL RESIZE_YES = TRUE; -const BOOL RESIZE_NO = FALSE; +const bool RESIZE_YES = true; +const bool RESIZE_NO = false; -const BOOL DRAG_ON_TOP = FALSE; -const BOOL DRAG_ON_LEFT = TRUE; +const bool DRAG_ON_TOP = false; +const bool DRAG_ON_LEFT = true; -const BOOL MINIMIZE_YES = TRUE; -const BOOL MINIMIZE_NO = FALSE; +const bool MINIMIZE_YES = true; +const bool MINIMIZE_NO = false; -const BOOL CLOSE_YES = TRUE; -const BOOL CLOSE_NO = FALSE; +const bool CLOSE_YES = true; +const bool CLOSE_NO = false; -const BOOL ADJUST_VERTICAL_YES = TRUE; -const BOOL ADJUST_VERTICAL_NO = FALSE; +const bool ADJUST_VERTICAL_YES = true; +const bool ADJUST_VERTICAL_NO = false; namespace LLFloaterEnums { @@ -219,13 +219,13 @@ public: bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - /*virtual*/ BOOL canSnapTo(const LLView* other_view); + /*virtual*/ bool canSnapTo(const LLView* other_view); /*virtual*/ void setSnappedTo(const LLView* snap_view); - /*virtual*/ void setFocus( BOOL b ); - /*virtual*/ void setIsChrome(BOOL is_chrome); + /*virtual*/ void setFocus( bool b ); + /*virtual*/ void setIsChrome(bool is_chrome); /*virtual*/ void setRect(const LLRect &rect); - void setIsSingleInstance(BOOL is_single_instance); - BOOL getIsSingleInstance() { return mSingleInstance; } + void setIsSingleInstance(bool is_single_instance); + bool getIsSingleInstance() { return mSingleInstance; } void initFloater(const Params& p); @@ -237,7 +237,7 @@ public: // Close the floater or its host. Use when hidding or toggling a floater instance. virtual void closeHostedFloater(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Release keyboard and mouse focus void releaseFocus(); @@ -254,13 +254,13 @@ public: std::string getTitle() const; void setShortTitle( const std::string& short_title ); std::string getShortTitle() const; - virtual void setMinimized(BOOL b); + virtual void setMinimized(bool b); void moveResizeHandlesToFront(); - void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); - void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE); + void addDependentFloater(LLFloater* dependent, bool reposition = true); + void addDependentFloater(LLHandle<LLFloater> dependent_handle, bool reposition = true); LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } void removeDependentFloater(LLFloater* dependent); - BOOL isMinimized() const { return mMinimized; } + bool isMinimized() const { return mMinimized; } /// isShown() differs from getVisible() in that isShown() also considers /// isMinimized(). isShown() is true only if visible and not minimized. bool isShown() const; @@ -269,17 +269,17 @@ public: static bool isShown(const LLFloater* floater); static bool isVisible(const LLFloater* floater); static bool isMinimized(const LLFloater* floater); - BOOL isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts - virtual BOOL isFrontmost(); - BOOL isDependent() { return !mDependeeHandle.isDead(); } - void setCanMinimize(BOOL can_minimize); - void setCanClose(BOOL can_close); - void setCanTearOff(BOOL can_tear_off); - virtual void setCanResize(BOOL can_resize); - void setCanDrag(BOOL can_drag); + bool isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts + virtual bool isFrontmost(); + bool isDependent() { return !mDependeeHandle.isDead(); } + void setCanMinimize(bool can_minimize); + void setCanClose(bool can_close); + void setCanTearOff(bool can_tear_off); + virtual void setCanResize(bool can_resize); + void setCanDrag(bool can_drag); bool getCanDrag(); void setHost(LLMultiFloater* host); - BOOL isResizable() const { return mResizable; } + bool isResizable() const { return mResizable; } void setResizeLimits( S32 min_width, S32 min_height ); void getResizeLimits( S32* min_width, S32* min_height ) { *min_width = mMinWidth; *min_height = mMinHeight; } @@ -309,16 +309,16 @@ public: // This cannot be "const" until all derived floater canClose() // methods are const as well. JC - virtual BOOL canClose() { return TRUE; } + virtual bool canClose() { return true; } - /*virtual*/ void setVisible(BOOL visible); // do not override - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); // do not override + /*virtual*/ void setVisible(bool visible); // do not override + /*virtual*/ void onVisibilityChange ( bool new_visibility ); // do not override - void setFrontmost(BOOL take_focus = TRUE, BOOL restore = TRUE); - virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + void setFrontmost(bool take_focus = true, bool restore = true); + virtual void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); // Defaults to false. - virtual BOOL canSaveAs() const { return FALSE; } + virtual bool canSaveAs() const { return false; } virtual void saveAs() {} @@ -391,8 +391,8 @@ protected: void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized const LLRect& getExpandedRect() const { return mExpandedRect; } - void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened - BOOL getAutoFocus() const { return mAutoFocus; } + void setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened + bool getAutoFocus() const { return mAutoFocus; } LLDragHandle* getDragHandle() const { return mDragHandle; } void destroy(); // Don't call this directly. You probably want to call closeFloater() @@ -411,7 +411,7 @@ protected: F32 contex_cone_out_alpha = CONTEXT_CONE_OUT_ALPHA); private: - void setForeground(BOOL b); // called only by floaterview + void setForeground(bool b); // called only by floaterview void cleanupHandles(); // remove handles to dead floaters void createMinimizeButton(); void buildButtons(const Params& p); @@ -428,7 +428,7 @@ private: */ static std::string getButtonTooltip(const Params& p, EFloaterButton e, bool is_chrome); - BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index); + bool offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index); void addResizeCtrls(); void layoutResizeCtrls(); void addDragHandle(); @@ -474,16 +474,16 @@ private: LLUIString mTitle; LLUIString mShortTitle; - BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater + bool mSingleInstance; // true if there is only ever one instance of the floater bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it bool mIsReuseInitialized; // true if mReuseInstance already set from parameters std::string mInstanceName; // Store the instance name so we can remove ourselves from the list - BOOL mCanTearOff; - BOOL mCanMinimize; - BOOL mCanClose; - BOOL mDragOnLeft; - BOOL mResizable; + bool mCanTearOff; + bool mCanMinimize; + bool mCanClose; + bool mDragOnLeft; + bool mResizable; LLFloaterEnums::EOpenPositioning mPositioning; LLCoordFloater mPosition; @@ -493,12 +493,12 @@ private: S32 mHeaderHeight; // height in pixels of header for title, drag bar S32 mLegacyHeaderHeight;// HACK see initFloaterXML() - BOOL mMinimized; - BOOL mForeground; + bool mMinimized; + bool mForeground; LLHandle<LLFloater> mDependeeHandle; - BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible. + bool mFirstLook; // true if the _next_ time this floater is visible will be the first time in the session that it is visible. typedef std::set<LLHandle<LLFloater> > handle_set_t; typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t; @@ -506,7 +506,7 @@ private: bool mButtonsEnabled[BUTTON_COUNT]; F32 mButtonScale; - BOOL mAutoFocus; + bool mAutoFocus; LLHandle<LLFloater> mSnappedTo; LLHandle<LLFloater> mHostHandle; @@ -517,7 +517,7 @@ private: bool mTornOff; static LLMultiFloater* sHostp; - static BOOL sQuitting; + static bool sQuitting; static std::string sButtonNames[BUTTON_COUNT]; static std::string sButtonToolTips[BUTTON_COUNT]; static std::string sButtonToolTipsIndex[BUTTON_COUNT]; @@ -525,7 +525,7 @@ private: typedef void(*click_callback)(LLFloater*); static click_callback sButtonCallbacks[BUTTON_COUNT]; - BOOL mHasBeenDraggedWhileMinimized; + bool mHasBeenDraggedWhileMinimized; S32 mPreviousMinimizedBottom; S32 mPreviousMinimizedLeft; @@ -551,7 +551,7 @@ protected: public: - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); /*virtual*/ LLRect getSnapRect() const; /*virtual*/ void refresh(); @@ -559,25 +559,25 @@ public: LLRect findNeighboringPosition( LLFloater* reference_floater, LLFloater* neighbor ); // Given a child of gFloaterView, make sure this view can fit entirely onscreen. - void adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars = false); + void adjustToFitScreen(LLFloater* floater, bool allow_partial_outside, bool snap_in_toolbars = false); void setMinimizePositionVerticalOffset(S32 offset) { mMinimizePositionVOffset = offset; } void getMinimizePosition( S32 *left, S32 *bottom); void restoreAll(); // un-minimize all floaters typedef std::set<LLView*> skip_list_t; - void pushVisibleAll(BOOL visible, const skip_list_t& skip_list = skip_list_t()); + void pushVisibleAll(bool visible, const skip_list_t& skip_list = skip_list_t()); void popVisibleAll(const skip_list_t& skip_list = skip_list_t()); - void setCycleMode(BOOL mode) { mFocusCycleMode = mode; } - BOOL getCycleMode() const { return mFocusCycleMode; } - void bringToFront( LLFloater* child, BOOL give_focus = TRUE, BOOL restore = TRUE ); + void setCycleMode(bool mode) { mFocusCycleMode = mode; } + bool getCycleMode() const { return mFocusCycleMode; } + void bringToFront( LLFloater* child, bool give_focus = true, bool restore = true ); void highlightFocusedFloater(); void unhighlightFocusedFloater(); void focusFrontFloater(); void destroyAllChildren(); // attempt to close all floaters void closeAllChildren(bool app_quitting); - BOOL allChildrenClosed(); + bool allChildrenClosed(); void shiftFloaters(S32 x_offset, S32 y_offset); void hideAllFloaters(); @@ -608,7 +608,7 @@ private: LLRect mToolbarBottomRect; LLRect mToolbarRightRect; LLHandle<LLView> mSnapView; - BOOL mFocusCycleMode; + bool mFocusCycleMode; S32 mSnapOffsetBottom; S32 mSnapOffsetRight; S32 mMinimizePositionVOffset; diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 62c26709d8..d87e4ce70f 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -248,7 +248,7 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str // Visibility Management //static -LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) +LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus) { if( sBlockShowFloaters // see EXT-7090 @@ -259,7 +259,7 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, { instance->openFloater(key); if (focus) - instance->setFocus(TRUE); + instance->setFocus(true); } return instance; } @@ -288,7 +288,7 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) } else { - return showInstance(name, key, TRUE) ? true : false; + return showInstance(name, key, true) ? true : false; } } @@ -332,7 +332,7 @@ void LLFloaterReg::hideVisibleInstances(const std::set<std::string>& exceptions) for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter) { LLFloater* floater = *iter; - floater->pushVisible(FALSE); + floater->pushVisible(false); } } } @@ -409,7 +409,7 @@ std::string LLFloaterReg::getBaseControlName(const std::string& name) std::string LLFloaterReg::declareVisibilityControl(const std::string& name) { std::string controlname = getVisibilityControlName(name); - LLFloater::getControlGroup()->declareBOOL(controlname, FALSE, + LLFloater::getControlGroup()->declareBOOL(controlname, false, llformat("Window Visibility for %s", name.c_str()), LLControlVariable::PERSIST_NONDFT); return controlname; @@ -419,7 +419,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name) std::string LLFloaterReg::declareDockStateControl(const std::string& name) { std::string controlname = getDockStateControlName(name); - LLFloater::getControlGroup()->declareBOOL(controlname, TRUE, + LLFloater::getControlGroup()->declareBOOL(controlname, true, llformat("Window Docking state for %s", name.c_str()), LLControlVariable::PERSIST_NONDFT); return controlname; @@ -492,7 +492,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& { if (host->isMinimized() || !host->isShown() || !host->isFrontmost()) { - host->setMinimized(FALSE); + host->setMinimized(false); instance->openFloater(key); instance->setVisibleAndFrontmost(true, key); } @@ -500,7 +500,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& { instance->openFloater(key); instance->setVisibleAndFrontmost(true, key); - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -511,7 +511,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& { if (instance->isMinimized()) { - instance->setMinimized(FALSE); + instance->setMinimized(false); instance->setVisibleAndFrontmost(true, key); } else if (!instance->isShown()) @@ -552,7 +552,7 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke { if (host->isMinimized() || !host->isShown() || !host->isFrontmost()) { - host->setMinimized(FALSE); + host->setMinimized(false); instance->openFloater(key); instance->setVisibleAndFrontmost(true, key); } @@ -560,14 +560,14 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke { instance->openFloater(key); instance->setVisibleAndFrontmost(true, key); - instance->setFocus(TRUE); + instance->setFocus(true); } } else { if (instance->isMinimized()) { - instance->setMinimized(FALSE); + instance->setMinimized(false); instance->setVisibleAndFrontmost(true, key); } else if (!instance->isShown()) diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index eaa59b1d6f..85d6ad6b12 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -102,7 +102,7 @@ public: // Visibility Management // return NULL if instance not found or can't create instance (no builder) - static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE); + static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false); // Close a floater (may destroy or set invisible) // return false if can't find instance static bool hideInstance(const std::string& name, const LLSD& key = LLSD()); @@ -145,7 +145,7 @@ public: } template <class T> - static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE) + static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false) { return dynamic_cast<T*>(showInstance(name, key, focus)); } diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 4b3a0a5d21..392bfb8bf4 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -35,7 +35,7 @@ const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; LLFlyoutButton::LLFlyoutButton(const Params& p) : LLComboBox(p), - mToggleState(FALSE), + mToggleState(false), mActionButton(NULL) { // Always use text box @@ -69,7 +69,7 @@ void LLFlyoutButton::draw() LLComboBox::draw(); } -void LLFlyoutButton::setToggleState(BOOL state) +void LLFlyoutButton::setToggleState(bool state) { mToggleState = state; } diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index 36998eba2e..15c7b4600f 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -56,13 +56,13 @@ protected: public: virtual void draw(); - void setToggleState(BOOL state); + void setToggleState(bool state); void onActionButtonClick(const LLSD& data); protected: LLButton* mActionButton; - BOOL mToggleState; + bool mToggleState; }; #endif // LL_LLFLYOUTBUTTON_H diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 7b0a6cbdae..c0fdcf8bf6 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -41,21 +41,21 @@ LLFocusableElement::LLFocusableElement() } // virtual -BOOL LLFocusableElement::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLFocusableElement::handleKey(KEY key, MASK mask, bool called_from_parent) { - return FALSE; + return false; } // virtual -BOOL LLFocusableElement::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLFocusableElement::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { - return FALSE; + return false; } // virtual -BOOL LLFocusableElement::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLFocusableElement::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { - return FALSE; + return false; } // virtual @@ -96,12 +96,12 @@ void LLFocusableElement::onTopLost() if (mTopLostCallback) (*mTopLostCallback)(this); } -BOOL LLFocusableElement::hasFocus() const +bool LLFocusableElement::hasFocus() const { return gFocusMgr.getKeyboardFocus() == this; } -void LLFocusableElement::setFocus(BOOL b) +void LLFocusableElement::setFocus(bool b) { } @@ -149,9 +149,9 @@ LLFocusMgr::LLFocusMgr() mKeyboardFocus( NULL ), mLastKeyboardFocus( NULL ), mDefaultKeyboardFocus( NULL ), - mKeystrokesOnly(FALSE), + mKeystrokesOnly(false), mTopCtrl( NULL ), - mAppHasFocus(TRUE), // Macs don't seem to notify us that we've gotten focus, so default to true + mAppHasFocus(true), // Macs don't seem to notify us that we've gotten focus, so default to true mImpl(new LLFocusMgr::Impl) { } @@ -186,7 +186,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view ) LLUI::getInstance()->removePopup(view); } -void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL keystrokes_only) +void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, bool lock, bool keystrokes_only) { // notes if keyboard focus is changed again (by onFocusLost/onFocusReceived) // making the rest of our processing unnecessary since it will already be @@ -269,7 +269,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL // releasing keyboard focus, move to the default. if (mDefaultKeyboardFocus != NULL && mKeyboardFocus == NULL) { - mDefaultKeyboardFocus->setFocus(TRUE); + mDefaultKeyboardFocus->setFocus(true); } LLView* focus_subtree = dynamic_cast<LLView*>(mKeyboardFocus); @@ -301,23 +301,23 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL } -// Returns TRUE is parent or any descedent of parent has keyboard focus. -BOOL LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const +// Returns true is parent or any descedent of parent has keyboard focus. +bool LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const { LLView* focus_view = dynamic_cast<LLView*>(mKeyboardFocus); while( focus_view ) { if( focus_view == parent ) { - return TRUE; + return true; } focus_view = focus_view->getParent(); } - return FALSE; + return false; } -// Returns TRUE is parent or any descedent of parent is the mouse captor. -BOOL LLFocusMgr::childHasMouseCapture( const LLView* parent ) const +// Returns true is parent or any descedent of parent is the mouse captor. +bool LLFocusMgr::childHasMouseCapture( const LLView* parent ) const { if( mMouseCaptor && dynamic_cast<LLView*>(mMouseCaptor) != NULL ) { @@ -326,12 +326,12 @@ BOOL LLFocusMgr::childHasMouseCapture( const LLView* parent ) const { if( captor_view == parent ) { - return TRUE; + return true; } captor_view = captor_view->getParent(); } } - return FALSE; + return false; } void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus ) @@ -400,18 +400,18 @@ void LLFocusMgr::removeMouseCaptureWithoutCallback( const LLMouseHandler* captor } -BOOL LLFocusMgr::childIsTopCtrl( const LLView* parent ) const +bool LLFocusMgr::childIsTopCtrl( const LLView* parent ) const { LLView* top_view = (LLView*)mTopCtrl; while( top_view ) { if( top_view == parent ) { - return TRUE; + return true; } top_view = top_view->getParent(); } - return FALSE; + return false; } @@ -471,7 +471,7 @@ void LLFocusMgr::triggerFocusFlash() mFocusFlashTimer.reset(); } -void LLFocusMgr::setAppHasFocus(BOOL focus) +void LLFocusMgr::setAppHasFocus(bool focus) { if (!mAppHasFocus && focus) { diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 0e3d7d8e59..3276135faf 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -45,8 +45,8 @@ public: LLFocusableElement(); virtual ~LLFocusableElement(); - virtual void setFocus( BOOL b ); - virtual BOOL hasFocus() const; + virtual void setFocus( bool b ); + virtual bool hasFocus() const; typedef boost::signals2::signal<void(LLFocusableElement*)> focus_signal_t; @@ -56,9 +56,9 @@ public: boost::signals2::connection setTopLostCallback(const focus_signal_t::slot_type& cb); // These were brought up the hierarchy from LLView so that we don't have to use dynamic_cast when dealing with keyboard focus. - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); + virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); + virtual bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); + virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); /** * If true this LLFocusableElement wants to receive KEYUP and KEYDOWN messages @@ -89,23 +89,23 @@ public: void setMouseCapture(LLMouseHandler* new_captor); // new_captor = NULL to release the mouse. LLMouseHandler* getMouseCapture() const { return mMouseCaptor; } void removeMouseCaptureWithoutCallback( const LLMouseHandler* captor ); - BOOL childHasMouseCapture( const LLView* parent ) const; + bool childHasMouseCapture( const LLView* parent ) const; // Keyboard Focus - void setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock = FALSE, BOOL keystrokes_only = FALSE); // new_focus = NULL to release the focus. + void setKeyboardFocus(LLFocusableElement* new_focus, bool lock = false, bool keystrokes_only = false); // new_focus = NULL to release the focus. LLFocusableElement* getKeyboardFocus() const { return mKeyboardFocus; } LLFocusableElement* getLastKeyboardFocus() const { return mLastKeyboardFocus; } - BOOL childHasKeyboardFocus( const LLView* parent ) const; + bool childHasKeyboardFocus( const LLView* parent ) const; void removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus ); - BOOL getKeystrokesOnly() { return mKeystrokesOnly; } - void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } + bool getKeystrokesOnly() { return mKeystrokesOnly; } + void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; } F32 getFocusFlashAmt() const; S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); } LLColor4 getFocusColor() const; void triggerFocusFlash(); - BOOL getAppHasFocus() const { return mAppHasFocus; } - void setAppHasFocus(BOOL focus); + bool getAppHasFocus() const { return mAppHasFocus; } + void setAppHasFocus(bool focus); LLView* getLastFocusForGroup(LLView* subtree_root) const; void clearLastFocusForGroup(LLView* subtree_root); @@ -119,13 +119,13 @@ public: void setTopCtrl(LLUICtrl* new_top); LLUICtrl* getTopCtrl() const { return mTopCtrl; } void removeTopCtrlWithoutCallback( const LLUICtrl* top_view ); - BOOL childIsTopCtrl( const LLView* parent ) const; + bool childIsTopCtrl( const LLView* parent ) const; // All Three void releaseFocusIfNeeded( LLView* top_view ); void lockFocus(); void unlockFocus(); - BOOL focusLocked() const { return mLockedView != NULL; } + bool focusLocked() const { return mLockedView != NULL; } bool keyboardFocusHasAccelerators() const; @@ -141,14 +141,14 @@ private: LLFocusableElement* mKeyboardFocus; // Keyboard events are preemptively routed to this object LLFocusableElement* mLastKeyboardFocus; // who last had focus LLFocusableElement* mDefaultKeyboardFocus; - BOOL mKeystrokesOnly; + bool mKeystrokesOnly; // Top View LLUICtrl* mTopCtrl; LLFrameTimer mFocusFlashTimer; - BOOL mAppHasFocus; + bool mAppHasFocus; Impl * mImpl; }; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index c9f74c63f8..0ac04e374d 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -84,12 +84,12 @@ F32 LLFolderView::sAutoOpenTime = 1.f; class LLCloseAllFoldersFunctor : public LLFolderViewFunctor { public: - LLCloseAllFoldersFunctor(BOOL close) { mOpen = !close; } + LLCloseAllFoldersFunctor(bool close) { mOpen = !close; } virtual ~LLCloseAllFoldersFunctor() {} virtual void doFolder(LLFolderViewFolder* folder); virtual void doItem(LLFolderViewItem* item); - BOOL mOpen; + bool mOpen; }; @@ -167,21 +167,21 @@ LLFolderView::LLFolderView(const Params& p) mAllowMultiSelect(p.allow_multiselect), mAllowDrag(p.allow_drag), mShowEmptyMessage(p.show_empty_message), - mShowFolderHierarchy(FALSE), + mShowFolderHierarchy(false), mRenameItem( NULL ), - mNeedsScroll( FALSE ), + mNeedsScroll( false ), mUseLabelSuffix(p.use_label_suffix), mSuppressFolderMenu(p.suppress_folder_menu), - mPinningSelectedItem(FALSE), - mNeedsAutoSelect( FALSE ), - mAutoSelectOverride(FALSE), - mNeedsAutoRename(FALSE), - mShowSelectionContext(FALSE), - mShowSingleSelection(FALSE), + mPinningSelectedItem(false), + mNeedsAutoSelect( false ), + mAutoSelectOverride(false), + mNeedsAutoRename(false), + mShowSelectionContext(false), + mShowSingleSelection(false), mArrangeGeneration(0), mSignalSelectCallback(0), mMinWidth(0), - mDragAndDropThisFrame(FALSE), + mDragAndDropThisFrame(false), mCallbackRegistrar(NULL), mEnableRegistrar(NULL), mUseEllipses(p.use_ellipses), @@ -205,7 +205,7 @@ LLFolderView::LLFolderView(const Params& p) mAutoOpenItems.setDepth(AUTO_OPEN_STACK_DEPTH); mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); - mKeyboardSelection = FALSE; + mKeyboardSelection = false; mIndentation = getParentFolder() ? getParentFolder()->getIndentation() + mLocalIndentation : 0; //clear label @@ -280,9 +280,9 @@ LLFolderView::~LLFolderView( void ) mViewModel = NULL; } -BOOL LLFolderView::canFocusChildren() const +bool LLFolderView::canFocusChildren() const { - return FALSE; + return false; } void LLFolderView::addFolder( LLFolderViewFolder* folder) @@ -293,7 +293,7 @@ void LLFolderView::addFolder( LLFolderViewFolder* folder) void LLFolderView::closeAllFolders() { // Close all the folders - setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN); arrangeAll(); } @@ -303,7 +303,7 @@ void LLFolderView::openTopLevelFolders() iter != mFolders.end();) { folders_t::iterator fit = iter++; - (*fit)->setOpen(TRUE); + (*fit)->setOpen(true); } } @@ -343,7 +343,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) getViewModelItem()->filter(filter); } -void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFolderView::reshape(S32 width, S32 height, bool called_from_parent) { LLRect scroll_rect; if (mScrollContainer) @@ -360,7 +360,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) width = scroll_rect.getWidth(); } LLView::reshape(width, height, called_from_parent); - mReshapeSignal(mSelectedItems, FALSE); + mReshapeSignal(mSelectedItems, false); } void LLFolderView::addToSelectionList(LLFolderViewItem* item) @@ -371,9 +371,9 @@ void LLFolderView::addToSelectionList(LLFolderViewItem* item) } if (mSelectedItems.size()) { - mSelectedItems.back()->setIsCurSelection(FALSE); + mSelectedItems.back()->setIsCurSelection(false); } - item->setIsCurSelection(TRUE); + item->setIsCurSelection(true); mSelectedItems.push_back(item); } @@ -381,7 +381,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item) { if (mSelectedItems.size()) { - mSelectedItems.back()->setIsCurSelection(FALSE); + mSelectedItems.back()->setIsCurSelection(false); } selected_items_t::iterator item_iter; @@ -398,7 +398,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item) } if (mSelectedItems.size()) { - mSelectedItems.back()->setIsCurSelection(TRUE); + mSelectedItems.back()->setIsCurSelection(true); } } @@ -419,19 +419,19 @@ LLFolderView::selected_items_t& LLFolderView::getSelectedItems( void ) } // Record the selected item and pass it down the hierachy. -BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus) +bool LLFolderView::setSelection(LLFolderViewItem* selection, bool openitem, + bool take_keyboard_focus) { mSignalSelectCallback = take_keyboard_focus ? SIGNAL_KEYBOARD_FOCUS : SIGNAL_NO_KEYBOARD_FOCUS; if( selection == this ) { - return FALSE; + return false; } if( selection && take_keyboard_focus) { - mParentPanel.get()->setFocus(TRUE); + mParentPanel.get()->setFocus(true); } // clear selection down here because change of keyboard focus can potentially @@ -443,7 +443,7 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, addToSelectionList(selection); } - BOOL rv = LLFolderViewFolder::setSelection(selection, openitem, take_keyboard_focus); + bool rv = LLFolderViewFolder::setSelection(selection, openitem, take_keyboard_focus); if(openitem && selection) { selection->getParentFolder()->requestArrange(); @@ -454,14 +454,14 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, return rv; } -BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) +bool LLFolderView::changeSelection(LLFolderViewItem* selection, bool selected) { - BOOL rv = FALSE; + bool rv = false; // can't select root folder if(!selection || selection == this) { - return FALSE; + return false; } if (!mAllowMultiSelect) @@ -478,7 +478,7 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) } } - BOOL on_list = (item_iter != mSelectedItems.end()); + bool on_list = (item_iter != mSelectedItems.end()); if(selected && !on_list) { @@ -510,7 +510,7 @@ void LLFolderView::sanitizeSelection() LLFolderViewItem* item = *item_iter; // ensure that each ancestor is open and potentially passes filtering - BOOL visible = false; + bool visible = false; if(item->getViewModelItem() != NULL) { visible = item->getViewModelItem()->potentiallyVisible(); // initialize from filter state for this item @@ -558,7 +558,7 @@ void LLFolderView::sanitizeSelection() std::vector<LLFolderViewItem*>::iterator item_it; for (item_it = items_to_remove.begin(); item_it != items_to_remove.end(); ++item_it ) { - changeSelection(*item_it, FALSE); // toggle selection (also removes from list) + changeSelection(*item_it, false); // toggle selection (also removes from list) } // if nothing selected after prior constraints... @@ -596,7 +596,7 @@ void LLFolderView::sanitizeSelection() if (new_selection) { - setSelection(new_selection, FALSE, FALSE); + setSelection(new_selection, false, false); } } } @@ -664,12 +664,12 @@ void LLFolderView::draw() if (hasVisibleChildren()) { - mStatusTextBox->setVisible( FALSE ); + mStatusTextBox->setVisible( false ); } else if (mShowEmptyMessage) { mStatusTextBox->setValue(getFolderViewModel()->getStatusText(mItems.empty() && mFolders.empty())); - mStatusTextBox->setVisible( TRUE ); + mStatusTextBox->setVisible( true ); // firstly reshape message textbox with current size. This is necessary to // LLTextBox::getTextPixelHeight works properly @@ -711,7 +711,7 @@ void LLFolderView::draw() // and arrow for the root folder LLView::draw(); - mDragAndDropThisFrame = FALSE; + mDragAndDropThisFrame = false; } void LLFolderView::finishRenamingItem( void ) @@ -830,7 +830,7 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) while (close_item && close_item != item->getParentFolder()) { mAutoOpenItems.pop(); - close_item->setOpenArrangeRecursively(FALSE); + close_item->setOpenArrangeRecursively(false); close_item = mAutoOpenItems.check(); } @@ -838,7 +838,7 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) mAutoOpenItems.push(item); - item->setOpen(TRUE); + item->setOpen(true); if(!item->isSingleFolderMode()) { LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); @@ -852,7 +852,7 @@ void LLFolderView::closeAutoOpenedFolders() while (mAutoOpenItems.check()) { LLFolderViewFolder* close_item = mAutoOpenItems.pop(); - close_item->setOpen(FALSE); + close_item->setOpen(false); } if (mAutoOpenCandidate) @@ -863,7 +863,7 @@ void LLFolderView::closeAutoOpenedFolders() mAutoOpenTimer.stop(); } -BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder) +bool LLFolderView::autoOpenTest(LLFolderViewFolder* folder) { if (folder && mAutoOpenCandidate == folder) { @@ -877,10 +877,10 @@ BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder) { autoOpenItem(folder); mAutoOpenTimer.stop(); - return TRUE; + return true; } } - return FALSE; + return false; } // otherwise new candidate, restart timer @@ -890,14 +890,14 @@ BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder) } mAutoOpenCandidate = folder; mAutoOpenTimer.start(); - return FALSE; + return false; } -BOOL LLFolderView::canCopy() const +bool LLFolderView::canCopy() const { if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0))) { - return FALSE; + return false; } for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it) @@ -905,10 +905,10 @@ BOOL LLFolderView::canCopy() const const LLFolderViewItem* item = *selected_it; if (!item->getViewModelItem()->isItemCopyable()) { - return FALSE; + return false; } } - return TRUE; + return true; } // copy selected item @@ -933,11 +933,11 @@ void LLFolderView::copy() mSearchString.clear(); } -BOOL LLFolderView::canCut() const +bool LLFolderView::canCut() const { if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0))) { - return FALSE; + return false; } for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it) @@ -947,10 +947,10 @@ BOOL LLFolderView::canCut() const if (!listener || !listener->isItemRemovable()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLFolderView::cut() @@ -982,11 +982,11 @@ void LLFolderView::cut() mSearchString.clear(); } -BOOL LLFolderView::canPaste() const +bool LLFolderView::canPaste() const { if (mSelectedItems.empty()) { - return FALSE; + return false; } if(getVisible() && getEnabled()) @@ -1003,13 +1003,13 @@ BOOL LLFolderView::canPaste() const listener = folderp->getViewModelItem(); if (!listener || !listener->isClipboardPasteable()) { - return FALSE; + return false; } } } - return TRUE; + return true; } - return FALSE; + return false; } // paste selected item @@ -1069,17 +1069,17 @@ void LLFolderView::startRenamingSelectedItem( void ) mRenamer->setText(item->getName()); mRenamer->selectAll(); - mRenamer->setVisible( TRUE ); + mRenamer->setVisible( true ); // set focus will fail unless item is visible - mRenamer->setFocus( TRUE ); + mRenamer->setFocus( true ); mRenamer->setTopLostCallback(boost::bind(&LLFolderView::onRenamerLost, this)); LLUI::getInstance()->addPopup(mRenamer); } } -BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) +bool LLFolderView::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; // SL-51858: Key presses are not being passed to the Popup menu. // A proper fix is non-trivial so instead just close the menu. @@ -1094,7 +1094,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) case KEY_F2: mSearchString.clear(); startRenamingSelectedItem(); - handled = TRUE; + handled = true; break; case KEY_RETURN: @@ -1104,7 +1104,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { finishRenamingItem(); mSearchString.clear(); - handled = TRUE; + handled = true; } } break; @@ -1113,7 +1113,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if( mRenameItem && mRenamer->getVisible() ) { closeRenamer(); - handled = TRUE; + handled = true; } mSearchString.clear(); break; @@ -1124,7 +1124,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { mScrollContainer->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -1133,7 +1133,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { mScrollContainer->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -1142,7 +1142,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { mScrollContainer->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -1157,14 +1157,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = getCurSelectedItem(); - BOOL shift_select = mask & MASK_SHIFT; + bool shift_select = mask & MASK_SHIFT; // don't shift select down to children of folders (they are implicitly selected through parent) LLFolderViewItem* next = last_selected->getNextOpenNode(!shift_select); if (!mKeyboardSelection || (!shift_select && (!next || next == last_selected))) { - setSelection(last_selected, FALSE, TRUE); - mKeyboardSelection = TRUE; + setSelection(last_selected, false, true); + mKeyboardSelection = true; } if (shift_select) @@ -1174,12 +1174,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if (next->isSelected()) { // shrink selection - changeSelection(last_selected, FALSE); + changeSelection(last_selected, false); } else if (last_selected->getParentFolder() == next->getParentFolder()) { // grow selection - changeSelection(next, TRUE); + changeSelection(next, true); } } } @@ -1193,11 +1193,11 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed { clearSelection(); - return TRUE; + return true; } - return FALSE; + return false; } - setSelection( next, FALSE, TRUE ); + setSelection( next, false, true ); } else { @@ -1205,14 +1205,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed { clearSelection(); - return TRUE; + return true; } - return FALSE; + return false; } } scrollToShowSelection(); mSearchString.clear(); - handled = TRUE; + handled = true; } break; @@ -1220,14 +1220,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = mSelectedItems.back(); - BOOL shift_select = mask & MASK_SHIFT; + bool shift_select = mask & MASK_SHIFT; // don't shift select down to children of folders (they are implicitly selected through parent) LLFolderViewItem* prev = last_selected->getPreviousOpenNode(!shift_select); if (!mKeyboardSelection || (!shift_select && prev == this)) { - setSelection(last_selected, FALSE, TRUE); - mKeyboardSelection = TRUE; + setSelection(last_selected, false, true); + mKeyboardSelection = true; } if (shift_select) @@ -1237,12 +1237,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if (prev->isSelected()) { // shrink selection - changeSelection(last_selected, FALSE); + changeSelection(last_selected, false); } else if (last_selected->getParentFolder() == prev->getParentFolder()) { // grow selection - changeSelection(prev, TRUE); + changeSelection(prev, true); } } } @@ -1256,18 +1256,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if(notifyParent(LLSD().with("action","select_prev")) > 0 )//message was processed { clearSelection(); - return TRUE; + return true; } - return FALSE; + return false; } - setSelection( prev, FALSE, TRUE ); + setSelection( prev, false, true ); } } scrollToShowSelection(); mSearchString.clear(); - handled = TRUE; + handled = true; } break; @@ -1275,9 +1275,9 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if(mSelectedItems.size()) { LLFolderViewItem* last_selected = getCurSelectedItem(); - last_selected->setOpen( TRUE ); + last_selected->setOpen( true ); mSearchString.clear(); - handled = TRUE; + handled = true; } break; @@ -1287,21 +1287,21 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) LLFolderViewItem* last_selected = getCurSelectedItem(); if(last_selected && last_selected->isSingleFolderMode()) { - handled = FALSE; + handled = false; break; } LLFolderViewItem* parent_folder = last_selected->getParentFolder(); if (!last_selected->isOpen() && parent_folder && parent_folder->getParentFolder()) { - setSelection(parent_folder, FALSE, TRUE); + setSelection(parent_folder, false, true); } else { - last_selected->setOpen( FALSE ); + last_selected->setOpen( false ); } mSearchString.clear(); scrollToShowSelection(); - handled = TRUE; + handled = true; } break; } @@ -1365,7 +1365,7 @@ bool LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) return LLView::handleMouseDown( x, y, mask ); } -BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward) +bool LLFolderView::search(LLFolderViewItem* first_item, const std::string &search_string, bool backward) { // get first selected item LLFolderViewItem* search_item = first_item; @@ -1382,7 +1382,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc } // search over all open nodes for first substring match (with wrapping) - BOOL found = FALSE; + bool found = false; LLFolderViewItem* original_search_item = search_item; do { @@ -1408,7 +1408,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc S32 search_string_length = llmin(upper_case_string.size(), current_item_label.size()); if (!current_item_label.compare(0, search_string_length, upper_case_string)) { - found = TRUE; + found = true; break; } if (backward) @@ -1425,7 +1425,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc if (found) { - setSelection(search_item, FALSE, TRUE); + setSelection(search_item, false, true); scrollToShowSelection(); } @@ -1524,7 +1524,7 @@ bool LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) } // Add "--no options--" if the menu is completely blank. -BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const +bool LLFolderView::addNoOptions(LLMenuGL* menu) const { const std::string nooptions_str = "--no options--"; LLView *nooptions_item = NULL; @@ -1537,7 +1537,7 @@ BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const LLView *menu_item = (*itor); if (menu_item->getVisible()) { - return FALSE; + return false; } std::string name = menu_item->getName(); if (menu_item->getName() == nooptions_str) @@ -1547,11 +1547,11 @@ BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const } if (nooptions_item) { - nooptions_item->setVisible(TRUE); - nooptions_item->setEnabled(FALSE); - return TRUE; + nooptions_item->setVisible(true); + nooptions_item->setEnabled(false); + return true; } - return FALSE; + return false; } bool LLFolderView::handleHover( S32 x, S32 y, MASK mask ) @@ -1575,15 +1575,15 @@ void LLFolderView::setHoveredItem(LLFolderViewItem* itemp) } } -BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - mDragAndDropThisFrame = TRUE; + mDragAndDropThisFrame = true; // have children handle it first - BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, + bool handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); // when drop is not handled by child, it should be handled @@ -1614,7 +1614,7 @@ void LLFolderView::scrollToShowSelection() { if ( mSelectedItems.size() ) { - mNeedsScroll = TRUE; + mNeedsScroll = true; } } @@ -1627,7 +1627,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr // don't scroll to items when mouse is being used to scroll/drag and drop if (gFocusMgr.childHasMouseCapture(mScrollContainer)) { - mNeedsScroll = FALSE; + mNeedsScroll = false; return; } @@ -1665,18 +1665,18 @@ LLRect LLFolderView::getVisibleRect() return visible_rect; } -BOOL LLFolderView::getShowSelectionContext() +bool LLFolderView::getShowSelectionContext() { if (mShowSelectionContext) { - return TRUE; + return true; } LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); if (menu && menu->getVisible()) { - return TRUE; + return true; } - return FALSE; + return false; } void LLFolderView::setShowSingleSelection(bool show) @@ -1707,7 +1707,7 @@ void LLFolderView::update() if (filter_object.isModified() && filter_object.isNotDefault() && mParentPanel.get()->getVisible()) { - mNeedsAutoSelect = TRUE; + mNeedsAutoSelect = true; } // Filter to determine visibility before arranging @@ -1734,7 +1734,7 @@ void LLFolderView::update() applyFunctorRecursively(functor); } - // Open filtered folders for folder views with mAutoSelectOverride=TRUE. + // Open filtered folders for folder views with mAutoSelectOverride=true. // Used by LLPlacesFolderView. if (filter_object.showAllResults()) { @@ -1747,7 +1747,7 @@ void LLFolderView::update() scrollToShowSelection(); } - BOOL filter_finished = mViewModel->contentsReady() + bool filter_finished = mViewModel->contentsReady() && (getViewModelItem()->passedFilter() || ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration() && !filter_modified)); @@ -1756,10 +1756,10 @@ void LLFolderView::update() || gFocusMgr.childHasMouseCapture(mParentPanel.get())) { // finishing the filter process, giving focus to the folder view, or dragging the scrollbar all stop the auto select process - mNeedsAutoSelect = FALSE; + mNeedsAutoSelect = false; } - BOOL is_visible = isInVisibleChain() || mForceArrange; + bool is_visible = isInVisibleChain() || mForceArrange; //Puts folders/items in proper positions // arrange() takes the model filter flag into account and call sort() if necessary (CHUI-849) @@ -1784,7 +1784,7 @@ void LLFolderView::update() if (!mPinningSelectedItem && !mSelectedItems.empty()) { // lets pin it! - mPinningSelectedItem = TRUE; + mPinningSelectedItem = true; //Computes visible area const LLRect visible_content_rect = (mScrollContainer ? mScrollContainer->getVisibleContentRect() : LLRect()); @@ -1819,7 +1819,7 @@ void LLFolderView::update() // stop pinning selected item after folders stop rearranging if (!needsArrange()) { - mPinningSelectedItem = FALSE; + mPinningSelectedItem = false; } } @@ -1855,7 +1855,7 @@ void LLFolderView::update() } if (!needs_arrange || !is_visible) { - mNeedsScroll = FALSE; + mNeedsScroll = false; } } } @@ -1872,15 +1872,15 @@ void LLFolderView::update() if (mSignalSelectCallback) { //RN: we use keyboard focus as a proxy for user-explicit actions - BOOL take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS); + bool take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS); mSelectSignal(mSelectedItems, take_keyboard_focus); } - mSignalSelectCallback = FALSE; + mSignalSelectCallback = false; } } else { - mSignalSelectCallback = FALSE; + mSignalSelectCallback = false; } } @@ -1915,7 +1915,7 @@ void LLFolderView::updateRenamerPosition() S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_rect.getWidth() - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH); S32 height = mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD; - mRenamer->reshape( width, height, TRUE ); + mRenamer->reshape( width, height, true ); } } @@ -1927,9 +1927,9 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) LLView::child_list_t::const_iterator menu_itor; for (menu_itor = list->begin(); menu_itor != list->end(); ++menu_itor) { - (*menu_itor)->setVisible(FALSE); - (*menu_itor)->pushVisible(TRUE); - (*menu_itor)->setEnabled(TRUE); + (*menu_itor)->setVisible(false); + (*menu_itor)->pushVisible(true); + (*menu_itor)->setEnabled(true); } // Successively filter out invalid options @@ -1995,7 +1995,7 @@ bool LLFolderView::selectFirstItem() { LLFolderViewItem* itemp = folder->getNextFromChild(0,true); if(itemp) - setSelection(itemp,FALSE,TRUE); + setSelection(itemp,false,true); return true; } @@ -2006,7 +2006,7 @@ bool LLFolderView::selectFirstItem() LLFolderViewItem* itemp = (*iit); if (itemp->getVisible()) { - setSelection(itemp,FALSE,TRUE); + setSelection(itemp,false,true); return true; } } @@ -2020,7 +2020,7 @@ bool LLFolderView::selectLastItem() LLFolderViewItem* itemp = (*iit); if (itemp->getVisible()) { - setSelection(itemp,FALSE,TRUE); + setSelection(itemp,false,true); return true; } } @@ -2032,7 +2032,7 @@ bool LLFolderView::selectLastItem() { LLFolderViewItem* itemp = folder->getPreviousFromChild(0,true); if(itemp) - setSelection(itemp,FALSE,TRUE); + setSelection(itemp,false,true); return true; } } @@ -2073,15 +2073,15 @@ void LLFolderView::onRenamerLost() { if (mRenamer && mRenamer->getVisible()) { - mRenamer->setVisible(FALSE); + mRenamer->setVisible(false); // will commit current name (which could be same as original name) - mRenamer->setFocus(FALSE); + mRenamer->setFocus(false); } if( mRenameItem ) { - setSelection( mRenameItem, TRUE ); + setSelection( mRenameItem, true ); mRenameItem = NULL; } } @@ -2089,17 +2089,17 @@ void LLFolderView::onRenamerLost() LLFolderViewItem* LLFolderView::getNextUnselectedItem() { LLFolderViewItem* last_item = *mSelectedItems.rbegin(); - LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE); + LLFolderViewItem* new_selection = last_item->getNextOpenNode(false); while(new_selection && new_selection->isSelected()) { - new_selection = new_selection->getNextOpenNode(FALSE); + new_selection = new_selection->getNextOpenNode(false); } if (!new_selection) { - new_selection = last_item->getPreviousOpenNode(FALSE); + new_selection = last_item->getPreviousOpenNode(false); while (new_selection && (new_selection->isInSelection())) { - new_selection = new_selection->getPreviousOpenNode(FALSE); + new_selection = new_selection->getPreviousOpenNode(false); } } return new_selection; diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index b235de95e9..3c604503f6 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -109,7 +109,7 @@ public: LLFolderView(const Params&); virtual ~LLFolderView( void ); - virtual BOOL canFocusChildren() const; + virtual bool canFocusChildren() const; virtual const LLFolderView* getRoot() const { return this; } virtual LLFolderView* getRoot() { return this; } @@ -120,7 +120,7 @@ public: LLFolderViewGroupedItemModel* getFolderViewGroupedItemModel() { return mGroupedItemModel; } const LLFolderViewGroupedItemModel* getFolderViewGroupedItemModel() const { return mGroupedItemModel; } - typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t; + typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, bool user_action)> signal_t; void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); } void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); } @@ -156,12 +156,12 @@ public: selected_items_t& getSelectedItems( void ); // Record the selected item and pass it down the hierarchy. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus = TRUE); + virtual bool setSelection(LLFolderViewItem* selection, bool openitem, + bool take_keyboard_focus = true); // This method is used to toggle the selection of an item. Walks // children, and keeps track of selected objects. - virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); + virtual bool changeSelection(LLFolderViewItem* selection, bool selected); virtual std::set<LLFolderViewItem*> getSelectionList() const; @@ -172,7 +172,7 @@ public: void removeFromSelectionList(LLFolderViewItem* item); bool startDrag(); - void setDragAndDropThisFrame() { mDragAndDropThisFrame = TRUE; } + void setDragAndDropThisFrame() { mDragAndDropThisFrame = true; } void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; } LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; } @@ -181,17 +181,17 @@ public: void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); - BOOL autoOpenTest(LLFolderViewFolder* item); - BOOL isOpen() const { return TRUE; } // root folder always open + bool autoOpenTest(LLFolderViewFolder* item); + bool isOpen() const { return true; } // root folder always open // Copy & paste - virtual BOOL canCopy() const; + virtual bool canCopy() const; virtual void copy(); - virtual BOOL canCut() const; + virtual bool canCut() const; virtual void cut(); - virtual BOOL canPaste() const; + virtual bool canPaste() const; virtual void paste(); LLFolderViewItem* getNextUnselectedItem(); @@ -200,20 +200,20 @@ public: void startRenamingSelectedItem( void ); // LLView functionality - ///*virtual*/ BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent ); - /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); + ///*virtual*/ bool handleKey( KEY key, MASK mask, bool called_from_parent ); + /*virtual*/ bool handleKeyHere( KEY key, MASK mask ); /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char); /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask ); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(FALSE); } + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(false); } virtual void draw(); virtual void deleteAllChildren(); @@ -223,22 +223,22 @@ public: void setScrollContainer( LLScrollContainer* parent ) { mScrollContainer = parent; } LLRect getVisibleRect(); - BOOL search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward); + bool search(LLFolderViewItem* first_item, const std::string &search_string, bool backward); void setShowSelectionContext(bool show) { mShowSelectionContext = show; } - BOOL getShowSelectionContext(); + bool getShowSelectionContext(); void setShowSingleSelection(bool show); - BOOL getShowSingleSelection() { return mShowSingleSelection; } + bool getShowSingleSelection() { return mShowSingleSelection; } F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); } bool getUseEllipses() { return mUseEllipses; } S32 getSelectedCount() { return (S32)mSelectedItems.size(); } void update(); // needs to be called periodically (e.g. once per frame) - BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } - BOOL needsAutoRename() { return mNeedsAutoRename; } - void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; } - void setPinningSelectedItem(BOOL val) { mPinningSelectedItem = val; } - void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; } + bool needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } + bool needsAutoRename() { return mNeedsAutoRename; } + void setNeedsAutoRename(bool val) { mNeedsAutoRename = val; } + void setPinningSelectedItem(bool val) { mPinningSelectedItem = val; } + void setAutoSelectOverride(bool val) { mAutoSelectOverride = val; } bool showItemLinkOverlays() { return mShowItemLinkOverlays; } @@ -280,7 +280,7 @@ protected: bool selectFirstItem(); bool selectLastItem(); - BOOL addNoOptions(LLMenuGL* menu) const; + bool addNoOptions(LLMenuGL* menu) const; protected: @@ -384,14 +384,14 @@ public: class LLSelectFirstFilteredItem : public LLFolderViewFunctor { public: - LLSelectFirstFilteredItem() : mItemSelected(FALSE), mFolderSelected(FALSE) {} + LLSelectFirstFilteredItem() : mItemSelected(false), mFolderSelected(false) {} virtual ~LLSelectFirstFilteredItem() {} virtual void doFolder(LLFolderViewFolder* folder); virtual void doItem(LLFolderViewItem* item); - BOOL wasItemSelected() { return mItemSelected || mFolderSelected; } + bool wasItemSelected() { return mItemSelected || mFolderSelected; } protected: - BOOL mItemSelected; - BOOL mFolderSelected; + bool mItemSelected; + bool mFolderSelected; }; class LLOpenFilteredFolders : public LLFolderViewFunctor @@ -406,15 +406,15 @@ public: class LLSaveFolderState : public LLFolderViewFunctor { public: - LLSaveFolderState() : mApply(FALSE) {} + LLSaveFolderState() : mApply(false) {} virtual ~LLSaveFolderState() {} virtual void doFolder(LLFolderViewFolder* folder); virtual void doItem(LLFolderViewItem* item) {} - void setApply(BOOL apply); + void setApply(bool apply); void clearOpenFolders() { mOpenFolders.clear(); } protected: std::set<LLUUID> mOpenFolders; - BOOL mApply; + bool mApply; }; class LLOpenFoldersWithSelection : public LLFolderViewFunctor diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 9069a95c9f..5956ae8b36 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(); } @@ -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, TRUE); + S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, 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; @@ -999,7 +999,7 @@ void LLFolderViewItem::draw() { suffix_font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); + S32_MAX, S32_MAX, &right_x, false ); } //--------------------------------------------------------------------------------// @@ -1013,7 +1013,7 @@ void LLFolderViewItem::draw() F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; font->renderUTF8( combined_string, filter_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - filter_string_length, S32_MAX, &right_x, FALSE ); + filter_string_length, S32_MAX, &right_x, false ); } else { @@ -1023,7 +1023,7 @@ void LLFolderViewItem::draw() F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel, filter_offset, label_filter_length); F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; font->renderUTF8( mLabel, filter_offset, match_string_left, yy, - sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, label_filter_length, S32_MAX, &right_x, FALSE ); + sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, label_filter_length, S32_MAX, &right_x, false ); } S32 suffix_filter_length = label_filter_length > 0 ? filter_string_length - label_filter_length : filter_string_length; @@ -1032,7 +1032,7 @@ void LLFolderViewItem::draw() S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size()); F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, mLabel.size()) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length); F32 yy = (F32)getRect().getHeight() - suffix_font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; - suffix_font->renderUTF8( mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, suffix_filter_length, S32_MAX, &right_x, FALSE ); + suffix_font->renderUTF8( mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, suffix_filter_length, S32_MAX, &right_x, false ); } } @@ -1066,8 +1066,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), @@ -1102,7 +1102,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); @@ -1262,7 +1262,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) > ll_round(mCurHeight) + mMaxFolderItemOverlap) { // hide if beyond current folder height - (*fit)->setVisible(FALSE); + (*fit)->setVisible(false); } } @@ -1274,7 +1274,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) if (getRect().getHeight() - (*iit)->getRect().mBottom > ll_round(mCurHeight) + mMaxFolderItemOverlap) { - (*iit)->setVisible(FALSE); + (*iit)->setVisible(false); } } } @@ -1292,7 +1292,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) return ll_round(mTargetHeight); } -BOOL LLFolderViewFolder::needsArrange() +bool LLFolderViewFolder::needsArrange() { return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); } @@ -1304,17 +1304,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 { @@ -1322,9 +1322,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();) @@ -1332,8 +1332,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(); @@ -1342,13 +1342,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; } @@ -1356,15 +1356,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(); @@ -1382,7 +1382,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(); @@ -1391,7 +1391,7 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec items_t::iterator iit = iter++; if((*iit)->changeSelection(selection, selected)) { - rv = TRUE; + rv = true; } } return rv; @@ -1575,7 +1575,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) @@ -1624,7 +1624,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 @@ -1634,12 +1634,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 { @@ -1650,11 +1650,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); } @@ -1712,11 +1712,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(); @@ -1725,7 +1725,7 @@ BOOL LLFolderViewFolder::isMovable() items_t::iterator iit = iter++; if(!(*iit)->isMovable()) { - return FALSE; + return false; } } @@ -1735,18 +1735,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(); @@ -1755,7 +1755,7 @@ BOOL LLFolderViewFolder::isRemovable() items_t::iterator iit = iter++; if(!(*iit)->isRemovable()) { - return FALSE; + return false; } } @@ -1765,10 +1765,10 @@ BOOL LLFolderViewFolder::isRemovable() folders_t::iterator fit = iter++; if(!(*fit)->isRemovable()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLFolderViewFolder::destroyRoot() @@ -1788,7 +1788,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); @@ -1811,7 +1811,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(); @@ -1842,7 +1842,7 @@ void LLFolderViewFolder::toggleOpen() } // Force a folder open or closed -void LLFolderViewFolder::setOpen(BOOL openitem) +void LLFolderViewFolder::setOpen(bool openitem) { if(mSingleFolderMode) { @@ -1859,9 +1859,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) { @@ -1896,17 +1896,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 @@ -1917,7 +1917,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 ) @@ -1960,14 +1960,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()) { @@ -1981,11 +1981,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, @@ -1995,14 +1995,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 @@ -2015,7 +2015,7 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, getRoot()->autoOpenTest(this); } - return TRUE; + return true; } @@ -2145,19 +2145,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 @@ -2175,16 +2175,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; } } @@ -2196,7 +2196,7 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, { if(item == (*iit)) { - found_item = TRUE; + found_item = true; // point to next item ++iit; break; @@ -2209,7 +2209,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; } @@ -2247,22 +2247,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 @@ -2280,7 +2280,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it { if(item == (*iit)) { - found_item = TRUE; + found_item = true; // point to next item ++iit; break; @@ -2294,7 +2294,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it { if(item == (*fit)) { - found_item = TRUE; + found_item = true; // point to next folder ++fit; break; @@ -2307,7 +2307,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; } diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index d178aa40d5..9d6b90dc3b 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -158,21 +158,21 @@ protected: static LLFontGL* getLabelFontForStyle(U8 style); - BOOL mIsSelected; + bool mIsSelected; public: static void initClass(); static void cleanupClass(); - BOOL postBuild(); + bool postBuild(); virtual void openItem( void ); - void arrangeAndSet(BOOL set_selection, BOOL take_keyboard_focus); + void arrangeAndSet(bool set_selection, bool take_keyboard_focus); virtual ~LLFolderViewItem( void ); - // addToFolder() returns TRUE if it succeeds. FALSE otherwise + // addToFolder() returns true if it succeeds. false otherwise virtual void addToFolder(LLFolderViewFolder* folder); // Finds width and height of this object and it's children. Also @@ -184,13 +184,13 @@ public: S32 getTextPad(); // If 'selection' is 'this' then note that otherwise ignore. - // Returns TRUE if this item ends up being selected. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); + // Returns true if this item ends up being selected. + virtual bool setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus); // This method is used to set the selection state of an item. // If 'selection' is 'this' then note selection. - // Returns TRUE if the selection state of this item was changed. - virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); + // Returns true if the selection state of this item was changed. + virtual bool changeSelection(LLFolderViewItem* selection, bool selected); // this method is used to deselect this element void deselectItem(); @@ -202,24 +202,24 @@ public: virtual std::set<LLFolderViewItem*> getSelectionList() const; // Returns true is this object and all of its children can be removed (deleted by user) - virtual BOOL isRemovable(); + virtual bool isRemovable(); // Returns true is this object and all of its children can be moved - virtual BOOL isMovable(); + virtual bool isMovable(); // destroys this item recursively virtual void destroyView(); - BOOL isSelected() const { return mIsSelected; } + bool isSelected() const { return mIsSelected; } bool isInSelection() const; - void setUnselected() { mIsSelected = FALSE; } + void setUnselected() { mIsSelected = false; } - void setIsCurSelection(BOOL select) { mIsCurSelection = select; } + void setIsCurSelection(bool select) { mIsCurSelection = select; } - BOOL getIsCurSelection() const { return mIsCurSelection; } + bool getIsCurSelection() const { return mIsCurSelection; } - BOOL hasVisibleChildren() const { return mHasVisibleChildren; } + bool hasVisibleChildren() const { return mHasVisibleChildren; } // true if object can't have children virtual bool isFolderComplete() { return true; } @@ -229,8 +229,8 @@ public: // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. - //virtual BOOL removeRecursively(BOOL single_item); - BOOL remove(); + //virtual bool removeRecursively(bool single_item); + bool remove(); // Build an appropriate context menu for the item. Flags unused. void buildContextMenu(class LLMenuGL& menu, U32 flags); @@ -249,8 +249,8 @@ public: void setParentFolder(LLFolderViewFolder* parent) { mParentFolder = parent; } - LLFolderViewItem* getNextOpenNode( BOOL include_children = TRUE ); - LLFolderViewItem* getPreviousOpenNode( BOOL include_children = TRUE ); + LLFolderViewItem* getNextOpenNode( bool include_children = true ); + LLFolderViewItem* getPreviousOpenNode( bool include_children = true ); const LLFolderViewModelItem* getViewModelItem( void ) const { return mViewModelItem; } LLFolderViewModelItem* getViewModelItem( void ) { return mViewModelItem; } @@ -262,16 +262,16 @@ public: void rename(const std::string& new_name); // Show children - virtual void setOpen(BOOL open = TRUE) {}; - virtual BOOL isOpen() const { return FALSE; } + virtual void setOpen(bool open = true) {}; + virtual bool isOpen() const { return false; } virtual LLFolderView* getRoot(); virtual const LLFolderView* getRoot() const; - BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor ); + bool isDescendantOf( const LLFolderViewFolder* potential_ancestor ); S32 getIndentation() const { return mIndentation; } - virtual BOOL passedFilter(S32 filter_generation = -1); - virtual BOOL isPotentiallyVisible(S32 filter_generation = -1); + virtual bool passedFilter(S32 filter_generation = -1); + virtual bool isPotentiallyVisible(S32 filter_generation = -1); // refresh information from the object being viewed. // refreshes label, suffixes and sets icons. Expensive! @@ -292,14 +292,14 @@ public: virtual void onMouseLeave(S32 x, S32 y, MASK mask); - //virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return LLView::findChildView(name, recurse); } + //virtual LLView* findChildView(const std::string& name, bool recurse) const { return LLView::findChildView(name, recurse); } // virtual void handleDropped(); virtual void draw(); void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color); - void drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor); + void drawHighlight(const bool showContent, const bool hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor); void drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -324,7 +324,7 @@ protected: friend class LLUICtrlFactory; void updateLabelRotation(); - virtual bool isCollapsed() { return FALSE; } + virtual bool isCollapsed() { return false; } public: typedef std::list<LLFolderViewItem*> items_t; @@ -334,8 +334,8 @@ protected: items_t mItems; folders_t mFolders; - BOOL mIsOpen; - BOOL mExpanderHighlighted; + bool mIsOpen; + bool mExpanderHighlighted; F32 mCurHeight; F32 mTargetHeight; F32 mAutoOpenCountdown; @@ -356,40 +356,40 @@ public: virtual ~LLFolderViewFolder( void ); - LLFolderViewItem* getNextFromChild( LLFolderViewItem*, BOOL include_children = TRUE ); - LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, BOOL include_children = TRUE ); + LLFolderViewItem* getNextFromChild( LLFolderViewItem*, bool include_children = true ); + LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, bool include_children = true ); - // addToFolder() returns TRUE if it succeeds. FALSE otherwise + // addToFolder() returns true if it succeeds. false otherwise virtual void addToFolder(LLFolderViewFolder* folder); // Finds width and height of this object and it's children. Also // makes sure that this view and it's children are the right size. virtual S32 arrange( S32* width, S32* height ); - BOOL needsArrange(); + bool needsArrange(); bool descendantsPassedFilter(S32 filter_generation = -1); // Passes selection information on to children and record // selection information if necessary. - // Returns TRUE if this object (or a child) ends up being selected. - // If 'openitem' is TRUE then folders are opened up along the way to the selection. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus = TRUE); + // Returns true if this object (or a child) ends up being selected. + // If 'openitem' is true then folders are opened up along the way to the selection. + virtual bool setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus = true); // 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. - virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); + // Returns true if the selection state of this folder, or of a child, was changed. + virtual bool changeSelection(LLFolderViewItem* selection, bool selected); // this method is used to group select items void extendSelectionTo(LLFolderViewItem* selection); // Returns true is this object and all of its children can be removed. - virtual BOOL isRemovable(); + virtual bool isRemovable(); // Returns true is this object and all of its children can be moved - virtual BOOL isMovable(); + virtual bool isMovable(); // destroys this folder, and all children virtual void destroyView(); @@ -416,7 +416,7 @@ public: virtual void toggleOpen(); // Force a folder open or closed - virtual void setOpen(BOOL openitem = TRUE); + virtual void setOpen(bool openitem = true); // Called when a child is refreshed. virtual void requestArrange(); @@ -425,14 +425,14 @@ public: // method was written because the list iterators destroy the state // of other iterations, thus, we can't arrange while iterating // through the children (such as when setting which is selected. - virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO); + virtual void setOpenArrangeRecursively(bool openitem, ERecurseType recurse = RECURSE_NO); // Get the current state of the folder. - virtual BOOL isOpen() const { return mIsOpen; } + virtual bool isOpen() const { return mIsOpen; } // special case if an object is dropped on the child. - BOOL handleDragAndDropFromChild(MASK mask, - BOOL drop, + bool handleDragAndDropFromChild(MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -451,14 +451,14 @@ public: virtual bool handleRightMouseDown( S32 x, S32 y, MASK mask ); virtual bool handleMouseDown( S32 x, S32 y, MASK mask ); virtual bool handleDoubleClick( S32 x, S32 y, MASK mask ); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - BOOL handleDragAndDropToThisFolder(MASK mask, - BOOL drop, + bool handleDragAndDropToThisFolder(MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index b3e3bc75e2..a91f202b2b 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -162,24 +162,24 @@ public: virtual void navigateToFolder(bool new_window = false, bool change_mode = false) = 0; - virtual BOOL isItemWearable() const { return FALSE; } + virtual bool isItemWearable() const { return false; } - virtual BOOL isItemRenameable() const = 0; + virtual bool isItemRenameable() const = 0; virtual bool renameItem(const std::string& new_name) = 0; - virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder + virtual bool isItemMovable( void ) const = 0; // Can be moved to another folder virtual void move( LLFolderViewModelItem* parent_listener ) = 0; - virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed - virtual BOOL removeItem() = 0; + virtual bool isItemRemovable( void ) const = 0; // Can be destroyed + virtual bool removeItem() = 0; virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) = 0; virtual bool isItemCopyable(bool can_copy_as_link = true) const = 0; - virtual BOOL copyToClipboard() const = 0; - virtual BOOL cutToClipboard() = 0; + virtual bool copyToClipboard() const = 0; + virtual bool cutToClipboard() = 0; virtual bool isCutToClipboard() { return false; }; - virtual BOOL isClipboardPasteable() const = 0; + virtual bool isClipboardPasteable() const = 0; virtual void pasteFromClipboard() = 0; virtual void pasteLinkFromClipboard() = 0; @@ -207,10 +207,10 @@ public: virtual void clearChildren() = 0; // This method will be called to determine if a drop can be - // performed, and will set drop to TRUE if a drop is - // requested. Returns TRUE if a drop is possible/happened, - // otherwise FALSE. - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + // performed, and will set drop to true if a drop is + // requested. Returns true if a drop is possible/happened, + // otherwise false. + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) = 0; diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index c774a1105f..0738900f8c 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -96,7 +96,7 @@ bool LLIconCtrl::handleHover(S32 x, S32 y, MASK mask) return LLUICtrl::handleHover(x, y, mask); } -void LLIconCtrl::onVisibilityChange(BOOL new_visibility) +void LLIconCtrl::onVisibilityChange(bool new_visibility) { LLUICtrl::onVisibilityChange(new_visibility); if (mPriority == LLGLTexture::BOOST_ICON) diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index 76b24cae52..416de0cc9f 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -74,7 +74,7 @@ public: virtual bool handleHover(S32 x, S32 y, MASK mask); // lluictrl overrides - void onVisibilityChange(BOOL new_visibility); + void onVisibilityChange(bool new_visibility); virtual void setValue(const LLSD& value ); std::string getImageName() const; diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 69e338ddb9..36401f5542 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -525,7 +525,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW // Line start tokens { - BOOL line_done = FALSE; + bool line_done = false; for (token_list_t::iterator iter = mLineTokenList.begin(); iter != mLineTokenList.end(); ++iter) { @@ -542,7 +542,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW //create segments from seg_start to seg_end insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); - line_done = TRUE; // to break out of second loop. + line_done = true; // to break out of second loop. break; } } diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 7e4e828a88..2db0101769 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -61,7 +61,7 @@ LLLayoutPanel::LLLayoutPanel(const Params& p) mMinDim(p.min_dim), mAutoResize(p.auto_resize), mUserResize(p.user_resize), - mCollapsed(FALSE), + mCollapsed(false), mCollapseAmt(0.f), mVisibleAmt(1.f), // default to fully visible mResizeBar(NULL), @@ -144,8 +144,8 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) ? getRect().getWidth() : getRect().getHeight())); - if (mAutoResize == FALSE - && mUserResize == TRUE + if (mAutoResize == false + && mUserResize == true && mMinDim == -1 ) { setMinDim(layout_dim); @@ -153,7 +153,7 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) mTargetDim = llmax(layout_dim, getMinDim()); } -void LLLayoutPanel::setVisible( BOOL visible ) +void LLLayoutPanel::setVisible( bool visible ) { if (visible != getVisible()) { @@ -166,7 +166,7 @@ void LLLayoutPanel::setVisible( BOOL visible ) LLPanel::setVisible(visible); } -void LLLayoutPanel::reshape( S32 width, S32 height, BOOL called_from_parent /*= TRUE*/ ) +void LLLayoutPanel::reshape( S32 width, S32 height, bool called_from_parent /*= true*/ ) { if (width == getRect().getWidth() && height == getRect().getHeight() && !LLView::sForceReshape) return; @@ -314,10 +314,10 @@ void LLLayoutStack::removeChild(LLView* view) } } -BOOL LLLayoutStack::postBuild() +bool LLLayoutStack::postBuild() { updateLayout(); - return TRUE; + return true; } bool LLLayoutStack::addChild(LLView* child, S32 tab_group) @@ -330,7 +330,7 @@ bool LLLayoutStack::addChild(LLView* child, S32 tab_group) createResizeBar(panelp); mNeedsLayout = true; } - BOOL result = LLView::addChild(child, tab_group); + bool result = LLView::addChild(child, tab_group); updateFractionalSizes(); return result; @@ -344,11 +344,11 @@ void LLLayoutStack::addPanel(LLLayoutPanel* panel, EAnimate animate) if (animate == ANIMATE) { panel->mVisibleAmt = 0.f; - panel->setVisible(TRUE); + panel->setVisible(true); } } -void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed) +void LLLayoutStack::collapsePanel(LLPanel* panel, bool collapsed) { LLLayoutPanel* panel_container = findEmbeddedPanel(panel); if (!panel_container) return; @@ -613,7 +613,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp) border_params.shadow_dark_color = LLUIColorTable::instance().getColor("ResizebarBorderDark"); addBorder(border_params); - setBorderVisible(TRUE); + setBorderVisible(true); LLImagePanel::Params image_panel; mDragHandleImage = LLUI::getUIImage(LLResizeBar::RIGHT == mSide ? "Vertical Drag Handle" : "Horizontal Drag Handle"); @@ -626,7 +626,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp) //if (mShowDragHandle) //{ - // setBackgroundVisible(TRUE); + // setBackgroundVisible(true); // setTransparentColor(LLUIColorTable::instance().getColor("ResizebarBody")); //} @@ -982,7 +982,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& //normalizeFractionalSizes(); } -void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLLayoutStack::reshape(S32 width, S32 height, bool called_from_parent) { mNeedsLayout = true; LLView::reshape(width, height, called_from_parent); @@ -995,7 +995,7 @@ void LLLayoutStack::updateResizeBarLimits() { if (!visible_panelp->getVisible() || visible_panelp->mCollapsed) { - visible_panelp->mResizeBar->setVisible(FALSE); + visible_panelp->mResizeBar->setVisible(false); continue; } @@ -1005,14 +1005,14 @@ void LLLayoutStack::updateResizeBarLimits() && (visible_panelp->mAutoResize || visible_panelp->mUserResize) // current panel is resizable && (previous_visible_panelp->mAutoResize || previous_visible_panelp->mUserResize)) // previous panel is resizable { - visible_panelp->mResizeBar->setVisible(TRUE); + visible_panelp->mResizeBar->setVisible(true); S32 previous_panel_headroom = previous_visible_panelp->getVisibleDim() - previous_visible_panelp->getRelevantMinDim(); visible_panelp->mResizeBar->setResizeLimits(visible_panelp->getRelevantMinDim(), visible_panelp->getVisibleDim() + previous_panel_headroom); } else { - visible_panelp->mResizeBar->setVisible(FALSE); + visible_panelp->mResizeBar->setVisible(false); } previous_visible_panelp = visible_panelp; diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 000b919ae7..e3f8629425 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -71,9 +71,9 @@ public: /*virtual*/ void draw(); /*virtual*/ void deleteAllChildren(); /*virtual*/ void removeChild(LLView*); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ bool addChild(LLView* child, S32 tab_group = 0); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL); @@ -85,7 +85,7 @@ public: } EAnimate; void addPanel(LLLayoutPanel* panel, EAnimate animate = NO_ANIMATE); - void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE); + void collapsePanel(LLPanel* panel, bool collapsed = true); S32 getNumPanels() { return mPanels.size(); } void updateLayout(); @@ -156,10 +156,10 @@ public: void handleReshape(const LLRect& new_rect, bool by_user); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, bool called_from_parent = true); - void setVisible(BOOL visible); + void setVisible(bool visible); S32 getLayoutDim() const; S32 getTargetDim() const; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 9b320fdf97..6664117bcd 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -74,7 +74,7 @@ static LLDefaultChildRegistry::Register<LLLineEditor> r1("line_editor"); // Compiler optimization, generate extern template template class LLLineEditor* LLView::getChild<class LLLineEditor>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; // // Member functions @@ -127,10 +127,10 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mTextLeftEdge(0), // computed in updateTextPadding() below mTextRightEdge(0), // computed in updateTextPadding() below mCommitOnFocusLost( p.commit_on_focus_lost ), - mKeystrokeOnEsc(FALSE), + mKeystrokeOnEsc(false), mRevertOnEsc( p.revert_on_esc ), mKeystrokeCallback( p.keystroke_callback() ), - mIsSelecting( FALSE ), + mIsSelecting( false ), mSelectionStart( 0 ), mSelectionEnd( 0 ), mLastSelectionX(-1), @@ -138,23 +138,23 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mLastSelectionStart(-1), mLastSelectionEnd(-1), mBorderThickness( 0 ), - mIgnoreArrowKeys( FALSE ), + mIgnoreArrowKeys( false ), mIgnoreTab( p.ignore_tab ), mDrawAsterixes( p.is_password ), mSpellCheck( p.spellcheck ), mSpellCheckStart(-1), mSpellCheckEnd(-1), mSelectAllonFocusReceived( p.select_on_focus ), - mSelectAllonCommit( TRUE ), - mPassDelete(FALSE), - mReadOnly(FALSE), + mSelectAllonCommit( true ), + mPassDelete(false), + mReadOnly(false), mBgImage( p.background_image ), mBgImageDisabled( p.background_image_disabled ), mBgImageFocused( p.background_image_focused ), mShowImageFocused( p.bg_image_always_focused ), mUseBgColor(p.use_bg_color), - mHaveHistory(FALSE), - mReplaceNewlinesWithSpaces( TRUE ), + mHaveHistory(false), + mReplaceNewlinesWithSpaces( true ), mLabel(p.label), mCursorColor(p.cursor_color()), mBgColor(p.bg_color()), @@ -169,7 +169,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) { llassert( mMaxLengthBytes > 0 ); - LLUICtrl::setEnabled(TRUE); + LLUICtrl::setEnabled(true); setEnabled(p.enabled); mScrollTimer.reset(); @@ -214,7 +214,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) LLLineEditor::~LLLineEditor() { - mCommitOnFocusLost = FALSE; + mCommitOnFocusLost = false; // Make sure no context menu linger around once the widget is deleted LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get()); @@ -231,7 +231,7 @@ LLLineEditor::~LLLineEditor() void LLLineEditor::initFromParams(const LLLineEditor::Params& params) { LLUICtrl::initFromParams(params); - LLUICtrl::setEnabled(TRUE); + LLUICtrl::setEnabled(true); setEnabled(params.enabled); } @@ -280,9 +280,9 @@ void LLLineEditor::onCommit() if (mSelectAllonCommit) selectAll(); } -// Returns TRUE if user changed value at all +// Returns true if user changed value at all // virtual -BOOL LLLineEditor::isDirty() const +bool LLLineEditor::isDirty() const { return mText.getString() != mPrevText; } @@ -343,14 +343,14 @@ void LLLineEditor::updateHistory() } } -void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLLineEditor::reshape(S32 width, S32 height, bool called_from_parent) { LLUICtrl::reshape(width, height, called_from_parent); updateTextPadding(); // For clamping side-effect. setCursor(mCursorPos); // For clamping side-effect. } -void LLLineEditor::setEnabled(BOOL enabled) +void LLLineEditor::setEnabled(bool enabled) { mReadOnly = !enabled; setTabStop(!mReadOnly); @@ -405,7 +405,7 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit // Check to see if entire field is selected. S32 len = mText.length(); - BOOL all_selected = (len > 0) + bool all_selected = (len > 0) && (( mSelectionStart == 0 && mSelectionEnd == len ) || ( mSelectionStart == len && mSelectionEnd == 0 )); @@ -517,7 +517,7 @@ void LLLineEditor::resetScrollPosition() setCursor(getCursor()); } -BOOL LLLineEditor::canDeselect() const +bool LLLineEditor::canDeselect() const { return hasSelection(); } @@ -526,13 +526,13 @@ void LLLineEditor::deselect() { mSelectionStart = 0; mSelectionEnd = 0; - mIsSelecting = FALSE; + mIsSelecting = false; } void LLLineEditor::startSelection() { - mIsSelecting = TRUE; + mIsSelecting = true; mSelectionStart = getCursor(); mSelectionEnd = getCursor(); } @@ -541,14 +541,14 @@ void LLLineEditor::endSelection() { if( mIsSelecting ) { - mIsSelecting = FALSE; + mIsSelecting = false; mSelectionEnd = getCursor(); } } -BOOL LLLineEditor::canSelectAll() const +bool LLLineEditor::canSelectAll() const { - return TRUE; + return true; } void LLLineEditor::selectAll() @@ -562,7 +562,7 @@ void LLLineEditor::selectAll() mSelectionEnd = 0; setCursor(mSelectionEnd); //mScrollHPos = 0; - mIsSelecting = TRUE; + mIsSelecting = true; updatePrimary(); } @@ -976,19 +976,19 @@ void LLLineEditor::addChar(const llwchar uni_char) S32 new_bytes = wchar_utf8_length(new_c); - BOOL allow_char = TRUE; + bool allow_char = true; // Check byte length limit if ((new_bytes + cur_bytes) > mMaxLengthBytes) { - allow_char = FALSE; + allow_char = false; } else if (mMaxLengthChars) { S32 wide_chars = mText.getWString().size(); if ((wide_chars + 1) > mMaxLengthChars) { - allow_char = FALSE; + allow_char = false; } } @@ -1033,7 +1033,7 @@ void LLLineEditor::setSelection(S32 start, S32 end) { S32 len = mText.length(); - mIsSelecting = TRUE; + mIsSelecting = true; // JC, yes, this seems odd, but I think you have to presume a // selection dragged from the end towards the start. @@ -1042,7 +1042,7 @@ void LLLineEditor::setSelection(S32 start, S32 end) setCursor(start); } -void LLLineEditor::setDrawAsterixes(BOOL b) +void LLLineEditor::setDrawAsterixes(bool b) { mDrawAsterixes = b; updateAllowingLanguageInput(); @@ -1077,13 +1077,13 @@ S32 LLLineEditor::nextWordPos(S32 cursorPos) const } -BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask) +bool LLLineEditor::handleSelectionKey(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; if( mask & MASK_SHIFT ) { - handled = TRUE; + handled = true; switch( key ) { @@ -1136,7 +1136,7 @@ BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask) } default: - handled = FALSE; + handled = false; break; } } @@ -1167,7 +1167,7 @@ void LLLineEditor::deleteSelection() } } -BOOL LLLineEditor::canCut() const +bool LLLineEditor::canCut() const { return !mReadOnly && !mDrawAsterixes && hasSelection(); } @@ -1191,7 +1191,7 @@ void LLLineEditor::cut() deleteSelection(); // Validate new string and rollback the if needed. - BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); + bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); if( need_to_rollback ) { rollback.doRollback( this ); @@ -1204,7 +1204,7 @@ void LLLineEditor::cut() } } -BOOL LLLineEditor::canCopy() const +bool LLLineEditor::canCopy() const { return !mDrawAsterixes && hasSelection(); } @@ -1221,7 +1221,7 @@ void LLLineEditor::copy() } } -BOOL LLLineEditor::canPaste() const +bool LLLineEditor::canPaste() const { return !mReadOnly && LLClipboard::instance().isTextAvailable(); } @@ -1319,7 +1319,7 @@ void LLLineEditor::pasteHelper(bool is_primary) deselect(); // Validate new string and rollback the if needed. - BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); + bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); if( need_to_rollback ) { rollback.doRollback( this ); @@ -1344,7 +1344,7 @@ void LLLineEditor::copyPrimary() } } -BOOL LLLineEditor::canPastePrimary() const +bool LLLineEditor::canPastePrimary() const { return !mReadOnly && LLClipboard::instance().isTextAvailable(true); } @@ -1357,9 +1357,9 @@ void LLLineEditor::updatePrimary() } } -BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) +bool LLLineEditor::handleSpecialKey(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch( key ) { @@ -1369,7 +1369,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) gKeyboard->toggleInsertMode(); } - handled = TRUE; + handled = true; break; case KEY_BACKSPACE: @@ -1390,7 +1390,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) LLUI::getInstance()->reportBadKeystroke(); } } - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -1398,7 +1398,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) if (!mIgnoreArrowKeys) { setCursor(0); - handled = TRUE; + handled = true; } break; @@ -1411,7 +1411,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) { setCursor(len); } - handled = TRUE; + handled = true; } break; @@ -1438,7 +1438,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; @@ -1465,7 +1465,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; @@ -1482,7 +1482,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; @@ -1499,7 +1499,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) { LLUI::getInstance()->reportBadKeystroke(); } - handled = TRUE; + handled = true; } break; @@ -1528,10 +1528,10 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) } -BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask ) +bool LLLineEditor::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; - BOOL selection_modified = FALSE; + bool handled = false; + bool selection_modified = false; if ( gFocusMgr.getKeyboardFocus() == this ) { @@ -1566,7 +1566,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask ) deselect(); } - BOOL need_to_rollback = FALSE; + bool need_to_rollback = false; // If read-only, don't allow changes need_to_rollback |= (mReadOnly && (mText.getString() == rollback.getText())); @@ -1625,7 +1625,7 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) deselect(); - BOOL need_to_rollback = FALSE; + bool need_to_rollback = false; // Validate new string and rollback the keystroke if needed. need_to_rollback |= ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); @@ -1651,7 +1651,7 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) } -BOOL LLLineEditor::canDoDelete() const +bool LLLineEditor::canDoDelete() const { return ( !mReadOnly && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) ); } @@ -1681,7 +1681,7 @@ void LLLineEditor::doDelete() } // Validate new string and rollback the if needed. - BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); + bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); if( need_to_rollback ) { rollback.doRollback( this ); @@ -1702,7 +1702,7 @@ void LLLineEditor::drawBackground() F32 alpha = getCurrentTransparency(); if (mUseBgColor) { - gl_rect_2d(getLocalRect(), mBgColor % alpha, TRUE); + gl_rect_2d(getLocalRect(), mBgColor % alpha, true); } else { @@ -1923,7 +1923,7 @@ void LLLineEditor::draw() &rendered_pixels_right); } #if 1 // for when we're ready for image art. - mBorder->setVisible(FALSE); // no more programmatic art. + mBorder->setVisible(false); // no more programmatic art. #endif if ( (getSpellCheck()) && (mText.length() > 2) ) @@ -2024,7 +2024,7 @@ void LLLineEditor::draw() // If we're editing... if( hasFocus()) { - //mBorder->setVisible(TRUE); // ok, programmer art just this once. + //mBorder->setVisible(true); // ok, programmer art just this once. // (Flash the cursor every half second) if (!mReadOnly && gFocusMgr.getAppHasFocus()) { @@ -2080,16 +2080,16 @@ void LLLineEditor::draw() LLFontGL::NO_SHADOW, S32_MAX, mTextRightEdge - ll_round(rendered_pixels_right), - &rendered_pixels_right, FALSE); + &rendered_pixels_right, false); } // Draw children (border) - //mBorder->setVisible(TRUE); - mBorder->setKeyboardFocusHighlight( TRUE ); + //mBorder->setVisible(true); + mBorder->setKeyboardFocusHighlight( true ); LLView::draw(); - mBorder->setKeyboardFocusHighlight( FALSE ); - //mBorder->setVisible(FALSE); + mBorder->setKeyboardFocusHighlight( false ); + //mBorder->setVisible(false); } else // does not have keyboard input { @@ -2105,7 +2105,7 @@ void LLLineEditor::draw() LLFontGL::NO_SHADOW, S32_MAX, mTextRightEdge - ll_round(rendered_pixels_right), - &rendered_pixels_right, FALSE); + &rendered_pixels_right, false); } // Draw children (border) LLView::draw(); @@ -2162,19 +2162,19 @@ void LLLineEditor::onTabInto() } //virtual -BOOL LLLineEditor::acceptsTextInput() const +bool LLLineEditor::acceptsTextInput() const { - return TRUE; + return true; } // Start or stop the editor from accepting text-editing keystrokes -void LLLineEditor::setFocus( BOOL new_state ) +void LLLineEditor::setFocus( bool new_state ) { - BOOL old_state = hasFocus(); + bool old_state = hasFocus(); if (!new_state) { - getWindow()->allowLanguageTextInput(this, FALSE); + getWindow()->allowLanguageTextInput(this, false); } @@ -2185,7 +2185,7 @@ void LLLineEditor::setFocus( BOOL new_state ) // We don't want handleMouseUp() to "finish" the selection (and thereby // set mSelectionEnd to where the mouse is), so we finish the selection // here. - mIsSelecting = FALSE; + mIsSelecting = false; } if( new_state ) @@ -2258,13 +2258,13 @@ bool LLLineEditor::prevalidateInput(const LLWString& wstr) } // static -BOOL LLLineEditor::postvalidateFloat(const std::string &str) +bool LLLineEditor::postvalidateFloat(const std::string &str) { LLLocale locale(LLLocale::USER_LOCALE); - BOOL success = TRUE; - BOOL has_decimal = FALSE; - BOOL has_digit = FALSE; + bool success = true; + bool has_decimal = false; + bool has_digit = false; LLWString trimmed = utf8str_to_wstring(str); LLWStringUtil::trim(trimmed); @@ -2289,22 +2289,22 @@ BOOL LLLineEditor::postvalidateFloat(const std::string &str) if( has_decimal ) { // can't have two - success = FALSE; + success = false; break; } else { - has_decimal = TRUE; + has_decimal = true; } } else if( LLStringOps::isDigit( trimmed[i] ) ) { - has_digit = TRUE; + has_digit = true; } else { - success = FALSE; + success = false; break; } } @@ -2316,7 +2316,7 @@ BOOL LLLineEditor::postvalidateFloat(const std::string &str) return success; } -BOOL LLLineEditor::evaluateFloat() +bool LLLineEditor::evaluateFloat() { bool success; F32 result = 0.f; @@ -2348,7 +2348,7 @@ void LLLineEditor::onMouseCaptureLost() } -void LLLineEditor::setSelectAllonFocusReceived(BOOL b) +void LLLineEditor::setSelectAllonFocusReceived(bool b) { mSelectAllonFocusReceived = b; } @@ -2369,16 +2369,16 @@ void LLLineEditor::setKeystrokeCallback(callback_t callback, void* user_data) } -BOOL LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text ) +bool LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text ) { mText.setArg(key, text); - return TRUE; + return true; } -BOOL LLLineEditor::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLLineEditor::setLabelArg( const std::string& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); - return TRUE; + return true; } @@ -2398,15 +2398,15 @@ void LLLineEditor::updateAllowingLanguageInput() } if (hasFocus() && !mReadOnly && !mDrawAsterixes && mPrevalidateFunc == NULL) { - window->allowLanguageTextInput(this, TRUE); + window->allowLanguageTextInput(this, true); } else { - window->allowLanguageTextInput(this, FALSE); + window->allowLanguageTextInput(this, false); } } -BOOL LLLineEditor::hasPreeditString() const +bool LLLineEditor::hasPreeditString() const { return (mPreeditPositions.size() > 1); } @@ -2612,7 +2612,7 @@ S32 LLLineEditor::getPreeditFontSize() const return ll_round(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); } -void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace) +void LLLineEditor::setReplaceNewlinesWithSpaces(bool replace) { mReplaceNewlinesWithSpaces = replace; } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index cdb514deaa..1ca300ec91 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -128,31 +128,31 @@ public: /*virtual*/ bool handleDoubleClick(S32 x,S32 y,MASK mask); /*virtual*/ bool handleMiddleMouseDown(S32 x,S32 y,MASK mask); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask ); /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char); /*virtual*/ void onMouseCaptureLost(); // LLEditMenuHandler overrides virtual void cut(); - virtual BOOL canCut() const; + virtual bool canCut() const; virtual void copy(); - virtual BOOL canCopy() const; + virtual bool canCopy() const; virtual void paste(); - virtual BOOL canPaste() const; + virtual bool canPaste() const; virtual void updatePrimary(); virtual void copyPrimary(); virtual void pastePrimary(); - virtual BOOL canPastePrimary() const; + virtual bool canPastePrimary() const; virtual void doDelete(); - virtual BOOL canDoDelete() const; + virtual bool canDoDelete() const; virtual void selectAll(); - virtual BOOL canSelectAll() const; + virtual bool canSelectAll() const; virtual void deselect(); - virtual BOOL canDeselect() const; + virtual bool canDeselect() const; // LLSpellCheckMenuHandler overrides /*virtual*/ bool getSpellCheck() const; @@ -174,26 +174,26 @@ public: // view overrides virtual void draw(); - virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE); + virtual void reshape(S32 width,S32 height,bool called_from_parent=true); virtual void onFocusReceived(); virtual void onFocusLost(); - virtual void setEnabled(BOOL enabled); + virtual void setEnabled(bool enabled); // UI control overrides virtual void clear(); virtual void onTabInto(); - virtual void setFocus( BOOL b ); + virtual void setFocus( bool b ); virtual void setRect(const LLRect& rect); - virtual BOOL acceptsTextInput() const; + virtual bool acceptsTextInput() const; virtual void onCommit(); - virtual BOOL isDirty() const; // Returns TRUE if user changed value at all + virtual bool isDirty() const; // Returns true if user changed value at all virtual void resetDirty(); // Clear dirty state // assumes UTF8 text virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setTextArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } const std::string& getLabel() { return mLabel.getString(); } @@ -217,9 +217,9 @@ public: void setSelection(S32 start, S32 end); virtual void getSelectionRange(S32 *position, S32 *length) const; - void setCommitOnFocusLost( BOOL b ) { mCommitOnFocusLost = b; } - void setRevertOnEsc( BOOL b ) { mRevertOnEsc = b; } - void setKeystrokeOnEsc(BOOL b) { mKeystrokeOnEsc = b; } + void setCommitOnFocusLost( bool b ) { mCommitOnFocusLost = b; } + void setRevertOnEsc( bool b ) { mRevertOnEsc = b; } + void setKeystrokeOnEsc(bool b) { mKeystrokeOnEsc = b; } void setCursorColor(const LLColor4& c) { mCursorColor = c; } const LLColor4& getCursorColor() const { return mCursorColor.get(); } @@ -235,23 +235,23 @@ public: const LLFontGL* getFont() const { return mGLFont; } void setFont(const LLFontGL* font); - void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; } - void setIgnoreTab(BOOL b) { mIgnoreTab = b; } - void setPassDelete(BOOL b) { mPassDelete = b; } - void setDrawAsterixes(BOOL b); + void setIgnoreArrowKeys(bool b) { mIgnoreArrowKeys = b; } + void setIgnoreTab(bool b) { mIgnoreTab = b; } + void setPassDelete(bool b) { mPassDelete = b; } + void setDrawAsterixes(bool b); // get the cursor position of the beginning/end of the prev/next word in the text S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; - BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); } + bool hasSelection() const { return (mSelectionStart != mSelectionEnd); } void startSelection(); void endSelection(); void extendSelection(S32 new_cursor_pos); void deleteSelection(); - void setSelectAllonFocusReceived(BOOL b); - void setSelectAllonCommit(BOOL b) { mSelectAllonCommit = b; } + void setSelectAllonFocusReceived(bool b); + void setSelectAllonCommit(bool b) { mSelectAllonCommit = b; } void onKeystroke(); typedef boost::function<void (LLLineEditor* caller, void* user_data)> callback_t; @@ -270,16 +270,16 @@ public: // Also callback that this method sets differs from setPrevalidate in a way that it validates just inputed // symbols, before existing text is modified, but setPrevalidate validates line after it was modified. void setPrevalidateInput(LLTextValidate::validate_func_t func); - static BOOL postvalidateFloat(const std::string &str); + static bool postvalidateFloat(const std::string &str); bool prevalidateInput(const LLWString& wstr); - BOOL evaluateFloat(); + bool evaluateFloat(); // line history support: - void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off + void setEnableLineHistory( bool enabled ) { mHaveHistory = enabled; } // switches line history on or off void updateHistory(); // stores current line in history - void setReplaceNewlinesWithSpaces(BOOL replace); + void setReplaceNewlinesWithSpaces(bool replace); void resetContextMenu() { setContextMenu(NULL); }; @@ -299,9 +299,9 @@ public: void setCursorAtLocalPos(S32 local_mouse_x); S32 findPixelNearestPos(S32 cursor_offset = 0) const; S32 calcCursorPos(S32 mouse_x); - BOOL handleSpecialKey(KEY key, MASK mask); - BOOL handleSelectionKey(KEY key, MASK mask); - BOOL handleControlKey(KEY key, MASK mask); + bool handleSpecialKey(KEY key, MASK mask); + bool handleSelectionKey(KEY key, MASK mask); + bool handleControlKey(KEY key, MASK mask); S32 handleCommitKey(KEY key, MASK mask); void updateTextPadding(); @@ -312,7 +312,7 @@ public: // private data members // void updateAllowingLanguageInput(); - BOOL hasPreeditString() const; + bool hasPreeditString() const; // Implementation (overrides) of LLPreeditor virtual void resetPreedit(); virtual void updatePreedit(const LLWString &preedit_string, @@ -333,7 +333,7 @@ protected: LLUIString mLabel; // text label that is visible when no user text provided // line history support: - BOOL mHaveHistory; // flag for enabled line history + bool mHaveHistory; // flag for enabled line history typedef std::vector<std::string> line_history_t; line_history_t mLineHistory; // line history storage line_history_t::iterator mCurrentHistoryLine; // currently browsed history line @@ -350,13 +350,13 @@ protected: S32 mTextLeftEdge; // Pixels, cached left edge of text based on left padding and width S32 mTextRightEdge; // Pixels, cached right edge of text based on right padding and width - BOOL mCommitOnFocusLost; - BOOL mRevertOnEsc; - BOOL mKeystrokeOnEsc; + bool mCommitOnFocusLost; + bool mRevertOnEsc; + bool mKeystrokeOnEsc; keystroke_callback_t mKeystrokeCallback; - BOOL mIsSelecting; // Selection for clipboard operations + bool mIsSelecting; // Selection for clipboard operations S32 mSelectionStart; S32 mSelectionEnd; S32 mLastSelectionX; @@ -387,17 +387,17 @@ protected: S32 mBorderThickness; - BOOL mIgnoreArrowKeys; - BOOL mIgnoreTab; - BOOL mDrawAsterixes; + bool mIgnoreArrowKeys; + bool mIgnoreTab; + bool mDrawAsterixes; - BOOL mSelectAllonFocusReceived; - BOOL mSelectAllonCommit; - BOOL mPassDelete; + bool mSelectAllonFocusReceived; + bool mSelectAllonCommit; + bool mPassDelete; - BOOL mReadOnly; + bool mReadOnly; - BOOL mShowImageFocused; + bool mShowImageFocused; bool mUseBgColor; @@ -416,7 +416,7 @@ private: LLPointer<LLUIImage> mBgImageDisabled; LLPointer<LLUIImage> mBgImageFocused; - BOOL mReplaceNewlinesWithSpaces; // if false, will replace pasted newlines with paragraph symbol. + bool mReplaceNewlinesWithSpaces; // if false, will replace pasted newlines with paragraph symbol. // private helper class class LLLineEditorRollback @@ -450,7 +450,7 @@ private: std::string mText; S32 mCursorPos; S32 mScrollHPos; - BOOL mIsSelecting; + bool mIsSelecting; S32 mSelectionStart; S32 mSelectionEnd; }; // end class LLLineEditorRollback @@ -460,7 +460,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLLINEEDITOR_CPP extern template class LLLineEditor* LLView::getChild<class LLLineEditor>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif // LL_LINEEDITOR_ diff --git a/indra/llui/lllocalcliprect.cpp b/indra/llui/lllocalcliprect.cpp index f3a526faeb..45b7a0948a 100644 --- a/indra/llui/lllocalcliprect.cpp +++ b/indra/llui/lllocalcliprect.cpp @@ -32,7 +32,7 @@ /*static*/ std::stack<LLRect> LLScreenClipRect::sClipRectStack; -LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) +LLScreenClipRect::LLScreenClipRect(const LLRect& rect, bool enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled) { @@ -99,7 +99,7 @@ void LLScreenClipRect::updateScissorRegion() //--------------------------------------------------------------------------- // LLLocalClipRect //--------------------------------------------------------------------------- -LLLocalClipRect::LLLocalClipRect(const LLRect& rect, BOOL enabled /* = TRUE */) +LLLocalClipRect::LLLocalClipRect(const LLRect& rect, bool enabled /* = true */) : LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX, rect.mTop + LLFontGL::sCurOrigin.mY, rect.mRight + LLFontGL::sCurOrigin.mX, diff --git a/indra/llui/lllocalcliprect.h b/indra/llui/lllocalcliprect.h index eeeaf2adb6..a258d34f31 100644 --- a/indra/llui/lllocalcliprect.h +++ b/indra/llui/lllocalcliprect.h @@ -38,7 +38,7 @@ class LLScreenClipRect { public: - LLScreenClipRect(const LLRect& rect, BOOL enabled = TRUE); + LLScreenClipRect(const LLRect& rect, bool enabled = true); virtual ~LLScreenClipRect(); private: @@ -48,7 +48,7 @@ private: private: LLGLState mScissorState; - BOOL mEnabled; + bool mEnabled; static std::stack<LLRect> sClipRectStack; }; @@ -56,7 +56,7 @@ private: class LLLocalClipRect : public LLScreenClipRect { public: - LLLocalClipRect(const LLRect& rect, BOOL enabled = TRUE); + LLLocalClipRect(const LLRect& rect, bool enabled = true); ~LLLocalClipRect(); }; diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index ceb78387ac..5374b7ea73 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -78,7 +78,7 @@ void LLMenuButton::hideMenu() LLToggleableMenu* menu = getMenu(); if (menu) { - menu->setVisible(FALSE); + menu->setVisible(false); } } @@ -118,9 +118,9 @@ void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_T menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2)); } -BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) +bool LLMenuButton::handleKeyHere(KEY key, MASK mask ) { - if (!getMenu()) return FALSE; + if (!getMenu()) return false; if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { @@ -129,17 +129,17 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) LLUICtrl::handleMouseDown(-1, -1, MASK_NONE); toggleMenu(); - return TRUE; + return true; } LLToggleableMenu* menu = getMenu(); if (menu && menu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE) { - menu->setVisible(FALSE); - return TRUE; + menu->setVisible(false); + return true; } - return FALSE; + return false; } bool LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index b6ec4e2e35..1854f459d5 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -66,7 +66,7 @@ public: boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb ); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask ); void hideMenu(); diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 755ff5f4e3..76da0755af 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -101,7 +101,7 @@ const std::string LLMenuGL::ARROW_DOWN("vvvvvvv"); const F32 MAX_MOUSE_SLOPE_SUB_MENU = 0.9f; -BOOL LLMenuGL::sKeyboardMode = FALSE; +bool LLMenuGL::sKeyboardMode = false; LLHandle<LLView> LLMenuHolderGL::sItemLastSelectedHandle; LLFrameTimer LLMenuHolderGL::sItemActivationTimer; @@ -151,10 +151,10 @@ LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p) : LLUICtrl(p), mJumpKey(p.jump_key), mAllowKeyRepeat(p.allow_key_repeat), - mHighlight( FALSE ), - mGotHover( FALSE ), - mBriefItem( FALSE ), - mDrawTextDisabled( FALSE ), + mHighlight( false ), + mGotHover( false ), + mBriefItem( false ), + mDrawTextDisabled( false ), mFont(p.font), mAcceleratorKey(KEY_NONE), mAcceleratorMask(MASK_NONE), @@ -166,7 +166,7 @@ LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p) { #ifdef LL_DARWIN // See if this Mac accelerator should really use the ctrl key and not get mapped to cmd - BOOL useMacCtrl = p.use_mac_ctrl; + bool useMacCtrl = p.use_mac_ctrl; #endif // LL_DARWIN std::string shortcut = p.shortcut; @@ -219,14 +219,14 @@ bool LLMenuItemGL::hasAccelerator(const KEY &key, const MASK &mask) const } //virtual -BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask) +bool LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask) { if( getEnabled() && (!gKeyboard->getKeyRepeated(key) || mAllowKeyRepeat) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) ) { onCommit(); - return TRUE; + return true; } - return FALSE; + return false; } bool LLMenuItemGL::handleHover(S32 x, S32 y, MASK mask) @@ -243,13 +243,13 @@ bool LLMenuItemGL::handleRightMouseDown(S32 x, S32 y, MASK mask) void LLMenuItemGL::onMouseEnter(S32 x, S32 y, MASK mask) { - setHover(TRUE); + setHover(true); LLUICtrl::onMouseEnter(x,y,mask); } void LLMenuItemGL::onMouseLeave(S32 x, S32 y, MASK mask) { - setHover(FALSE); + setHover(false); LLUICtrl::onMouseLeave(x,y,mask); } @@ -269,7 +269,7 @@ bool LLMenuItemGL::handleRightMouseUp(S32 x, S32 y, MASK mask) // This function checks to see if the accelerator key is already in use; // if not, it will be added to the list -BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp) +bool LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp) { LLMenuKeyboardBinding *accelerator = NULL; @@ -294,7 +294,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *list // LL_WARNS() << warning << LL_ENDL; // LLAlertDialog::modalAlert(warning); - return FALSE; + return false; } } if (!accelerator) @@ -309,7 +309,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *list listp->push_back(accelerator);//addData(accelerator); } } - return TRUE; + return true; } // This function appends the character string representation of @@ -333,13 +333,13 @@ U32 LLMenuItemGL::getNominalHeight( void ) const } //virtual -void LLMenuItemGL::setBriefItem(BOOL brief) +void LLMenuItemGL::setBriefItem(bool brief) { mBriefItem = brief; } //virtual -BOOL LLMenuItemGL::isBriefItem() const +bool LLMenuItemGL::isBriefItem() const { return mBriefItem; } @@ -403,7 +403,7 @@ void LLMenuItemGL::onCommit( void ) } // set the hover status (called by it's menu) - void LLMenuItemGL::setHighlight( BOOL highlight ) + void LLMenuItemGL::setHighlight( bool highlight ) { if (highlight) { @@ -419,7 +419,7 @@ void LLMenuItemGL::onCommit( void ) } -BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask ) +bool LLMenuItemGL::handleKeyHere( KEY key, MASK mask ) { if (getHighlight() && getMenu()->isOpen()) @@ -427,30 +427,30 @@ BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask ) if (key == KEY_UP) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); getMenu()->highlightPrevItem(this); - return TRUE; + return true; } else if (key == KEY_DOWN) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); getMenu()->highlightNextItem(this); - return TRUE; + return true; } else if (key == KEY_RETURN && mask == MASK_NONE) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); onCommit(); - return TRUE; + return true; } } - return FALSE; + return false; } bool LLMenuItemGL::handleMouseUp( S32 x, S32 y, MASK mask) @@ -522,19 +522,19 @@ void LLMenuItemGL::draw( void ) if( !mDrawBoolLabel.empty() ) { mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); if( !mDrawAccelLabel.empty() ) { mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, - LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } if( !mDrawBranchLabel.empty() ) { mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, - LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } } @@ -553,13 +553,13 @@ void LLMenuItemGL::draw( void ) } } -BOOL LLMenuItemGL::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLMenuItemGL::setLabelArg( const std::string& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); - return TRUE; + return true; } -void LLMenuItemGL::onVisibilityChange(BOOL new_visibility) +void LLMenuItemGL::onVisibilityChange(bool new_visibility) { if (getMenu()) { @@ -735,12 +735,12 @@ void LLMenuItemTearOffGL::onCommit() { if (parent_floater) { - parent_floater->addDependentFloater(tear_off_menu, FALSE); + parent_floater->addDependentFloater(tear_off_menu, false); } // give focus to torn off menu because it will have // been taken away when parent menu closes - tear_off_menu->setFocus(TRUE); + tear_off_menu->setFocus(true); } } LLMenuItemGL::onCommit(); @@ -860,12 +860,12 @@ void LLMenuItemCallGL::buildDrawLabel( void ) LLMenuItemGL::buildDrawLabel(); } -BOOL LLMenuItemCallGL::handleKeyHere( KEY key, MASK mask ) +bool LLMenuItemCallGL::handleKeyHere( KEY key, MASK mask ) { return LLMenuItemGL::handleKeyHere(key, mask); } -BOOL LLMenuItemCallGL::handleAcceleratorKey( KEY key, MASK mask ) +bool LLMenuItemCallGL::handleAcceleratorKey( KEY key, MASK mask ) { if( (!gKeyboard->getKeyRepeated(key) || getAllowKeyRepeat()) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) ) { @@ -873,10 +873,10 @@ BOOL LLMenuItemCallGL::handleAcceleratorKey( KEY key, MASK mask ) if (getEnabled()) { onCommit(); - return TRUE; + return true; } } - return FALSE; + return false; } // handleRightMouseUp moved into base class LLMenuItemGL so clicks are @@ -968,7 +968,7 @@ LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p) if (branch) { mBranchHandle = branch->getHandle(); - branch->setVisible(FALSE); + branch->setVisible(false); branch->setParentMenuItem(this); } } @@ -984,7 +984,7 @@ LLMenuItemBranchGL::~LLMenuItemBranchGL() // virtual -LLView* LLMenuItemBranchGL::getChildView(const std::string& name, BOOL recurse) const +LLView* LLMenuItemBranchGL::getChildView(const std::string& name, bool recurse) const { LLMenuGL* branch = getBranch(); if (branch) @@ -1001,7 +1001,7 @@ LLView* LLMenuItemBranchGL::getChildView(const std::string& name, BOOL recurse) return LLView::getChildView(name, recurse); } -LLView* LLMenuItemBranchGL::findChildView(const std::string& name, BOOL recurse) const +LLView* LLMenuItemBranchGL::findChildView(const std::string& name, bool recurse) const { LLMenuGL* branch = getBranch(); if (branch) @@ -1022,7 +1022,7 @@ LLView* LLMenuItemBranchGL::findChildView(const std::string& name, BOOL recurse) bool LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask) { // switch to mouse navigation mode - LLMenuGL::setKeyboardMode(FALSE); + LLMenuGL::setKeyboardMode(false); onCommit(); make_ui_sound("UISndClickRelease"); @@ -1034,18 +1034,18 @@ bool LLMenuItemBranchGL::hasAccelerator(const KEY &key, const MASK &mask) const return getBranch() && getBranch()->hasAccelerator(key, mask); } -BOOL LLMenuItemBranchGL::handleAcceleratorKey(KEY key, MASK mask) +bool LLMenuItemBranchGL::handleAcceleratorKey(KEY key, MASK mask) { return getBranch() && getBranch()->handleAcceleratorKey(key, mask); } // This function checks to see if the accelerator key is already in use; // if not, it will be added to the list -BOOL LLMenuItemBranchGL::addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp) +bool LLMenuItemBranchGL::addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp) { LLMenuGL* branch = getBranch(); if (!branch) - return FALSE; + return false; U32 item_count = branch->getItemCount(); LLMenuItemGL *item; @@ -1058,7 +1058,7 @@ BOOL LLMenuItemBranchGL::addToAcceleratorList(std::list<LLMenuKeyboardBinding*> } } - return FALSE; + return false; } @@ -1086,9 +1086,9 @@ void LLMenuItemBranchGL::onCommit( void ) LLUICtrl::onCommit(); } -BOOL LLMenuItemBranchGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLMenuItemBranchGL::handleKey(KEY key, MASK mask, bool called_from_parent) { - BOOL handled = FALSE; + bool handled = false; if (getBranch() && called_from_parent) { handled = getBranch()->handleKey(key, mask, called_from_parent); @@ -1102,12 +1102,12 @@ BOOL LLMenuItemBranchGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) return handled; } -BOOL LLMenuItemBranchGL::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLMenuItemBranchGL::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { - BOOL handled = FALSE; + bool handled = false; if (getBranch() && called_from_parent) { - handled = getBranch()->handleUnicodeChar(uni_char, TRUE); + handled = getBranch()->handleUnicodeChar(uni_char, true); } if (!handled) @@ -1119,7 +1119,7 @@ BOOL LLMenuItemBranchGL::handleUnicodeChar(llwchar uni_char, BOOL called_from_pa } -void LLMenuItemBranchGL::setHighlight( BOOL highlight ) +void LLMenuItemBranchGL::setHighlight( bool highlight ) { if (highlight == getHighlight()) return; @@ -1128,17 +1128,17 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight ) if (!branch) return; - BOOL auto_open = getEnabled() && (!branch->getVisible() || branch->getTornOff()); + bool auto_open = getEnabled() && (!branch->getVisible() || branch->getTornOff()); // torn off menus don't open sub menus on hover unless they have focus LLFloater * menu_parent = dynamic_cast<LLFloater *>(getMenu()->getParent()); if (getMenu()->getTornOff() && menu_parent && !menu_parent->hasFocus()) { - auto_open = FALSE; + auto_open = false; } // don't auto open torn off sub-menus (need to explicitly active menu item to give them focus) if (branch->getTornOff()) { - auto_open = FALSE; + auto_open = false; } LLMenuItemGL::setHighlight(highlight); if( highlight ) @@ -1155,13 +1155,13 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight ) LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent()); if (branch_parent) { - branch_parent->setFocus(FALSE); + branch_parent->setFocus(false); } branch->clearHoverItem(); } else { - branch->setVisible( FALSE ); + branch->setVisible( false ); } } } @@ -1171,7 +1171,7 @@ void LLMenuItemBranchGL::draw() LLMenuItemGL::draw(); if (getBranch() && getBranch()->getVisible() && !getBranch()->getTornOff()) { - setHighlight(TRUE); + setHighlight(true); } } @@ -1184,16 +1184,16 @@ void LLMenuItemBranchGL::updateBranchParent(LLView* parentp) } } -void LLMenuItemBranchGL::onVisibilityChange( BOOL new_visibility ) +void LLMenuItemBranchGL::onVisibilityChange( bool new_visibility ) { - if (new_visibility == FALSE && getBranch() && !getBranch()->getTornOff()) + if (new_visibility == false && getBranch() && !getBranch()->getTornOff()) { - getBranch()->setVisible(FALSE); + getBranch()->setVisible(false); } LLMenuItemGL::onVisibilityChange(new_visibility); } -BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) +bool LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) { LLMenuGL* branch = getBranch(); if (!branch) @@ -1208,15 +1208,15 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) if (branch->getVisible() && key == KEY_LEFT) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); - BOOL handled = branch->clearHoverItem(); + bool handled = branch->clearHoverItem(); if (branch->getTornOff()) { LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent()); if (branch_parent) { - branch_parent->setFocus(FALSE); + branch_parent->setFocus(false); } } if (handled && getMenu()->getTornOff()) @@ -1224,7 +1224,7 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) LLFloater * menu_parent = dynamic_cast<LLFloater *>(getMenu()->getParent()); if (menu_parent) { - menu_parent->setFocus(TRUE); + menu_parent->setFocus(true); } } return handled; @@ -1233,12 +1233,12 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) if (key == KEY_RIGHT && !branch->getHighlightedItem()) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); LLMenuItemGL* itemp = branch->highlightNextItem(NULL); if (itemp) { - return TRUE; + return true; } } } @@ -1246,13 +1246,13 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) } //virtual -BOOL LLMenuItemBranchGL::isActive() const +bool LLMenuItemBranchGL::isActive() const { return isOpen() && getBranch() && getBranch()->getHighlightedItem(); } //virtual -BOOL LLMenuItemBranchGL::isOpen() const +bool LLMenuItemBranchGL::isOpen() const { return getBranch() && getBranch()->isOpen(); } @@ -1323,7 +1323,7 @@ void LLMenuItemBranchGL::openMenu() } branch->translate( delta_x, delta_y ); - branch->setVisible( TRUE ); + branch->setVisible( true ); branch->getParent()->sendChildToFront(branch); dirtyRect(); @@ -1358,20 +1358,20 @@ public: // set the hover status (called by it's menu) and if the object is // active. This is used for behavior transfer. - virtual void setHighlight( BOOL highlight ); + virtual void setHighlight( bool highlight ); - virtual BOOL isActive( void ) const; + virtual bool isActive( void ) const; // LLView functionality virtual bool handleMouseDown( S32 x, S32 y, MASK mask ); virtual bool handleMouseUp( S32 x, S32 y, MASK mask ); virtual void draw( void ); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); + virtual bool handleAcceleratorKey(KEY key, MASK mask); virtual void onFocusLost(); - virtual void setFocus(BOOL b); + virtual void setFocus(bool b); }; LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const Params& p) : @@ -1403,7 +1403,7 @@ void LLMenuItemBranchDownGL::openMenu( void ) LLMenuGL* branch = getBranch(); if( branch->getVisible() && !branch->getTornOff() ) { - branch->setVisible( FALSE ); + branch->setVisible( false ); } else { @@ -1444,15 +1444,15 @@ void LLMenuItemBranchDownGL::openMenu( void ) } branch->translate( delta_x, 0 ); - setHighlight(TRUE); - branch->setVisible( TRUE ); + setHighlight(true); + branch->setVisible( true ); branch->getParent()->sendChildToFront(branch); } } } // set the hover status (called by it's menu) -void LLMenuItemBranchDownGL::setHighlight( BOOL highlight ) +void LLMenuItemBranchDownGL::setHighlight( bool highlight ) { if (highlight == getHighlight()) return; @@ -1471,18 +1471,18 @@ void LLMenuItemBranchDownGL::setHighlight( BOOL highlight ) LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent()); if (branch_parent) { - branch_parent->setFocus(FALSE); + branch_parent->setFocus(false); } branch->clearHoverItem(); } else { - branch->setVisible( FALSE ); + branch->setVisible( false ); } } } -BOOL LLMenuItemBranchDownGL::isActive() const +bool LLMenuItemBranchDownGL::isActive() const { // for top level menus, being open is sufficient to be considered // active, because clicking on them with the mouse will open @@ -1514,10 +1514,10 @@ bool LLMenuItemBranchDownGL::handleMouseUp( S32 x, S32 y, MASK mask ) } -BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask) +bool LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask) { - BOOL branch_visible = getBranch()->getVisible(); - BOOL handled = getBranch()->handleAcceleratorKey(key, mask); + bool branch_visible = getBranch()->getVisible(); + bool handled = getBranch()->handleAcceleratorKey(key, mask); if (handled && !branch_visible && isInVisibleChain()) { // flash this menu entry because we triggered an invisible menu item @@ -1530,11 +1530,11 @@ void LLMenuItemBranchDownGL::onFocusLost() { // needed for tab-based selection LLMenuItemBranchGL::onFocusLost(); - LLMenuGL::setKeyboardMode(FALSE); - setHighlight(FALSE); + LLMenuGL::setKeyboardMode(false); + setHighlight(false); } -void LLMenuItemBranchDownGL::setFocus(BOOL b) +void LLMenuItemBranchDownGL::setFocus(bool b) { // needed for tab-based selection LLMenuItemBranchGL::setFocus(b); @@ -1542,16 +1542,16 @@ void LLMenuItemBranchDownGL::setFocus(BOOL b) setHighlight(b); } -BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) +bool LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) { - BOOL menu_open = getBranch()->getVisible(); + bool menu_open = getBranch()->getVisible(); // don't do keyboard navigation of top-level menus unless in keyboard mode, or menu expanded if (getHighlight() && getMenu()->isOpen() && (isActive() || LLMenuGL::getKeyboardMode())) { if (key == KEY_LEFT) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); LLMenuItemGL* itemp = getMenu()->highlightPrevItem(this); // open new menu only if previous menu was open @@ -1560,12 +1560,12 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) itemp->onCommit(); } - return TRUE; + return true; } else if (key == KEY_RIGHT) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); LLMenuItemGL* itemp = getMenu()->highlightNextItem(this); // open new menu only if previous menu was open @@ -1574,35 +1574,35 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) itemp->onCommit(); } - return TRUE; + return true; } else if (key == KEY_DOWN) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); if (!isActive()) { onCommit(); } getBranch()->highlightNextItem(NULL); - return TRUE; + return true; } else if (key == KEY_UP) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); if (!isActive()) { onCommit(); } getBranch()->highlightPrevItem(NULL); - return TRUE; + return true; } } - return FALSE; + return false; } void LLMenuItemBranchDownGL::draw( void ) @@ -1610,7 +1610,7 @@ void LLMenuItemBranchDownGL::draw( void ) //FIXME: try removing this if (getBranch()->getVisible() && !getBranch()->getTornOff()) { - setHighlight(TRUE); + setHighlight(true); } if( getHighlight() ) @@ -1682,8 +1682,8 @@ protected: public: /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); - /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent); + /*virtual*/ void setEnabled(bool enabled); virtual void onCommit( void ); private: @@ -1733,14 +1733,14 @@ void LLMenuScrollItem::draw() } /*virtual*/ -void LLMenuScrollItem::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLMenuScrollItem::reshape(S32 width, S32 height, bool called_from_parent) { mArrowBtn->reshape(width, height, called_from_parent); LLView::reshape(width, height, called_from_parent); } /*virtual*/ -void LLMenuScrollItem::setEnabled(BOOL enabled) +void LLMenuScrollItem::setEnabled(bool enabled) { mArrowBtn->setEnabled(enabled); LLView::setEnabled(enabled); @@ -1762,7 +1762,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mDropShadowed( p.drop_shadow ), mHasSelection(false), mHorizontalLayout( p.horizontal_layout ), - mScrollable(mHorizontalLayout ? FALSE : p.scrollable), // Scrolling is supported only for vertical layout + mScrollable(mHorizontalLayout ? false : p.scrollable), // Scrolling is supported only for vertical layout mMaxScrollableItems(p.max_scrollable_items), mPreferredWidth(p.preferred_width), mKeepFixedSize( p.keep_fixed_size ), @@ -1771,7 +1771,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mLastMouseY(0), mMouseVelX(0), mMouseVelY(0), - mTornOff(FALSE), + mTornOff(false), mTearOffItem(NULL), mSpilloverBranch(NULL), mFirstVisibleItem(NULL), @@ -1780,8 +1780,8 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mSpilloverMenu(NULL), mJumpKey(p.jump_key), mCreateJumpKeys(p.create_jump_keys), - mNeedsArrange(FALSE), - mAlwaysShowMenu(FALSE), + mNeedsArrange(false), + mAlwaysShowMenu(false), mResetScrollPositionOnShow(true), mShortcutPad(p.shortcut_pad) { @@ -1821,7 +1821,7 @@ LLMenuGL::~LLMenuGL( void ) mJumpKeys.clear(); } -void LLMenuGL::setCanTearOff(BOOL tear_off) +void LLMenuGL::setCanTearOff(bool tear_off) { if (tear_off && mTearOffItem == NULL) { @@ -1911,7 +1911,7 @@ void LLMenuGL::removeChild( LLView* ctrl) return LLUICtrl::removeChild(ctrl); } -BOOL LLMenuGL::postBuild() +bool LLMenuGL::postBuild() { createJumpKeys(); return LLUICtrl::postBuild(); @@ -1919,10 +1919,10 @@ BOOL LLMenuGL::postBuild() // are we the childmost active menu and hence our jump keys should be enabled? // or are we a free-standing torn-off menu (which uses jump keys too) -BOOL LLMenuGL::jumpKeysActive() +bool LLMenuGL::jumpKeysActive() { LLMenuItemGL* highlighted_item = getHighlightedItem(); - BOOL active = getVisible() && getEnabled(); + bool active = getVisible() && getEnabled(); if (active) { @@ -1948,7 +1948,7 @@ BOOL LLMenuGL::jumpKeysActive() return active; } -BOOL LLMenuGL::isOpen() +bool LLMenuGL::isOpen() { if (getTornOff()) { @@ -1957,7 +1957,7 @@ BOOL LLMenuGL::isOpen() // the open menu chain even if we don't have focus if (itemp && itemp->isOpen()) { - return TRUE; + return true; } // otherwise we are only active if we have keyboard focus LLFloater * parent = dynamic_cast<LLFloater *>(getParent()); @@ -1965,7 +1965,7 @@ BOOL LLMenuGL::isOpen() { return parent->hasFocus(); } - return FALSE; + return false; } else { @@ -2075,7 +2075,7 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction) LL_WARNS() << "Unknown scrolling direction: " << direction << LL_ENDL; } - mNeedsArrange = TRUE; + mNeedsArrange = true; arrangeAndClear(); return true; @@ -2332,11 +2332,11 @@ void LLMenuGL::arrange( void ) LLRect rect; mArrowUpItem->setRect(rect.setLeftTopAndSize( 0, cur_height, width, mArrowUpItem->getNominalHeight())); - mArrowUpItem->setVisible(TRUE); + mArrowUpItem->setVisible(true); mArrowUpItem->setEnabled(height_before_first_visible_item > MENU_ITEM_PADDING); mArrowUpItem->reshape(width, mArrowUpItem->getNominalHeight()); mArrowDownItem->setRect(rect.setLeftTopAndSize( 0, mArrowDownItem->getNominalHeight(), width, mArrowDownItem->getNominalHeight())); - mArrowDownItem->setVisible(TRUE); + mArrowDownItem->setVisible(true); mArrowDownItem->setEnabled(height_before_first_visible_item + visible_items_height < (S32)height); mArrowDownItem->reshape(width, mArrowDownItem->getNominalHeight()); @@ -2348,11 +2348,11 @@ void LLMenuGL::arrange( void ) { if (NULL != mArrowUpItem) { - mArrowUpItem->setVisible(FALSE); + mArrowUpItem->setVisible(false); } if (NULL != mArrowDownItem) { - mArrowDownItem->setVisible(FALSE); + mArrowDownItem->setVisible(false); } } @@ -2415,7 +2415,7 @@ void LLMenuGL::arrangeAndClear( void ) if (mNeedsArrange) { arrange(); - mNeedsArrange = FALSE; + mNeedsArrange = false; } } @@ -2477,7 +2477,7 @@ void LLMenuGL::cleanupSpilloverBranch() void LLMenuGL::createJumpKeys() { if (!mCreateJumpKeys) return; - mCreateJumpKeys = FALSE; + mCreateJumpKeys = false; mJumpKeys.clear(); @@ -2542,7 +2542,7 @@ void LLMenuGL::createJumpKeys() tokenizer tokens(uppercase_label, sep); tokenizer::iterator token_iter; - BOOL found_key = FALSE; + bool found_key = false; for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) { std::string uppercase_word = *token_iter; @@ -2560,7 +2560,7 @@ void LLMenuGL::createJumpKeys() { mJumpKeys.insert(std::pair<KEY, LLMenuItemGL*>(jump_key, (*item_it))); (*item_it)->setJumpKey(jump_key); - found_key = TRUE; + found_key = true; break; } } @@ -2643,7 +2643,7 @@ void LLMenuGL::setLeftAndBottom(S32 left, S32 bottom) needsArrange(); } -BOOL LLMenuGL::handleJumpKey(KEY key) +bool LLMenuGL::handleJumpKey(KEY key) { // must perform case-insensitive comparison, so just switch to uppercase input key key = toupper(key); @@ -2651,31 +2651,31 @@ BOOL LLMenuGL::handleJumpKey(KEY key) if(found_it != mJumpKeys.end() && found_it->second->getEnabled()) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); // force highlight to close old menus and open and sub-menus - found_it->second->setHighlight(TRUE); + found_it->second->setHighlight(true); found_it->second->onCommit(); } // if we are navigating the menus, we need to eat the keystroke // so rest of UI doesn't handle it - return TRUE; + return true; } // Add the menu item to this menu. -BOOL LLMenuGL::append( LLMenuItemGL* item ) +bool LLMenuGL::append( LLMenuItemGL* item ) { - if (!item) return FALSE; + if (!item) return false; mItems.push_back( item ); LLUICtrl::addChild(item); needsArrange(); - return TRUE; + return true; } // add a separator to this menu -BOOL LLMenuGL::addSeparator() +bool LLMenuGL::addSeparator() { LLMenuItemSeparatorGL::Params p; LLMenuItemGL* separator = LLUICtrlFactory::create<LLMenuItemSeparatorGL>(p); @@ -2683,14 +2683,14 @@ BOOL LLMenuGL::addSeparator() } // add a menu - this will create a cascading menu -BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) +bool LLMenuGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { LL_ERRS() << "** Attempt to attach menu to itself. This is certainly " << "a logic error." << LL_ENDL; } - BOOL success = TRUE; + bool success = true; LLMenuItemBranchGL::Params p; p.name = menu->getName(); @@ -2712,7 +2712,7 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) } // add a context menu branch -BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) +bool LLMenuGL::appendContextSubMenu(LLMenuGL *menu) { if (menu == this) { @@ -2735,7 +2735,7 @@ BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) return append( item ); } -void LLMenuGL::setEnabledSubMenus(BOOL enable) +void LLMenuGL::setEnabledSubMenus(bool enable) { setEnabled(enable); item_list_t::iterator item_iter; @@ -2746,8 +2746,8 @@ void LLMenuGL::setEnabledSubMenus(BOOL enable) } // setItemEnabled() - pass the label and the enable flag for a menu -// item. TRUE will make sure it's enabled, FALSE will disable it. -void LLMenuGL::setItemEnabled( const std::string& name, BOOL enable ) +// item. true will make sure it's enabled, false will disable it. +void LLMenuGL::setItemEnabled( const std::string& name, bool enable ) { item_list_t::iterator item_iter; for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) @@ -2761,7 +2761,7 @@ void LLMenuGL::setItemEnabled( const std::string& name, BOOL enable ) } } -void LLMenuGL::setItemVisible( const std::string& name, BOOL visible ) +void LLMenuGL::setItemVisible( const std::string& name, bool visible ) { item_list_t::iterator item_iter; for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) @@ -2796,12 +2796,12 @@ void LLMenuGL::setItemLastSelected(LLMenuItemGL* item) } // Set whether drop shadowed -void LLMenuGL::setDropShadowed( const BOOL shadowed ) +void LLMenuGL::setDropShadowed( const bool shadowed ) { mDropShadowed = shadowed; } -void LLMenuGL::setTornOff(BOOL torn_off) +void LLMenuGL::setTornOff(bool torn_off) { mTornOff = torn_off; } @@ -2854,7 +2854,7 @@ LLMenuItemGL* LLMenuGL::getHighlightedItem() return NULL; } -LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled) +LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, bool skip_disabled) { if (mItems.empty()) return NULL; // highlighting first item on a torn off menu is the @@ -2864,7 +2864,7 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa LLFloater * parent = dynamic_cast<LLFloater *>(getParent()); if (parent) { - parent->setFocus(TRUE); + parent->setFocus(true); } } @@ -2933,9 +2933,9 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa { if (cur_item) { - cur_item->setHighlight(FALSE); + cur_item->setHighlight(false); } - (*next_item_iter)->setHighlight(TRUE); + (*next_item_iter)->setHighlight(true); return (*next_item_iter); } @@ -2959,7 +2959,7 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa return NULL; } -LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled) +LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, bool skip_disabled) { if (mItems.empty()) return NULL; @@ -2970,7 +2970,7 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa LLFloater * parent = dynamic_cast<LLFloater *>(getParent()); if (parent) { - parent->setFocus(TRUE); + parent->setFocus(true); } } @@ -3025,7 +3025,7 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa // skip separators and disabled/invisible items if ((*prev_item_iter)->getEnabled() && (*prev_item_iter)->getVisible() && (*prev_item_iter)->getName() != SEPARATOR_NAME) { - (*prev_item_iter)->setHighlight(TRUE); + (*prev_item_iter)->setHighlight(true); return (*prev_item_iter); } @@ -3096,12 +3096,12 @@ bool LLMenuGL::hasAccelerator(const KEY &key, const MASK &mask) const return false; } -BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask) +bool LLMenuGL::handleAcceleratorKey(KEY key, MASK mask) { // don't handle if not enabled if(!getEnabled()) { - return FALSE; + return false; } // Pass down even if not visible @@ -3111,11 +3111,11 @@ BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask) LLMenuItemGL* itemp = *item_iter; if (itemp->handleAcceleratorKey(key, mask)) { - return TRUE; + return true; } } - return FALSE; + return false; } bool LLMenuGL::handleUnicodeCharHere( llwchar uni_char ) @@ -3225,7 +3225,7 @@ void LLMenuGL::draw( void ) if (mNeedsArrange) { arrange(); - mNeedsArrange = FALSE; + mNeedsArrange = false; } if (mDropShadowed && !mTornOff) { @@ -3250,7 +3250,7 @@ void LLMenuGL::drawBackground(LLMenuItemGL* itemp, F32 alpha) gl_rect_2d( 0, item_rect.getHeight(), item_rect.getWidth(), 0); } -void LLMenuGL::setVisible(BOOL visible) +void LLMenuGL::setVisible(bool visible) { if (visible != getVisible()) { @@ -3273,7 +3273,7 @@ void LLMenuGL::setVisible(BOOL visible) } } -LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, BOOL recurse) const +LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, bool recurse) const { LLView* view = findChildView(name, recurse); if (view) @@ -3294,23 +3294,23 @@ LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, BOOL recurse) c return NULL; } -BOOL LLMenuGL::clearHoverItem() +bool LLMenuGL::clearHoverItem() { for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLMenuItemGL* itemp = (LLMenuItemGL*)*child_it; if (itemp->getHighlight()) { - itemp->setHighlight(FALSE); - return TRUE; + itemp->setHighlight(false); + return true; } } - return FALSE; + return false; } void hide_top_view( LLView* view ) { - if( view ) view->setVisible( FALSE ); + if( view ) view->setVisible( false ); } @@ -3327,12 +3327,12 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S3 return; } - menu->setVisible( TRUE ); + menu->setVisible( true ); if(!menu->getAlwaysShowMenu()) { //Do not show menu if all menu items are disabled - BOOL item_enabled = false; + bool item_enabled = false; for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); itor != menu->getChildList()->end(); ++itor) @@ -3343,7 +3343,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S3 if(!item_enabled) { - menu->setVisible( FALSE ); + menu->setVisible( false ); return; } } @@ -3408,7 +3408,7 @@ static LLDefaultChildRegistry::Register<LLMenuBarGL> r2("menu_bar"); LLMenuBarGL::LLMenuBarGL( const Params& p ) : LLMenuGL(p), - mAltKeyTrigger(FALSE) + mAltKeyTrigger(false) {} // Default destructor @@ -3418,19 +3418,19 @@ LLMenuBarGL::~LLMenuBarGL() mAccelerators.clear(); } -BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) +bool LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) { if (getHighlightedItem() && mask == MASK_NONE) { // unmodified key accelerators are ignored when navigating menu // (but are used as jump keys so will still work when appropriate menu is up) - return FALSE; + return false; } - BOOL result = LLMenuGL::handleAcceleratorKey(key, mask); + bool result = LLMenuGL::handleAcceleratorKey(key, mask); if (result && mask & MASK_ALT) { // ALT key used to trigger hotkey, don't use as shortcut to open menu - mAltKeyTrigger = FALSE; + mAltKeyTrigger = false; } if(!result @@ -3441,16 +3441,16 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) if (getHighlightedItem()) { clearHoverItem(); - LLMenuGL::setKeyboardMode(FALSE); + LLMenuGL::setKeyboardMode(false); } else { // close menus originating from other menu bars when first opening menu via keyboard LLMenuGL::sMenuContainer->hideMenus(); highlightNextItem(NULL); - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); } - return TRUE; + return true; } if (result && !getHighlightedItem() && LLMenuGL::sMenuContainer->hasVisibleMenu()) @@ -3462,22 +3462,22 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) return result; } -BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask) +bool LLMenuBarGL::handleKeyHere(KEY key, MASK mask) { static LLUICachedControl<bool> use_altkey_for_menus ("UseAltKeyForMenus", 0); if(key == KEY_ALT && !gKeyboard->getKeyRepeated(key) && use_altkey_for_menus) { - mAltKeyTrigger = TRUE; + mAltKeyTrigger = true; } else // if any key other than ALT hit, clear out waiting for Alt key mode { - mAltKeyTrigger = FALSE; + mAltKeyTrigger = false; } if (key == KEY_ESCAPE && mask == MASK_NONE) { - LLMenuGL::setKeyboardMode(FALSE); - // if any menus are visible, this will return TRUE, stopping further processing of ESCAPE key + LLMenuGL::setKeyboardMode(false); + // if any menus are visible, this will return true, stopping further processing of ESCAPE key return LLMenuGL::sMenuContainer->hideMenus(); } @@ -3487,7 +3487,7 @@ BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask) return LLMenuGL::handleKeyHere(key, mask); } -BOOL LLMenuBarGL::handleJumpKey(KEY key) +bool LLMenuBarGL::handleJumpKey(KEY key) { // perform case-insensitive comparison key = toupper(key); @@ -3495,12 +3495,12 @@ BOOL LLMenuBarGL::handleJumpKey(KEY key) if(found_it != mJumpKeys.end() && found_it->second->getEnabled()) { // switch to keyboard navigation mode - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); - found_it->second->setHighlight(TRUE); + found_it->second->setHighlight(true); found_it->second->onCommit(); } - return TRUE; + return true; } bool LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask) @@ -3559,14 +3559,14 @@ void LLMenuBarGL::checkMenuTrigger() LLMenuGL::sMenuContainer->hideMenus(); highlightNextItem(NULL); - LLMenuGL::setKeyboardMode(TRUE); + LLMenuGL::setKeyboardMode(true); } } - mAltKeyTrigger = FALSE; + mAltKeyTrigger = false; } } -BOOL LLMenuBarGL::jumpKeysActive() +bool LLMenuBarGL::jumpKeysActive() { // require user to be in keyboard navigation mode to activate key triggers // as menu bars are always visible and it is easy to leave the mouse cursor over them @@ -3615,14 +3615,14 @@ S32 LLMenuBarGL::getRightmostMenuEdge() } // add a vertical separator to this menu -BOOL LLMenuBarGL::addSeparator() +bool LLMenuBarGL::addSeparator() { LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL(); return append( separator ); } // add a menu - this will create a drop down menu. -BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) +bool LLMenuBarGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { @@ -3630,7 +3630,7 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) << "a logic error." << LL_ENDL; } - BOOL success = TRUE; + bool success = true; // *TODO: Hack! Fix this LLMenuItemBranchDownGL::Params p; @@ -3657,7 +3657,7 @@ bool LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask ) bool handled = false; LLView* active_menu = NULL; - BOOL no_mouse_data = mLastMouseX == 0 && mLastMouseY == 0; + bool no_mouse_data = mLastMouseX == 0 && mLastMouseY == 0; S32 mouse_delta_x = no_mouse_data ? 0 : x - mLastMouseX; S32 mouse_delta_y = no_mouse_data ? 0 : y - mLastMouseY; mMouseVelX = (mMouseVelX / 2) + (mouse_delta_x / 2); @@ -3691,7 +3691,7 @@ bool LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask ) viewp->handleHover(local_x, local_y, mask)) { ((LLMenuItemGL*)viewp)->setHighlight(true); - handled = TRUE; + handled = true; if (active_menu && active_menu != viewp) { ((LLMenuItemGL*)viewp)->onCommit(); @@ -3731,7 +3731,7 @@ LLMenuHolderGL::LLMenuHolderGL(const LLMenuHolderGL::Params& p) : LLPanel(p) { sItemActivationTimer.stop(); - mCanHide = TRUE; + mCanHide = true; } void LLMenuHolderGL::draw() @@ -3823,9 +3823,9 @@ bool LLMenuHolderGL::handleRightMouseUp( S32 x, S32 y, MASK mask ) return handled; } -BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLMenuHolderGL::handleKey(KEY key, MASK mask, bool called_from_parent) { - BOOL handled = false; + bool handled = false; LLMenuGL* const pMenu = dynamic_cast<LLMenuGL*>(getVisibleMenu()); if (pMenu) @@ -3833,7 +3833,7 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) //eat TAB key - EXT-7000 if (key == KEY_TAB && mask == MASK_NONE) { - return TRUE; + return true; } //handle ESCAPE and RETURN key @@ -3842,7 +3842,7 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) { if (pMenu->getHighlightedItem()) { - handled = pMenu->handleKey(key, mask, TRUE); + handled = pMenu->handleKey(key, mask, true); } else if (mask == MASK_NONE || (key >= KEY_LEFT && key <= KEY_DOWN)) { @@ -3859,7 +3859,7 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) } -void LLMenuHolderGL::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLMenuHolderGL::reshape(S32 width, S32 height, bool called_from_parent) { if (width != getRect().getWidth() || height != getRect().getHeight()) { @@ -3882,14 +3882,14 @@ LLView* const LLMenuHolderGL::getVisibleMenu() const } -BOOL LLMenuHolderGL::hideMenus() +bool LLMenuHolderGL::hideMenus() { if (!mCanHide) { - return FALSE; + return false; } - LLMenuGL::setKeyboardMode(FALSE); - BOOL menu_visible = hasVisibleMenu(); + LLMenuGL::setKeyboardMode(false); + bool menu_visible = hasVisibleMenu(); if (menu_visible) { // clicked off of menu, hide them all @@ -3898,7 +3898,7 @@ BOOL LLMenuHolderGL::hideMenus() LLView* viewp = *child_it; if (dynamic_cast<LLMenuGL*>(viewp) != NULL && viewp->getVisible()) { - viewp->setVisible(FALSE); + viewp->setVisible(false); } } } @@ -3927,9 +3927,9 @@ LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) : setName(menup->getName()); setTitle(menup->getLabel()); - setCanMinimize(FALSE); + setCanMinimize(false); // flag menu as being torn off - menup->setTornOff(TRUE); + menup->setTornOff(true); // update menu layout as torn off menu (no spillover menus) menup->needsArrange(); @@ -3944,12 +3944,12 @@ LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) : menup->setFollows( FOLLOWS_LEFT | FOLLOWS_BOTTOM ); mOldParent = menup->getParent(); addChild(menup); - menup->setVisible(TRUE); + menup->setVisible(true); LLRect menu_rect = menup->getRect(); menu_rect.setOriginAndSize( 1, 1, menu_rect.getWidth(), menu_rect.getHeight()); menup->setRect(menu_rect); - menup->setDropShadowed(FALSE); + menup->setDropShadowed(false); mMenu = menup; @@ -3997,7 +3997,7 @@ void LLTearOffMenu::onFocusReceived() { if (parent_menu_item->getMenu()->getVisible()) { - parent_menu_item->setHighlight(TRUE); + parent_menu_item->setHighlight(true); parent_menu_item = parent_menu_item->getMenu()->getParentMenuItem(); } else @@ -4015,29 +4015,29 @@ void LLTearOffMenu::onFocusLost() LLFloater::onFocusLost(); } -BOOL LLTearOffMenu::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLTearOffMenu::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { // pass keystrokes down to menu - return mMenu->handleUnicodeChar(uni_char, TRUE); + return mMenu->handleUnicodeChar(uni_char, true); } -BOOL LLTearOffMenu::handleKeyHere(KEY key, MASK mask) +bool LLTearOffMenu::handleKeyHere(KEY key, MASK mask) { if (!mMenu->getHighlightedItem()) { if (key == KEY_UP) { mMenu->highlightPrevItem(NULL); - return TRUE; + return true; } else if (key == KEY_DOWN) { mMenu->highlightNextItem(NULL); - return TRUE; + return true; } } // pass keystrokes down to menu - return mMenu->handleKey(key, mask, TRUE); + return mMenu->handleKey(key, mask, true); } void LLTearOffMenu::translate(S32 x, S32 y) @@ -4055,7 +4055,7 @@ LLTearOffMenu* LLTearOffMenu::create(LLMenuGL* menup) { LLTearOffMenu* tearoffp = new LLTearOffMenu(menup); // keep onscreen - gFloaterView->adjustToFitScreen(tearoffp, FALSE); + gFloaterView->adjustToFitScreen(tearoffp, false); tearoffp->openFloater(LLSD()); return tearoffp; @@ -4092,10 +4092,10 @@ void LLTearOffMenu::closeTearOff() mOldParent->addChild(mMenu); mMenu->clearHoverItem(); mMenu->setFollowsNone(); - mMenu->setBackgroundVisible(TRUE); - mMenu->setVisible(FALSE); - mMenu->setTornOff(FALSE); - mMenu->setDropShadowed(TRUE); + mMenu->setBackgroundVisible(true); + mMenu->setVisible(false); + mMenu->setTornOff(false); + mMenu->setDropShadowed(true); mQuitRequested = true; } @@ -4129,19 +4129,19 @@ void LLContextMenuBranch::buildDrawLabel( void ) // enabled, this item is enabled. JC U32 sub_count = menu->getItemCount(); U32 i; - BOOL any_enabled = FALSE; + bool any_enabled = false; for (i = 0; i < sub_count; i++) { LLMenuItemGL* item = menu->getItem(i); item->buildDrawLabel(); if (item->getEnabled() && !item->getDrawTextDisabled() ) { - any_enabled = TRUE; + any_enabled = true; break; } } setDrawTextDisabled(!any_enabled); - setEnabled(TRUE); + setEnabled(true); } mDrawAccelLabel.clear(); @@ -4174,7 +4174,7 @@ void LLContextMenuBranch::onCommit( void ) showSubMenu(); } -void LLContextMenuBranch::setHighlight( BOOL highlight ) +void LLContextMenuBranch::setHighlight( bool highlight ) { if (highlight == getHighlight()) return; LLMenuItemGL::setHighlight(highlight); @@ -4204,13 +4204,13 @@ static MenuRegistry::Register<LLContextMenu> context_menu_register2("context_men LLContextMenu::LLContextMenu(const Params& p) : LLMenuGL(p), - mHoveredAnyItem(FALSE), + mHoveredAnyItem(false), mHoverItem(NULL) { - //setBackgroundVisible(TRUE); + //setBackgroundVisible(true); } -void LLContextMenu::setVisible(BOOL visible) +void LLContextMenu::setVisible(bool visible) { if (!visible) hide(); @@ -4279,18 +4279,18 @@ void LLContextMenu::show(S32 x, S32 y, LLView* spawning_view) { mSpawningViewHandle.markDead(); } - LLView::setVisible(TRUE); + LLView::setVisible(true); } void LLContextMenu::hide() { if (!getVisible()) return; - LLView::setVisible(FALSE); + LLView::setVisible(false); if (mHoverItem) { - mHoverItem->setHighlight( FALSE ); + mHoverItem->setHighlight( false ); } mHoverItem = NULL; } @@ -4386,7 +4386,7 @@ bool LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask ) } - BOOL result = handleMouseUp( x, y, mask ); + bool result = handleMouseUp( x, y, mask ); mHoveredAnyItem = false; return result; diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 88fb30fbb2..a52941ab73 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -89,7 +89,7 @@ protected: friend class LLUICtrlFactory; public: // LLView overrides - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleRightMouseUp(S32 x, S32 y, MASK mask); @@ -99,7 +99,7 @@ public: /*virtual*/ LLSD getValue() const; virtual bool hasAccelerator(const KEY &key, const MASK &mask) const; - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); + virtual bool handleAcceleratorKey(KEY key, MASK mask); LLColor4 getHighlightBgColor() { return mHighlightBackground.get(); } @@ -114,17 +114,17 @@ public: virtual U32 getNominalHeight( void ) const; // Marks item as not needing space for check marks or accelerator keys - virtual void setBriefItem(BOOL brief); - virtual BOOL isBriefItem() const; + virtual void setBriefItem(bool brief); + virtual bool isBriefItem() const; - virtual BOOL addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp); - void setAllowKeyRepeat(BOOL allow) { mAllowKeyRepeat = allow; } - BOOL getAllowKeyRepeat() const { return mAllowKeyRepeat; } + virtual bool addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp); + void setAllowKeyRepeat(bool allow) { mAllowKeyRepeat = allow; } + bool getAllowKeyRepeat() const { return mAllowKeyRepeat; } // change the label void setLabel( const LLStringExplicit& label ) { mLabel = label; } std::string getLabel( void ) const { return mLabel.getString(); } - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); // Get the parent menu for this item virtual class LLMenuGL* getMenu() const; @@ -150,19 +150,19 @@ public: virtual void onCommit( void ); - virtual void setHighlight( BOOL highlight ); - virtual BOOL getHighlight() const { return mHighlight; } + virtual void setHighlight( bool highlight ); + virtual bool getHighlight() const { return mHighlight; } // determine if this represents an active sub-menu - virtual BOOL isActive( void ) const { return FALSE; } + virtual bool isActive( void ) const { return false; } // determine if this represents an open sub-menu - virtual BOOL isOpen( void ) const { return FALSE; } + virtual bool isOpen( void ) const { return false; } - virtual void setEnabledSubMenus(BOOL enable){}; + virtual void setEnabledSubMenus(bool enable){}; // LLView Functionality - virtual BOOL handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ); virtual bool handleMouseDown( S32 x, S32 y, MASK mask ); virtual bool handleMouseUp( S32 x, S32 y, MASK mask ); virtual bool handleScrollWheel( S32 x, S32 y, S32 clicks ); @@ -172,13 +172,13 @@ public: virtual void draw( void ); - BOOL getHover() const { return mGotHover; } + bool getHover() const { return mGotHover; } - void setDrawTextDisabled(BOOL disabled) { mDrawTextDisabled = disabled; } - BOOL getDrawTextDisabled() const { return mDrawTextDisabled; } + void setDrawTextDisabled(bool disabled) { mDrawTextDisabled = disabled; } + bool getDrawTextDisabled() const { return mDrawTextDisabled; } protected: - void setHover(BOOL hover) { mGotHover = hover; } + void setHover(bool hover) { mGotHover = hover; } // This function appends the character string representation of // the current accelerator key and mask to the provided string. @@ -207,19 +207,19 @@ protected: LLUIColor mHighlightBackground; LLUIColor mHighlightForeground; - BOOL mHighlight; + bool mHighlight; private: // Keyboard and mouse variables - BOOL mAllowKeyRepeat; - BOOL mGotHover; + bool mAllowKeyRepeat; + bool mGotHover; // If true, suppress normal space for check marks on the left and accelerator // keys on the right. - BOOL mBriefItem; + bool mBriefItem; // Font for this item const LLFontGL* mFont; - BOOL mDrawTextDisabled; + bool mDrawTextDisabled; KEY mJumpKey; }; @@ -288,8 +288,8 @@ public: virtual void onCommit( void ); - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleAcceleratorKey(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); //virtual void draw(); @@ -447,18 +447,18 @@ public: /*virtual*/ bool handleScrollWheel( S32 x, S32 y, S32 clicks ); /*virtual*/ void draw( void ); /*virtual*/ void drawBackground(LLMenuItemGL* itemp, F32 alpha); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); /*virtual*/ void deleteAllChildren(); /*virtual*/ void removeChild( LLView* ctrl); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual bool hasAccelerator(const KEY &key, const MASK &mask) const; - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); + virtual bool handleAcceleratorKey(KEY key, MASK mask); - LLMenuGL* findChildMenuByName(const std::string& name, BOOL recurse) const; + LLMenuGL* findChildMenuByName(const std::string& name, bool recurse) const; - BOOL clearHoverItem(); + bool clearHoverItem(); // return the name label const std::string& getLabel( void ) const { return mLabel.getString(); } @@ -467,37 +467,37 @@ public: // background colors void setBackgroundColor( const LLUIColor& color ) { mBackgroundColor = color; } const LLUIColor& getBackgroundColor() const { return mBackgroundColor; } - void setBackgroundVisible( BOOL b ) { mBgVisible = b; } - void setCanTearOff(BOOL tear_off); + void setBackgroundVisible( bool b ) { mBgVisible = b; } + void setCanTearOff(bool tear_off); // add a separator to this menu - virtual BOOL addSeparator(); + virtual bool addSeparator(); // for branching menu items, bring sub menus up to root level of menu hierarchy virtual void updateParent( LLView* parentp ); // setItemEnabled() - pass the name and the enable flag for a - // menu item. TRUE will make sure it's enabled, FALSE will disable + // menu item. true will make sure it's enabled, false will disable // it. - void setItemEnabled( const std::string& name, BOOL enable ); + void setItemEnabled( const std::string& name, bool enable ); // propagate message to submenus - void setEnabledSubMenus(BOOL enable); + void setEnabledSubMenus(bool enable); - void setItemVisible( const std::string& name, BOOL visible); + void setItemVisible( const std::string& name, bool visible); void setItemLabel(const std::string &name, const std::string &label); // sets the left,bottom corner of menu, useful for popups void setLeftAndBottom(S32 left, S32 bottom); - virtual BOOL handleJumpKey(KEY key); + virtual bool handleJumpKey(KEY key); - virtual BOOL jumpKeysActive(); + virtual bool jumpKeysActive(); - virtual BOOL isOpen(); + virtual bool isOpen(); - void needsArrange() { mNeedsArrange = TRUE; } + void needsArrange() { mNeedsArrange = true; } // Shape this menu to fit the current state of the children, and // adjust the child rects to fit. This is called automatically // when you add items. *FIX: We may need to deal with visibility @@ -520,8 +520,8 @@ public: LLMenuItemGL* getItem(std::string name); LLMenuItemGL* getHighlightedItem(); - LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE); - LLMenuItemGL* highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE); + LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, bool skip_disabled = true); + LLMenuItemGL* highlightPrevItem(LLMenuItemGL* cur_item, bool skip_disabled = true); void buildDrawLabels(); void createJumpKeys(); @@ -530,46 +530,46 @@ public: static void showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S32 mouse_x = 0, S32 mouse_y = 0); // Whether to drop shadow menu bar - void setDropShadowed( const BOOL shadowed ); + void setDropShadowed( const bool shadowed ); void setParentMenuItem( LLMenuItemGL* parent_menu_item ) { mParentMenuItem = parent_menu_item->getHandle(); } LLMenuItemGL* getParentMenuItem() const { return dynamic_cast<LLMenuItemGL*>(mParentMenuItem.get()); } - void setTornOff(BOOL torn_off); - BOOL getTornOff() { return mTornOff; } + void setTornOff(bool torn_off); + bool getTornOff() { return mTornOff; } - BOOL getCanTearOff() { return mTearOffItem != NULL; } + bool getCanTearOff() { return mTearOffItem != NULL; } KEY getJumpKey() const { return mJumpKey; } void setJumpKey(KEY key) { mJumpKey = key; } - static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; } - static BOOL getKeyboardMode() { return sKeyboardMode; } + static void setKeyboardMode(bool mode) { sKeyboardMode = mode; } + static bool getKeyboardMode() { return sKeyboardMode; } S32 getShortcutPad() { return mShortcutPad; } bool scrollItems(EScrollingDirection direction); - BOOL isScrollable() const { return mScrollable; } + bool isScrollable() const { return mScrollable; } static class LLMenuHolderGL* sMenuContainer; void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; } bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; } - void setAlwaysShowMenu(BOOL show) { mAlwaysShowMenu = show; } - BOOL getAlwaysShowMenu() { return mAlwaysShowMenu; } + void setAlwaysShowMenu(bool show) { mAlwaysShowMenu = show; } + bool getAlwaysShowMenu() { return mAlwaysShowMenu; } // add a context menu branch - BOOL appendContextSubMenu(LLMenuGL *menu); + bool appendContextSubMenu(LLMenuGL *menu); protected: void createSpilloverBranch(); void cleanupSpilloverBranch(); // Add the menu item to this menu. - virtual BOOL append( LLMenuItemGL* item ); + virtual bool append( LLMenuItemGL* item ); // add a menu - this will create a cascading menu - virtual BOOL appendMenu( LLMenuGL* menu ); + virtual bool appendMenu( LLMenuGL* menu ); // Used in LLContextMenu and in LLTogleableMenu // to add an item of context menu branch @@ -589,33 +589,33 @@ protected: S32 mMouseVelY; U32 mMaxScrollableItems; U32 mPreferredWidth; - BOOL mHorizontalLayout; - BOOL mScrollable; - BOOL mKeepFixedSize; - BOOL mNeedsArrange; + bool mHorizontalLayout; + bool mScrollable; + bool mKeepFixedSize; + bool mNeedsArrange; private: static LLColor4 sDefaultBackgroundColor; - static BOOL sKeyboardMode; + static bool sKeyboardMode; - BOOL mAlwaysShowMenu; + bool mAlwaysShowMenu; LLUIColor mBackgroundColor; - BOOL mBgVisible; + bool mBgVisible; LLHandle<LLView> mParentMenuItem; LLUIString mLabel; - BOOL mDropShadowed; // Whether to drop shadow + bool mDropShadowed; // Whether to drop shadow bool mHasSelection; LLFrameTimer mFadeTimer; LLTimer mScrollItemsTimer; - BOOL mTornOff; + bool mTornOff; class LLMenuItemTearOffGL* mTearOffItem; class LLMenuItemBranchGL* mSpilloverBranch; LLMenuGL* mSpilloverMenu; KEY mJumpKey; - BOOL mCreateJumpKeys; + bool mCreateJumpKeys; S32 mShortcutPad; bool mResetScrollPositionOnShow; }; // end class LLMenuGL @@ -646,44 +646,44 @@ public: virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool hasAccelerator(const KEY &key, const MASK &mask) const; - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); + virtual bool handleAcceleratorKey(KEY key, MASK mask); // check if we've used these accelerators already - virtual BOOL addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp); + virtual bool addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp); // called to rebuild the draw label virtual void buildDrawLabel( void ); virtual void onCommit( void ); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); + virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); + virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); // set the hover status (called by it's menu) and if the object is // active. This is used for behavior transfer. - virtual void setHighlight( BOOL highlight ); + virtual void setHighlight( bool highlight ); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); - virtual BOOL isActive() const; + virtual bool isActive() const; - virtual BOOL isOpen() const; + virtual bool isOpen() const; LLMenuGL* getBranch() const { return (LLMenuGL*)mBranchHandle.get(); } virtual void updateBranchParent( LLView* parentp ); // LLView Functionality - virtual void onVisibilityChange( BOOL curVisibilityIn ); + virtual void onVisibilityChange( bool curVisibilityIn ); virtual void draw(); - virtual void setEnabledSubMenus(BOOL enabled) { if (getBranch()) getBranch()->setEnabledSubMenus(enabled); } + virtual void setEnabledSubMenus(bool enabled) { if (getBranch()) getBranch()->setEnabledSubMenus(enabled); } virtual void openMenu(); - virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE) const; - virtual LLView* findChildView(const std::string& name, BOOL recurse = TRUE) const; + virtual LLView* getChildView(const std::string& name, bool recurse = true) const; + virtual LLView* findChildView(const std::string& name, bool recurse = true) const; private: LLHandle<LLView> mBranchHandle; @@ -716,7 +716,7 @@ public: // LLView Functionality // can't set visibility directly, must call show or hide - virtual void setVisible (BOOL visible); + virtual void setVisible (bool visible); virtual void show (S32 x, S32 y, LLView* spawning_view = NULL); virtual void hide (); @@ -733,7 +733,7 @@ public: void setSpawningView(LLHandle<LLView> spawning_view) { mSpawningViewHandle = spawning_view; } protected: - BOOL mHoveredAnyItem; + bool mHoveredAnyItem; LLMenuItemGL* mHoverItem; LLRootHandle<LLContextMenu> mHandle; LLHandle<LLView> mSpawningViewHandle; @@ -762,7 +762,7 @@ public: virtual void onCommit( void ); LLContextMenu* getBranch() { return mBranch.get(); } - void setHighlight( BOOL highlight ); + void setHighlight( bool highlight ); protected: void showSubMenu(); @@ -785,17 +785,17 @@ public: LLMenuBarGL( const Params& p ); virtual ~LLMenuBarGL(); - /*virtual*/ BOOL handleAcceleratorKey(KEY key, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ BOOL handleJumpKey(KEY key); + /*virtual*/ bool handleAcceleratorKey(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleJumpKey(KEY key); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); /*virtual*/ void draw(); - /*virtual*/ BOOL jumpKeysActive(); + /*virtual*/ bool jumpKeysActive(); // add a vertical separator to this menu - virtual BOOL addSeparator(); + virtual bool addSeparator(); // LLView Functionality virtual bool handleHover( S32 x, S32 y, MASK mask ); @@ -803,11 +803,11 @@ public: // Returns x position of rightmost child, usually Help menu S32 getRightmostMenuEdge(); - void resetMenuTrigger() { mAltKeyTrigger = FALSE; } + void resetMenuTrigger() { mAltKeyTrigger = false; } private: // add a menu - this will create a drop down menu. - virtual BOOL appendMenu( LLMenuGL* menu ); + virtual bool appendMenu( LLMenuGL* menu ); // rearrange the child rects so they fit the shape of the menu // bar. virtual void arrange( void ); @@ -815,7 +815,7 @@ private: void checkMenuTrigger(); std::list <LLMenuKeyboardBinding*> mAccelerators; - BOOL mAltKeyTrigger; + bool mAltKeyTrigger; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -831,9 +831,9 @@ public: LLMenuHolderGL(const Params& p); virtual ~LLMenuHolderGL() {} - virtual BOOL hideMenus(); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - void setCanHide(BOOL can_hide) { mCanHide = can_hide; } + virtual bool hideMenus(); + void reshape(S32 width, S32 height, bool called_from_parent = true); + void setCanHide(bool can_hide) { mCanHide = can_hide; } // LLView functionality virtual void draw(); @@ -843,10 +843,10 @@ public: // Close context menus on right mouse up not handled by menus. /*virtual*/ bool handleRightMouseUp( S32 x, S32 y, MASK mask ); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); virtual const LLRect getMenuRect() const { return getLocalRect(); } LLView*const getVisibleMenu() const; - virtual BOOL hasVisibleMenu() const {return getVisibleMenu() != NULL;} + virtual bool hasVisibleMenu() const {return getVisibleMenu() != NULL;} static void setActivatedItem(LLMenuItemGL* item); @@ -858,7 +858,7 @@ private: static LLHandle<LLView> sItemLastSelectedHandle; static LLFrameTimer sItemActivationTimer; - BOOL mCanHide; + bool mCanHide; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -876,8 +876,8 @@ public: virtual void draw(void); virtual void onFocusReceived(); virtual void onFocusLost(); - virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); + virtual bool handleKeyHere(KEY key, MASK mask); virtual void translate(S32 x, S32 y); void updateSize(); diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index d3afbdb8ba..c501d1efc1 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -38,18 +38,18 @@ // static std::list<LLModalDialog*> LLModalDialog::sModalStack; -LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal ) +LLModalDialog::LLModalDialog( const LLSD& key, bool modal ) : LLFloater(key), mModal( modal ) { if (modal) { - setCanMinimize(FALSE); - setCanClose(FALSE); + setCanMinimize(false); + setCanClose(false); } - setVisible( FALSE ); - setBackgroundVisible(TRUE); - setBackgroundOpaque(TRUE); + setVisible( false ); + setBackgroundVisible(true); + setBackgroundOpaque(true); centerOnScreen(); // default position mCloseSignal.connect(boost::bind(&LLModalDialog::stopModal, this)); } @@ -70,7 +70,7 @@ LLModalDialog::~LLModalDialog() } // virtual -BOOL LLModalDialog::postBuild() +bool LLModalDialog::postBuild() { return LLFloater::postBuild(); } @@ -85,7 +85,7 @@ void LLModalDialog::openFloater(const LLSD& key) LLFloater::setFloaterHost(thost); } -void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLModalDialog::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); centerOnScreen(); @@ -102,14 +102,14 @@ void LLModalDialog::onOpen(const LLSD& key) LLModalDialog* front = sModalStack.front(); if (front != this) { - front->setVisible(FALSE); + front->setVisible(false); } } // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( this ); LLUI::getInstance()->addPopup(this); - setFocus(TRUE); + setFocus(true); std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); if (iter != sModalStack.end()) @@ -142,12 +142,12 @@ void LLModalDialog::stopModal() if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); - front->setVisible(TRUE); + front->setVisible(true); } } -void LLModalDialog::setVisible( BOOL visible ) +void LLModalDialog::setVisible( bool visible ) { if (mModal) { @@ -158,7 +158,7 @@ void LLModalDialog::setVisible( BOOL visible ) // The dialog view is a root view LLUI::getInstance()->addPopup(this); - setFocus( TRUE ); + setFocus( true ); } else { @@ -256,27 +256,27 @@ bool LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask) } -BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) +bool LLModalDialog::handleKeyHere(KEY key, MASK mask ) { LLFloater::handleKeyHere(key, mask ); if (mModal) { // Suck up all keystokes except CTRL-Q. - BOOL is_quit = ('Q' == key) && (MASK_CONTROL == mask); + bool is_quit = ('Q' == key) && (MASK_CONTROL == mask); return !is_quit; } else { // don't process escape key until message box has been on screen a minimal amount of time // to avoid accidentally destroying the message box when user is hitting escape at the time it appears - BOOL enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f; + bool enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f; if (enough_time_elapsed && key == KEY_ESCAPE) { closeFloater(); - return TRUE; + return true; } - return FALSE; + return false; } } @@ -312,7 +312,7 @@ void LLModalDialog::onAppFocusLost() gFocusMgr.setMouseCapture( NULL ); } - instance->setFocus(FALSE); + instance->setFocus(false); } } @@ -325,7 +325,7 @@ void LLModalDialog::onAppFocusGained() // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( instance ); - instance->setFocus(TRUE); + instance->setFocus(true); LLUI::getInstance()->addPopup(instance); instance->centerOnScreen(); diff --git a/indra/llui/llmodaldialog.h b/indra/llui/llmodaldialog.h index 1c7f86a17e..0fd1f64033 100644 --- a/indra/llui/llmodaldialog.h +++ b/indra/llui/llmodaldialog.h @@ -39,15 +39,15 @@ class LLModalDialog; class LLModalDialog : public LLFloater { public: - LLModalDialog( const LLSD& key, BOOL modal = true ); + LLModalDialog( const LLSD& key, bool modal = true ); virtual ~LLModalDialog(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void openFloater(const LLSD& key = LLSD()); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); @@ -55,12 +55,12 @@ public: /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask ); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); /*virtual*/ void draw(); - BOOL isModal() const { return mModal; } + bool isModal() const { return mModal; } void stopModal(); static void onAppFocusLost(); @@ -75,7 +75,7 @@ protected: private: LLFrameTimer mVisibleTime; - const BOOL mModal; + const bool mModal; static std::list<LLModalDialog*> sModalStack; // Top of stack is currently being displayed }; diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index d1a597511e..fe0d88e68f 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -40,7 +40,7 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params) : LLFloater(key), mTabContainer(NULL), mTabPos(LLTabContainer::TOP), - mAutoResize(TRUE), + mAutoResize(true), mOrigMinWidth(params.min_width), mOrigMinHeight(params.min_height) { @@ -71,7 +71,7 @@ void LLMultiFloater::onClose(bool app_quitting) { if(isMinimized()) { - setMinimized(FALSE); + setMinimized(false); } LLFloater::onClose(app_quitting); } @@ -89,7 +89,7 @@ void LLMultiFloater::draw() } } -BOOL LLMultiFloater::closeAllFloaters() +bool LLMultiFloater::closeAllFloaters() { S32 tabToClose = 0; S32 lastTabCount = mTabContainer->getTabCount(); @@ -110,8 +110,8 @@ BOOL LLMultiFloater::closeAllFloaters() } } if( mTabContainer->getTabCount() != 0 ) - return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE. - return TRUE; //else all tabs were successfully closed... + return false; // Couldn't close all the tabs (pending save dialog?) so return false. + return true; //else all tabs were successfully closed... } void LLMultiFloater::growToFit(S32 content_width, S32 content_height) @@ -139,7 +139,7 @@ void LLMultiFloater::growToFit(S32 content_width, S32 content_height) } /** - void addFloater(LLFloater* floaterp, BOOL select_added_floater) + void addFloater(LLFloater* floaterp, bool select_added_floater) Adds the LLFloater pointed to by floaterp to this. If floaterp is already hosted by this, then it is re-added to get @@ -149,7 +149,7 @@ void LLMultiFloater::growToFit(S32 content_width, S32 content_height) Affects: mTabContainer, floaterp **/ -void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point) +void LLMultiFloater::addFloater(LLFloater* floaterp, bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point) { if (!floaterp) { @@ -190,13 +190,13 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, floater_data.mSaveRect = floaterp->mSaveRect; // remove minimize and close buttons - floaterp->setCanMinimize(FALSE); - floaterp->setCanResize(FALSE); - floaterp->setCanDrag(FALSE); - floaterp->mSaveRect = FALSE; + floaterp->setCanMinimize(false); + floaterp->setCanResize(false); + floaterp->setCanDrag(false); + floaterp->mSaveRect = false; floaterp->storeRectControl(); // avoid double rendering of floater background (makes it more opaque) - floaterp->setBackgroundVisible(FALSE); + floaterp->setBackgroundVisible(false); if (mAutoResize) { @@ -226,7 +226,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, floaterp->setHost(this); if (isMinimized()) { - floaterp->setVisible(FALSE); + floaterp->setVisible(false); } // Tabs sometimes overlap resize handle @@ -244,14 +244,14 @@ void LLMultiFloater::updateFloaterTitle(LLFloater* floaterp) /** - BOOL selectFloater(LLFloater* floaterp) + bool selectFloater(LLFloater* floaterp) If the LLFloater pointed to by floaterp is hosted by this, then its tab is selected and returns true. Otherwise returns false. Affects: mTabContainer **/ -BOOL LLMultiFloater::selectFloater(LLFloater* floaterp) +bool LLMultiFloater::selectFloater(LLFloater* floaterp) { return mTabContainer->selectTabPanel(floaterp); } @@ -278,7 +278,7 @@ void LLMultiFloater::showFloater(LLFloater* floaterp, LLTabContainer::eInsertion if (floaterp != mTabContainer->getCurrentPanel() && !mTabContainer->selectTabPanel(floaterp)) { - addFloater(floaterp, TRUE, insertion_point); + addFloater(floaterp, true, insertion_point); } } @@ -302,8 +302,8 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp) mFloaterDataMap.erase(found_data_it); } mTabContainer->removeTabPanel(floaterp); - floaterp->setBackgroundVisible(TRUE); - floaterp->setCanDrag(TRUE); + floaterp->setBackgroundVisible(true); + floaterp->setCanDrag(true); floaterp->setHost(NULL); floaterp->applyRectControl(); @@ -326,7 +326,7 @@ void LLMultiFloater::tabClose() } } -void LLMultiFloater::setVisible(BOOL visible) +void LLMultiFloater::setVisible(bool visible) { // *FIX: shouldn't have to do this, fix adding to minimized multifloater LLFloater::setVisible(visible); @@ -349,7 +349,7 @@ void LLMultiFloater::setVisible(BOOL visible) } } -BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) +bool LLMultiFloater::handleKeyHere(KEY key, MASK mask) { if (key == 'W' && mask == MASK_CONTROL) { @@ -363,10 +363,10 @@ BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) // bring back focus on tab container if there are any tab left if(mTabContainer->getTabCount() > 0) { - mTabContainer->setFocus(TRUE); + mTabContainer->setFocus(true); } } - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); @@ -396,7 +396,7 @@ S32 LLMultiFloater::getFloaterCount() } /** - BOOL isFloaterFlashing(LLFloater* floaterp) + bool isFloaterFlashing(LLFloater* floaterp) Returns true if the LLFloater pointed to by floaterp is currently in a flashing state and is hosted by this. @@ -404,24 +404,24 @@ S32 LLMultiFloater::getFloaterCount() Requires: floaterp != NULL **/ -BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp) +bool LLMultiFloater::isFloaterFlashing(LLFloater* floaterp) { if ( floaterp && floaterp->getHost() == this ) return mTabContainer->getTabPanelFlashing(floaterp); - return FALSE; + return false; } /** - BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing) + bool setFloaterFlashing(LLFloater* floaterp, bool flashing) Sets the current flashing state of the LLFloater pointed - to by floaterp to be the BOOL flashing if the LLFloater pointed + to by floaterp to be the bool flashing if the LLFloater pointed to by floaterp is hosted by this. Requires: floaterp != NULL **/ -void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing) +void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, bool flashing) { if ( floaterp && floaterp->getHost() == this ) mTabContainer->setTabPanelFlashing(floaterp, flashing); @@ -436,7 +436,7 @@ void LLMultiFloater::onTabSelected() } } -void LLMultiFloater::setCanResize(BOOL can_resize) +void LLMultiFloater::setCanResize(bool can_resize) { LLFloater::setCanResize(can_resize); if (!mTabContainer) return; @@ -450,7 +450,7 @@ void LLMultiFloater::setCanResize(BOOL can_resize) } } -BOOL LLMultiFloater::postBuild() +bool LLMultiFloater::postBuild() { mCloseSignal.connect(boost::bind(&LLMultiFloater::closeAllFloaters, this)); @@ -459,13 +459,13 @@ BOOL LLMultiFloater::postBuild() if (mTabContainer) { - return TRUE; + return true; } mTabContainer = getChild<LLTabContainer>("Preview Tabs"); setCanResize(mResizable); - return TRUE; + return true; } void LLMultiFloater::updateResizeLimits() @@ -498,7 +498,7 @@ void LLMultiFloater::updateResizeLimits() // make sure this window is visible on screen when it has been modified // (tab added, etc) - gFloaterView->adjustToFitScreen(this, TRUE); + gFloaterView->adjustToFitScreen(this, true); } } diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index c106a62527..47f7b3e8b9 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -43,16 +43,16 @@ public: void buildTabContainer(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ void onClose(bool app_quitting); virtual void draw(); - virtual void setVisible(BOOL visible); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + virtual void setVisible(bool visible); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); - virtual void setCanResize(BOOL can_resize); + virtual void setCanResize(bool can_resize); virtual void growToFit(S32 content_width, S32 content_height); - virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); + virtual void addFloater(LLFloater* floaterp, bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); virtual void showFloater(LLFloater* floaterp, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); virtual void removeFloater(LLFloater* floaterp); @@ -60,16 +60,16 @@ public: virtual void tabOpen(LLFloater* opened_floater, bool from_click); virtual void tabClose(); - virtual BOOL selectFloater(LLFloater* floaterp); + virtual bool selectFloater(LLFloater* floaterp); virtual void selectNextFloater(); virtual void selectPrevFloater(); virtual LLFloater* getActiveFloater(); - virtual BOOL isFloaterFlashing(LLFloater* floaterp); + virtual bool isFloaterFlashing(LLFloater* floaterp); virtual S32 getFloaterCount(); - virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing); - virtual BOOL closeAllFloaters(); //Returns FALSE if the floater could not be closed due to pending confirmation dialogs + virtual void setFloaterFlashing(LLFloater* floaterp, bool flashing); + virtual bool closeAllFloaters(); //Returns false if the floater could not be closed due to pending confirmation dialogs void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; } void onTabSelected(); @@ -81,9 +81,9 @@ protected: { S32 mWidth; S32 mHeight; - BOOL mCanMinimize; - BOOL mCanResize; - BOOL mSaveRect; + bool mCanMinimize; + bool mCanResize; + bool mSaveRect; }; LLTabContainer* mTabContainer; @@ -92,7 +92,7 @@ protected: floater_data_map_t mFloaterDataMap; LLTabContainer::TabPosition mTabPos; - BOOL mAutoResize; + bool mAutoResize; S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late private: diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index 577e1f0a27..685b1c8b98 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -161,7 +161,7 @@ F32 LLMultiSlider::getNearestIncrement(F32 value) const return mMinValue + value; } -void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from_event) +void LLMultiSlider::setSliderValue(const std::string& name, F32 value, bool from_event) { // exit if not there if(!mValue.has(name)) { @@ -263,7 +263,7 @@ void LLMultiSlider::setValue(const LLSD& value) mCurSlider = mIt->first; for(; mIt != value.endMap(); mIt++) { - setSliderValue(mIt->first, (F32)mIt->second.asReal(), TRUE); + setSliderValue(mIt->first, (F32)mIt->second.asReal(), true); } } } @@ -378,7 +378,7 @@ const std::string& LLMultiSlider::addSlider(F32 val) mCurSlider = newName.str(); // move the slider - setSliderValue(mCurSlider, initVal, TRUE); + setSliderValue(mCurSlider, initVal, true); return mCurSlider; } @@ -411,7 +411,7 @@ bool LLMultiSlider::addSlider(F32 val, const std::string& name) mCurSlider = name; // move the slider - setSliderValue(mCurSlider, initVal, TRUE); + setSliderValue(mCurSlider, initVal, true); return true; } @@ -614,25 +614,25 @@ bool LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask) +bool LLMultiSlider::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch(key) { case KEY_UP: case KEY_DOWN: // eat up and down keys to be consistent - handled = TRUE; + handled = true; break; case KEY_LEFT: setCurSliderValue(getCurSliderValue() - getIncrement()); onCommit(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: setCurSliderValue(getCurSliderValue() + getIncrement()); onCommit(); - handled = TRUE; + handled = true; break; default: break; @@ -700,7 +700,7 @@ void LLMultiSlider::draw() mIt->second.mTop + extra_triangle_height, mIt->second.mLeft + mIt->second.getWidth() / 2, mIt->second.mBottom - extra_triangle_height, - mTriangleColor.get() % opacity, TRUE); + mTriangleColor.get() % opacity, true); } } else if (!mRoundedSquareImgp && !mThumbImagep) @@ -725,23 +725,23 @@ void LLMultiSlider::draw() } // the draw command - gl_rect_2d(mIt->second, curThumbColor, TRUE); + gl_rect_2d(mIt->second, curThumbColor, true); } // now draw the current and hover sliders if(curSldrIt != mThumbRects.end()) { - gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), TRUE); + gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), true); } // and draw the drag start if (gFocusMgr.getMouseCapture() == this) { - gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, FALSE); + gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, false); } else if (hoverSldrIt != mThumbRects.end()) { - gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), TRUE); + gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), true); } } else diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index b6eacd33f5..7195c5d5a3 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -81,7 +81,7 @@ public: // Multi-slider rounds values to nearest increments (bias towards rounding down) F32 getNearestIncrement(F32 value) const; - void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); + void setSliderValue(const std::string& name, F32 value, bool from_event = false); F32 getSliderValue(const std::string& name) const; F32 getSliderValueFromPos(S32 xpos, S32 ypos) const; LLRect getSliderThumbRect(const std::string& name) const; @@ -94,7 +94,7 @@ public: F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } void setCurSlider(const std::string& name); void resetCurSlider(); - void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); } + void setCurSliderValue(F32 val, bool from_event = false) { setSliderValue(mCurSlider, val, from_event); } /*virtual*/ void setValue(const LLSD& value) override; /*virtual*/ LLSD getValue() const override { return mValue; } @@ -113,7 +113,7 @@ public: /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask) override; - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask) override; + /*virtual*/ bool handleKeyHere(KEY key, MASK mask) override; /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override; /*virtual*/ void draw() override; @@ -130,11 +130,11 @@ protected: static S32 mNameCounter; S32 mMaxNumSliders; - BOOL mAllowOverlap; - BOOL mLoopOverlap; + bool mAllowOverlap; + bool mLoopOverlap; F32 mOverlapThreshold; - BOOL mDrawTrack; - BOOL mUseTriangle; /// hacked in toggle to use a triangle + bool mDrawTrack; + bool mUseTriangle; /// hacked in toggle to use a triangle S32 mMouseOffset; LLRect mDragStartThumbRect; diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index b3df7c154b..7f5b0ccac3 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -144,7 +144,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p) mEditor->setFocusReceivedCallback( boost::bind(LLMultiSliderCtrl::onEditorGainFocus, _1, this) ); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others - //mEditor->setSelectAllonFocusReceived(TRUE); + //mEditor->setSelectAllonFocusReceived(true); addChild(mEditor); } else @@ -219,7 +219,7 @@ void LLMultiSliderCtrl::setValue(const LLSD& value) updateText(); } -void LLMultiSliderCtrl::setSliderValue(const std::string& name, F32 v, BOOL from_event) +void LLMultiSliderCtrl::setSliderValue(const std::string& name, F32 v, bool from_event) { mMultiSlider->setSliderValue(name, v, from_event ); mCurValue = mMultiSlider->getCurSliderValue(); @@ -237,9 +237,9 @@ void LLMultiSliderCtrl::resetCurSlider() mMultiSlider->resetCurSlider(); } -BOOL LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - BOOL res = FALSE; + bool res = false; if (mLabelBox) { res = mLabelBox->setTextArg(key, text); @@ -329,7 +329,7 @@ void LLMultiSliderCtrl::clear() } -BOOL LLMultiSliderCtrl::isMouseHeldDown() +bool LLMultiSliderCtrl::isMouseHeldDown() { return gFocusMgr.getMouseCapture() == mMultiSlider; } @@ -368,7 +368,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) if (!self) // cast failed - wrong type! :O return; - BOOL success = FALSE; + bool success = false; F32 val = self->mCurValue; F32 saved_val = self->mCurValue; @@ -382,7 +382,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) self->setCurSliderValue( val ); // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) ) { - success = TRUE; + success = true; } } } @@ -409,14 +409,14 @@ void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata) if (!self) return; - BOOL success = FALSE; + bool success = false; F32 saved_val = self->mCurValue; F32 new_val = self->mMultiSlider->getCurSliderValue(); self->mCurValue = new_val; // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) ) { - success = TRUE; + success = true; } if( success ) @@ -434,7 +434,7 @@ void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata) self->updateText(); } -void LLMultiSliderCtrl::setEnabled(BOOL b) +void LLMultiSliderCtrl::setEnabled(bool b) { LLF32UICtrl::setEnabled( b ); @@ -457,7 +457,7 @@ void LLMultiSliderCtrl::setEnabled(BOOL b) } -void LLMultiSliderCtrl::setTentative(BOOL b) +void LLMultiSliderCtrl::setTentative(bool b) { if( mEditor ) { @@ -469,11 +469,11 @@ void LLMultiSliderCtrl::setTentative(BOOL b) void LLMultiSliderCtrl::onCommit() { - setTentative(FALSE); + setTentative(false); if( mEditor ) { - mEditor->setTentative(FALSE); + mEditor->setTentative(false); } setControlValue(getValueF32()); diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h index adb28676ec..b58540666b 100644 --- a/indra/llui/llmultisliderctrl.h +++ b/indra/llui/llmultisliderctrl.h @@ -83,24 +83,24 @@ public: virtual ~LLMultiSliderCtrl(); F32 getSliderValue(const std::string& name) const { return mMultiSlider->getSliderValue(name); } - void setSliderValue(const std::string& name, F32 v, BOOL from_event = FALSE); + void setSliderValue(const std::string& name, F32 v, bool from_event = false); virtual void setValue(const LLSD& value ); virtual LLSD getValue() const { return mMultiSlider->getValue(); } - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); const std::string& getCurSlider() const { return mMultiSlider->getCurSlider(); } F32 getCurSliderValue() const { return mCurValue; } void setCurSlider(const std::string& name); void resetCurSlider(); - void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mMultiSlider->getCurSlider(), val, from_event); } + void setCurSliderValue(F32 val, bool from_event = false) { setSliderValue(mMultiSlider->getCurSlider(), val, from_event); } virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); } - BOOL isMouseHeldDown(); + bool isMouseHeldDown(); - virtual void setEnabled( BOOL b ); + virtual void setEnabled( bool b ); virtual void clear(); virtual void setPrecision(S32 precision); void setMinValue(F32 min_value) {mMultiSlider->setMinValue(min_value);} @@ -138,7 +138,7 @@ public: virtual void onTabInto(); - virtual void setTentative(BOOL b); // marks value as tentative + virtual void setTentative(bool b); // marks value as tentative virtual void onCommit(); // mark not tentative, then commit virtual void setControlName(const std::string& control_name, LLView* context); @@ -155,8 +155,8 @@ private: private: const LLFontGL* mFont; - BOOL mShowText; - BOOL mCanEditText; + bool mShowText; + bool mCanEditText; S32 mPrecision; LLTextBox* mLabelBox; diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index d736aa6634..239e573f1d 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -216,7 +216,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica ui_inst->mSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name)); } - BOOL show_notification = TRUE; + bool show_notification = true; if (p.ignore.control.isProvided()) { mIgnoreSetting = ui_inst->mSettingGroups["config"]->getControl(p.ignore.control); @@ -1549,7 +1549,7 @@ bool LLNotifications::loadTemplates() std::string base_filename = search_paths.front(); LLXMLNodePtr root; - BOOL success = LLXMLNode::getLayeredXMLNode(root, search_paths); + bool success = LLXMLNode::getLayeredXMLNode(root, search_paths); if (!success || root.isNull() || !root->hasName( "notifications" )) { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 921398a693..46e1616805 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -443,11 +443,11 @@ public: // return response LLSD filled in with default form contents and (optionally) the default button selected LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON); - // returns index of first button with value==TRUE + // returns index of first button with value==true // usually this the button the user clicked on // returns -1 if no button clicked (e.g. form has not been displayed) static S32 getSelectedOption(const LLSD& notification, const LLSD& response); - // returns name of first button with value==TRUE + // returns name of first button with value==true static std::string getSelectedOptionName(const LLSD& notification); // after someone responds to a notification (usually by clicking a button, diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index f770920c4a..ba6a31eb9e 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -55,7 +55,7 @@ LLPanel::factory_stack_t LLPanel::sFactoryStack; // Compiler optimization, generate extern template template class LLPanel* LLView::getChild<class LLPanel>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; LLPanel::LocalizedString::LocalizedString() : name("name"), @@ -127,9 +127,9 @@ LLPanel::~LLPanel() } // virtual -BOOL LLPanel::isPanel() const +bool LLPanel::isPanel() const { - return TRUE; + return true; } void LLPanel::addBorder(LLViewBorder::Params p) @@ -167,13 +167,13 @@ void LLPanel::clearCtrls() for (LLPanel::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it) { LLUICtrl* ctrl = *ctrl_it; - ctrl->setFocus( FALSE ); - ctrl->setEnabled( FALSE ); + ctrl->setFocus( false ); + ctrl->setEnabled( false ); ctrl->clear(); } } -void LLPanel::setCtrlsEnabled( BOOL b ) +void LLPanel::setCtrlsEnabled( bool b ) { LLPanel::ctrl_list_t ctrls = getCtrlList(); for (LLPanel::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it) @@ -247,13 +247,13 @@ void LLPanel::updateDefaultBtn() if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled()) { LLButton* buttonp = dynamic_cast<LLButton*>(gFocusMgr.getKeyboardFocus()); - BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); + bool focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); // only enable default button when current focus is not a return-capturing button mDefaultBtn->setBorderEnabled(!focus_is_child_button); } else { - mDefaultBtn->setBorderEnabled(FALSE); + mDefaultBtn->setBorderEnabled(false); } } } @@ -261,19 +261,19 @@ void LLPanel::updateDefaultBtn() void LLPanel::refresh() { // do nothing by default - // but is automatically called in setFocus(TRUE) + // but is automatically called in setFocus(true) } void LLPanel::setDefaultBtn(LLButton* btn) { if (mDefaultBtn && mDefaultBtn->getEnabled()) { - mDefaultBtn->setBorderEnabled(FALSE); + mDefaultBtn->setBorderEnabled(false); } mDefaultBtn = btn; if (mDefaultBtn) { - mDefaultBtn->setBorderEnabled(TRUE); + mDefaultBtn->setBorderEnabled(true); } } @@ -290,17 +290,17 @@ void LLPanel::setDefaultBtn(const std::string& id) } } -BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) +bool LLPanel::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); // handle user hitting ESC to defocus if (key == KEY_ESCAPE) { - setFocus(FALSE); - return TRUE; + setFocus(false); + return true; } else if( (mask == MASK_SHIFT) && (KEY_TAB == key)) { @@ -310,7 +310,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); if (focus_root) { - handled = focus_root->focusPrevItem(FALSE); + handled = focus_root->focusPrevItem(false); } } } @@ -322,7 +322,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); if (focus_root) { - handled = focus_root->focusNextItem(FALSE); + handled = focus_root->focusNextItem(false); } } } @@ -335,38 +335,38 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) { // current focus is a return-capturing button, // let *that* button handle the return key - handled = FALSE; + handled = false; } else if (mDefaultBtn && mDefaultBtn->getVisible() && mDefaultBtn->getEnabled()) { // If we have a default button, click it when return is pressed mDefaultBtn->onCommit(); - handled = TRUE; + handled = true; } else if (cur_focus->acceptsTextInput()) { // call onCommit for text input handling control cur_focus->onCommit(); - handled = TRUE; + handled = true; } } return handled; } -void LLPanel::onVisibilityChange ( BOOL new_visibility ) +void LLPanel::onVisibilityChange ( bool new_visibility ) { LLUICtrl::onVisibilityChange ( new_visibility ); if (mVisibleSignal) - (*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass BOOL as LLSD + (*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass bool as LLSD } -void LLPanel::setFocus(BOOL b) +void LLPanel::setFocus(bool b) { if( b && !hasFocus()) { // give ourselves focus preemptively, to avoid infinite loop - LLUICtrl::setFocus(TRUE); + LLUICtrl::setFocus(true); // then try to pass to first valid child focusFirstItem(); } @@ -376,7 +376,7 @@ void LLPanel::setFocus(BOOL b) } } -void LLPanel::setBorderVisible(BOOL b) +void LLPanel::setBorderVisible(bool b) { if (mBorder) { @@ -504,7 +504,7 @@ static LLTrace::BlockTimerStatHandle FTM_PANEL_SETUP("Panel Setup"); static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference"); static LLTrace::BlockTimerStatHandle FTM_PANEL_POSTBUILD("Panel PostBuild"); -BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params) +bool LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params) { Params params(default_params); { @@ -533,7 +533,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu setupParamsForExport(output_params, parent); output_node->setName(node->getName()->mString); parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params); - return TRUE; + return true; } LLUICtrlFactory::instance().pushFileName(xml_filename); @@ -543,7 +543,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu { LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; - return FALSE; + return false; } parser.readXUI(referenced_xml, params, LLUICtrlFactory::getInstance()->getCurFileName()); @@ -590,7 +590,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu postBuild(); } } - return TRUE; + return true; } bool LLPanel::hasString(const std::string& name) @@ -658,7 +658,7 @@ void LLPanel::childSetEnabled(const std::string& id, bool enabled) } } -void LLPanel::childSetFocus(const std::string& id, BOOL focus) +void LLPanel::childSetFocus(const std::string& id, bool focus) { LLUICtrl* child = findChild<LLUICtrl>(id); if (child) @@ -667,7 +667,7 @@ void LLPanel::childSetFocus(const std::string& id, BOOL focus) } } -BOOL LLPanel::childHasFocus(const std::string& id) +bool LLPanel::childHasFocus(const std::string& id) { LLUICtrl* child = findChild<LLUICtrl>(id); if (child) @@ -676,7 +676,7 @@ BOOL LLPanel::childHasFocus(const std::string& id) } else { - return FALSE; + return false; } } @@ -752,24 +752,24 @@ LLSD LLPanel::childGetValue(const std::string& id) const return LLSD(); } -BOOL LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text) +bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text) { LLUICtrl* child = findChild<LLUICtrl>(id); if (child) { return child->setTextArg(key, text); } - return FALSE; + return false; } -BOOL LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text) +bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text) { LLView* child = findChild<LLView>(id); if (child) { return child->setLabelArg(key, text); } - return FALSE; + return false; } void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_type& function) @@ -803,10 +803,10 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t:: //----------------------------------------------------------------------------- // buildPanel() //----------------------------------------------------------------------------- -BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params) +bool LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params) { LL_PROFILE_ZONE_SCOPED; - BOOL didPost = FALSE; + bool didPost = false; LLXMLNodePtr root; if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 8018365d3e..33883bf6a4 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -40,8 +40,8 @@ #include <queue> const S32 LLPANEL_BORDER_WIDTH = 1; -const BOOL BORDER_YES = TRUE; -const BOOL BORDER_NO = FALSE; +const bool BORDER_YES = true; +const bool BORDER_NO = false; class LLButton; class LLUIImage; @@ -107,20 +107,20 @@ protected: public: typedef std::vector<class LLUICtrl *> ctrl_list_t; - BOOL buildFromFile(const std::string &filename, const LLPanel::Params& default_params = getDefaultParams()); + bool buildFromFile(const std::string &filename, const LLPanel::Params& default_params = getDefaultParams()); static LLPanel* createFactoryPanel(const std::string& name); /*virtual*/ ~LLPanel(); // LLView interface - /*virtual*/ BOOL isPanel() const; + /*virtual*/ bool isPanel() const; /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ bool handleKeyHere( KEY key, MASK mask ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); // From LLFocusableElement - /*virtual*/ void setFocus( BOOL b ); + /*virtual*/ void setFocus( bool b ); // New virtuals virtual void refresh(); // called in setFocus() @@ -131,8 +131,8 @@ public: void addBorder( LLViewBorder::Params p); void addBorder(); void removeBorder(); - BOOL hasBorder() const { return mBorder != NULL; } - void setBorderVisible( BOOL b ); + bool hasBorder() const { return mBorder != NULL; } + void setBorderVisible( bool b ); void setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; } const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; } @@ -144,10 +144,10 @@ public: LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; } LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; } LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; } - void setBackgroundVisible( BOOL b ) { mBgVisible = b; } - BOOL isBackgroundVisible() const { return mBgVisible; } - void setBackgroundOpaque(BOOL b) { mBgOpaque = b; } - BOOL isBackgroundOpaque() const { return mBgOpaque; } + void setBackgroundVisible( bool b ) { mBgVisible = b; } + bool isBackgroundVisible() const { return mBgVisible; } + void setBackgroundOpaque(bool b) { mBgOpaque = b; } + bool isBackgroundOpaque() const { return mBgOpaque; } void setDefaultBtn(LLButton* btn = NULL); void setDefaultBtn(const std::string& id); void updateDefaultBtn(); @@ -156,7 +156,7 @@ public: void setHelpTopic(const std::string& help_topic) { mHelpTopic = help_topic; } std::string getHelpTopic() const { return mHelpTopic; } - void setCtrlsEnabled(BOOL b); + void setCtrlsEnabled(bool b); ctrl_list_t getCtrlList() const; LLHandle<LLPanel> getHandle() const { return getDerivedHandle<LLPanel>(); } @@ -167,7 +167,7 @@ public: EnableCallbackRegistry::ScopedRegistrar& getEnableCallbackRegistrar() { return mEnableCallbackRegistrar; } void initFromParams(const Params& p); - BOOL initPanelXML( LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params); + bool initPanelXML( LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params); bool hasString(const std::string& name); std::string getString(const std::string& name, const LLStringUtil::format_map_t& args) const; @@ -184,8 +184,8 @@ public: void childDisable(const std::string& name) { childSetEnabled(name, false); }; // LLUICtrl - void childSetFocus(const std::string& id, BOOL focus = TRUE); - BOOL childHasFocus(const std::string& id); + void childSetFocus(const std::string& id, bool focus = true); + bool childHasFocus(const std::string& id); // *TODO: Deprecate; for backwards compatability only: // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)), @@ -203,9 +203,9 @@ public: LLSD childGetValue(const std::string& id) const; // For setting text / label replacement params, e.g. "Hello [NAME]" - // Not implemented for all types, defaults to noop, returns FALSE if not applicaple - BOOL childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text); - BOOL childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text); + // Not implemented for all types, defaults to noop, returns false if not applicaple + bool childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text); + bool childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text); // LLButton void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value); @@ -238,8 +238,8 @@ protected: std::string mXMLFilename; private: - BOOL mBgVisible; // any background at all? - BOOL mBgOpaque; // use opaque color or image + bool mBgVisible; // any background at all? + bool mBgOpaque; // use opaque color or image LLUIColor mBgOpaqueColor; LLUIColor mBgAlphaColor; LLUIColor mBgOpaqueImageOverlay; @@ -259,7 +259,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLPANEL_CPP extern template class LLPanel* LLView::getChild<class LLPanel>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif typedef boost::function<LLPanel* (void)> LLPanelClassCreatorFunc; diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 32ce5e5575..04553e1f9f 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -53,7 +53,7 @@ public: /*virtual*/ ~LLRadioCtrl(); /*virtual*/ void setValue(const LLSD& value); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); LLSD getPayload() { return mPayload; } @@ -119,16 +119,16 @@ LLRadioGroup::~LLRadioGroup() } // virtual -BOOL LLRadioGroup::postBuild() +bool LLRadioGroup::postBuild() { if (!mRadioButtons.empty()) { mRadioButtons[0]->setTabStop(true); } - return TRUE; + return true; } -void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled) +void LLRadioGroup::setIndexEnabled(S32 index, bool enabled) { S32 count = 0; for (button_list_t::iterator iter = mRadioButtons.begin(); @@ -138,7 +138,7 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled) if (count == index) { child->setEnabled(enabled); - if (index == mSelectedIndex && enabled == FALSE) + if (index == mSelectedIndex && enabled == false) { setSelectedIndex(-1); } @@ -173,30 +173,30 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled) } } -BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) +bool LLRadioGroup::setSelectedIndex(S32 index, bool from_event) { if ((S32)mRadioButtons.size() <= index ) { - return FALSE; + return false; } if (index < -1) { // less then minimum value - return FALSE; + return false; } if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect) { // -1 is "nothing selected" - return FALSE; + return false; } if (mSelectedIndex >= 0) { LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex]; old_radio_item->setTabStop(false); - old_radio_item->setValue( FALSE ); + old_radio_item->setValue( false ); } else { @@ -209,11 +209,11 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) { LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex]; radio_item->setTabStop(true); - radio_item->setValue( TRUE ); + radio_item->setValue( true ); if (hasFocus()) { - radio_item->focusFirstItem(FALSE, FALSE); + radio_item->focusFirstItem(false, false); } } @@ -222,7 +222,7 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) setControlValue(getValue()); } - return TRUE; + return true; } void LLRadioGroup::focusSelectedRadioBtn() @@ -232,18 +232,18 @@ void LLRadioGroup::focusSelectedRadioBtn() LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex]; if (radio_item->hasTabStop() && radio_item->getEnabled()) { - radio_item->focusFirstItem(FALSE, FALSE); + radio_item->focusFirstItem(false, false); } } else if (mRadioButtons[0]->hasTabStop() || hasTabStop()) { - focusFirstItem(FALSE, FALSE); + focusFirstItem(false, false); } } -BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) +bool LLRadioGroup::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; // do any of the tab buttons have keyboard focus? if (mask == MASK_NONE) { @@ -258,7 +258,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { onCommit(); } - handled = TRUE; + handled = true; break; case KEY_UP: if (!setSelectedIndex((getSelectedIndex() - 1))) @@ -269,7 +269,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { onCommit(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: if (!setSelectedIndex((getSelectedIndex() - 1))) @@ -280,7 +280,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { onCommit(); } - handled = TRUE; + handled = true; break; case KEY_RIGHT: if (!setSelectedIndex((getSelectedIndex() + 1))) @@ -291,7 +291,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { onCommit(); } - handled = TRUE; + handled = true; break; default: break; @@ -358,11 +358,11 @@ void LLRadioGroup::setValue( const LLSD& value ) // string not found, try integer if (value.isInteger()) { - setSelectedIndex((S32) value.asInteger(), TRUE); + setSelectedIndex((S32) value.asInteger(), true); } else { - setSelectedIndex(-1, TRUE); + setSelectedIndex(-1, true); } } } @@ -381,9 +381,9 @@ LLSD LLRadioGroup::getValue() const } // LLCtrlSelectionInterface functions -BOOL LLRadioGroup::setCurrentByID( const LLUUID& id ) +bool LLRadioGroup::setCurrentByID( const LLUUID& id ) { - return FALSE; + return false; } LLUUID LLRadioGroup::getCurrentID() const @@ -391,7 +391,7 @@ LLUUID LLRadioGroup::getCurrentID() const return LLUUID::null; } -BOOL LLRadioGroup::setSelectedByValue(const LLSD& value, BOOL selected) +bool LLRadioGroup::setSelectedByValue(const LLSD& value, bool selected) { S32 idx = 0; for (button_list_t::const_iterator iter = mRadioButtons.begin(); @@ -400,12 +400,12 @@ BOOL LLRadioGroup::setSelectedByValue(const LLSD& value, BOOL selected) if((*iter)->getPayload().asString() == value.asString()) { setSelectedIndex(idx); - return TRUE; + return true; } idx++; } - return FALSE; + return false; } LLSD LLRadioGroup::getSelectedValue() @@ -413,7 +413,7 @@ LLSD LLRadioGroup::getSelectedValue() return getValue(); } -BOOL LLRadioGroup::isSelected(const LLSD& value) const +bool LLRadioGroup::isSelected(const LLSD& value) const { S32 idx = 0; for (button_list_t::const_iterator iter = mRadioButtons.begin(); @@ -423,22 +423,22 @@ BOOL LLRadioGroup::isSelected(const LLSD& value) const { if (idx == mSelectedIndex) { - return TRUE; + return true; } } idx++; } - return FALSE; + return false; } -BOOL LLRadioGroup::operateOnSelection(EOperation op) +bool LLRadioGroup::operateOnSelection(EOperation op) { - return FALSE; + return false; } -BOOL LLRadioGroup::operateOnAll(EOperation op) +bool LLRadioGroup::operateOnAll(EOperation op) { - return FALSE; + return false; } LLRadioGroup::ItemParams::ItemParams() @@ -458,7 +458,7 @@ LLRadioCtrl::LLRadioCtrl(const LLRadioGroup::ItemParams& p) } } -BOOL LLRadioCtrl::postBuild() +bool LLRadioCtrl::postBuild() { // Old-style radio_item used the text contents to indicate the label, // but new-style radio_item uses label attribute. @@ -467,7 +467,7 @@ BOOL LLRadioCtrl::postBuild() { setLabel(value); } - return TRUE; + return true; } bool LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index dcb2f43bfe..d638605bb3 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -64,15 +64,15 @@ public: virtual ~LLRadioGroup(); - virtual BOOL postBuild(); + virtual bool postBuild(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); - void setIndexEnabled(S32 index, BOOL enabled); + void setIndexEnabled(S32 index, bool enabled); // return the index value of the selected item S32 getSelectedIndex() const { return mSelectedIndex; } // set the index value programatically - BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE); + bool setSelectedIndex(S32 index, bool from_event = false); // foxus child by index if it can get focus void focusSelectedRadioBtn(); @@ -88,18 +88,18 @@ public: // LLCtrlSelectionInterface functions /*virtual*/ S32 getItemCount() const { return mRadioButtons.size(); } - /*virtual*/ BOOL getCanSelect() const { return TRUE; } - /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); } - /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); } - /*virtual*/ BOOL selectItemRange( S32 first, S32 last ) { return setSelectedIndex(first); } + /*virtual*/ bool getCanSelect() const { return true; } + /*virtual*/ bool selectFirstItem() { return setSelectedIndex(0); } + /*virtual*/ bool selectNthItem( S32 index ) { return setSelectedIndex(index); } + /*virtual*/ bool selectItemRange( S32 first, S32 last ) { return setSelectedIndex(first); } /*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); } - /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); + /*virtual*/ bool setCurrentByID( const LLUUID& id ); /*virtual*/ LLUUID getCurrentID() const; // LLUUID::null if no items in menu - /*virtual*/ BOOL setSelectedByValue(const LLSD& value, BOOL selected); + /*virtual*/ bool setSelectedByValue(const LLSD& value, bool selected); /*virtual*/ LLSD getSelectedValue(); - /*virtual*/ BOOL isSelected(const LLSD& value) const; - /*virtual*/ BOOL operateOnSelection(EOperation op); - /*virtual*/ BOOL operateOnAll(EOperation op); + /*virtual*/ bool isSelected(const LLSD& value) const; + /*virtual*/ bool operateOnSelection(EOperation op); + /*virtual*/ bool operateOnAll(EOperation op); private: const LLFontGL* mFont; diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 71e3ec3094..5c53ddfce6 100644 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -59,8 +59,8 @@ public: virtual bool handleDoubleClick(S32 x, S32 y, MASK mask); void setResizeLimits( S32 min_size, S32 max_size ) { mMinSize = min_size; mMaxSize = max_size; } - void setEnableSnapping(BOOL enable) { mSnappingEnabled = enable; } - void setAllowDoubleClickSnapping(BOOL allow) { mAllowDoubleClickSnapping = allow; } + void setEnableSnapping(bool enable) { mSnappingEnabled = enable; } + void setAllowDoubleClickSnapping(bool allow) { mAllowDoubleClickSnapping = allow; } bool canResize() { return getEnabled() && mMaxSize > mMinSize; } void setResizeListener(boost::function<void(void*)> listener) {mResizeListener = listener;} void setImagePanel(LLPanel * panelp); diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index b1f4a6c69d..760174a878 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -366,7 +366,7 @@ void LLResizeHandle::draw() } -BOOL LLResizeHandle::pointInHandle( S32 x, S32 y ) +bool LLResizeHandle::pointInHandle( S32 x, S32 y ) { if( pointInView(x, y) ) { @@ -378,8 +378,8 @@ BOOL LLResizeHandle::pointInHandle( S32 x, S32 y ) case LEFT_TOP: return (x <= RESIZE_BORDER_WIDTH) || (y >= TOP_BORDER); case LEFT_BOTTOM: return (x <= RESIZE_BORDER_WIDTH) || (y <= RESIZE_BORDER_WIDTH); case RIGHT_TOP: return (x >= RIGHT_BORDER) || (y >= TOP_BORDER); - case RIGHT_BOTTOM: return TRUE; + case RIGHT_BOTTOM: return true; } } - return FALSE; + return false; } diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h index d82934f75b..6dddc42f5e 100644 --- a/indra/llui/llresizehandle.h +++ b/indra/llui/llresizehandle.h @@ -58,7 +58,7 @@ public: void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; } private: - BOOL pointInHandle( S32 x, S32 y ); + bool pointInHandle( S32 x, S32 y ); S32 mDragLastScreenX; S32 mDragLastScreenY; diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 23e0842f37..1d166c8bbb 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -99,9 +99,9 @@ std::string LLResMgr::getMonetaryString( S32 input ) const // Note: we assume here that the currency symbol goes on the left. (Hey, it's Lindens! We can just decide.) - BOOL negative = (input < 0 ); - BOOL negative_before = negative && (conv->n_sign_posn != 2); - BOOL negative_after = negative && (conv->n_sign_posn == 2); + bool negative = (input < 0 ); + bool negative_before = negative && (conv->n_sign_posn != 2); + bool negative_after = negative && (conv->n_sign_posn == 2); std::string digits = llformat("%u", abs(input)); if( !grouping || !grouping[0] ) diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index 2cc0644d90..f520ba2fb8 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -73,7 +73,7 @@ LLScrollbar::LLScrollbar(const Params & p) mDocPos( p.doc_pos ), mPageSize( p.page_size ), mStepSize( p.step_size ), - mDocChanged(FALSE), + mDocChanged(false), mDragStartX( 0 ), mDragStartY( 0 ), mHoverGlowStrength(0.15f), @@ -136,19 +136,19 @@ void LLScrollbar::setDocParams( S32 size, S32 pos ) { mDocSize = size; setDocPos(pos); - mDocChanged = TRUE; + mDocChanged = true; updateThumbRect(); } // returns true if document position really changed -bool LLScrollbar::setDocPos(S32 pos, BOOL update_thumb) +bool LLScrollbar::setDocPos(S32 pos, bool update_thumb) { pos = llclamp(pos, 0, getDocPosMax()); if (pos != mDocPos) { mDocPos = pos; - mDocChanged = TRUE; + mDocChanged = true; if( mChangeCallback ) { @@ -170,7 +170,7 @@ void LLScrollbar::setDocSize(S32 size) { mDocSize = size; setDocPos(mDocPos); - mDocChanged = TRUE; + mDocChanged = true; updateThumbRect(); } @@ -182,7 +182,7 @@ void LLScrollbar::setPageSize( S32 page_size ) { mPageSize = page_size; setDocPos(mDocPos); - mDocChanged = TRUE; + mDocChanged = true; updateThumbRect(); } @@ -329,7 +329,7 @@ bool LLScrollbar::handleHover(S32 x, S32 y, MASK mask) S32 new_pos = llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines ); // Note: we do not call updateThumbRect() here. Instead we let the thumb and the document go slightly // out of sync (less than a line's worth) to make the thumb feel responsive. - changeLine( new_pos - mDocPos, FALSE ); + changeLine( new_pos - mDocPos, false ); } } @@ -373,7 +373,7 @@ bool LLScrollbar::handleHover(S32 x, S32 y, MASK mask) // Note: we do not call updateThumbRect() here. Instead we let the thumb and the document go slightly // out of sync (less than a line's worth) to make the thumb feel responsive. - changeLine( new_pos - mDocPos, FALSE ); + changeLine( new_pos - mDocPos, false ); } } @@ -410,7 +410,7 @@ bool LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks) bool LLScrollbar::handleScrollHWheel(S32 x, S32 y, S32 clicks) { - bool handled = FALSE; + bool handled = false; if (LLScrollbar::HORIZONTAL == mOrientation) { handled = changeLine(clicks * mStepSize, true); @@ -418,7 +418,7 @@ bool LLScrollbar::handleScrollHWheel(S32 x, S32 y, S32 clicks) return handled; } -BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg) { // enable this to get drag and drop to control scrollbars @@ -434,10 +434,10 @@ BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // : F32(pos - SCROLLBAR_SIZE) / usable_track_length; // S32 new_pos = (VERTICAL == mOrientation) ? llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines ) // : llclamp( S32(ratio * variable_lines + 0.5f), 0, variable_lines ); - // changeLine( new_pos - mDocPos, TRUE ); + // changeLine( new_pos - mDocPos, true ); //} - //return TRUE; - return FALSE; + //return true; + return false; } bool LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask) @@ -464,7 +464,7 @@ bool LLScrollbar::handleDoubleClick(S32 x, S32 y, MASK mask) } -void LLScrollbar::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLScrollbar::reshape(S32 width, S32 height, bool called_from_parent) { if (width == getRect().getWidth() && height == getRect().getHeight()) return; LLView::reshape( width, height, called_from_parent ); @@ -493,14 +493,14 @@ void LLScrollbar::draw() if(mBGVisible) { - gl_rect_2d(getLocalRect(), mBGColor.get(), TRUE); + gl_rect_2d(getLocalRect(), mBGColor.get(), true); } S32 local_mouse_x; S32 local_mouse_y; LLUI::getInstance()->getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); - BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; - BOOL hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); + bool other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; + bool hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); if (hovered) { mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLSmoothInterpolation::getInterpolant(0.05f)); @@ -517,9 +517,9 @@ void LLScrollbar::draw() gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0, mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(), mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * mThickness : getRect().getWidth(), - mOrientation == VERTICAL ? mThickness : 0, mTrackColor.get(), TRUE); + mOrientation == VERTICAL ? mThickness : 0, mTrackColor.get(), true); - gl_rect_2d(mThumbRect, mThumbColor.get(), TRUE); + gl_rect_2d(mThumbRect, mThumbColor.get(), true); } else @@ -578,7 +578,7 @@ void LLScrollbar::draw() } // end draw -bool LLScrollbar::changeLine( S32 delta, BOOL update_thumb ) +bool LLScrollbar::changeLine( S32 delta, bool update_thumb ) { return setDocPos(mDocPos + delta, update_thumb); } @@ -589,35 +589,35 @@ void LLScrollbar::setValue(const LLSD& value) } -BOOL LLScrollbar::handleKeyHere(KEY key, MASK mask) +bool LLScrollbar::handleKeyHere(KEY key, MASK mask) { if (getDocPosMax() == 0 && !getVisible()) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch( key ) { case KEY_HOME: setDocPos( 0 ); - handled = TRUE; + handled = true; break; case KEY_END: setDocPos( getDocPosMax() ); - handled = TRUE; + handled = true; break; case KEY_DOWN: setDocPos( getDocPos() + mStepSize ); - handled = TRUE; + handled = true; break; case KEY_UP: setDocPos( getDocPos() - mStepSize ); - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -636,7 +636,7 @@ void LLScrollbar::pageUp(S32 overlap) { if (mDocSize > mPageSize) { - changeLine( -(mPageSize - overlap), TRUE ); + changeLine( -(mPageSize - overlap), true ); } } @@ -644,18 +644,18 @@ void LLScrollbar::pageDown(S32 overlap) { if (mDocSize > mPageSize) { - changeLine( mPageSize - overlap, TRUE ); + changeLine( mPageSize - overlap, true ); } } void LLScrollbar::onLineUpBtnPressed( const LLSD& data ) { - changeLine( -mStepSize, TRUE ); + changeLine( -mStepSize, true ); } void LLScrollbar::onLineDownBtnPressed( const LLSD& data ) { - changeLine( mStepSize, TRUE ); + changeLine( mStepSize, true ); } void LLScrollbar::setThickness(S32 thickness) diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h index 82607f2dd0..b381c57283 100644 --- a/indra/llui/llscrollbar.h +++ b/indra/llui/llscrollbar.h @@ -82,17 +82,17 @@ public: virtual void setValue(const LLSD& value); // Overrides from LLView - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks); virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); virtual void draw(); @@ -102,7 +102,7 @@ public: // How many "lines" the "document" has scrolled. // 0 <= DocPos <= DocSize - DocVisibile - bool setDocPos( S32 pos, BOOL update_thumb = TRUE ); + bool setDocPos( S32 pos, bool update_thumb = true ); S32 getDocPos() const { return mDocPos; } bool isAtBeginning() const; @@ -129,7 +129,7 @@ public: private: void updateThumbRect(); - bool changeLine(S32 delta, BOOL update_thumb ); + bool changeLine(S32 delta, bool update_thumb ); callback_t mChangeCallback; @@ -138,7 +138,7 @@ private: S32 mDocPos; // Position within the doc that the scrollbar is modeling, in "lines" (user size) S32 mPageSize; // Maximum number of lines that can be seen at one time. S32 mStepSize; - BOOL mDocChanged; + bool mDocChanged; LLRect mThumbRect; S32 mDragStartX; diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 48b55a1d87..09e8fd1f84 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -81,7 +81,7 @@ LLScrollContainer::Params::Params() // Default constructor LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) : LLUICtrl(p), - mAutoScrolling( FALSE ), + mAutoScrolling( false ), mAutoScrollRate( 0.f ), mBackgroundColor(p.bg_color()), mIsOpaque(p.is_opaque), @@ -178,7 +178,7 @@ void LLScrollContainer::scrollVertical( S32 new_pos ) // LLView functionality void LLScrollContainer::reshape(S32 width, S32 height, - BOOL called_from_parent) + bool called_from_parent) { LLUICtrl::reshape( width, height, called_from_parent ); @@ -191,8 +191,8 @@ void LLScrollContainer::reshape(S32 width, S32 height, S32 visible_width = 0; S32 visible_height = 0; - BOOL show_v_scrollbar = FALSE; - BOOL show_h_scrollbar = FALSE; + bool show_v_scrollbar = false; + bool show_h_scrollbar = false; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); mScrollbar[VERTICAL]->setDocSize( scrolled_rect.getHeight() ); @@ -204,7 +204,7 @@ void LLScrollContainer::reshape(S32 width, S32 height, } } -BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask) +bool LLScrollContainer::handleKeyHere(KEY key, MASK mask) { // allow scrolled view to handle keystrokes in case it delegated keyboard focus // to the scroll container. @@ -213,18 +213,18 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask) // call LLScrollContainer::handleKeyHere in turn if (mScrolledView && mScrolledView->handleKeyHere(key, mask)) { - return TRUE; + return true; } for( S32 i = 0; i < ORIENTATION_COUNT; i++ ) { if( mScrollbar[i]->handleKeyHere(key, mask) ) { updateScroll(); - return TRUE; + return true; } } - return FALSE; + return false; } bool LLScrollContainer::handleUnicodeCharHere(llwchar uni_char) @@ -292,8 +292,8 @@ bool LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks) return false; } -BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, +bool LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -301,7 +301,7 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, { // Scroll folder view if needed. Never accepts a drag or drop. *accept = ACCEPT_NO; - BOOL handled = autoScroll(x, y); + bool handled = autoScroll(x, y); if( !handled ) { @@ -309,7 +309,7 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, cargo_data, accept, tooltip_msg) != NULL; } - return TRUE; + return true; } bool LLScrollContainer::canAutoScroll(S32 x, S32 y) @@ -366,7 +366,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll) if (do_scroll) { mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed); - mAutoScrolling = TRUE; + mAutoScrolling = true; } scrolling = true; } @@ -378,7 +378,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll) if (do_scroll) { mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed); - mAutoScrolling = TRUE; + mAutoScrolling = true; } scrolling = true; } @@ -392,7 +392,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll) if (do_scroll) { mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed); - mAutoScrolling = TRUE; + mAutoScrolling = true; } scrolling = true; } @@ -404,7 +404,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll) if (do_scroll) { mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed); - mAutoScrolling = TRUE; + mAutoScrolling = true; } scrolling = true; } @@ -413,7 +413,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll) return scrolling; } -void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const +void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, bool* show_h_scrollbar, bool* show_v_scrollbar ) const { const LLRect& doc_rect = getScrolledViewRect(); static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0); @@ -426,8 +426,8 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height *visible_width = getRect().getWidth() - 2 * border_width; *visible_height = getRect().getHeight() - 2 * border_width; - *show_v_scrollbar = FALSE; - *show_h_scrollbar = FALSE; + *show_v_scrollbar = false; + *show_h_scrollbar = false; if (!mHideScrollbar) { @@ -435,12 +435,12 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height // the display of sliders. if ((doc_height - *visible_height) > 1) { - *show_v_scrollbar = TRUE; + *show_v_scrollbar = true; *visible_width -= scrollbar_size; } if ((doc_width - *visible_width) > 1) { - *show_h_scrollbar = TRUE; + *show_h_scrollbar = true; *visible_height -= scrollbar_size; // Note: Do *not* recompute *show_v_scrollbar here because with // The view inside the scroll container should not be extended @@ -449,7 +449,7 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height if( !*show_v_scrollbar && ((doc_height - *visible_height) > 1) ) { - *show_v_scrollbar = TRUE; + *show_v_scrollbar = true; *visible_width -= scrollbar_size; } } @@ -473,7 +473,7 @@ void LLScrollContainer::draw() mAutoScrollRate = mMinAutoScrollRate; } // clear this flag to be set on next call to autoScroll - mAutoScrolling = FALSE; + mAutoScrolling = false; // auto-focus when scrollbar active // this allows us to capture user intent (i.e. stop automatically scrolling the view/etc) @@ -506,8 +506,8 @@ void LLScrollContainer::draw() { S32 visible_width = 0; S32 visible_height = 0; - BOOL show_v_scrollbar = FALSE; - BOOL show_h_scrollbar = FALSE; + bool show_v_scrollbar = false; + bool show_h_scrollbar = false; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); LLLocalClipRect clip(LLRect(mInnerRect.mLeft, @@ -578,8 +578,8 @@ void LLScrollContainer::updateScroll() S32 doc_height = doc_rect.getHeight(); S32 visible_width = 0; S32 visible_height = 0; - BOOL show_v_scrollbar = FALSE; - BOOL show_h_scrollbar = FALSE; + bool show_v_scrollbar = false; + bool show_h_scrollbar = false; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); S32 border_width = getBorderWidth(); @@ -591,14 +591,14 @@ void LLScrollContainer::updateScroll() } scrollVertical( mScrollbar[VERTICAL]->getDocPos() ); - mScrollbar[VERTICAL]->setVisible( TRUE ); + mScrollbar[VERTICAL]->setVisible( true ); S32 v_scrollbar_height = visible_height; if( !show_h_scrollbar && mReserveScrollCorner ) { v_scrollbar_height -= scrollbar_size; } - mScrollbar[VERTICAL]->reshape( scrollbar_size, v_scrollbar_height, TRUE ); + mScrollbar[VERTICAL]->reshape( scrollbar_size, v_scrollbar_height, true ); // Make room for the horizontal scrollbar (or not) S32 v_scrollbar_offset = 0; @@ -614,7 +614,7 @@ void LLScrollContainer::updateScroll() { mScrolledView->translate( 0, getRect().getHeight() - border_width - doc_rect.mTop ); - mScrollbar[VERTICAL]->setVisible( FALSE ); + mScrollbar[VERTICAL]->setVisible( false ); mScrollbar[VERTICAL]->setDocPos( 0 ); } @@ -630,19 +630,19 @@ void LLScrollContainer::updateScroll() scrollHorizontal( mScrollbar[HORIZONTAL]->getDocPos() ); } - mScrollbar[HORIZONTAL]->setVisible( TRUE ); + mScrollbar[HORIZONTAL]->setVisible( true ); S32 h_scrollbar_width = visible_width; if( !show_v_scrollbar && mReserveScrollCorner ) { h_scrollbar_width -= scrollbar_size; } - mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, scrollbar_size, TRUE ); + mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, scrollbar_size, true ); } else { mScrolledView->translate( border_width - doc_rect.mLeft, 0 ); - mScrollbar[HORIZONTAL]->setVisible( FALSE ); + mScrollbar[HORIZONTAL]->setVisible( false ); mScrollbar[HORIZONTAL]->setDocPos( 0 ); } @@ -653,7 +653,7 @@ void LLScrollContainer::updateScroll() mScrollbar[VERTICAL]->setPageSize( visible_height ); } // end updateScroll -void LLScrollContainer::setBorderVisible(BOOL b) +void LLScrollContainer::setBorderVisible(bool b) { mBorder->setVisible( b ); // Recompute inner rect, as border visibility changes it @@ -676,8 +676,8 @@ LLRect LLScrollContainer::getContentWindowRect() LLRect scroller_view_rect; S32 visible_width = 0; S32 visible_height = 0; - BOOL show_h_scrollbar = FALSE; - BOOL show_v_scrollbar = FALSE; + bool show_h_scrollbar = false; + bool show_v_scrollbar = false; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); S32 border_width = getBorderWidth(); scroller_view_rect.setOriginAndSize(border_width, diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h index 2875f95526..13f69cb83b 100644 --- a/indra/llui/llscrollcontainer.h +++ b/indra/llui/llscrollcontainer.h @@ -85,12 +85,12 @@ public: virtual void setValue(const LLSD& value) { mInnerRect.setValue(value); } - void setBorderVisible( BOOL b ); + void setBorderVisible( bool b ); void scrollToShowRect( const LLRect& rect, const LLRect& constraint); void scrollToShowRect( const LLRect& rect) { scrollToShowRect(rect, LLRect(0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0)); } - void setReserveScrollCorner( BOOL b ) { mReserveScrollCorner = b; } + void setReserveScrollCorner( bool b ) { mReserveScrollCorner = b; } LLRect getVisibleContentRect(); LLRect getContentWindowRect(); virtual const LLRect getScrolledViewRect() const { return mScrolledView ? mScrolledView->getRect() : LLRect::null; } @@ -105,12 +105,12 @@ public: S32 getBorderWidth() const; // LLView functionality - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); + virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); virtual bool handleScrollWheel( S32 x, S32 y, S32 clicks ); virtual bool handleScrollHWheel( S32 x, S32 y, S32 clicks ); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -134,16 +134,16 @@ private: virtual void scrollVertical( S32 new_pos ); void updateScroll(); bool autoScroll(S32 x, S32 y, bool do_scroll); - void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const; + void calcVisibleSize( S32 *visible_width, S32 *visible_height, bool* show_h_scrollbar, bool* show_v_scrollbar ) const; LLScrollbar* mScrollbar[ORIENTATION_COUNT]; S32 mSize; - BOOL mIsOpaque; + bool mIsOpaque; LLUIColor mBackgroundColor; LLRect mInnerRect; LLViewBorder* mBorder; - BOOL mReserveScrollCorner; - BOOL mAutoScrolling; + bool mReserveScrollCorner; + bool mAutoScrolling; F32 mAutoScrollRate; F32 mMinAutoScrollRate; F32 mMaxAutoScrollRate; diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index b6f2eb8ba2..e16ba9627a 100644 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -152,7 +152,7 @@ void LLScrollingPanelList::removePanel( U32 panel_index ) } } -void LLScrollingPanelList::updatePanels(BOOL allow_modify) +void LLScrollingPanelList::updatePanels(bool allow_modify) { for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin(); iter != mPanelList.end(); ++iter) @@ -191,7 +191,7 @@ void LLScrollingPanelList::updatePanelVisiblilty() local_rect.getWidth(), local_rect.getHeight(), &screen_rect.mRight, &screen_rect.mTop ); - BOOL intersects = + bool intersects = ( (screen_rect.mRight > parent_screen_rect.mLeft) && (screen_rect.mLeft < parent_screen_rect.mRight) ) && ( (screen_rect.mTop > parent_screen_rect.mBottom) && (screen_rect.mBottom < parent_screen_rect.mTop) ); diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index e8df176ec3..964fa1ba40 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -40,7 +40,7 @@ class LLScrollingPanel : public LLPanel { public: LLScrollingPanel(const LLPanel::Params& params) : LLPanel(params) {} - virtual void updatePanel(BOOL allow_modify) = 0; + virtual void updatePanel(bool allow_modify) = 0; }; @@ -68,7 +68,7 @@ public: S32 addPanel( LLScrollingPanel* panel ); void removePanel( LLScrollingPanel* panel ); void removePanel( U32 panel_index ); - void updatePanels(BOOL allow_modify); + void updatePanels(bool allow_modify); const panel_list_t& getPanelList() { return mPanelList; } private: diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index f73c9aa539..89435b1874 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -281,9 +281,9 @@ void LLScrollListText::highlightText(S32 offset, S32 num_chars) } //virtual -BOOL LLScrollListText::isText() const +bool LLScrollListText::isText() const { - return TRUE; + return true; } // virtual @@ -298,7 +298,7 @@ const std::string &LLScrollListText::getToolTip() const } // virtual -BOOL LLScrollListText::needsToolTip() const +bool LLScrollListText::needsToolTip() const { // If base class has a tooltip, return that if (LLScrollListCell::needsToolTip()) @@ -309,7 +309,7 @@ BOOL LLScrollListText::needsToolTip() const } //virtual -BOOL LLScrollListText::getVisible() const +bool LLScrollListText::getVisible() const { return mVisible; } @@ -335,7 +335,7 @@ S32 LLScrollListText::getContentWidth() const void LLScrollListText::setColor(const LLColor4& color) { mColor = color; - mUseColor = TRUE; + mUseColor = true; } void LLScrollListText::setText(const LLStringExplicit& text) @@ -436,7 +436,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col string_chars, getTextWidth(), &right_x, - TRUE); + true); } // @@ -480,14 +480,14 @@ void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_co mCheckBox->draw(); } -BOOL LLScrollListCheck::handleClick() +bool LLScrollListCheck::handleClick() { if (mCheckBox->getEnabled()) { mCheckBox->toggle(); } // don't change selection when clicking on embedded checkbox - return TRUE; + return true; } /*virtual*/ @@ -509,7 +509,7 @@ void LLScrollListCheck::onCommit() } /*virtual*/ -void LLScrollListCheck::setEnabled(BOOL enable) +void LLScrollListCheck::setEnabled(bool enable) { mCheckBox->setEnabled(enable); } @@ -660,7 +660,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight string_chars, getTextWidth(), &right_x, - TRUE); + true); if (mIcon) { diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h index 2588da2331..38184e7860 100644 --- a/indra/llui/llscrolllistcell.h +++ b/indra/llui/llscrolllistcell.h @@ -106,16 +106,16 @@ public: virtual void setAltValue(const LLSD& value) { } virtual const std::string &getToolTip() const { return mToolTip; } virtual void setToolTip(const std::string &str) { mToolTip = str; } - virtual BOOL getVisible() const { return TRUE; } + virtual bool getVisible() const { return true; } virtual void setWidth(S32 width) { mWidth = width; } virtual void highlightText(S32 offset, S32 num_chars) {} - virtual BOOL isText() const { return FALSE; } - virtual BOOL needsToolTip() const { return ! mToolTip.empty(); } + virtual bool isText() const { return false; } + virtual bool needsToolTip() const { return ! mToolTip.empty(); } virtual void setColor(const LLColor4&) {} virtual void onCommit() {}; - virtual BOOL handleClick() { return FALSE; } - virtual void setEnabled(BOOL enable) { } + virtual bool handleClick() { return false; } + virtual void setEnabled(bool enable) { } private: S32 mWidth; @@ -146,13 +146,13 @@ public: /*virtual*/ void setAltValue(const LLSD& value); /*virtual*/ const LLSD getValue() const; /*virtual*/ const LLSD getAltValue() const; - /*virtual*/ BOOL getVisible() const; + /*virtual*/ bool getVisible() const; /*virtual*/ void highlightText(S32 offset, S32 num_chars); /*virtual*/ void setColor(const LLColor4&); - /*virtual*/ BOOL isText() const; + /*virtual*/ bool isText() const; /*virtual*/ const std::string & getToolTip() const; - /*virtual*/ BOOL needsToolTip() const; + /*virtual*/ bool needsToolTip() const; S32 getTextWidth() const { return mTextWidth;} void setTextWidth(S32 value) { mTextWidth = value;} @@ -171,7 +171,7 @@ protected: LLColor4 mHighlightColor; U8 mUseColor; LLFontGL::HAlign mFontAlignment; - BOOL mVisible; + bool mVisible; S32 mHighlightCount; S32 mHighlightOffset; @@ -235,8 +235,8 @@ public: /*virtual*/ void setValue(const LLSD& value); /*virtual*/ void onCommit(); - /*virtual*/ BOOL handleClick(); - /*virtual*/ void setEnabled(BOOL enable); + /*virtual*/ bool handleClick(); + /*virtual*/ void setEnabled(bool enable); LLCheckBoxCtrl* getCheckBox() { return mCheckBox; } diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index 3dff93af98..a935ea2f11 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -52,7 +52,7 @@ LLScrollColumnHeader::Params::Params() LLScrollColumnHeader::LLScrollColumnHeader(const LLScrollColumnHeader::Params& p) : LLButton(p), // use combobox params to steal images mColumn(p.column), - mHasResizableElement(FALSE) + mHasResizableElement(false) { setClickedCallback(boost::bind(&LLScrollColumnHeader::onClick, this, _2)); @@ -74,12 +74,12 @@ LLScrollColumnHeader::~LLScrollColumnHeader() void LLScrollColumnHeader::draw() { std::string sort_column = mColumn->mParentCtrl->getSortColumnName(); - BOOL draw_arrow = !mColumn->mLabel.empty() + bool draw_arrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() // check for indirect sorting column as well as column's sorting name && (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName); - BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); + bool is_ascending = mColumn->mParentCtrl->getSortAscending(); if (draw_arrow) { setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white); @@ -241,7 +241,7 @@ void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user) } } -void LLScrollColumnHeader::setHasResizableElement(BOOL resizable) +void LLScrollColumnHeader::setHasResizableElement(bool resizable) { if (mHasResizableElement != resizable) { @@ -270,7 +270,7 @@ void LLScrollColumnHeader::updateResizeBars() { LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col); if (!columnp || !columnp->mHeader) continue; - BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize(); + bool enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize(); columnp->mHeader->enableResizeBar(enable); if (enable) { @@ -279,12 +279,12 @@ void LLScrollColumnHeader::updateResizeBars() } } -void LLScrollColumnHeader::enableResizeBar(BOOL enable) +void LLScrollColumnHeader::enableResizeBar(bool enable) { mResizeBar->setEnabled(enable); } -BOOL LLScrollColumnHeader::canResize() +bool LLScrollColumnHeader::canResize() { return getVisible() && (mHasResizableElement || mColumn->mDynamicWidth); } diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h index 1699c3d4e9..630e5ef529 100644 --- a/indra/llui/llscrolllistcolumn.h +++ b/indra/llui/llscrolllistcolumn.h @@ -56,17 +56,17 @@ public: /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); LLScrollListColumn* getColumn() { return mColumn; } - void setHasResizableElement(BOOL resizable); + void setHasResizableElement(bool resizable); void updateResizeBars(); - BOOL canResize(); - void enableResizeBar(BOOL enable); + bool canResize(); + void enableResizeBar(bool enable); void onClick(const LLSD& data); private: LLScrollListColumn* mColumn; LLResizeBar* mResizeBar; - BOOL mHasResizableElement; + bool mHasResizableElement; }; /* @@ -158,7 +158,7 @@ public: ESortDirection mSortDirection; LLUIString mLabel; F32 mRelWidth; - BOOL mDynamicWidth; + bool mDynamicWidth; S32 mMaxContentWidth; S32 mIndex; LLScrollListCtrl* mParentCtrl; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 56873ec11a..251ac46e2f 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -66,7 +66,7 @@ static LLDefaultChildRegistry::Register<LLScrollListCtrl> r("scroll_list"); // local structures & classes. struct SortScrollListItem { - SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal, bool alternate_sort) + SortScrollListItem(const std::vector<std::pair<S32, bool> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal, bool alternate_sort) : mSortOrders(sort_orders) , mSortSignal(sort_signal) , mAltSort(alternate_sort) @@ -80,7 +80,7 @@ struct SortScrollListItem it != mSortOrders.rend(); ++it) { S32 col_idx = it->first; - BOOL sort_ascending = it->second; + bool sort_ascending = it->second; S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column? @@ -114,7 +114,7 @@ struct SortScrollListItem } - typedef std::vector<std::pair<S32, BOOL> > sort_order_t; + typedef std::vector<std::pair<S32, bool> > sort_order_t; const LLScrollListCtrl::sort_signal_t* mSortSignal; const sort_order_t& mSortOrders; const bool mAltSort; @@ -357,7 +357,7 @@ LLScrollListCtrl::~LLScrollListCtrl() } -BOOL LLScrollListCtrl::setMaxItemCount(S32 max_count) +bool LLScrollListCtrl::setMaxItemCount(S32 max_count) { if (max_count >= getItemCount()) { @@ -376,7 +376,7 @@ S32 LLScrollListCtrl::getItemCount() const return mItemList.size(); } -BOOL LLScrollListCtrl::hasSelectedItem() const +bool LLScrollListCtrl::hasSelectedItem() const { item_list::iterator iter; for (iter = mItemList.begin(); iter < mItemList.end(); ) @@ -384,11 +384,11 @@ BOOL LLScrollListCtrl::hasSelectedItem() const LLScrollListItem* itemp = *iter; if (itemp && itemp->getSelected()) { - return TRUE; + return true; } iter++; } - return FALSE; + return false; } // virtual LLScrolListInterface function (was deleteAllItems) @@ -523,7 +523,7 @@ LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const } -void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLScrollListCtrl::reshape( S32 width, S32 height, bool called_from_parent ) { LLUICtrl::reshape( width, height, called_from_parent ); @@ -551,7 +551,7 @@ void LLScrollListCtrl::updateLayout() // how many lines of content in a single "page" S32 page_lines = getLinesPerPage(); - BOOL scrollbar_visible = mLineHeight * getItemCount() > mItemListRect.getHeight(); + bool scrollbar_visible = mLineHeight * getItemCount() > mItemListRect.getHeight(); if (scrollbar_visible) { // provide space on the right for scrollbar @@ -593,9 +593,9 @@ LLRect LLScrollListCtrl::getRequiredRect() } -BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL requires_column ) +bool LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, bool requires_column ) { - BOOL not_too_big = getItemCount() < mMaxItemCount; + bool not_too_big = getItemCount() < mMaxItemCount; if (not_too_big) { switch( pos ) @@ -851,12 +851,12 @@ void LLScrollListCtrl::setPageLines(S32 new_page_lines) updateLayout(); } -BOOL LLScrollListCtrl::selectFirstItem() +bool LLScrollListCtrl::selectFirstItem() { - BOOL success = FALSE; + bool success = false; // our $%&@#$()^%#$()*^ iterators don't let us check against the first item inside out iteration - BOOL first_item = TRUE; + bool first_item = true; item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) @@ -876,7 +876,7 @@ BOOL LLScrollListCtrl::selectFirstItem() selectItem(itemp, -1); } } - success = TRUE; + success = true; mOriginalSelection = 0; } else @@ -894,17 +894,17 @@ BOOL LLScrollListCtrl::selectFirstItem() // Deselects all other items // virtual -BOOL LLScrollListCtrl::selectNthItem( S32 target_index ) +bool LLScrollListCtrl::selectNthItem( S32 target_index ) { return selectItemRange(target_index, target_index); } // virtual -BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) +bool LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) { if (mItemList.empty()) { - return FALSE; + return false; } // make sure sort is up to date @@ -918,7 +918,7 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) else last_index = llclamp(last_index, first_index, listlen-1); - BOOL success = FALSE; + bool success = false; S32 index = 0; for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); ) { @@ -934,8 +934,8 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) if( itemp->getEnabled() ) { // TODO: support range selection for cells - selectItem(itemp, -1, FALSE); - success = TRUE; + selectItem(itemp, -1, false); + success = true; } } else @@ -1083,7 +1083,7 @@ S32 LLScrollListCtrl::selectMultiple( uuid_vec_t ids ) if (item->getEnabled() && (item->getUUID() == (*iditr))) { // TODO: support multiple selection for cells - selectItem(item, -1, FALSE); + selectItem(item, -1, false); ++count; break; } @@ -1134,7 +1134,7 @@ S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id ) const return -1; } -void LLScrollListCtrl::selectPrevItem( BOOL extend_selection) +void LLScrollListCtrl::selectPrevItem( bool extend_selection) { LLScrollListItem* prev_item = NULL; @@ -1179,7 +1179,7 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection) } -void LLScrollListCtrl::selectNextItem( BOOL extend_selection) +void LLScrollListCtrl::selectNextItem( bool extend_selection) { LLScrollListItem* next_item = NULL; @@ -1224,7 +1224,7 @@ void LLScrollListCtrl::selectNextItem( BOOL extend_selection) -void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change) +void LLScrollListCtrl::deselectAllItems(bool no_commit_on_change) { item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) @@ -1263,9 +1263,9 @@ LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos) // Selects first enabled item of the given name. // Returns false if item not found. // Calls getItemByLabel in order to combine functionality -BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sensitive, S32 column/* = 0*/) +bool LLScrollListCtrl::selectItemByLabel(const std::string& label, bool case_sensitive, S32 column/* = 0*/) { - deselectAllItems(TRUE); // ensure that no stale items are selected, even if we don't find a match + deselectAllItems(true); // ensure that no stale items are selected, even if we don't find a match LLScrollListItem* item = getItemByLabel(label, case_sensitive, column); bool found = NULL != item; @@ -1282,7 +1282,7 @@ BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sen return found; } -LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOOL case_sensitive, S32 column) +LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, bool case_sensitive, S32 column) { if (label.empty()) //RN: assume no empty items { @@ -1313,16 +1313,16 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOO } -BOOL LLScrollListCtrl::selectItemByPrefix(const std::string& target, BOOL case_sensitive, S32 column) +bool LLScrollListCtrl::selectItemByPrefix(const std::string& target, bool case_sensitive, S32 column) { return selectItemByPrefix(utf8str_to_wstring(target), case_sensitive, column); } // Selects first enabled item that has a name where the name's first part matched the target string. // Returns false if item not found. -BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sensitive, S32 column) +bool LLScrollListCtrl::selectItemByPrefix(const LLWString& target, bool case_sensitive, S32 column) { - BOOL found = FALSE; + bool found = false; LLWString target_trimmed( target ); S32 target_len = target_trimmed.size(); @@ -1336,11 +1336,11 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen LLScrollListItem* item = *iter; // Only select enabled items with matching names LLScrollListCell* cellp = item->getColumn(column == -1 ? getSearchColumn() : column); - BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE; + bool select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : false; if (select) { selectItem(item, -1); - found = TRUE; + found = true; break; } } @@ -1372,7 +1372,7 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen LLWString trimmed_label = item_label; LLWStringUtil::trim(trimmed_label); - BOOL select = item->getEnabled() && trimmed_label.compare(0, target_trimmed.size(), target_trimmed) == 0; + bool select = item->getEnabled() && trimmed_label.compare(0, target_trimmed.size(), target_trimmed) == 0; if (select) { @@ -1380,7 +1380,7 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen S32 offset = item_label.find(target_trimmed); cellp->highlightText(offset, target_trimmed.size()); selectItem(item, -1); - found = TRUE; + found = true; break; } } @@ -1413,7 +1413,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv } else { - deselectAllItems(TRUE); + deselectAllItems(true); if (!case_sensitive) { // do comparisons in lower case @@ -1447,7 +1447,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv { // find offset of matching text cellp->highlightText(found_iter, substring_trimmed.size()); - selectItem(item, -1, FALSE); + selectItem(item, -1, false); found++; @@ -1489,7 +1489,7 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. -LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled) +LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, bool enabled) { if (getItemCount() < mMaxItemCount) { @@ -1504,16 +1504,16 @@ LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_te } // Select the line or lines that match this UUID -BOOL LLScrollListCtrl::selectByID( const LLUUID& id ) +bool LLScrollListCtrl::selectByID( const LLUUID& id ) { return selectByValue( LLSD(id) ); } -BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected) +bool LLScrollListCtrl::setSelectedByValue(const LLSD& value, bool selected) { - BOOL found = FALSE; + bool found = false; - if (selected && !mAllowMultipleSelection) deselectAllItems(TRUE); + if (selected && !mAllowMultipleSelection) deselectAllItems(true); item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) @@ -1527,12 +1527,12 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected) { LLSD::Binary data1 = value.asBinary(); LLSD::Binary data2 = item->getValue().asBinary(); - found = std::equal(data1.begin(), data1.end(), data2.begin()) ? TRUE : FALSE; + found = std::equal(data1.begin(), data1.end(), data2.begin()) ? true : false; } } else { - found = item->getValue().asString() == value.asString() ? TRUE : FALSE; + found = item->getValue().asString() == value.asString() ? true : false; } if (found) @@ -1558,7 +1558,7 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected) return found; } -BOOL LLScrollListCtrl::isSelected(const LLSD& value) const +bool LLScrollListCtrl::isSelected(const LLSD& value) const { item_list::const_iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) @@ -1569,7 +1569,7 @@ BOOL LLScrollListCtrl::isSelected(const LLSD& value) const return item->getSelected(); } } - return FALSE; + return false; } LLUUID LLScrollListCtrl::getStringUUIDSelectedItem() const @@ -1736,7 +1736,7 @@ void LLScrollListCtrl::draw() LLUICtrl::draw(); } -void LLScrollListCtrl::setEnabled(BOOL enabled) +void LLScrollListCtrl::setEnabled(bool enabled) { mCanSelect = enabled; setTabStop(enabled); @@ -1828,11 +1828,11 @@ bool LLScrollListCtrl::handleToolTip(S32 x, S32 y, MASK mask) return handled; } -BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) +bool LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) { - if (!mCanSelect) return FALSE; + if (!mCanSelect) return false; - BOOL selection_changed = FALSE; + bool selection_changed = false; LLScrollListItem* hit_item = hitItem(x, y); @@ -1868,17 +1868,17 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) LLScrollListItem *item = *itor; if (item == hit_item || item == lastSelected) { - selectItem(item, getColumnIndexFromOffset(x), FALSE); + selectItem(item, getColumnIndexFromOffset(x), false); selecting = !selecting; if (hit_item == lastSelected) { // stop selecting now, since we just clicked on our last selected item - selecting = FALSE; + selecting = false; } } if (selecting) { - selectItem(item, getColumnIndexFromOffset(x), FALSE); + selectItem(item, getColumnIndexFromOffset(x), false); } } } @@ -1893,7 +1893,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) { if(!(mMaxSelectable > 0 && getAllSelected().size() >= mMaxSelectable)) { - selectItem(hit_item, getColumnIndexFromOffset(x), FALSE); + selectItem(hit_item, getColumnIndexFromOffset(x), false); } else { @@ -1906,7 +1906,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) } else { - deselectAllItems(TRUE); + deselectAllItems(true); selectItem(hit_item, getColumnIndexFromOffset(x)); } } @@ -1927,7 +1927,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) else { //mLastSelected = NULL; - //deselectAllItems(TRUE); + //deselectAllItems(true); } return selection_changed; @@ -1949,7 +1949,7 @@ bool LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask) handleClick(x, y, mask); } - return TRUE; + return true; } bool LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask) @@ -2030,7 +2030,7 @@ bool LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) menu->show(x, y); LLMenuGL::showPopup(this, menu, x, y); - return TRUE; + return true; } } return LLUICtrl::handleRightMouseDown(x, y, mask); @@ -2110,7 +2110,7 @@ void LLScrollListCtrl::copySLURLToClipboard(std::string id, bool is_group) bool LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) { - //BOOL handled = FALSE; + //bool handled = false; bool handled = handleClick(x, y, mask); if (!handled) @@ -2130,16 +2130,16 @@ bool LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) return true; } -BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) +bool LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) { // which row was clicked on? LLScrollListItem* hit_item = hitItem(x, y); - if (!hit_item) return FALSE; + if (!hit_item) return false; // get appropriate cell from that row S32 column_index = getColumnIndexFromOffset(x); LLScrollListCell* hit_cell = hit_item->getColumn(column_index); - if (!hit_cell) return FALSE; + if (!hit_cell) return false; // if cell handled click directly (i.e. clicked on an embedded checkbox) if (hit_cell->handleClick()) @@ -2175,7 +2175,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) onCommit(); } // eat click (e.g. do not trigger double click callback) - return TRUE; + return true; } else { @@ -2184,7 +2184,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) gFocusMgr.setMouseCapture(this); mNeedsScroll = true; // do not eat click (allow double click callback) - return FALSE; + return false; } } @@ -2337,9 +2337,9 @@ void LLScrollListCtrl::onMouseLeave(S32 x, S32 y, MASK mask) mouseOverHighlightNthItem(-1); } -BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) +bool LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { - BOOL handled = FALSE; + bool handled = false; // not called from parent means we have keyboard focus or a child does if (mCanSelect) @@ -2352,18 +2352,18 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mAllowKeyboardMovement || hasFocus()) { // commit implicit in call - selectPrevItem(FALSE); + selectPrevItem(false); mNeedsScroll = true; - handled = TRUE; + handled = true; } break; case KEY_DOWN: if (mAllowKeyboardMovement || hasFocus()) { // commit implicit in call - selectNextItem(FALSE); + selectNextItem(false); mNeedsScroll = true; - handled = TRUE; + handled = true; } break; case KEY_LEFT: @@ -2388,7 +2388,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) break; } item->setSelectedCell(cell); - handled = TRUE; + handled = true; } } break; @@ -2414,7 +2414,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) break; } item->setSelectedCell(cell); - handled = TRUE; + handled = true; } } break; @@ -2428,7 +2428,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { onCommit(); } - handled = TRUE; + handled = true; } break; case KEY_PAGE_DOWN: @@ -2441,7 +2441,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { onCommit(); } - handled = TRUE; + handled = true; } break; case KEY_HOME: @@ -2454,7 +2454,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { onCommit(); } - handled = TRUE; + handled = true; } break; case KEY_END: @@ -2467,7 +2467,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { onCommit(); } - handled = TRUE; + handled = true; } break; case KEY_RETURN: @@ -2478,7 +2478,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { onCommit(); mSearchString.clear(); - handled = TRUE; + handled = true; } break; case KEY_BACKSPACE: @@ -2498,7 +2498,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) } } } - else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), FALSE)) + else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), false)) { mNeedsScroll = true; // update search string only on successful match @@ -2618,11 +2618,11 @@ void LLScrollListCtrl::reportInvalidInput() make_ui_sound("UISndBadKeystroke"); } -BOOL LLScrollListCtrl::isRepeatedChars(const LLWString& string) const +bool LLScrollListCtrl::isRepeatedChars(const LLWString& string) const { if (string.empty()) { - return FALSE; + return false; } llwchar first_char = string[0]; @@ -2631,14 +2631,14 @@ BOOL LLScrollListCtrl::isRepeatedChars(const LLWString& string) const { if (string[i] != first_char) { - return FALSE; + return false; } } - return TRUE; + return true; } -void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, BOOL select_single_item) +void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, bool select_single_item) { if (!itemp) return; @@ -2654,9 +2654,9 @@ void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, BOOL select } if (select_single_item) { - deselectAllItems(TRUE); + deselectAllItems(true); } - itemp->setSelected(TRUE); + itemp->setSelected(true); switch (mSelectionType) { case CELL: @@ -2685,7 +2685,7 @@ void LLScrollListCtrl::deselectItem(LLScrollListItem* itemp) mLastSelected = NULL; } - itemp->setSelected(FALSE); + itemp->setSelected(false); LLScrollListCell* cellp = itemp->getColumn(getSearchColumn()); if (cellp) { @@ -2700,7 +2700,7 @@ void LLScrollListCtrl::commitIfChanged() if (mSelectionChanged) { mDirty = true; - mSelectionChanged = FALSE; + mSelectionChanged = false; onCommit(); } } @@ -2710,13 +2710,13 @@ struct SameSortColumn SameSortColumn(S32 column) : mColumn(column) {} S32 mColumn; - bool operator()(std::pair<S32, BOOL> sort_column) { return sort_column.first == mColumn; } + bool operator()(std::pair<S32, bool> sort_column) { return sort_column.first == mColumn; } }; -BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending) +bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending) { LLScrollListColumn* sort_column = getColumn(column_idx); - if (!sort_column) return FALSE; + if (!sort_column) return false; sort_column->mSortDirection = ascending ? LLScrollListColumn::ASCENDING : LLScrollListColumn::DESCENDING; @@ -2727,7 +2727,7 @@ BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending) if (mSortColumns.empty()) { mSortColumns.push_back(new_sort_column); - return TRUE; + return true; } else { @@ -2765,7 +2765,7 @@ void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar ) } -void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending) +void LLScrollListCtrl::sortByColumn(const std::string& name, bool ascending) { column_map_t::iterator itor = mColumns.find(name); if (itor != mColumns.end()) @@ -2775,7 +2775,7 @@ void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending) } // First column is column 0 -void LLScrollListCtrl::sortByColumnIndex(U32 column, BOOL ascending) +void LLScrollListCtrl::sortByColumnIndex(U32 column, bool ascending) { setSort(column, ascending); updateSort(); @@ -2796,9 +2796,9 @@ void LLScrollListCtrl::updateSort() const } // for one-shot sorts, does not save sort column/order -void LLScrollListCtrl::sortOnce(S32 column, BOOL ascending) +void LLScrollListCtrl::sortOnce(S32 column, bool ascending) { - std::vector<std::pair<S32, BOOL> > sort_column; + std::vector<std::pair<S32, bool> > sort_column; sort_column.push_back(std::make_pair(column, ascending)); // do stable sort to preserve any previous sorts @@ -2901,7 +2901,7 @@ void LLScrollListCtrl::copy() } // virtual -BOOL LLScrollListCtrl::canCopy() const +bool LLScrollListCtrl::canCopy() const { return (getFirstSelected() != NULL); } @@ -2914,7 +2914,7 @@ void LLScrollListCtrl::cut() } // virtual -BOOL LLScrollListCtrl::canCut() const +bool LLScrollListCtrl::canCut() const { return canCopy() && canDoDelete(); } @@ -2929,7 +2929,7 @@ void LLScrollListCtrl::selectAll() LLScrollListItem *itemp = *iter; if( itemp->getEnabled() ) { - selectItem(itemp, -1, FALSE); + selectItem(itemp, -1, false); } } @@ -2940,7 +2940,7 @@ void LLScrollListCtrl::selectAll() } // virtual -BOOL LLScrollListCtrl::canSelectAll() const +bool LLScrollListCtrl::canSelectAll() const { return getCanSelect() && mAllowMultipleSelection && !(mMaxSelectable > 0 && mItemList.size() > mMaxSelectable); } @@ -2952,7 +2952,7 @@ void LLScrollListCtrl::deselect() } // virtual -BOOL LLScrollListCtrl::canDeselect() const +bool LLScrollListCtrl::canDeselect() const { return getCanSelect(); } @@ -3093,7 +3093,7 @@ std::string LLScrollListCtrl::getSortColumnName() else return ""; } -BOOL LLScrollListCtrl::hasSortOrder() const +bool LLScrollListCtrl::hasSortOrder() const { return !mSortColumns.empty(); } @@ -3230,7 +3230,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS && cell->isText() && !cell->getValue().asString().empty()) { - columnp->mHeader->setHasResizableElement(TRUE); + columnp->mHeader->setHasResizableElement(true); } } @@ -3258,7 +3258,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS && cell->isText() && !cell->getValue().asString().empty()) { - columnp->mHeader->setHasResizableElement(TRUE); + columnp->mHeader->setHasResizableElement(true); } } } @@ -3315,26 +3315,26 @@ LLSD LLScrollListCtrl::getValue() const return item->getValue(); } -BOOL LLScrollListCtrl::operateOnSelection(EOperation op) +bool LLScrollListCtrl::operateOnSelection(EOperation op) { if (op == OP_DELETE) { deleteSelectedItems(); - return TRUE; + return true; } else if (op == OP_DESELECT) { deselectAllItems(); } - return FALSE; + return false; } -BOOL LLScrollListCtrl::operateOnAll(EOperation op) +bool LLScrollListCtrl::operateOnAll(EOperation op) { if (op == OP_DELETE) { clearRows(); - return TRUE; + return true; } else if (op == OP_DESELECT) { @@ -3344,10 +3344,10 @@ BOOL LLScrollListCtrl::operateOnAll(EOperation op) { selectAll(); } - return FALSE; + return false; } //virtual -void LLScrollListCtrl::setFocus(BOOL b) +void LLScrollListCtrl::setFocus(bool b) { // for tabbing into pristine scroll lists (Finder) if (!getFirstSelected()) @@ -3360,9 +3360,9 @@ void LLScrollListCtrl::setFocus(BOOL b) // virtual -BOOL LLScrollListCtrl::isDirty() const +bool LLScrollListCtrl::isDirty() const { - BOOL grubby = mDirty; + bool grubby = mDirty; if ( !mAllowMultipleSelection ) { grubby = (mOriginalSelection != getFirstSelectedIndex()); @@ -3373,7 +3373,7 @@ BOOL LLScrollListCtrl::isDirty() const // Clear dirty state void LLScrollListCtrl::resetDirty() { - mDirty = FALSE; + mDirty = false; mOriginalSelection = getFirstSelectedIndex(); } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index a121913579..1eb3e530e8 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -166,7 +166,7 @@ public: // Sets an array of column descriptors void setColumnHeadings(const LLSD& headings); - void sortByColumnIndex(U32 column, BOOL ascending); + void sortByColumnIndex(U32 column, bool ascending); // LLCtrlListInterface functions virtual S32 getItemCount() const; @@ -189,7 +189,7 @@ public: // Simple add element. Takes a single array of: // [ "value" => value, "font" => font, "font-style" => style ] virtual void clearRows(); // clears all elements - virtual void sortByColumn(const std::string& name, BOOL ascending); + virtual void sortByColumn(const std::string& name, bool ascending); // These functions take and return an array of arrays of elements, as above virtual void setValue(const LLSD& value ); @@ -200,37 +200,37 @@ public: LLCtrlScrollInterface* getScrollInterface() { return (LLCtrlScrollInterface*)this; } // DEPRECATED: Use setSelectedByValue() below. - BOOL setCurrentByID( const LLUUID& id ) { return selectByID(id); } + bool setCurrentByID( const LLUUID& id ) { return selectByID(id); } virtual LLUUID getCurrentID() const { return getStringUUIDSelectedItem(); } - BOOL operateOnSelection(EOperation op); - BOOL operateOnAll(EOperation op); + bool operateOnSelection(EOperation op); + bool operateOnAll(EOperation op); - // returns FALSE if unable to set the max count so low - BOOL setMaxItemCount(S32 max_count); + // returns false if unable to set the max count so low + bool setMaxItemCount(S32 max_count); - BOOL selectByID( const LLUUID& id ); // FALSE if item not found + bool selectByID( const LLUUID& id ); // false if item not found // Match item by value.asString(), which should work for string, integer, uuid. - // Returns FALSE if not found. - BOOL setSelectedByValue(const LLSD& value, BOOL selected); + // Returns false if not found. + bool setSelectedByValue(const LLSD& value, bool selected); - BOOL isSorted() const { return mSorted; } + bool isSorted() const { return mSorted; } - virtual BOOL isSelected(const LLSD& value) const; + virtual bool isSelected(const LLSD& value) const; - BOOL hasSelectedItem() const; + bool hasSelectedItem() const; - BOOL handleClick(S32 x, S32 y, MASK mask); - BOOL selectFirstItem(); - BOOL selectNthItem( S32 index ); - BOOL selectItemRange( S32 first, S32 last ); - BOOL selectItemAt(S32 x, S32 y, MASK mask); + bool handleClick(S32 x, S32 y, MASK mask); + bool selectFirstItem(); + bool selectNthItem( S32 index ); + bool selectItemRange( S32 first, S32 last ); + bool selectItemAt(S32 x, S32 y, MASK mask); void deleteSingleItem( S32 index ); void deleteItems(const LLSD& sd); void deleteSelectedItems(); - void deselectAllItems(BOOL no_commit_on_change = FALSE); // by default, go ahead and commit on selection change + void deselectAllItems(bool no_commit_on_change = false); // by default, go ahead and commit on selection change void clearHighlightedItems(); @@ -247,8 +247,8 @@ public: void swapWithNext(S32 index); void swapWithPrevious(S32 index); - void setCanSelect(BOOL can_select) { mCanSelect = can_select; } - virtual BOOL getCanSelect() const { return mCanSelect; } + void setCanSelect(bool can_select) { mCanSelect = can_select; } + virtual bool getCanSelect() const { return mCanSelect; } S32 getItemIndex( LLScrollListItem* item ) const; S32 getItemIndex( const LLUUID& item_id ) const; @@ -260,10 +260,10 @@ public: // one of which can be selected at a time. virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD()); - BOOL selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 ); // FALSE if item not found - BOOL selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE, S32 column = -1); - BOOL selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE, S32 column = -1); - LLScrollListItem* getItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 ); + bool selectItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 ); // false if item not found + bool selectItemByPrefix(const std::string& target, bool case_sensitive = true, S32 column = -1); + bool selectItemByPrefix(const LLWString& target, bool case_sensitive = true, S32 column = -1); + LLScrollListItem* getItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 ); const std::string getSelectedItemLabel(S32 column = 0) const; LLSD getSelectedValue(); @@ -278,7 +278,7 @@ public: // DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue(). // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. - LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, bool enabled = true); LLUUID getStringUUIDSelectedItem() const; LLScrollListItem* getFirstSelected() const; @@ -294,7 +294,7 @@ public: LLScrollListItem* getItem(const LLSD& sd) const; - void setAllowMultipleSelection(BOOL mult ) { mAllowMultipleSelection = mult; } + void setAllowMultipleSelection(bool mult ) { mAllowMultipleSelection = mult; } void setBgWriteableColor(const LLColor4 &c) { mBgWriteableColor = c; } void setReadOnlyBgColor(const LLColor4 &c) { mBgReadOnlyColor = c; } @@ -306,15 +306,15 @@ public: void setHighlightedColor(const LLColor4 &c) { mHighlightedColor = c; } void setFgDisableColor(const LLColor4 &c) { mFgDisabledColor = c; } - void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; } - void setDrawStripes(BOOL b) { mDrawStripes = b; } + void setBackgroundVisible(bool b) { mBackgroundVisible = b; } + void setDrawStripes(bool b) { mDrawStripes = b; } void setColumnPadding(const S32 c) { mColumnPadding = c; } S32 getColumnPadding() const { return mColumnPadding; } void setRowPadding(const S32 c) { mColumnPadding = c; } S32 getRowPadding() const { return mColumnPadding; } - void setCommitOnKeyboardMovement(BOOL b) { mCommitOnKeyboardMovement = b; } - void setCommitOnSelectionChange(BOOL b) { mCommitOnSelectionChange = b; } - void setAllowKeyboardMovement(BOOL b) { mAllowKeyboardMovement = b; } + void setCommitOnKeyboardMovement(bool b) { mCommitOnKeyboardMovement = b; } + void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; } + void setAllowKeyboardMovement(bool b) { mAllowKeyboardMovement = b; } void setMaxSelectable(U32 max_selected) { mMaxSelectable = max_selected; } S32 getMaxSelectable() { return mMaxSelectable; } @@ -342,26 +342,26 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char); /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ bool handleScrollHWheel(S32 x, S32 y, S32 clicks); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ void setEnabled(BOOL enabled); - /*virtual*/ void setFocus( BOOL b ); + /*virtual*/ void setEnabled(bool enabled); + /*virtual*/ void setFocus( bool b ); /*virtual*/ void onFocusReceived(); /*virtual*/ void onFocusLost(); /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); - virtual BOOL isDirty() const; + virtual bool isDirty() const; virtual void resetDirty(); // Clear dirty state virtual void updateLayout(); virtual void fitContents(S32 max_width, S32 max_height); virtual LLRect getRequiredRect(); - static BOOL rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row); + static bool rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row); LLRect getItemListRect() { return mItemListRect; } @@ -383,28 +383,28 @@ public: * then display all items. */ void setPageLines(S32 page_lines ); - void setCollapseEmptyColumns(BOOL collapse); + void setCollapseEmptyColumns(bool collapse); LLScrollListItem* hitItem(S32 x,S32 y); virtual void scrollToShowSelected(); // LLEditMenuHandler functions virtual void copy(); - virtual BOOL canCopy() const; + virtual bool canCopy() const; virtual void cut(); - virtual BOOL canCut() const; + virtual bool canCut() const; virtual void selectAll(); - virtual BOOL canSelectAll() const; + virtual bool canSelectAll() const; virtual void deselect(); - virtual BOOL canDeselect() const; + virtual bool canDeselect() const; void setNumDynamicColumns(S32 num) { mNumDynamicWidthColumns = num; } void updateStaticColumnWidth(LLScrollListColumn* col, S32 new_width); S32 getTotalStaticColumnWidth() { return mTotalStaticColumnWidth; } std::string getSortColumnName(); - BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; } - BOOL hasSortOrder() const; + bool getSortAscending() { return mSortColumns.empty() ? true : mSortColumns.back().second; } + bool hasSortOrder() const; void clearSortOrder(); void setAlternateSort() { mAlternateSort = true; } @@ -413,7 +413,7 @@ public: // conceptually const, but mutates mItemList void updateSort() const; // sorts a list without affecting the permanent sort order (so further list insertions can be unsorted, for example) - void sortOnce(S32 column, BOOL ascending); + void sortOnce(S32 column, bool ascending); // manually call this whenever editing list items in place to flag need for resorting void setNeedsSort(bool val = true) { mSorted = !val; } @@ -445,8 +445,8 @@ protected: // (except in the case that the addItem() call fails, in which case it is up // to the caller to delete the item) // - // returns FALSE if item faile to be added to list, does NOT delete 'item' - BOOL addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM, BOOL requires_column = TRUE ); + // returns false if item faile to be added to list, does NOT delete 'item' + bool addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM, bool requires_column = true ); typedef std::deque<LLScrollListItem *> item_list; item_list& getItemList() { return mItemList; } @@ -454,17 +454,17 @@ protected: void updateLineHeight(); private: - void selectPrevItem(BOOL extend_selection); - void selectNextItem(BOOL extend_selection); + void selectPrevItem(bool extend_selection); + void selectNextItem(bool extend_selection); void drawItems(); void updateLineHeightInsert(LLScrollListItem* item); void reportInvalidInput(); - BOOL isRepeatedChars(const LLWString& string) const; - void selectItem(LLScrollListItem* itemp, S32 cell, BOOL single_select = TRUE); + bool isRepeatedChars(const LLWString& string) const; + void selectItem(LLScrollListItem* itemp, S32 cell, bool single_select = true); void deselectItem(LLScrollListItem* itemp); void commitIfChanged(); - BOOL setSort(S32 column, BOOL ascending); + bool setSort(S32 column, bool ascending); S32 getLinesPerPage(); static void showProfile(std::string id, bool is_group); @@ -508,8 +508,8 @@ private: S32 mColumnPadding; S32 mRowPadding; - BOOL mBackgroundVisible; - BOOL mDrawStripes; + bool mBackgroundVisible; + bool mDrawStripes; LLUIColor mBgWriteableColor; LLUIColor mBgReadOnlyColor; @@ -553,7 +553,7 @@ private: typedef std::vector<LLScrollListColumn*> ordered_columns_t; ordered_columns_t mColumnsIndexed; - typedef std::pair<S32, BOOL> sort_column_t; + typedef std::pair<S32, bool> sort_column_t; std::vector<sort_column_t> mSortColumns; sort_signal_t* mSortCallback; diff --git a/indra/llui/llscrolllistitem.cpp b/indra/llui/llscrolllistitem.cpp index e1360f80cd..6d360a1bd9 100644 --- a/indra/llui/llscrolllistitem.cpp +++ b/indra/llui/llscrolllistitem.cpp @@ -38,8 +38,8 @@ //--------------------------------------------------------------------------- LLScrollListItem::LLScrollListItem( const Params& p ) -: mSelected(FALSE), - mHighlighted(FALSE), +: mSelected(false), + mHighlighted(false), mHoverIndex(-1), mSelectedIndex(-1), mEnabled(p.enabled), @@ -56,13 +56,13 @@ LLScrollListItem::~LLScrollListItem() mColumns.clear(); } -void LLScrollListItem::setSelected(BOOL b) +void LLScrollListItem::setSelected(bool b) { mSelected = b; mSelectedIndex = -1; } -void LLScrollListItem::setHighlighted(BOOL b) +void LLScrollListItem::setHighlighted(bool b) { mHighlighted = b; mHoverIndex = -1; diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h index a3398305b1..a6fa05cd44 100644 --- a/indra/llui/llscrolllistitem.h +++ b/indra/llui/llscrolllistitem.h @@ -79,14 +79,14 @@ public: virtual ~LLScrollListItem(); - void setSelected( BOOL b ); - BOOL getSelected() const { return mSelected; } + void setSelected( bool b ); + bool getSelected() const { return mSelected; } - void setEnabled( BOOL b ) { mEnabled = b; } - BOOL getEnabled() const { return mEnabled; } + void setEnabled( bool b ) { mEnabled = b; } + bool getEnabled() const { return mEnabled; } - void setHighlighted( BOOL b ); - BOOL getHighlighted() const { return mHighlighted; } + void setHighlighted( bool b ); + bool getHighlighted() const { return mHighlighted; } void setSelectedCell( S32 cell ); S32 getSelectedCell() const { return mSelectedIndex; } @@ -127,11 +127,11 @@ protected: LLScrollListItem( const Params& ); private: - BOOL mSelected; - BOOL mHighlighted; + bool mSelected; + bool mHighlighted; S32 mHoverIndex; S32 mSelectedIndex; - BOOL mEnabled; + bool mEnabled; void* mUserdata; LLSD mItemValue; LLSD mItemAltValue; diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index bafeef41fb..78bd06b67e 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -72,7 +72,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this)); mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params); - mSearchEditor->setPassDelete(TRUE); + mSearchEditor->setPassDelete(true); addChild(mSearchEditor); if (p.search_button_visible) @@ -140,13 +140,13 @@ LLSD LLSearchEditor::getValue() const } //virtual -BOOL LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text ) +bool LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text ) { return mSearchEditor->setTextArg(key, text); } //virtual -BOOL LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text ) { return mSearchEditor->setLabelArg(key, text); } @@ -167,7 +167,7 @@ void LLSearchEditor::clear() } //virtual -void LLSearchEditor::setFocus( BOOL b ) +void LLSearchEditor::setFocus( bool b ) { if (mSearchEditor) { diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index c0f3c1d60c..b332967f9b 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -67,7 +67,7 @@ public: {} }; - void setCommitOnFocusLost(BOOL b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); } + void setCommitOnFocusLost(bool b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); } protected: LLSearchEditor(const Params&); @@ -84,11 +84,11 @@ public: // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setTextArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); virtual void setLabel( const LLStringExplicit &new_label ); virtual void clear(); - virtual void setFocus( BOOL b ); + virtual void setFocus( bool b ); void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; } void setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; } diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index e759e7716e..c1c761c8fa 100644 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -93,7 +93,7 @@ LLSlider::~LLSlider() delete mMouseUpSignal; } -void LLSlider::setValue(F32 value, BOOL from_event) +void LLSlider::setValue(F32 value, bool from_event) { value = llclamp( value, mMinValue, mMaxValue ); @@ -256,20 +256,20 @@ bool LLSlider::handleMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLSlider::handleKeyHere(KEY key, MASK mask) +bool LLSlider::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch(key) { case KEY_DOWN: case KEY_LEFT: setValueAndCommit(getValueF32() - getIncrement()); - handled = TRUE; + handled = true; break; case KEY_UP: case KEY_RIGHT: setValueAndCommit(getValueF32() + getIncrement()); - handled = TRUE; + handled = true; break; default: break; diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index ad3df1da82..767fcd3bbd 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -60,9 +60,9 @@ protected: friend class LLUICtrlFactory; public: virtual ~LLSlider(); - void setValue( F32 value, BOOL from_event = FALSE ); + void setValue( F32 value, bool from_event = false ); // overrides for LLF32UICtrl methods - virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } + virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), true); } virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); } @@ -75,7 +75,7 @@ public: virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); @@ -83,7 +83,7 @@ private: void setValueAndCommit(F32 value); void updateThumbRect(); - BOOL mVolumeSlider; + bool mVolumeSlider; S32 mMouseOffset; LLRect mDragStartThumbRect; diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index d80a434f22..2bfb3a624b 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -173,7 +173,7 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onEditorGainFocus, _1, this )); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others - //mEditor->setSelectAllonFocusReceived(TRUE); + //mEditor->setSelectAllonFocusReceived(true); addChild(mEditor); } else @@ -210,16 +210,16 @@ void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata } -void LLSliderCtrl::setValue(F32 v, BOOL from_event) +void LLSliderCtrl::setValue(F32 v, bool from_event) { mSlider->setValue( v, from_event ); mValue = mSlider->getValueF32(); updateText(); } -BOOL LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - BOOL res = FALSE; + bool res = false; if (mLabelBox) { res = mLabelBox->setTextArg(key, text); @@ -319,7 +319,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) if (!self) return; - BOOL success = FALSE; + bool success = false; F32 val = self->mValue; F32 saved_val = self->mValue; @@ -333,7 +333,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) self->setValue( val ); // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) ) { - success = TRUE; + success = true; } } } @@ -362,14 +362,14 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata ) if (!self) return; - BOOL success = FALSE; + bool success = false; F32 saved_val = self->mValue; F32 new_val = self->mSlider->getValueF32(); self->mValue = new_val; // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) ) { - success = TRUE; + success = true; } if( success ) @@ -387,7 +387,7 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata ) self->updateText(); } -void LLSliderCtrl::setEnabled(BOOL b) +void LLSliderCtrl::setEnabled(bool b) { LLView::setEnabled( b ); @@ -410,7 +410,7 @@ void LLSliderCtrl::setEnabled(BOOL b) } -void LLSliderCtrl::setTentative(BOOL b) +void LLSliderCtrl::setTentative(bool b) { if( mEditor ) { @@ -422,11 +422,11 @@ void LLSliderCtrl::setTentative(BOOL b) void LLSliderCtrl::onCommit() { - setTentative(FALSE); + setTentative(false); if( mEditor ) { - mEditor->setTentative(FALSE); + mEditor->setTentative(false); } setControlValue(getValueF32()); @@ -440,7 +440,7 @@ void LLSliderCtrl::setRect(const LLRect& rect) } //virtual -void LLSliderCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLSliderCtrl::reshape(S32 width, S32 height, bool called_from_parent) { LLF32UICtrl::reshape(width, height, called_from_parent); updateSliderRect(); diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 541c167717..810162df16 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -84,17 +84,17 @@ public: virtual ~LLSliderCtrl(); /*virtual*/ F32 getValueF32() const { return mSlider->getValueF32(); } - void setValue(F32 v, BOOL from_event = FALSE); + void setValue(F32 v, bool from_event = false); - /*virtual*/ void setValue(const LLSD& value) { setValue((F32)value.asReal(), TRUE); } + /*virtual*/ void setValue(const LLSD& value) { setValue((F32)value.asReal(), true); } /*virtual*/ LLSD getValue() const { return LLSD(getValueF32()); } - /*virtual*/ BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + /*virtual*/ bool setLabelArg( const std::string& key, const LLStringExplicit& text ); - BOOL isMouseHeldDown() const { return mSlider->hasMouseCapture(); } + bool isMouseHeldDown() const { return mSlider->hasMouseCapture(); } virtual void setPrecision(S32 precision); - /*virtual*/ void setEnabled( BOOL b ); + /*virtual*/ void setEnabled( bool b ); /*virtual*/ void clear(); /*virtual*/ void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } @@ -116,7 +116,7 @@ public: /*virtual*/ void onTabInto(); - /*virtual*/ void setTentative(BOOL b); // marks value as tentative + /*virtual*/ void setTentative(bool b); // marks value as tentative /*virtual*/ void onCommit(); // mark not tentative, then commit /*virtual*/ void setControlName(const std::string& control_name, LLView* context) @@ -126,7 +126,7 @@ public: } /*virtual*/ void setRect(const LLRect& rect); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); static void onSliderCommit(LLUICtrl* caller, const LLSD& userdata); @@ -154,8 +154,8 @@ private: const LLFontGL* mFont; const LLFontGL* mLabelFont; - BOOL mShowText; - BOOL mCanEditText; + bool mShowText; + bool mCanEditText; S32 mPrecision; LLTextBox* mLabelBox; diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 3a3ecb2d85..84ac3a8c0f 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -63,7 +63,7 @@ LLSpinCtrl::Params::Params() LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) : LLF32UICtrl(p), mLabelBox(NULL), - mbHasBeenSet( FALSE ), + mbHasBeenSet( false ), mPrecision(p.decimal_digits), mTextEnabledColor(p.text_enabled_color()), mTextDisabledColor(p.text_disabled_color()) @@ -143,12 +143,12 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) //RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus // than when it doesn't. Instead, if you always have to double click to select all the text, // it's easier to understand - //mEditor->setSelectAllonFocusReceived(TRUE); - mEditor->setSelectAllonCommit(FALSE); + //mEditor->setSelectAllonFocusReceived(true); + mEditor->setSelectAllonCommit(false); addChild(mEditor); updateEditor(); - setUseBoundingRect( TRUE ); + setUseBoundingRect( true ); } F32 clamp_precision(F32 value, S32 decimal_precision) @@ -275,7 +275,7 @@ void LLSpinCtrl::setValue(const LLSD& value ) F32 v = (F32)value.asReal(); if (getValueF32() != v || !mbHasBeenSet) { - mbHasBeenSet = TRUE; + mbHasBeenSet = true; LLF32UICtrl::setValue(value); if (!mEditor->hasFocus()) @@ -291,7 +291,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value ) F32 v = (F32)value.asReal(); if (getValueF32() != v || !mbHasBeenSet) { - mbHasBeenSet = TRUE; + mbHasBeenSet = true; LLF32UICtrl::setValue(value); updateEditor(); @@ -303,7 +303,7 @@ void LLSpinCtrl::clear() { setValue(mMinValue); mEditor->clear(); - mbHasBeenSet = FALSE; + mbHasBeenSet = false; } void LLSpinCtrl::updateLabelColor() @@ -333,7 +333,7 @@ void LLSpinCtrl::updateEditor() void LLSpinCtrl::onEditorCommit( const LLSD& data ) { - BOOL success = FALSE; + bool success = false; if( mEditor->evaluateFloat() ) { @@ -349,7 +349,7 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data ) setValue(val); if( !mValidateSignal || (*mValidateSignal)( this, val ) ) { - success = TRUE; + success = true; onCommit(); } else @@ -378,13 +378,13 @@ void LLSpinCtrl::forceEditorCommit() } -void LLSpinCtrl::setFocus(BOOL b) +void LLSpinCtrl::setFocus(bool b) { LLUICtrl::setFocus( b ); mEditor->setFocus( b ); } -void LLSpinCtrl::setEnabled(BOOL b) +void LLSpinCtrl::setEnabled(bool b) { LLView::setEnabled( b ); mEditor->setEnabled( b ); @@ -392,14 +392,14 @@ void LLSpinCtrl::setEnabled(BOOL b) } -void LLSpinCtrl::setTentative(BOOL b) +void LLSpinCtrl::setTentative(bool b) { mEditor->setTentative(b); LLUICtrl::setTentative(b); } -BOOL LLSpinCtrl::isMouseHeldDown() const +bool LLSpinCtrl::isMouseHeldDown() const { return mDownBtn->hasMouseCapture() @@ -408,7 +408,7 @@ BOOL LLSpinCtrl::isMouseHeldDown() const void LLSpinCtrl::onCommit() { - setTentative(FALSE); + setTentative(false); setControlValue(getValueF32()); LLF32UICtrl::onCommit(); } @@ -439,7 +439,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label) updateLabelColor(); } -void LLSpinCtrl::setAllowEdit(BOOL allow_edit) +void LLSpinCtrl::setAllowEdit(bool allow_edit) { mEditor->setEnabled(allow_edit); mAllowEdit = allow_edit; @@ -475,7 +475,7 @@ bool LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) return true; } -BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) +bool LLSpinCtrl::handleKeyHere(KEY key, MASK mask) { if (mEditor->hasFocus()) { @@ -485,20 +485,20 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) // but not allowing revert on a spinner seems dangerous updateEditor(); mEditor->resetScrollPosition(); - mEditor->setFocus(FALSE); - return TRUE; + mEditor->setFocus(false); + return true; } if(key == KEY_UP) { onUpBtn(getValue()); - return TRUE; + return true; } if(key == KEY_DOWN) { onDownBtn(getValue()); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 8d22693021..046d15eaf7 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -66,12 +66,12 @@ public: F32 get() const { return getValueF32(); } void set(F32 value) { setValue(value); mInitialValue = value; } - BOOL isMouseHeldDown() const; + bool isMouseHeldDown() const; - virtual void setEnabled( BOOL b ); - virtual void setFocus( BOOL b ); + virtual void setEnabled( bool b ); + virtual void setFocus( bool b ); virtual void clear(); - virtual BOOL isDirty() const { return( getValueF32() != mInitialValue ); } + virtual bool isDirty() const { return( getValueF32() != mInitialValue ); } virtual void resetDirty() { mInitialValue = getValueF32(); } virtual void setPrecision(S32 precision); @@ -79,17 +79,17 @@ public: void setLabel(const LLStringExplicit& label); void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); } void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor();} - void setAllowEdit(BOOL allow_edit); + void setAllowEdit(bool allow_edit); virtual void onTabInto(); - virtual void setTentative(BOOL b); // marks value as tentative + virtual void setTentative(bool b); // marks value as tentative virtual void onCommit(); // mark not tentative, then commit void forceEditorCommit(); // for commit on external button virtual bool handleScrollWheel(S32 x,S32 y,S32 clicks); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); @@ -117,8 +117,8 @@ private: class LLButton* mUpBtn; class LLButton* mDownBtn; - BOOL mbHasBeenSet; - BOOL mAllowEdit; + bool mbHasBeenSet; + bool mAllowEdit; }; #endif // LL_LLSPINCTRL_H diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 3fe314e77a..ec014a7419 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -104,14 +104,14 @@ void LLStatGraph::draw() color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); gGL.color4fv(color.mV); - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true); gGL.color4fv(LLColor4::black.mV); - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, FALSE); + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, false); color = it->mColor; gGL.color4fv(color.mV); - gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE); + gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, true); } void LLStatGraph::setMin(const F32 min) diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index ba7cfc5d10..e70c745b3b 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -106,7 +106,7 @@ public: private: LLTrace::StatType<LLTrace::CountAccumulator>* mNewStatFloatp; - BOOL mPerSec; + bool mPerSec; F32 mValue; diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index bb731f4f7e..5b8b9a4e35 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -73,17 +73,17 @@ void LLStyle::setLinkHREF(const std::string& href) mLink = href; } -BOOL LLStyle::isLink() const +bool LLStyle::isLink() const { return mIsLink; } -BOOL LLStyle::isVisible() const +bool LLStyle::isVisible() const { return mVisible; } -void LLStyle::setVisible(BOOL is_visible) +void LLStyle::setVisible(bool is_visible) { mVisible = is_visible; } diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 9f1eba79d8..906df1762a 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -61,8 +61,8 @@ public: const LLUIColor& getSelectedColor() const { return mSelectedColor; } void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; } - BOOL isVisible() const; - void setVisible(BOOL is_visible); + bool isVisible() const; + void setVisible(bool is_visible); LLFontGL::ShadowType getShadowType() const { return mDropShadow; } @@ -71,13 +71,13 @@ public: const std::string& getLinkHREF() const { return mLink; } void setLinkHREF(const std::string& href); - BOOL isLink() const; + bool isLink() const; LLPointer<LLUIImage> getImage() const; void setImage(const LLUUID& src); void setImage(const std::string& name); - BOOL isImage() const { return mImagep.notNull(); } + bool isImage() const { return mImagep.notNull(); } bool operator==(const LLStyle &rhs) const { @@ -101,7 +101,7 @@ protected: ~LLStyle() { } private: - BOOL mVisible; + bool mVisible; LLUIColor mColor; LLUIColor mReadOnlyColor; LLUIColor mSelectedColor; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 512b2a9a30..1328510a07 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -75,7 +75,7 @@ public: mTabContainer(c), mTabPanel(p), mButton(b), - mOldState(FALSE), + mOldState(false), mPlaceholderText(placeholder), mPadding(0), mVisible(true) @@ -84,7 +84,7 @@ public: LLTabContainer* mTabContainer; LLPanel* mTabPanel; LLButton* mButton; - BOOL mOldState; + bool mOldState; LLTextBox* mPlaceholderText; S32 mPadding; @@ -232,7 +232,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) : LLPanel(p), mCurrentTabIdx(-1), mTabsHidden(p.hide_tabs), - mScrolled(FALSE), + mScrolled(false), mScrollPos(0), mScrollPosPixels(0), mMaxScrollPos(0), @@ -306,14 +306,14 @@ void LLTabContainer::setValue(const LLSD& value) } //virtual -void LLTabContainer::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLTabContainer::reshape(S32 width, S32 height, bool called_from_parent) { LLPanel::reshape( width, height, called_from_parent ); updateMaxScrollPos(); } //virtual -LLView* LLTabContainer::getChildView(const std::string& name, BOOL recurse) const +LLView* LLTabContainer::getChildView(const std::string& name, bool recurse) const { tuple_list_t::const_iterator itor; for (itor = mTabList.begin(); itor != mTabList.end(); ++itor) @@ -341,7 +341,7 @@ LLView* LLTabContainer::getChildView(const std::string& name, BOOL recurse) cons } //virtual -LLView* LLTabContainer::findChildView(const std::string& name, BOOL recurse) const +LLView* LLTabContainer::findChildView(const std::string& name, bool recurse) const { tuple_list_t::const_iterator itor; for (itor = mTabList.begin(); itor != mTabList.end(); ++itor) @@ -383,11 +383,11 @@ bool LLTabContainer::addChild(LLView* view, S32 tab_group) } } -BOOL LLTabContainer::postBuild() +bool LLTabContainer::postBuild() { selectFirstTab(); - return TRUE; + return true; } // virtual @@ -431,7 +431,7 @@ void LLTabContainer::draw() setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLSmoothInterpolation::getInterpolant(0.08f))); - BOOL has_scroll_arrows = !mHideScrollArrows && !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); + bool has_scroll_arrows = !mHideScrollArrows && !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); if (!mIsVertical) { mJumpPrevArrowBtn->setVisible( has_scroll_arrows ); @@ -459,7 +459,7 @@ void LLTabContainer::draw() for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( FALSE ); + tuple->mButton->setVisible( false ); } } @@ -478,7 +478,7 @@ void LLTabContainer::draw() for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( TRUE ); + tuple->mButton->setVisible( true ); } S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos(); @@ -504,14 +504,14 @@ void LLTabContainer::draw() { if( tuple->mButton->getFlashing() ) { - mPrevArrowBtn->setFlashing( TRUE ); + mPrevArrowBtn->setFlashing( true ); } } else if( max_scroll_visible < idx ) { if( tuple->mButton->getFlashing() ) { - mNextArrowBtn->setFlashing( TRUE ); + mNextArrowBtn->setFlashing( true ); } } } @@ -604,7 +604,7 @@ bool LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) index = llclamp(index, 0, tab_count-1); LLButton* tab_button = getTab(index)->mButton; gFocusMgr.setMouseCapture(this); - tab_button->setFocus(TRUE); + tab_button->setFocus(true); mMouseDownTimer.start(); } } @@ -772,25 +772,25 @@ bool LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask) } // virtual -BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) +bool LLTabContainer::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; if (key == KEY_LEFT && mask == MASK_ALT) { selectPrevTab(); - handled = TRUE; + handled = true; } else if (key == KEY_RIGHT && mask == MASK_ALT) { selectNextTab(); - handled = TRUE; + handled = true; } if (handled) { if (getCurrentPanel()) { - getCurrentPanel()->setFocus(TRUE); + getCurrentPanel()->setFocus(true); } } @@ -803,21 +803,21 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) { case KEY_UP: selectPrevTab(); - handled = TRUE; + handled = true; break; case KEY_DOWN: selectNextTab(); - handled = TRUE; + handled = true; break; case KEY_LEFT: - handled = TRUE; + handled = true; break; case KEY_RIGHT: if (getTabPosition() == LEFT && getCurrentPanel()) { - getCurrentPanel()->setFocus(TRUE); + getCurrentPanel()->setFocus(true); } - handled = TRUE; + handled = true; break; default: break; @@ -830,24 +830,24 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) case KEY_UP: if (getTabPosition() == BOTTOM && getCurrentPanel()) { - getCurrentPanel()->setFocus(TRUE); + getCurrentPanel()->setFocus(true); } - handled = TRUE; + handled = true; break; case KEY_DOWN: if (getTabPosition() == TOP && getCurrentPanel()) { - getCurrentPanel()->setFocus(TRUE); + getCurrentPanel()->setFocus(true); } - handled = TRUE; + handled = true; break; case KEY_LEFT: selectPrevTab(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: selectNextTab(); - handled = TRUE; + handled = true; break; default: break; @@ -858,9 +858,9 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) } // virtual -BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string &tooltip) +bool LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string &tooltip) { - BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); + bool has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); if(mOpenTabsOnDragAndDrop && !getTabsHidden()) { @@ -901,7 +901,7 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( TRUE ); + tuple->mButton->setVisible( true ); S32 local_x = x - tuple->mButton->getRect().mLeft; S32 local_y = y - tuple->mButton->getRect().mBottom; if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible()) @@ -964,9 +964,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) const std::string& label = panel.label.isProvided() ? panel.label() : panel.panel()->getLabel(); - BOOL select = panel.select_tab(); + bool select = panel.select_tab(); S32 indent = panel.indent(); - BOOL placeholder = panel.is_placeholder; + bool placeholder = panel.is_placeholder; eInsertionPoint insertion_point = panel.insert_at(); static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0); @@ -1030,10 +1030,10 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } child->setFollowsAll(); child->translate( tab_panel_rect.mLeft - child->getRect().mLeft, tab_panel_rect.mBottom - child->getRect().mBottom); - child->reshape( tab_panel_rect.getWidth(), tab_panel_rect.getHeight(), TRUE ); + child->reshape( tab_panel_rect.getWidth(), tab_panel_rect.getHeight(), true ); // add this child later - child->setVisible( FALSE ); // Will be made visible when selected + child->setVisible( false ); // Will be made visible when selected mTotalTabWidth += button_width; @@ -1255,7 +1255,7 @@ void LLTabContainer::removeTabPanel(LLPanel* child) } } - BOOL has_focus = gFocusMgr.childHasKeyboardFocus(this); + bool has_focus = gFocusMgr.childHasKeyboardFocus(this); // If the tab being deleted is the selected one, select a different tab. for(std::vector<LLTabTuple*>::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) @@ -1305,7 +1305,7 @@ void LLTabContainer::removeTabPanel(LLPanel* child) LLPanel* panelp = getPanelByIndex(mCurrentTabIdx); if (panelp) { - panelp->setFocus(TRUE); + panelp->setFocus(true); } } @@ -1324,7 +1324,7 @@ void LLTabContainer::unlockTabs() mLockedTabCount = 0; } -void LLTabContainer::enableTabButton(S32 which, BOOL enable) +void LLTabContainer::enableTabButton(S32 which, bool enable) { if (which >= 0 && which < (S32)mTabList.size()) { @@ -1453,10 +1453,10 @@ void LLTabContainer::selectNextTab() return; } - BOOL tab_has_focus = FALSE; + bool tab_has_focus = false; if (mCurrentTabIdx >= 0 && mTabList[mCurrentTabIdx]->mButton->hasFocus()) { - tab_has_focus = TRUE; + tab_has_focus = true; } S32 idx = mCurrentTabIdx+1; if (idx >= (S32)mTabList.size()) @@ -1468,16 +1468,16 @@ void LLTabContainer::selectNextTab() if (tab_has_focus) { - mTabList[idx]->mButton->setFocus(TRUE); + mTabList[idx]->mButton->setFocus(true); } } void LLTabContainer::selectPrevTab() { - BOOL tab_has_focus = FALSE; + bool tab_has_focus = false; if (mCurrentTabIdx >= 0 && mTabList[mCurrentTabIdx]->mButton->hasFocus()) { - tab_has_focus = TRUE; + tab_has_focus = true; } S32 idx = mCurrentTabIdx-1; if (idx < 0) @@ -1490,11 +1490,11 @@ void LLTabContainer::selectPrevTab() } if (tab_has_focus) { - mTabList[idx]->mButton->setFocus(TRUE); + mTabList[idx]->mButton->setFocus(true); } } -BOOL LLTabContainer::selectTabPanel(LLPanel* child) +bool LLTabContainer::selectTabPanel(LLPanel* child) { S32 idx = 0; for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) @@ -1506,25 +1506,25 @@ BOOL LLTabContainer::selectTabPanel(LLPanel* child) } idx++; } - return FALSE; + return false; } -BOOL LLTabContainer::selectTab(S32 which) +bool LLTabContainer::selectTab(S32 which) { if (which >= getTabCount() || which < 0) - return FALSE; + return false; LLTabTuple* selected_tuple = getTab(which); if (!selected_tuple) { - return FALSE; + return false; } LLSD cbdata; if (selected_tuple->mTabPanel) cbdata = selected_tuple->mTabPanel->getName(); - BOOL res = FALSE; + bool res = false; if( !mValidateSignal || (*mValidateSignal)( this, cbdata ) ) { res = setTab(which); @@ -1538,16 +1538,16 @@ BOOL LLTabContainer::selectTab(S32 which) } // private -BOOL LLTabContainer::setTab(S32 which) +bool LLTabContainer::setTab(S32 which) { static LLUICachedControl<S32> tabcntr_arrow_btn_size ("UITabCntrArrowBtnSize", 0); LLTabTuple* selected_tuple = getTab(which); if (!selected_tuple) { - return FALSE; + return false; } - BOOL is_visible = FALSE; + bool is_visible = false; if( selected_tuple->mButton->getEnabled() && selected_tuple->mVisible ) { setCurrentPanelIndex(which); @@ -1556,7 +1556,7 @@ BOOL LLTabContainer::setTab(S32 which) for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - BOOL is_selected = ( tuple == selected_tuple ); + bool is_selected = ( tuple == selected_tuple ); // Although the selected tab must be complete, we may have hollow LLTabTuple tucked in the list if (tuple && tuple->mButton) { @@ -1583,11 +1583,11 @@ BOOL LLTabContainer::setTab(S32 which) if( i >= getScrollPos() && i <= getScrollPos() + num_visible) { setCurrentPanelIndex(which); - is_visible = TRUE; + is_visible = true; } else { - is_visible = FALSE; + is_visible = false; } } else if (!mHideScrollArrows && getMaxScrollPos() > 0) @@ -1619,11 +1619,11 @@ BOOL LLTabContainer::setTab(S32 which) setScrollPos(llclamp(getScrollPos(), min_scroll_pos, i)); setScrollPos(llmin(getScrollPos(), getMaxScrollPos())); } - is_visible = TRUE; + is_visible = true; } else { - is_visible = TRUE; + is_visible = true; } } i++; @@ -1632,36 +1632,36 @@ BOOL LLTabContainer::setTab(S32 which) if (mIsVertical && getCurrentPanelIndex() >= 0) { LLTabTuple* tuple = getTab(getCurrentPanelIndex()); - tuple->mTabPanel->setVisible( TRUE ); - tuple->mButton->setToggleState( TRUE ); + tuple->mTabPanel->setVisible( true ); + tuple->mButton->setToggleState( true ); } return is_visible; } -BOOL LLTabContainer::selectTabByName(const std::string& name) +bool LLTabContainer::selectTabByName(const std::string& name) { LLPanel* panel = getPanelByName(name); if (!panel) { LL_WARNS() << "LLTabContainer::selectTabByName(" << name << ") failed" << LL_ENDL; - return FALSE; + return false; } - BOOL result = selectTabPanel(panel); + bool result = selectTabPanel(panel); return result; } -BOOL LLTabContainer::getTabPanelFlashing(LLPanel *child) +bool LLTabContainer::getTabPanelFlashing(LLPanel *child) { LLTabTuple* tuple = getTabByPanel(child); if( tuple ) { return tuple->mButton->getFlashing(); } - return FALSE; + return false; } -void LLTabContainer::setTabPanelFlashing(LLPanel* child, BOOL state ) +void LLTabContainer::setTabPanelFlashing(LLPanel* child, bool state ) { LLTabTuple* tuple = getTabByPanel(child); if( tuple ) @@ -1811,7 +1811,7 @@ void LLTabContainer::onTabBtn( const LLSD& data, LLPanel* panel ) if (tuple) { - tuple->mTabPanel->setFocus(TRUE); + tuple->mTabPanel->setFocus(true); } } @@ -1821,7 +1821,7 @@ void LLTabContainer::onNextBtn( const LLSD& data ) { scrollNext(); } - mScrolled = FALSE; + mScrolled = false; if(mCurrentTabIdx < mTabList.size()-1) { @@ -1840,7 +1840,7 @@ void LLTabContainer::onNextBtnHeld( const LLSD& data ) { selectNextTab(); } - mScrolled = TRUE; + mScrolled = true; } } @@ -1850,7 +1850,7 @@ void LLTabContainer::onPrevBtn( const LLSD& data ) { scrollPrev(); } - mScrolled = FALSE; + mScrolled = false; if(mCurrentTabIdx > 0) { @@ -1879,7 +1879,7 @@ void LLTabContainer::onPrevBtnHeld( const LLSD& data ) { selectPrevTab(); } - mScrolled = TRUE; + mScrolled = true; } } @@ -2009,21 +2009,21 @@ void LLTabContainer::initButtons() } } - mPrevArrowBtn->setTabStop(FALSE); + mPrevArrowBtn->setTabStop(false); addChild(mPrevArrowBtn); - mNextArrowBtn->setTabStop(FALSE); + mNextArrowBtn->setTabStop(false); addChild(mNextArrowBtn); if (mJumpPrevArrowBtn) { - mJumpPrevArrowBtn->setTabStop(FALSE); + mJumpPrevArrowBtn->setTabStop(false); addChild(mJumpPrevArrowBtn); } if (mJumpNextArrowBtn) { - mJumpNextArrowBtn->setTabStop(FALSE); + mJumpNextArrowBtn->setTabStop(false); addChild(mJumpNextArrowBtn); } @@ -2088,7 +2088,7 @@ void LLTabContainer::insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_p void LLTabContainer::updateMaxScrollPos() { static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0); - BOOL no_scroll = TRUE; + bool no_scroll = true; if (mIsVertical) { S32 tab_total_height = (BTN_HEIGHT + tabcntrv_pad) * getTabCount(); @@ -2099,7 +2099,7 @@ void LLTabContainer::updateMaxScrollPos() S32 available_height_with_arrows = getRect().getHeight() - 2*(tabcntrv_arrow_btn_size + 3*tabcntrv_pad) - mNextArrowBtn->getRect().mBottom; S32 additional_needed = tab_total_height - available_height_with_arrows; setMaxScrollPos((S32) ceil(additional_needed / float(BTN_HEIGHT + tabcntrv_pad) ) ); - no_scroll = FALSE; + no_scroll = false; } } else @@ -2131,7 +2131,7 @@ void LLTabContainer::updateMaxScrollPos() } // in case last tab doesn't actually fit on screen, make it the last scrolling position setMaxScrollPos(llmin(getMaxScrollPos(), getTabCount() - 1)); - no_scroll = FALSE; + no_scroll = false; } } if (no_scroll) @@ -2197,9 +2197,9 @@ void LLTabContainer::setTabVisibility( LLPanel const *aPanel, bool aVisible ) } if( foundTab ) - this->setVisible( TRUE ); + this->setVisible( true ); else - this->setVisible( FALSE ); + this->setVisible( false ); updateMaxScrollPos(); } diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 1615d72758..d5fee27406 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -130,28 +130,28 @@ protected: public: //LLTabContainer( const std::string& name, const LLRect& rect, TabPosition pos, - // BOOL bordered, BOOL is_vertical); + // bool bordered, bool is_vertical); /*virtual*/ ~LLTabContainer(); // from LLView /*virtual*/ void setValue(const LLSD& value); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleMouseUp( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType type, void* cargo_data, EAcceptance* accept, std::string& tooltip); - /*virtual*/ LLView* getChildView(const std::string& name, BOOL recurse = TRUE) const; - /*virtual*/ LLView* findChildView(const std::string& name, BOOL recurse = TRUE) const; + /*virtual*/ LLView* getChildView(const std::string& name, bool recurse = true) const; + /*virtual*/ LLView* findChildView(const std::string& name, bool recurse = true) const; /*virtual*/ void initFromParams(const LLPanel::Params& p); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); struct TabPanelParams : public LLInitParam::Block<TabPanelParams> { @@ -181,7 +181,7 @@ public: void lockTabs(S32 num_tabs = 0); void unlockTabs(); S32 getNumLockedTabs() { return mLockedTabCount; } - void enableTabButton(S32 which, BOOL enable); + void enableTabButton(S32 which, bool enable); void deleteAllTabs(); LLPanel* getCurrentPanel(); S32 getCurrentPanelIndex(); @@ -197,13 +197,13 @@ public: void selectLastTab(); void selectNextTab(); void selectPrevTab(); - BOOL selectTabPanel( LLPanel* child ); - BOOL selectTab(S32 which); - BOOL selectTabByName(const std::string& title); + bool selectTabPanel( LLPanel* child ); + bool selectTab(S32 which); + bool selectTabByName(const std::string& title); void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } - BOOL getTabPanelFlashing(LLPanel* child); - void setTabPanelFlashing(LLPanel* child, BOOL state); + bool getTabPanelFlashing(LLPanel* child); + void setTabPanelFlashing(LLPanel* child, bool state); void setTabImage(LLPanel* child, std::string img_name, const LLColor4& color = LLColor4::white); void setTabImage(LLPanel* child, const LLUUID& img_id, const LLColor4& color = LLColor4::white); void setTabImage(LLPanel* child, LLIconCtrl* icon); @@ -238,7 +238,7 @@ private: void initButtons(); - BOOL setTab(S32 which); + bool setTab(S32 which); LLTabTuple* getTab(S32 index) { return mTabList[index]; } LLTabTuple* getTabByPanel(LLPanel* child); @@ -251,8 +251,8 @@ private: S32 getScrollPosPixels() const { return mScrollPosPixels; } void setScrollPosPixels(S32 pixels) { mScrollPosPixels = pixels; } - void setTabsHidden(BOOL hidden) { mTabsHidden = hidden; } - BOOL getTabsHidden() const { return mTabsHidden; } + void setTabsHidden(bool hidden) { mTabsHidden = hidden; } + bool getTabsHidden() const { return mTabsHidden; } void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap @@ -270,10 +270,10 @@ private: tuple_list_t mTabList; S32 mCurrentTabIdx; - BOOL mTabsHidden; - BOOL mHideScrollArrows; + bool mTabsHidden; + bool mHideScrollArrows; - BOOL mScrolled; + bool mScrolled; LLFrameTimer mScrollTimer; S32 mScrollPos; S32 mScrollPosPixels; @@ -288,7 +288,7 @@ private: LLButton* mPrevArrowBtn; LLButton* mNextArrowBtn; - BOOL mIsVertical; + bool mIsVertical; // Horizontal specific LLButton* mJumpPrevArrowBtn; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index d53e7154ba..65c57fc764 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -202,7 +202,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mSelectedBGColor(p.bg_selected_color), mReflowIndex(S32_MAX), mCursorPos( 0 ), - mScrollNeeded(FALSE), + mScrollNeeded(false), mDesiredXPixel(-1), mHPad(p.h_pad), mVPad(p.v_pad), @@ -218,7 +218,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mScrollIndex(-1), mSelectionStart( 0 ), mSelectionEnd( 0 ), - mIsSelecting( FALSE ), + mIsSelecting( false ), mPlainText ( p.plain_text ), mWordWrap(p.wrap), mUseEllipses( p.use_ellipses ), @@ -301,7 +301,7 @@ void LLTextBase::initFromParams(const LLTextBase::Params& p) bool LLTextBase::truncate() { - BOOL did_truncate = FALSE; + bool did_truncate = false; // First rough check - if we're less than 1/4th the size, we're OK if (getLength() >= S32(mMaxTextByteLength / 4)) @@ -328,7 +328,7 @@ bool LLTextBase::truncate() LLWString text = utf8str_to_wstring( temp_utf8_text ); // remove extra bit of current string, to preserve formatting, etc. removeStringNoUndo(text.size(), getWText().size() - text.size()); - did_truncate = TRUE; + did_truncate = true; } } @@ -1249,7 +1249,7 @@ bool LLTextBase::handleToolTip(S32 x, S32 y, MASK mask) } -void LLTextBase::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLTextBase::reshape(S32 width, S32 height, bool called_from_parent) { if (width != getRect().getWidth() || height != getRect().getHeight() || LLView::sForceReshape) { @@ -1324,7 +1324,7 @@ void LLTextBase::draw() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(text_rect, bg_color % alpha, TRUE); + gl_rect_2d(text_rect, bg_color % alpha, true); } // Draw highlighted if needed @@ -1335,7 +1335,7 @@ void LLTextBase::draw() if( mScroller ) bg_rect.intersectWith( text_rect ); - gl_rect_2d( text_rect, bg_color, TRUE ); + gl_rect_2d( text_rect, bg_color, true ); } bool should_clip = mClip || mScroller != NULL; @@ -1356,9 +1356,9 @@ void LLTextBase::draw() drawCursor(); } - mDocumentView->setVisibleDirect(FALSE); + mDocumentView->setVisibleDirect(false); LLUICtrl::draw(); - mDocumentView->setVisibleDirect(TRUE); + mDocumentView->setVisibleDirect(true); } @@ -1377,7 +1377,7 @@ void LLTextBase::setReadOnlyColor(const LLColor4 &c) } //virtual -void LLTextBase::onVisibilityChange( BOOL new_visibility ) +void LLTextBase::onVisibilityChange( bool new_visibility ) { LLContextMenu* menu = static_cast<LLContextMenu*>(mPopupMenuHandle.get()); if(!new_visibility && menu) @@ -1394,7 +1394,7 @@ void LLTextBase::setValue(const LLSD& value ) } //virtual -BOOL LLTextBase::canDeselect() const +bool LLTextBase::canDeselect() const { return hasSelection(); } @@ -1405,7 +1405,7 @@ void LLTextBase::deselect() { mSelectionStart = 0; mSelectionEnd = 0; - mIsSelecting = FALSE; + mIsSelecting = false; } bool LLTextBase::getSpellCheck() const @@ -1533,7 +1533,7 @@ void LLTextBase::updateScrollFromCursor() { return; } - mScrollNeeded = FALSE; + mScrollNeeded = false; // scroll so that the cursor is at the top of the page LLRect scroller_doc_window = getVisibleDocumentRect(); @@ -2038,7 +2038,7 @@ LLTextBase::segment_set_t::const_iterator LLTextBase::getSegIterContaining(S32 i LLTextSegmentPtr LLTextBase::getSegmentAtLocalPos( S32 x, S32 y, bool hit_past_end_of_line) { // Find the cursor position at the requested local screen position - S32 offset = getDocIndexFromLocalCoord( x, y, FALSE, hit_past_end_of_line); + S32 offset = getDocIndexFromLocalCoord( x, y, false, hit_past_end_of_line); segment_set_t::iterator seg_iter = getSegIterContaining(offset); if (seg_iter != mSegments.end()) { @@ -2295,10 +2295,10 @@ void LLTextBase::setLabel(const LLStringExplicit& label) resetLabel(); } -BOOL LLTextBase::setLabelArg(const std::string& key, const LLStringExplicit& text ) +bool LLTextBase::setLabelArg(const std::string& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); - return TRUE; + return true; } void LLTextBase::resetLabel() @@ -2381,10 +2381,10 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig // Save old state S32 selection_start = mSelectionStart; S32 selection_end = mSelectionEnd; - BOOL was_selecting = mIsSelecting; + bool was_selecting = mIsSelecting; S32 cursor_pos = mCursorPos; S32 old_length = getLength(); - BOOL cursor_was_at_end = (mCursorPos == old_length); + bool cursor_was_at_end = (mCursorPos == old_length); deselect(); @@ -2566,7 +2566,7 @@ const LLWString& LLTextBase::getWText() const // will be put to its right. If round is false, the cursor will always be put to the // character's left. -S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line) const +S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round, bool hit_past_end_of_line) const { // Figure out which line we're nearest to. LLRect doc_rect = mDocumentView->getRect(); @@ -2846,7 +2846,7 @@ void LLTextBase::changeLine( S32 delta ) { LLRect visible_region = getVisibleDocumentRect(); S32 new_cursor_pos = getDocIndexFromLocalCoord(mDesiredXPixel, - mLineInfoList[new_line].mRect.mBottom + mVisibleTextRect.mBottom - visible_region.mBottom, TRUE); + mLineInfoList[new_line].mRect.mBottom + mVisibleTextRect.mBottom - visible_region.mBottom, true); S32 actual_line = getLineNumFromDocIndex(new_cursor_pos); if (actual_line != new_line) { @@ -3109,7 +3109,7 @@ void LLTextBase::startSelection() { if( !mIsSelecting ) { - mIsSelecting = TRUE; + mIsSelecting = true; mSelectionStart = mCursorPos; mSelectionEnd = mCursorPos; } @@ -3119,7 +3119,7 @@ void LLTextBase::endSelection() { if( mIsSelecting ) { - mIsSelecting = FALSE; + mIsSelecting = false; mSelectionEnd = mCursorPos; } } @@ -3267,7 +3267,7 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e } } -LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible) +LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible) : LLTextSegment(start, end), mToken(NULL), mEditor(editor) @@ -3574,7 +3574,7 @@ LLLabelTextSegment::LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end { } -LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible) +LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible) : LLNormalTextSegment(color, start, end, editor, is_visible) { } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 1dd91eef32..236f97c4d0 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -125,7 +125,7 @@ class LLNormalTextSegment : public LLTextSegment { public: LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor ); - LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); + LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true); virtual ~LLNormalTextSegment(); /*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const; @@ -138,7 +138,7 @@ public: /*virtual*/ void setStyle(LLStyleConstSP style) { mStyle = style; } /*virtual*/ void setToken( LLKeywordToken* token ) { mToken = token; } /*virtual*/ LLKeywordToken* getToken() const { return mToken; } - /*virtual*/ BOOL getToolTip( std::string& msg ) const; + /*virtual*/ bool getToolTip( std::string& msg ) const; /*virtual*/ void setToolTip(const std::string& tooltip); /*virtual*/ void dump() const; @@ -170,7 +170,7 @@ class LLLabelTextSegment : public LLNormalTextSegment { public: LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor ); - LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); + LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true); protected: @@ -351,20 +351,20 @@ public: /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); // LLView interface - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); // LLUICtrl interface - /*virtual*/ BOOL acceptsTextInput() const { return !mReadOnly; } + /*virtual*/ bool acceptsTextInput() const { return !mReadOnly; } /*virtual*/ void setColor( const LLColor4& c ); virtual void setReadOnlyColor(const LLColor4 &c); - virtual void onVisibilityChange( BOOL new_visibility ); + virtual void onVisibilityChange( bool new_visibility ); /*virtual*/ void setValue(const LLSD& value ); /*virtual*/ LLTextViewModel* getViewModel() const; // LLEditMenuHandler interface - /*virtual*/ BOOL canDeselect() const; + /*virtual*/ bool canDeselect() const; /*virtual*/ void deselect(); virtual void onFocusReceived(); @@ -416,7 +416,7 @@ public: void appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params()); void setLabel(const LLStringExplicit& label); - virtual BOOL setLabelArg(const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg(const std::string& key, const LLStringExplicit& text ); const std::string& getLabel() { return mLabel.getString(); } const LLWString& getWlabel() { return mLabel.getWString();} @@ -450,7 +450,7 @@ public: F32 getLineSpacingMult() { return mLineSpacingMult; } S32 getLineSpacingPixels() { return mLineSpacingPixels; } // only for multiline - S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line = true) const; + S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round, bool hit_past_end_of_line = true) const; LLRect getLocalRectFromDocIndex(S32 pos) const; LLRect getDocRectFromDocIndex(S32 pos) const; @@ -525,7 +525,7 @@ protected: class TextCmd { public: - TextCmd( S32 pos, BOOL group_with_next, LLTextSegmentPtr segment = LLTextSegmentPtr() ) + TextCmd( S32 pos, bool group_with_next, LLTextSegmentPtr segment = LLTextSegmentPtr() ) : mPos(pos), mGroupWithNext(group_with_next) { @@ -535,13 +535,13 @@ protected: } } virtual ~TextCmd() {} - virtual BOOL execute(LLTextBase* editor, S32* delta) = 0; + virtual bool execute(LLTextBase* editor, S32* delta) = 0; virtual S32 undo(LLTextBase* editor) = 0; virtual S32 redo(LLTextBase* editor) = 0; - virtual BOOL canExtend(S32 pos) const { return FALSE; } + virtual bool canExtend(S32 pos) const { return false; } virtual void blockExtensions() {} - virtual BOOL extendAndExecute( LLTextBase* editor, S32 pos, llwchar c, S32* delta ) { llassert(0); return 0; } - virtual BOOL hasExtCharValue( llwchar value ) const { return FALSE; } + virtual bool extendAndExecute( LLTextBase* editor, S32 pos, llwchar c, S32* delta ) { llassert(0); return 0; } + virtual bool hasExtCharValue( llwchar value ) const { return false; } // Defined here so they can access protected LLTextEditor editing methods S32 insert(LLTextBase* editor, S32 pos, const LLWString &wstr) { return editor->insertStringNoUndo( pos, wstr, &mSegments ); } @@ -549,11 +549,11 @@ protected: S32 overwrite(LLTextBase* editor, S32 pos, llwchar wc) { return editor->overwriteCharNoUndo(pos, wc); } S32 getPosition() const { return mPos; } - BOOL groupWithNext() const { return mGroupWithNext; } + bool groupWithNext() const { return mGroupWithNext; } protected: const S32 mPos; - BOOL mGroupWithNext; + bool mGroupWithNext; segment_vec_t mSegments; }; @@ -621,7 +621,7 @@ protected: // misc void updateRects(); - void needsScroll() { mScrollNeeded = TRUE; } + void needsScroll() { mScrollNeeded = true; } struct URLLabelCallback; // Replace a URL with a new icon and label, for example, when @@ -674,7 +674,7 @@ protected: S32 mSelectionEnd; LLTimer mTripleClickTimer; - BOOL mIsSelecting; // Are we in the middle of a drag-select? + bool mIsSelecting; // Are we in the middle of a drag-select? // spell checking bool mSpellCheck; diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 739b46bb07..f143d619c5 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -39,7 +39,7 @@ static LLDefaultChildRegistry::Register<LLTextBox> r("text"); // Compiler optimization, generate extern template template class LLTextBox* LLView::getChild<class LLTextBox>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; LLTextBox::LLTextBox(const LLTextBox::Params& p) : LLTextBase(p), @@ -115,7 +115,7 @@ bool LLTextBox::handleHover(S32 x, S32 y, MASK mask) return handled; } -void LLTextBox::setEnabled(BOOL enabled) +void LLTextBox::setEnabled(bool enabled) { // just treat enabled as read-only flag bool read_only = !enabled; @@ -156,16 +156,16 @@ LLSD LLTextBox::getValue() const return getViewModel()->getValue(); } -BOOL LLTextBox::setTextArg( const std::string& key, const LLStringExplicit& text ) +bool LLTextBox::setTextArg( const std::string& key, const LLStringExplicit& text ) { mText.setArg(key, text); LLTextBase::setText(mText.getString()); - return TRUE; + return true; } -void LLTextBox::reshapeToFitText(BOOL called_from_parent) +void LLTextBox::reshapeToFitText(bool called_from_parent) { reflow(); diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index bf0348723b..39016e2f4e 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -52,7 +52,7 @@ public: /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setEnabled(bool enabled); /*virtual*/ void setText( const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params() ); @@ -60,13 +60,13 @@ public: void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } void setClickedCallback( boost::function<void (void*)> cb, void* userdata = NULL ); - void reshapeToFitText(BOOL called_from_parent = FALSE); + void reshapeToFitText(bool called_from_parent = false); S32 getTextPixelWidth(); S32 getTextPixelHeight(); /*virtual*/ LLSD getValue() const; - /*virtual*/ BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); + /*virtual*/ bool setTextArg( const std::string& key, const LLStringExplicit& text ); void setShowCursorHand(bool show_cursor) { mShowCursorHand = show_cursor; } @@ -81,7 +81,7 @@ protected: // Build time optimization, generate once in .cpp file #ifndef LLTEXTBOX_CPP extern template class LLTextBox* LLView::getChild<class LLTextBox>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index eabeeddcd4..2250ed5cb3 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -70,7 +70,7 @@ static LLDefaultChildRegistry::Register<LLTextEditor> r("simple_text_editor"); // Compiler optimization, generate extern template template class LLTextEditor* LLView::getChild<class LLTextEditor>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; // // Constants @@ -83,12 +83,12 @@ const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and spell class LLTextEditor::TextCmdInsert : public LLTextBase::TextCmd { public: - TextCmdInsert(S32 pos, BOOL group_with_next, const LLWString &ws, LLTextSegmentPtr segment) + TextCmdInsert(S32 pos, bool group_with_next, const LLWString &ws, LLTextSegmentPtr segment) : TextCmd(pos, group_with_next, segment), mWString(ws) { } virtual ~TextCmdInsert() {} - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { *delta = insert(editor, getPosition(), mWString ); LLWStringUtil::truncate(mWString, *delta); @@ -114,29 +114,29 @@ private: class LLTextEditor::TextCmdAddChar : public LLTextBase::TextCmd { public: - TextCmdAddChar( S32 pos, BOOL group_with_next, llwchar wc, LLTextSegmentPtr segment) - : TextCmd(pos, group_with_next, segment), mWString(1, wc), mBlockExtensions(FALSE) + TextCmdAddChar( S32 pos, bool group_with_next, llwchar wc, LLTextSegmentPtr segment) + : TextCmd(pos, group_with_next, segment), mWString(1, wc), mBlockExtensions(false) { } virtual void blockExtensions() { - mBlockExtensions = TRUE; + mBlockExtensions = true; } - virtual BOOL canExtend(S32 pos) const + virtual bool canExtend(S32 pos) const { // cannot extend text with custom segments - if (!mSegments.empty()) return FALSE; + if (!mSegments.empty()) return false; return !mBlockExtensions && (pos == getPosition() + (S32)mWString.length()); } - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { *delta = insert(editor, getPosition(), mWString); LLWStringUtil::truncate(mWString, *delta); //mWString = wstring_truncate(mWString, *delta); return (*delta != 0); } - virtual BOOL extendAndExecute( LLTextBase* editor, S32 pos, llwchar wc, S32* delta ) + virtual bool extendAndExecute( LLTextBase* editor, S32 pos, llwchar wc, S32* delta ) { LLWString ws; ws += wc; @@ -161,7 +161,7 @@ public: private: LLWString mWString; - BOOL mBlockExtensions; + bool mBlockExtensions; }; @@ -170,15 +170,15 @@ private: class LLTextEditor::TextCmdOverwriteChar : public LLTextBase::TextCmd { public: - TextCmdOverwriteChar( S32 pos, BOOL group_with_next, llwchar wc) + TextCmdOverwriteChar( S32 pos, bool group_with_next, llwchar wc) : TextCmd(pos, group_with_next), mChar(wc), mOldChar(0) {} - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { mOldChar = editor->getWText()[getPosition()]; overwrite(editor, getPosition(), mChar); *delta = 0; - return TRUE; + return true; } virtual S32 undo( LLTextBase* editor ) { @@ -201,12 +201,12 @@ private: class LLTextEditor::TextCmdRemove : public LLTextBase::TextCmd { public: - TextCmdRemove( S32 pos, BOOL group_with_next, S32 len, segment_vec_t& segments ) : + TextCmdRemove( S32 pos, bool group_with_next, S32 len, segment_vec_t& segments ) : TextCmd(pos, group_with_next), mLen(len) { std::swap(mSegments, segments); } - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { mWString = editor->getWText().substr(getPosition(), mLen); *delta = remove(editor, getPosition(), mLen ); @@ -246,7 +246,7 @@ LLTextEditor::Params::Params() LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : LLTextBase(p), mAutoreplaceCallback(), - mBaseDocIsPristine(TRUE), + mBaseDocIsPristine(true), mPristineCmd( NULL ), mLastCmd( NULL ), mDefaultColor( p.default_color() ), @@ -259,7 +259,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mPrevalidateFunc(p.prevalidate_callback()), mShowContextMenu(p.show_context_menu), mEnableTooltipPaste(p.enable_tooltip_paste), - mPassDelete(FALSE), + mPassDelete(false), mKeepSelectionOnReturn(false) { mSourceID.generate(); @@ -275,7 +275,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : addChild( mBorder ); setText(p.default_text()); - mParseOnTheFly = TRUE; + mParseOnTheFly = true; } void LLTextEditor::initFromParams( const LLTextEditor::Params& p) @@ -329,14 +329,14 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Param blockUndo(); deselect(); - mParseOnTheFly = FALSE; + mParseOnTheFly = false; LLTextBase::setText(utf8str, input_params); - mParseOnTheFly = TRUE; + mParseOnTheFly = true; resetDirty(); } -void LLTextEditor::selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap) +void LLTextEditor::selectNext(const std::string& search_text_in, bool case_insensitive, bool wrap) { if (search_text_in.empty()) { @@ -373,7 +373,7 @@ void LLTextEditor::selectNext(const std::string& search_text_in, BOOL case_insen // If still -1, then search_text just isn't found. if (-1 == loc) { - mIsSelecting = FALSE; + mIsSelecting = false; mSelectionEnd = 0; mSelectionStart = 0; return; @@ -381,15 +381,15 @@ void LLTextEditor::selectNext(const std::string& search_text_in, BOOL case_insen setCursorPos(loc); - mIsSelecting = TRUE; + mIsSelecting = true; mSelectionEnd = mCursorPos; mSelectionStart = llmin((S32)getLength(), (S32)(mCursorPos + search_text.size())); } -BOOL LLTextEditor::replaceText(const std::string& search_text_in, const std::string& replace_text, - BOOL case_insensitive, BOOL wrap) +bool LLTextEditor::replaceText(const std::string& search_text_in, const std::string& replace_text, + bool case_insensitive, bool wrap) { - BOOL replaced = FALSE; + bool replaced = false; if (search_text_in.empty()) { @@ -411,7 +411,7 @@ BOOL LLTextEditor::replaceText(const std::string& search_text_in, const std::str if (selected_text == search_text) { insertText(replace_text); - replaced = TRUE; + replaced = true; } } @@ -419,15 +419,15 @@ BOOL LLTextEditor::replaceText(const std::string& search_text_in, const std::str return replaced; } -void LLTextEditor::replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive) +void LLTextEditor::replaceTextAll(const std::string& search_text, const std::string& replace_text, bool case_insensitive) { startOfDoc(); - selectNext(search_text, case_insensitive, FALSE); + selectNext(search_text, case_insensitive, false); - BOOL replaced = TRUE; + bool replaced = true; while ( replaced ) { - replaced = replaceText(search_text,replace_text, case_insensitive, FALSE); + replaced = replaceText(search_text,replace_text, case_insensitive, false); } } @@ -505,7 +505,7 @@ void LLTextEditor::getSegmentsInRange(LLTextEditor::segment_vec_t& segments_out, } } -BOOL LLTextEditor::selectionContainsLineBreaks() +bool LLTextEditor::selectionContainsLineBreaks() { if (hasSelection()) { @@ -517,11 +517,11 @@ BOOL LLTextEditor::selectionContainsLineBreaks() { if (wtext[i] == '\n') { - return TRUE; + return true; } } } - return FALSE; + return false; } @@ -552,7 +552,7 @@ S32 LLTextEditor::indentLine( S32 pos, S32 spaces ) LLWString wtext = getWText(); if (wtext[pos] == ' ') { - delta_spaces += remove( pos, 1, FALSE ); + delta_spaces += remove( pos, 1, false ); } } } @@ -567,7 +567,7 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) LLWString text = getWText(); S32 left = llmin( mSelectionStart, mSelectionEnd ); S32 right = left + llabs( mSelectionStart - mSelectionEnd ); - BOOL cursor_on_right = (mSelectionEnd > mSelectionStart); + bool cursor_on_right = (mSelectionEnd > mSelectionStart); S32 cur = left; // Expand left to start of line @@ -596,7 +596,7 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) // Disabling parsing on the fly to avoid updating text segments // until all indentation commands are executed. - mParseOnTheFly = FALSE; + mParseOnTheFly = false; // Find each start-of-line and indent it do @@ -623,7 +623,7 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) } while( cur < right ); - mParseOnTheFly = TRUE; + mParseOnTheFly = true; if( (right < getLength()) && (text[right] == '\n') ) { @@ -646,9 +646,9 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) } //virtual -BOOL LLTextEditor::canSelectAll() const +bool LLTextEditor::canSelectAll() const { - return TRUE; + return true; } // virtual @@ -708,7 +708,7 @@ bool LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) mSelectionEnd = mCursorPos; } // assume we're starting a drag select - mIsSelecting = TRUE; + mIsSelecting = true; } else { @@ -977,7 +977,7 @@ S32 LLTextEditor::insert(S32 pos, const LLWString &wstr, bool group_with_next_op S32 LLTextEditor::remove(S32 pos, S32 length, bool group_with_next_op) { S32 end_pos = getEditableIndex(pos + length, true); - BOOL removedChar = FALSE; + bool removedChar = false; segment_vec_t segments_to_remove; // store text segments @@ -999,7 +999,7 @@ S32 LLTextEditor::overwriteChar(S32 pos, llwchar wc) } else { - return execute(new TextCmdOverwriteChar(pos, FALSE, wc)); + return execute(new TextCmdOverwriteChar(pos, false, wc)); } } @@ -1044,7 +1044,7 @@ void LLTextEditor::removeCharOrTab() for (S32 i = 0; i < chars_to_remove; i++) { setCursorPos(mCursorPos - 1); - remove( mCursorPos, 1, FALSE ); + remove( mCursorPos, 1, false ); } } else @@ -1056,7 +1056,7 @@ void LLTextEditor::removeCharOrTab() // Remove a single character from the text S32 LLTextEditor::removeChar(S32 pos) { - return remove( pos, 1, FALSE ); + return remove( pos, 1, false ); } void LLTextEditor::removeChar() @@ -1107,7 +1107,7 @@ S32 LLTextEditor::addChar(S32 pos, llwchar wc) } else { - return execute(new TextCmdAddChar(pos, FALSE, wc, LLTextSegmentPtr())); + return execute(new TextCmdAddChar(pos, false, wc, LLTextSegmentPtr())); } } @@ -1119,7 +1119,7 @@ void LLTextEditor::addChar(llwchar wc) } if( hasSelection() ) { - deleteSelection(TRUE); + deleteSelection(true); } else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { @@ -1146,7 +1146,7 @@ void LLTextEditor::addChar(llwchar wc) } } -void LLTextEditor::addLineBreakChar(BOOL group_together) +void LLTextEditor::addLineBreakChar(bool group_together) { if( !getEnabled() ) { @@ -1154,7 +1154,7 @@ void LLTextEditor::addLineBreakChar(BOOL group_together) } if( hasSelection() ) { - deleteSelection(TRUE); + deleteSelection(true); } else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { @@ -1170,13 +1170,13 @@ void LLTextEditor::addLineBreakChar(BOOL group_together) } -BOOL LLTextEditor::handleSelectionKey(const KEY key, const MASK mask) +bool LLTextEditor::handleSelectionKey(const KEY key, const MASK mask) { - BOOL handled = FALSE; + bool handled = false; if( mask & MASK_SHIFT ) { - handled = TRUE; + handled = true; switch( key ) { @@ -1257,7 +1257,7 @@ BOOL LLTextEditor::handleSelectionKey(const KEY key, const MASK mask) break; default: - handled = FALSE; + handled = false; break; } } @@ -1271,14 +1271,14 @@ BOOL LLTextEditor::handleSelectionKey(const KEY key, const MASK mask) return handled; } -BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) +bool LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) { - BOOL handled = FALSE; + bool handled = false; // Ignore capslock key if( MASK_NONE == mask ) { - handled = TRUE; + handled = true; switch( key ) { case KEY_UP: @@ -1343,7 +1343,7 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) break; default: - handled = FALSE; + handled = false; break; } } @@ -1356,7 +1356,7 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask) return handled; } -void LLTextEditor::deleteSelection(BOOL group_with_next_op ) +void LLTextEditor::deleteSelection(bool group_with_next_op ) { if( getEnabled() && hasSelection() ) { @@ -1371,7 +1371,7 @@ void LLTextEditor::deleteSelection(BOOL group_with_next_op ) } // virtual -BOOL LLTextEditor::canCut() const +bool LLTextEditor::canCut() const { return !mReadOnly && hasSelection(); } @@ -1386,12 +1386,12 @@ void LLTextEditor::cut() S32 left_pos = llmin( mSelectionStart, mSelectionEnd ); S32 length = llabs( mSelectionStart - mSelectionEnd ); LLClipboard::instance().copyToClipboard( getWText(), left_pos, length); - deleteSelection( FALSE ); + deleteSelection( false ); onKeyStroke(); } -BOOL LLTextEditor::canCopy() const +bool LLTextEditor::canCopy() const { return hasSelection(); } @@ -1408,7 +1408,7 @@ void LLTextEditor::copy() LLClipboard::instance().copyToClipboard(getWText(), left_pos, length); } -BOOL LLTextEditor::canPaste() const +bool LLTextEditor::canPaste() const { return !mReadOnly && LLClipboard::instance().isTextAvailable(); } @@ -1430,7 +1430,7 @@ void LLTextEditor::pastePrimary() // paste from primary (itsprimary==true) or clipboard (itsprimary==false) void LLTextEditor::pasteHelper(bool is_primary) { - mParseOnTheFly = FALSE; + mParseOnTheFly = false; bool can_paste_it; if (is_primary) { @@ -1457,7 +1457,7 @@ void LLTextEditor::pasteHelper(bool is_primary) // Delete any selected characters (the paste replaces them) if( (!is_primary) && hasSelection() ) { - deleteSelection(TRUE); + deleteSelection(true); } // Clean up string (replace tabs and remove characters that our fonts don't support). @@ -1472,7 +1472,7 @@ void LLTextEditor::pasteHelper(bool is_primary) deselect(); onKeyStroke(); - mParseOnTheFly = TRUE; + mParseOnTheFly = true; } @@ -1514,9 +1514,9 @@ void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string) if(pos!=start) { std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,pos-start); - setCursorPos(mCursorPos + insert(mCursorPos, str, TRUE, LLTextSegmentPtr())); + setCursorPos(mCursorPos + insert(mCursorPos, str, true, LLTextSegmentPtr())); } - addLineBreakChar(TRUE); // Add a line break and group with the next addition. + addLineBreakChar(true); // Add a line break and group with the next addition. start = pos+1; pos = clean_string.find('\n',start); @@ -1525,11 +1525,11 @@ void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string) if (pos != start) { std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start); - setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr())); + setCursorPos(mCursorPos + insert(mCursorPos, str, false, LLTextSegmentPtr())); } else { - addLineBreakChar(FALSE); // Add a line break and end the grouping. + addLineBreakChar(false); // Add a line break and end the grouping. } } @@ -1545,7 +1545,7 @@ void LLTextEditor::copyPrimary() LLClipboard::instance().copyToClipboard(getWText(), left_pos, length, true); } -BOOL LLTextEditor::canPastePrimary() const +bool LLTextEditor::canPastePrimary() const { return !mReadOnly && LLClipboard::instance().isTextAvailable(true); } @@ -1558,13 +1558,13 @@ void LLTextEditor::updatePrimary() } } -BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask) +bool LLTextEditor::handleControlKey(const KEY key, const MASK mask) { - BOOL handled = FALSE; + bool handled = false; if( mask & MASK_CONTROL ) { - handled = TRUE; + handled = true; switch( key ) { @@ -1628,7 +1628,7 @@ BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask) break; default: - handled = FALSE; + handled = false; break; } } @@ -1642,11 +1642,11 @@ BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask) } -BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) +bool LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) { - BOOL handled = TRUE; + bool handled = true; - if (mReadOnly) return FALSE; + if (mReadOnly) return false; switch( key ) { @@ -1660,7 +1660,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) case KEY_BACKSPACE: if( hasSelection() ) { - deleteSelection(FALSE); + deleteSelection(false); } else if( 0 < mCursorPos ) @@ -1679,7 +1679,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) { if( hasSelection() && !mKeepSelectionOnReturn ) { - deleteSelection(FALSE); + deleteSelection(false); } if (mAutoIndent) { @@ -1688,7 +1688,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) } else { - handled = FALSE; + handled = false; break; } break; @@ -1696,7 +1696,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) case KEY_TAB: if (mask & MASK_CONTROL) { - handled = FALSE; + handled = false; break; } if( hasSelection() && selectionContainsLineBreaks() ) @@ -1707,7 +1707,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) { if( hasSelection() ) { - deleteSelection(FALSE); + deleteSelection(false); } S32 offset = getLineOffsetFromDocIndex(mCursorPos); @@ -1721,7 +1721,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) break; default: - handled = FALSE; + handled = false; break; } @@ -1759,15 +1759,15 @@ void LLTextEditor::unindentLineBeforeCloseBrace() } -BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) +bool LLTextEditor::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; // Special case for TAB. If want to move to next field, report // not handled and let the parent take care of field movement. if (KEY_TAB == key && mTabsToNextField) { - return FALSE; + return false; } if (mReadOnly && mScroller) @@ -1791,7 +1791,7 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) // Delete any selected characters (the tooltip text replaces them) if(hasSelection()) { - deleteSelection(TRUE); + deleteSelection(true); } std::basic_string<llwchar>::size_type pos = tool_tip_text.find('\n',0); @@ -1803,7 +1803,7 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) // Add the text cleanStringForPaste(tool_tip_text); pasteTextWithLinebreaks(tool_tip_text); - handled = TRUE; + handled = true; } } else @@ -1866,7 +1866,7 @@ bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char) // virtual -BOOL LLTextEditor::canDoDelete() const +bool LLTextEditor::canDoDelete() const { return !mReadOnly && ( !mPassDelete || ( hasSelection() || (mCursorPos < getLength())) ); } @@ -1879,7 +1879,7 @@ void LLTextEditor::doDelete() } if( hasSelection() ) { - deleteSelection(FALSE); + deleteSelection(false); } else if( mCursorPos < getLength() ) @@ -1923,14 +1923,14 @@ void LLTextEditor::doDelete() void LLTextEditor::blockUndo() { - mBaseDocIsPristine = FALSE; + mBaseDocIsPristine = false; mLastCmd = NULL; std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer()); mUndoStack.clear(); } // virtual -BOOL LLTextEditor::canUndo() const +bool LLTextEditor::canUndo() const { return !mReadOnly && mLastCmd != NULL; } @@ -1961,7 +1961,7 @@ void LLTextEditor::undo() onKeyStroke(); } -BOOL LLTextEditor::canRedo() const +bool LLTextEditor::canRedo() const { return !mReadOnly && (mUndoStack.size() > 0) && (mLastCmd != mUndoStack.front()); } @@ -2040,7 +2040,7 @@ void LLTextEditor::onCommit() LLTextBase::onCommit(); } -void LLTextEditor::setEnabled(BOOL enabled) +void LLTextEditor::setEnabled(bool enabled) { // just treat enabled as read-only flag bool read_only = !enabled; @@ -2073,7 +2073,7 @@ void LLTextEditor::showContextMenu(S32 x, S32 y) // Route menu to this class // previously this was done in ::handleRightMoseDown: //if(hasTabStop()) - // setFocus(TRUE) - why? weird... + // setFocus(true) - why? weird... // and then inside setFocus // .... // gEditMenuHandler = this; @@ -2251,9 +2251,9 @@ void LLTextEditor::draw() // Start or stop the editor from accepting text-editing keystrokes // see also LLLineEditor -void LLTextEditor::setFocus( BOOL new_state ) +void LLTextEditor::setFocus( bool new_state ) { - BOOL old_state = hasFocus(); + bool old_state = hasFocus(); // Don't change anything if the focus state didn't change if (new_state == old_state) return; @@ -2261,7 +2261,7 @@ void LLTextEditor::setFocus( BOOL new_state ) // Notify early if we are losing focus. if (!new_state) { - getWindow()->allowLanguageTextInput(this, FALSE); + getWindow()->allowLanguageTextInput(this, false); } LLTextBase::setFocus( new_state ); @@ -2293,7 +2293,7 @@ void LLTextEditor::setCursorAndScrollToEnd() endOfDoc(); } -void LLTextEditor::getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ) +void LLTextEditor::getCurrentLineAndColumn( S32* line, S32* col, bool include_wordwrap ) { *line = getLineNumFromDocIndex(mCursorPos, include_wordwrap); *col = getLineOffsetFromDocIndex(mCursorPos, include_wordwrap); @@ -2335,32 +2335,32 @@ void LLTextEditor::autoIndent() // Inserts new text at the cursor position void LLTextEditor::insertText(const std::string &new_text) { - BOOL enabled = getEnabled(); - setEnabled( TRUE ); + bool enabled = getEnabled(); + setEnabled( true ); // Delete any selected characters (the insertion replaces them) if( hasSelection() ) { - deleteSelection(TRUE); + deleteSelection(true); } - setCursorPos(mCursorPos + insert( mCursorPos, utf8str_to_wstring(new_text), FALSE, LLTextSegmentPtr() )); + setCursorPos(mCursorPos + insert( mCursorPos, utf8str_to_wstring(new_text), false, LLTextSegmentPtr() )); setEnabled( enabled ); } void LLTextEditor::insertText(LLWString &new_text) { - BOOL enabled = getEnabled(); - setEnabled( TRUE ); + bool enabled = getEnabled(); + setEnabled( true ); // Delete any selected characters (the insertion replaces them) if( hasSelection() ) { - deleteSelection(TRUE); + deleteSelection(true); } - setCursorPos(mCursorPos + insert( mCursorPos, new_text, FALSE, LLTextSegmentPtr() )); + setCursorPos(mCursorPos + insert( mCursorPos, new_text, false, LLTextSegmentPtr() )); setEnabled( enabled ); } @@ -2370,10 +2370,10 @@ void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const // Save old state S32 selection_start = mSelectionStart; S32 selection_end = mSelectionEnd; - BOOL was_selecting = mIsSelecting; + bool was_selecting = mIsSelecting; S32 cursor_pos = mCursorPos; S32 old_length = getLength(); - BOOL cursor_was_at_end = (mCursorPos == old_length); + bool cursor_was_at_end = (mCursorPos == old_length); deselect(); @@ -2382,7 +2382,7 @@ void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const LLWString widget_wide_text = utf8str_to_wstring(text); LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + widget_wide_text.size()); - insert(getLength(), widget_wide_text, FALSE, segment); + insert(getLength(), widget_wide_text, false, segment); // Set the cursor and scroll position if( selection_start != selection_end ) @@ -2412,7 +2412,7 @@ void LLTextEditor::removeTextFromEnd(S32 num_chars) { if (num_chars <= 0) return; - remove(getLength() - num_chars, num_chars, FALSE); + remove(getLength() - num_chars, num_chars, false); S32 len = getLength(); setCursorPos (llclamp(mCursorPos, 0, len)); @@ -2428,7 +2428,7 @@ void LLTextEditor::onSpellCheckPerformed() { if (isPristine()) { - mBaseDocIsPristine = FALSE; + mBaseDocIsPristine = false; } } @@ -2445,7 +2445,7 @@ void LLTextEditor::makePristine() } } -BOOL LLTextEditor::isPristine() const +bool LLTextEditor::isPristine() const { if( mPristineCmd ) { @@ -2458,7 +2458,7 @@ BOOL LLTextEditor::isPristine() const } } -BOOL LLTextEditor::tryToRevertToPristineState() +bool LLTextEditor::tryToRevertToPristineState() { if( !isPristine() ) { @@ -2487,7 +2487,7 @@ BOOL LLTextEditor::tryToRevertToPristineState() } } - return isPristine(); // TRUE => success + return isPristine(); // true => success } void LLTextEditor::updateLinkSegments() @@ -2546,7 +2546,7 @@ void LLTextEditor::onMouseCaptureLost() /////////////////////////////////////////////////////////////////// // Hack for Notecards -BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) +bool LLTextEditor::importBuffer(const char* buffer, S32 length ) { std::istringstream instream(buffer); @@ -2565,20 +2565,20 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) if( 1 != sscanf(tbuf, "Linden text version %d", &version) ) { LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; - return FALSE; + return false; } if( 1 != version ) { LL_WARNS() << "Invalid Linden text file version: " << version << LL_ENDL; - return FALSE; + return false; } instream.getline(tbuf, MAX_STRING); if( 0 != sscanf(tbuf, "{") ) { LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; - return FALSE; + return false; } S32 text_len = 0; @@ -2586,36 +2586,36 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) if( 1 != sscanf(tbuf, "Text length %d", &text_len) ) { LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; - return FALSE; + return false; } if( text_len > mMaxTextByteLength ) { LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; - return FALSE; + return false; } - BOOL success = TRUE; + bool success = true; char* text = new char[ text_len + 1]; if (text == NULL) { LL_ERRS() << "Memory allocation failure." << LL_ENDL; - return FALSE; + return false; } instream.get(text, text_len + 1, '\0'); text[text_len] = '\0'; if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */ { LL_WARNS() << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << LL_ENDL;/* Flawfinder: ignore */ - success = FALSE; + success = false; } instream.getline(tbuf, MAX_STRING); if( success && (0 != sscanf(tbuf, "}")) ) { LL_WARNS() << "Invalid Linden text file format: missing terminal }" << LL_ENDL; - success = FALSE; + success = false; } if( success ) @@ -2632,7 +2632,7 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) return success; } -BOOL LLTextEditor::exportBuffer(std::string &buffer ) +bool LLTextEditor::exportBuffer(std::string &buffer ) { std::ostringstream outstream(buffer); @@ -2643,7 +2643,7 @@ BOOL LLTextEditor::exportBuffer(std::string &buffer ) outstream << getText(); outstream << "}\n"; - return TRUE; + return true; } void LLTextEditor::updateAllowingLanguageInput() @@ -2656,17 +2656,17 @@ void LLTextEditor::updateAllowingLanguageInput() } if (hasFocus() && !mReadOnly) { - window->allowLanguageTextInput(this, TRUE); + window->allowLanguageTextInput(this, true); } else { - window->allowLanguageTextInput(this, FALSE); + window->allowLanguageTextInput(this, false); } } // Preedit is managed off the undo/redo command stack. -BOOL LLTextEditor::hasPreeditString() const +bool LLTextEditor::hasPreeditString() const { return (mPreeditPositions.size() > 1); } @@ -2682,7 +2682,7 @@ void LLTextEditor::resetPreedit() } else { - deleteSelection(TRUE); + deleteSelection(true); } } if (hasPreeditString()) @@ -2913,11 +2913,11 @@ S32 LLTextEditor::getPreeditFontSize() const return ll_round((F32)mFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); } -BOOL LLTextEditor::isDirty() const +bool LLTextEditor::isDirty() const { if(mReadOnly) { - return FALSE; + return false; } if( mPristineCmd ) diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 26d61b9502..b96a433d5d 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -87,7 +87,7 @@ public: void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback); - void setParseHighlights(BOOL parsing) {mParseHighlights=parsing;} + void setParseHighlights(bool parsing) {mParseHighlights=parsing;} static S32 spacesPerTab(); @@ -99,7 +99,7 @@ public: virtual bool handleDoubleClick(S32 x, S32 y, MASK mask ); virtual bool handleMiddleMouseDown(S32 x,S32 y,MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual bool handleKeyHere(KEY key, MASK mask ); virtual bool handleUnicodeCharHere(llwchar uni_char); virtual void onMouseCaptureLost(); @@ -109,51 +109,51 @@ public: virtual void onFocusReceived(); virtual void onFocusLost(); virtual void onCommit(); - virtual void setEnabled(BOOL enabled); + virtual void setEnabled(bool enabled); // uictrl overrides virtual void clear(); - virtual void setFocus( BOOL b ); - virtual BOOL isDirty() const; + virtual void setFocus( bool b ); + virtual bool isDirty() const; // LLEditMenuHandler interface virtual void undo(); - virtual BOOL canUndo() const; + virtual bool canUndo() const; virtual void redo(); - virtual BOOL canRedo() const; + virtual bool canRedo() const; virtual void cut(); - virtual BOOL canCut() const; + virtual bool canCut() const; virtual void copy(); - virtual BOOL canCopy() const; + virtual bool canCopy() const; virtual void paste(); - virtual BOOL canPaste() const; + virtual bool canPaste() const; virtual void updatePrimary(); virtual void copyPrimary(); virtual void pastePrimary(); - virtual BOOL canPastePrimary() const; + virtual bool canPastePrimary() const; virtual void doDelete(); - virtual BOOL canDoDelete() const; + virtual bool canDoDelete() const; virtual void selectAll(); - virtual BOOL canSelectAll() const; + virtual bool canSelectAll() const; void selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos); virtual bool canLoadOrSaveToFile(); - void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); - BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE); - void replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive); + void selectNext(const std::string& search_text_in, bool case_insensitive, bool wrap = true); + bool replaceText(const std::string& search_text, const std::string& replace_text, bool case_insensitive, bool wrap = true); + void replaceTextAll(const std::string& search_text, const std::string& replace_text, bool case_insensitive); // Undo/redo stack void blockUndo(); // Text editing virtual void makePristine(); - BOOL isPristine() const; - BOOL allowsEmbeddedItems() const { return mAllowEmbeddedItems; } + bool isPristine() const; + bool allowsEmbeddedItems() const { return mAllowEmbeddedItems; } // Autoreplace (formerly part of LLLineEditor) typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t; @@ -179,19 +179,19 @@ public: // Does not change highlight or cursor position. void removeTextFromEnd(S32 num_chars); - BOOL tryToRevertToPristineState(); + bool tryToRevertToPristineState(); void setCursorAndScrollToEnd(); - void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); + void getCurrentLineAndColumn( S32* line, S32* col, bool include_wordwrap ); // Hacky methods to make it into a word-wrapping, potentially scrolling, // read-only text box. - void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; } + void setCommitOnFocusLost(bool b) { mCommitOnFocusLost = b; } // Hack to handle Notecards - virtual BOOL importBuffer(const char* buffer, S32 length ); - virtual BOOL exportBuffer(std::string& buffer ); + virtual bool importBuffer(const char* buffer, S32 length ); + virtual bool exportBuffer(std::string& buffer ); const LLUUID& getSourceID() const { return mSourceID; } @@ -202,7 +202,7 @@ public: void setShowContextMenu(bool show) { mShowContextMenu = show; } bool getShowContextMenu() const { return mShowContextMenu; } - void setPassDelete(BOOL b) { mPassDelete = b; } + void setPassDelete(bool b) { mPassDelete = b; } protected: void showContextMenu(S32 x, S32 y); @@ -216,13 +216,13 @@ protected: S32 indentLine( S32 pos, S32 spaces ); void unindentLineBeforeCloseBrace(); - virtual BOOL handleSpecialKey(const KEY key, const MASK mask); - BOOL handleNavigationKey(const KEY key, const MASK mask); - BOOL handleSelectionKey(const KEY key, const MASK mask); - BOOL handleControlKey(const KEY key, const MASK mask); + virtual bool handleSpecialKey(const KEY key, const MASK mask); + bool handleNavigationKey(const KEY key, const MASK mask); + bool handleSelectionKey(const KEY key, const MASK mask); + bool handleControlKey(const KEY key, const MASK mask); - BOOL selectionContainsLineBreaks(); - void deleteSelection(BOOL transient_operation); + bool selectionContainsLineBreaks(); + void deleteSelection(bool transient_operation); S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; @@ -241,7 +241,7 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addLineBreakChar(BOOL group_together = FALSE); + void addLineBreakChar(bool group_together = false); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); S32 removeChar(S32 pos); @@ -250,7 +250,7 @@ protected: void focusLostHelper(); void updateAllowingLanguageInput(); - BOOL hasPreeditString() const; + bool hasPreeditString() const; // Overrides LLPreeditor virtual void resetPreedit(); @@ -304,7 +304,7 @@ private: class TextCmdOverwriteChar; class TextCmdRemove; - BOOL mBaseDocIsPristine; + bool mBaseDocIsPristine; TextCmd* mPristineCmd; TextCmd* mLastCmd; @@ -312,11 +312,11 @@ private: typedef std::deque<TextCmd*> undo_stack_t; undo_stack_t mUndoStack; - BOOL mTabsToNextField; // if true, tab moves focus to next field, else inserts spaces - BOOL mCommitOnFocusLost; - BOOL mTakesFocus; + bool mTabsToNextField; // if true, tab moves focus to next field, else inserts spaces + bool mCommitOnFocusLost; + bool mTakesFocus; - BOOL mAllowEmbeddedItems; + bool mAllowEmbeddedItems; bool mShowContextMenu; bool mEnableTooltipPaste; bool mPassDelete; @@ -335,7 +335,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLTEXTEDITOR_CPP extern template class LLTextEditor* LLView::getChild<class LLTextEditor>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif // LL_TEXTEDITOR_H diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp index 0b36241da0..e9fc6592d0 100644 --- a/indra/llui/lltextparser.cpp +++ b/indra/llui/lltextparser.cpp @@ -184,11 +184,11 @@ bool LLTextParser::parseFullLineHighlights(const std::string &text, LLColor4 *co { LLSD color_llsd = mHighlights[i]["color"]; color->setValue(color_llsd); - return TRUE; + return true; } } } - return FALSE; //No matches found. + return false; //No matches found. } std::string LLTextParser::getFileName() @@ -229,11 +229,11 @@ bool LLTextParser::saveToDisk(LLSD highlights) if (filename.empty()) { LL_WARNS() << "LLTextParser::saveToDisk() no valid user directory." << LL_ENDL; - return FALSE; + return false; } llofstream file; file.open(filename.c_str()); LLSDSerialize::toPrettyXML(mHighlights, file); file.close(); - return TRUE; + return true; } diff --git a/indra/llui/lltextvalidate.cpp b/indra/llui/lltextvalidate.cpp index bfe0a5bb5d..bd3cfbacde 100644 --- a/indra/llui/lltextvalidate.cpp +++ b/indra/llui/lltextvalidate.cpp @@ -55,7 +55,7 @@ namespace LLTextValidate { LLLocale locale(LLLocale::USER_LOCALE); - bool success = TRUE; + bool success = true; LLWString trimmed = str; LLWStringUtil::trim(trimmed); S32 len = trimmed.length(); @@ -76,7 +76,7 @@ namespace LLTextValidate { if( (decimal_point != trimmed[i] ) && !LLStringOps::isDigit( trimmed[i] ) ) { - success = FALSE; + success = false; break; } } @@ -93,7 +93,7 @@ namespace LLTextValidate { LLLocale locale(LLLocale::USER_LOCALE); - bool success = TRUE; + bool success = true; LLWString trimmed = str; LLWStringUtil::trim(trimmed); S32 len = trimmed.length(); @@ -111,7 +111,7 @@ namespace LLTextValidate { if( !LLStringOps::isDigit( trimmed[i] ) ) { - success = FALSE; + success = false; break; } } @@ -127,19 +127,19 @@ namespace LLTextValidate LLWString trimmed = str; LLWStringUtil::trim(trimmed); S32 len = trimmed.length(); - bool success = TRUE; + bool success = true; if(0 < len) { if(('-' == trimmed[0]) || ('0' == trimmed[0])) { - success = FALSE; + success = false; } S32 i = 0; while(success && (i < len)) { if(!LLStringOps::isDigit(trimmed[i++])) { - success = FALSE; + success = false; } } } @@ -148,7 +148,7 @@ namespace LLTextValidate S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10); if (val <= 0) { - success = FALSE; + success = false; } } return success; @@ -161,19 +161,19 @@ namespace LLTextValidate LLWString trimmed = str; LLWStringUtil::trim(trimmed); S32 len = trimmed.length(); - bool success = TRUE; + bool success = true; if(0 < len) { if('-' == trimmed[0]) { - success = FALSE; + success = false; } S32 i = 0; while(success && (i < len)) { if(!LLStringOps::isDigit(trimmed[i++])) { - success = FALSE; + success = false; } } } @@ -182,7 +182,7 @@ namespace LLTextValidate S32 val = strtol(wstring_to_utf8str(trimmed).c_str(), NULL, 10); if (val < 0) { - success = FALSE; + success = false; } } return success; @@ -194,19 +194,19 @@ namespace LLTextValidate LLWString test_str = str; S32 len = test_str.length(); - bool success = TRUE; + bool success = true; if(0 < len) { if('-' == test_str[0]) { - success = FALSE; + success = false; } S32 i = 0; while(success && (i < len)) { if(!LLStringOps::isDigit(test_str[i]) || LLStringOps::isSpace(test_str[i++])) { - success = FALSE; + success = false; } } } @@ -215,7 +215,7 @@ namespace LLTextValidate S32 val = strtol(wstring_to_utf8str(test_str).c_str(), NULL, 10); if (val < 0) { - success = FALSE; + success = false; } } return success; @@ -225,14 +225,14 @@ namespace LLTextValidate { LLLocale locale(LLLocale::USER_LOCALE); - bool rv = TRUE; + bool rv = true; S32 len = str.length(); if(len == 0) return rv; while(len--) { if( !LLStringOps::isAlnum((char)str[len]) ) { - rv = FALSE; + rv = false; break; } } @@ -243,14 +243,14 @@ namespace LLTextValidate { LLLocale locale(LLLocale::USER_LOCALE); - bool rv = TRUE; + bool rv = true; S32 len = str.length(); if(len == 0) return rv; while(len--) { if(!(LLStringOps::isAlnum((char)str[len]) || (' ' == str[len]))) { - rv = FALSE; + rv = false; break; } } @@ -262,7 +262,7 @@ namespace LLTextValidate // inventory item names, parcel names, object names, etc. bool validateASCIIPrintableNoPipe(const LLWString &str) { - bool rv = TRUE; + bool rv = true; S32 len = str.length(); if(len == 0) return rv; while(len--) @@ -272,14 +272,14 @@ namespace LLTextValidate || wc > 0x7f || wc == '|') { - rv = FALSE; + rv = false; break; } if(!(wc == ' ' || LLStringOps::isAlnum((char)wc) || LLStringOps::isPunct((char)wc) ) ) { - rv = FALSE; + rv = false; break; } } @@ -290,7 +290,7 @@ namespace LLTextValidate // Used for avatar names bool validateASCIIPrintableNoSpace(const LLWString &str) { - bool rv = TRUE; + bool rv = true; S32 len = str.length(); if(len == 0) return rv; while(len--) @@ -300,13 +300,13 @@ namespace LLTextValidate || wc > 0x7f || LLStringOps::isSpace(wc)) { - rv = FALSE; + rv = false; break; } if( !(LLStringOps::isAlnum((char)str[len]) || LLStringOps::isPunct((char)str[len]) ) ) { - rv = FALSE; + rv = false; break; } } @@ -315,13 +315,13 @@ namespace LLTextValidate bool validateASCII(const LLWString &str) { - bool rv = TRUE; + bool rv = true; S32 len = str.length(); while(len--) { if (str[len] < 0x20 || str[len] > 0x7f) { - rv = FALSE; + rv = false; break; } } @@ -332,7 +332,7 @@ namespace LLTextValidate { if (LLStringOps::isSpace(str[0])) { - return FALSE; + return false; } return validateASCII(str); } @@ -341,13 +341,13 @@ namespace LLTextValidate // Example is landmark description in Places SP. bool validateASCIIWithNewLine(const LLWString &str) { - bool rv = TRUE; + bool rv = true; S32 len = str.length(); while(len--) { if ((str[len] < 0x20 && str[len] != 0xA) || str[len] > 0x7f) { - rv = FALSE; + rv = false; break; } } diff --git a/indra/llui/lltextvalidate.h b/indra/llui/lltextvalidate.h index e2b6c313d6..57d7419c8c 100644 --- a/indra/llui/lltextvalidate.h +++ b/indra/llui/lltextvalidate.h @@ -34,7 +34,7 @@ namespace LLTextValidate { - typedef boost::function<BOOL (const LLWString &wstr)> validate_func_t; + typedef boost::function<bool (const LLWString &wstr)> validate_func_t; struct ValidateTextNamedFuncs : public LLInitParam::TypeValuesHelper<validate_func_t, ValidateTextNamedFuncs> diff --git a/indra/llui/lltimectrl.cpp b/indra/llui/lltimectrl.cpp index 516057f8fd..37cc52f967 100644 --- a/indra/llui/lltimectrl.cpp +++ b/indra/llui/lltimectrl.cpp @@ -131,7 +131,7 @@ LLTimeCtrl::LLTimeCtrl(const LLTimeCtrl::Params& p) mDownBtn = LLUICtrlFactory::create<LLButton>(down_button_params); addChild(mDownBtn); - setUseBoundingRect( TRUE ); + setUseBoundingRect( true ); } F32 LLTimeCtrl::getTime24() const @@ -158,27 +158,27 @@ void LLTimeCtrl::setTime24(F32 time) updateText(); } -BOOL LLTimeCtrl::handleKeyHere(KEY key, MASK mask) +bool LLTimeCtrl::handleKeyHere(KEY key, MASK mask) { if (mEditor->hasFocus()) { if(key == KEY_UP) { onUpBtn(); - return TRUE; + return true; } if(key == KEY_DOWN) { onDownBtn(); - return TRUE; + return true; } if (key == KEY_RETURN) { onCommit(); - return TRUE; + return true; } } - return FALSE; + return false; } void LLTimeCtrl::onUpBtn() diff --git a/indra/llui/lltimectrl.h b/indra/llui/lltimectrl.h index b5f268c76a..3fac65039a 100644 --- a/indra/llui/lltimectrl.h +++ b/indra/llui/lltimectrl.h @@ -81,7 +81,7 @@ private: }; virtual void onFocusLost(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void onUpBtn(); void onDownBtn(); @@ -126,6 +126,6 @@ private: U32 mTime; // minutes since midnight: 0 - 1439 U32 mSnapToMin; // interval in minutes to snap to - BOOL mAllowEdit; + bool mAllowEdit; }; #endif /* LLTIMECTRL_H_ */ diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp index 3e56e0a589..b324eff132 100644 --- a/indra/llui/lltoggleablemenu.cpp +++ b/indra/llui/lltoggleablemenu.cpp @@ -52,7 +52,7 @@ boost::signals2::connection LLToggleableMenu::setVisibilityChangeCallback(const } // virtual -void LLToggleableMenu::onVisibilityChange (BOOL curVisibilityIn) +void LLToggleableMenu::onVisibilityChange (bool curVisibilityIn) { S32 x,y; LLUI::getInstance()->getMousePositionLocal(LLUI::getInstance()->getRootView(), &x, &y); @@ -94,7 +94,7 @@ bool LLToggleableMenu::toggleVisibility() if (getVisible()) { - setVisible(FALSE); + setVisible(false); mClosedByButtonClick = false; return false; } diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h index 55a6483021..b1260f050f 100644 --- a/indra/llui/lltoggleablemenu.h +++ b/indra/llui/lltoggleablemenu.h @@ -45,7 +45,7 @@ public: boost::signals2::connection setVisibilityChangeCallback( const commit_signal_t::slot_type& cb ); - virtual void onVisibilityChange (BOOL curVisibilityIn); + virtual void onVisibilityChange (bool curVisibilityIn); virtual bool addChild (LLView* view, S32 tab_group = 0); diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 7925c1048d..580d91fb4b 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -399,7 +399,7 @@ 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)); } } @@ -444,9 +444,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(); @@ -785,8 +785,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 @@ -798,13 +798,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 @@ -842,7 +842,7 @@ void LLToolBar::draw() } LLIconCtrl* caret = mCaretIcon; - caret->setVisible(FALSE); + caret->setVisible(false); if (mDragAndDropTarget && !mButtonCommands.empty()) { LLRect caret_rect = caret->getRect(); @@ -860,15 +860,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; @@ -1043,14 +1043,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) @@ -1084,7 +1084,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } else { - handled = FALSE; + handled = false; } } @@ -1165,7 +1165,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>(); @@ -1201,12 +1201,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) { diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 3a4f2fb76e..0f5f7b16b7 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -40,8 +40,8 @@ class LLToolBarButton; class LLIconCtrl; typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t; -typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; -typedef boost::function<BOOL (void* data, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t; +typedef boost::function<bool (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; +typedef boost::function<bool (void* data, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t; class LLToolBarButton : public LLButton { @@ -65,8 +65,8 @@ public: bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleHover(S32 x, S32 y, MASK mask); - void reshape(S32 width, S32 height, BOOL called_from_parent = true); - void setEnabled(BOOL enabled); + void reshape(S32 width, S32 height, bool called_from_parent = true); + void setEnabled(bool enabled); void setCommandId(const LLCommandId& id) { mId = id; } LLCommandId getCommandId() { return mId; } @@ -214,9 +214,9 @@ public: // virtuals void draw(); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, bool called_from_parent = true); bool handleRightMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -270,7 +270,7 @@ private: void updateLayoutAsNeeded(); void createButtons(); void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth); - BOOL isSettingChecked(const LLSD& userdata); + bool isSettingChecked(const LLSD& userdata); void onSettingEnable(const LLSD& userdata); void onRemoveSelectedCommand(); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 0c5a1adcb3..2cd50a7a39 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -321,14 +321,14 @@ void LLToolTip::snapToChildren() setShape(tooltip_rect); } -void LLToolTip::setVisible(BOOL visible) +void LLToolTip::setVisible(bool visible) { // fade out tooltip over time if (visible) { mVisibleTimer.start(); mFadeTimer.stop(); - LLPanel::setVisible(TRUE); + LLPanel::setVisible(true); } else { @@ -539,7 +539,7 @@ void LLToolTipMgr::hideToolTips() { if (mToolTip) { - mToolTip->setVisible(FALSE); + mToolTip->setVisible(false); } } diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index e95a1754d0..309d2a468e 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -99,7 +99,7 @@ public: /*virtual*/ void draw(); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); bool isFading(); F32 getVisibleTime(); diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp index 5da722a72b..05e1ef35ed 100644 --- a/indra/llui/lltransutil.cpp +++ b/indra/llui/lltransutil.cpp @@ -56,7 +56,7 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s bool LLTransUtil::parseLanguageStrings(const std::string& xml_filename) { LLXMLNodePtr root; - BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); if (!success) { diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 3f3ec7ee8b..cc11d53809 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -172,7 +172,7 @@ mHelpImpl(NULL) // Callbacks for associating controls with floater visibility: reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleInstance, _2, LLSD())); reg.add("Floater.ToggleOrBringToFront", boost::bind(&LLFloaterReg::toggleInstanceOrBringToFront, _2, LLSD())); - reg.add("Floater.Show", boost::bind(&LLFloaterReg::showInstance, _2, LLSD(), FALSE)); + reg.add("Floater.Show", boost::bind(&LLFloaterReg::showInstance, _2, LLSD(), false)); reg.add("Floater.ShowOrBringToFront", boost::bind(&LLFloaterReg::showInstanceOrBringToFront, _2, LLSD())); reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideInstance, _2, LLSD())); diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index a5a1f7ac1a..a248e0941d 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -44,7 +44,7 @@ F32 LLUICtrl::sInactiveControlTransparency = 1.0f; // Compiler optimization, generate extern template template class LLUICtrl* LLView::getChild<class LLUICtrl>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; LLUICtrl::CallbackParam::CallbackParam() : name("name"), @@ -100,10 +100,10 @@ const LLUICtrl::Params& LLUICtrl::getDefaultParams() LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel) : LLView(p), - mIsChrome(FALSE), + mIsChrome(false), mRequestsFront(p.requests_front), - mTabStop(FALSE), - mTentative(FALSE), + mTabStop(false), + mTentative(false), mViewModel(viewmodel), mControlVariable(NULL), mEnabledControlVariable(NULL), @@ -414,7 +414,7 @@ bool LLUICtrl::handleDoubleClick(S32 x, S32 y, MASK mask) } // can't tab to children of a non-tab-stop widget -BOOL LLUICtrl::canFocusChildren() const +bool LLUICtrl::canFocusChildren() const { return hasTabStop(); } @@ -439,9 +439,9 @@ void LLUICtrl::onCommit() } //virtual -BOOL LLUICtrl::isCtrl() const +bool LLUICtrl::isCtrl() const { - return TRUE; + return true; } //virtual @@ -473,7 +473,7 @@ LLViewModel* LLUICtrl::getViewModel() const } //virtual -BOOL LLUICtrl::postBuild() +bool LLUICtrl::postBuild() { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // @@ -662,15 +662,15 @@ bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, } // virtual -BOOL LLUICtrl::setTextArg( const std::string& key, const LLStringExplicit& text ) +bool LLUICtrl::setTextArg( const std::string& key, const LLStringExplicit& text ) { - return FALSE; + return false; } // virtual -BOOL LLUICtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLUICtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - return FALSE; + return false; } // virtual @@ -691,12 +691,12 @@ LLCtrlScrollInterface* LLUICtrl::getScrollInterface() return NULL; } -BOOL LLUICtrl::hasFocus() const +bool LLUICtrl::hasFocus() const { return (gFocusMgr.childHasKeyboardFocus(this)); } -void LLUICtrl::setFocus(BOOL b) +void LLUICtrl::setFocus(bool b) { // focus NEVER goes to ui ctrls that are disabled! if (!getEnabled()) @@ -720,25 +720,25 @@ void LLUICtrl::setFocus(BOOL b) } // virtual -void LLUICtrl::setTabStop( BOOL b ) +void LLUICtrl::setTabStop( bool b ) { mTabStop = b; } // virtual -BOOL LLUICtrl::hasTabStop() const +bool LLUICtrl::hasTabStop() const { return mTabStop; } // virtual -BOOL LLUICtrl::acceptsTextInput() const +bool LLUICtrl::acceptsTextInput() const { - return FALSE; + return false; } //virtual -BOOL LLUICtrl::isDirty() const +bool LLUICtrl::isDirty() const { return mViewModel->isDirty(); }; @@ -761,13 +761,13 @@ void LLUICtrl::clear() } // virtual -void LLUICtrl::setIsChrome(BOOL is_chrome) +void LLUICtrl::setIsChrome(bool is_chrome) { mIsChrome = is_chrome; } // virtual -BOOL LLUICtrl::getIsChrome() const +bool LLUICtrl::getIsChrome() const { LLView* parent_ctrl = getParent(); while(parent_ctrl) @@ -790,7 +790,7 @@ BOOL LLUICtrl::getIsChrome() const } -BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) +bool LLUICtrl::focusFirstItem(bool prefer_text_fields, bool focus_flash) { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // try to select default tab group child @@ -801,14 +801,14 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back()); if(!ctrl->hasFocus()) { - ctrl->setFocus(TRUE); + ctrl->setFocus(true); ctrl->onTabInto(); if(focus_flash) { gFocusMgr.triggerFocusFlash(); } } - return TRUE; + return true; } // search for text field first if(prefer_text_fields) @@ -821,14 +821,14 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back()); if(!ctrl->hasFocus()) { - ctrl->setFocus(TRUE); + ctrl->setFocus(true); ctrl->onTabInto(); if(focus_flash) { gFocusMgr.triggerFocusFlash(); } } - return TRUE; + return true; } } // no text field found, or we don't care about text fields @@ -838,20 +838,20 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back()); if(!ctrl->hasFocus()) { - ctrl->setFocus(TRUE); + ctrl->setFocus(true); ctrl->onTabInto(); if(focus_flash) { gFocusMgr.triggerFocusFlash(); } } - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLUICtrl::focusNextItem(BOOL text_fields_only) +bool LLUICtrl::focusNextItem(bool text_fields_only) { // this assumes that this method is called on the focus root. LLViewQuery query = getTabOrderQuery(); @@ -864,7 +864,7 @@ BOOL LLUICtrl::focusNextItem(BOOL text_fields_only) return focusNext(result); } -BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only) +bool LLUICtrl::focusPrevItem(bool text_fields_only) { // this assumes that this method is called on the focus root. LLViewQuery query = getTabOrderQuery(); @@ -1016,13 +1016,13 @@ boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<b } // virtual -void LLUICtrl::setTentative(BOOL b) +void LLUICtrl::setTentative(bool b) { mTentative = b; } // virtual -BOOL LLUICtrl::getTentative() const +bool LLUICtrl::getTentative() const { return mTentative; } diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index c5182fefe9..b2b64251ba 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -39,8 +39,8 @@ #include "llviewmodel.h" // *TODO move dependency to .cpp file #include "llsearchablecontrol.h" -const BOOL TAKE_FOCUS_YES = TRUE; -const BOOL TAKE_FOCUS_NO = FALSE; +const bool TAKE_FOCUS_YES = true; +const bool TAKE_FOCUS_NO = false; class LLUICtrl : public LLView, public boost::signals2::trackable @@ -146,15 +146,15 @@ protected: // We shouldn't ever need to set this directly //virtual void setViewModel(const LLViewModelPtr&); - /*virtual*/ BOOL postBuild() override; + /*virtual*/ bool postBuild() override; public: // LLView interface - /*virtual*/ BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ) override; - /*virtual*/ BOOL isCtrl() const override; + /*virtual*/ bool setLabelArg( const std::string& key, const LLStringExplicit& text ) override; + /*virtual*/ bool isCtrl() const override; /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask) override; /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override; - /*virtual*/ BOOL canFocusChildren() const override; + /*virtual*/ bool canFocusChildren() const override; /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; @@ -162,8 +162,8 @@ public: /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask) override; // From LLFocusableElement - /*virtual*/ void setFocus( BOOL b ) override; - /*virtual*/ BOOL hasFocus() const override; + /*virtual*/ void setFocus( bool b ) override; + /*virtual*/ bool hasFocus() const override; // New virtuals @@ -186,22 +186,22 @@ public: void setFunctionName(const std::string& function_name); - virtual void setTentative(BOOL b); - virtual BOOL getTentative() const; + virtual void setTentative(bool b); + virtual bool getTentative() const; virtual void setValue(const LLSD& value); virtual LLSD getValue() const; /// When two widgets are displaying the same data (e.g. during a skin /// change), share their ViewModel. virtual void shareViewModelFrom(const LLUICtrl& other); - virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); - virtual void setIsChrome(BOOL is_chrome); + virtual bool setTextArg( const std::string& key, const LLStringExplicit& text ); + virtual void setIsChrome(bool is_chrome); - virtual BOOL acceptsTextInput() const; // Defaults to false + virtual bool acceptsTextInput() const; // Defaults to false // A control is dirty if the user has modified its value. // Editable controls should override this. - virtual BOOL isDirty() const; // Defauls to false + virtual bool isDirty() const; // Defauls to false virtual void resetDirty(); //Defaults to no-op // Call appropriate callback @@ -222,16 +222,16 @@ public: void setTransparencyType(ETypeTransparency type); ETypeTransparency getTransparencyType() const {return mTransparencyType;} - BOOL focusNextItem(BOOL text_entry_only); - BOOL focusPrevItem(BOOL text_entry_only); - BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE ); + bool focusNextItem(bool text_entry_only); + bool focusPrevItem(bool text_entry_only); + bool focusFirstItem(bool prefer_text_fields = false, bool focus_flash = true ); // Non Virtuals LLHandle<LLUICtrl> getHandle() const { return getDerivedHandle<LLUICtrl>(); } - BOOL getIsChrome() const; + bool getIsChrome() const; - void setTabStop( BOOL b ); - BOOL hasTabStop() const; + void setTabStop( bool b ); + bool hasTabStop() const; LLUICtrl* getParentUICtrl() const; @@ -266,7 +266,7 @@ public: LLSINGLETON_EMPTY_CTOR(LLTextInputFilter); /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl *>(view)->acceptsTextInput(), TRUE); + return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl *>(view)->acceptsTextInput(), true); } }; @@ -322,10 +322,10 @@ protected: private: - BOOL mIsChrome; - BOOL mRequestsFront; - BOOL mTabStop; - BOOL mTentative; + bool mIsChrome; + bool mRequestsFront; + bool mTabStop; + bool mTentative; ETypeTransparency mTransparencyType; }; @@ -333,7 +333,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLUICTRL_CPP extern template class LLUICtrl* LLView::getChild<class LLUICtrl>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif // LL_LLUICTRL_H diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index a85db17c7f..dca777cc1f 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -124,7 +124,7 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid LLXMLNodePtr outputChild; if (output_node) { - outputChild = output_node->createChild("", FALSE); + outputChild = output_node->createChild("", false); } if (!instance().createFromXML(child_node, viewp, LLStringUtil::null, registry, outputChild)) diff --git a/indra/llui/llundo.cpp b/indra/llui/llundo.cpp index 7c4c183a30..7a867357f8 100644 --- a/indra/llui/llundo.cpp +++ b/indra/llui/llundo.cpp @@ -72,7 +72,7 @@ LLUndoBuffer::~LLUndoBuffer() //----------------------------------------------------------------------------- // getNextAction() //----------------------------------------------------------------------------- -LLUndoBuffer::LLUndoAction* LLUndoBuffer::getNextAction(BOOL setClusterBegin) +LLUndoBuffer::LLUndoAction* LLUndoBuffer::getNextAction(bool setClusterBegin) { LLUndoAction *nextAction = mActions[mNextAction]; @@ -97,11 +97,11 @@ LLUndoBuffer::LLUndoAction* LLUndoBuffer::getNextAction(BOOL setClusterBegin) //----------------------------------------------------------------------------- // undoAction() //----------------------------------------------------------------------------- -BOOL LLUndoBuffer::undoAction() +bool LLUndoBuffer::undoAction() { if (!canUndo()) { - return FALSE; + return false; } S32 prevAction = (mNextAction + mNumActions - 1) % mNumActions; @@ -118,7 +118,7 @@ BOOL LLUndoBuffer::undoAction() if (mNextAction == mFirstAction) { mOperationID--; - return FALSE; + return false; } // do wrap-around of index, but avoid negative numbers for modulo operator @@ -127,17 +127,17 @@ BOOL LLUndoBuffer::undoAction() mOperationID--; - return TRUE; + return true; } //----------------------------------------------------------------------------- // redoAction() //----------------------------------------------------------------------------- -BOOL LLUndoBuffer::redoAction() +bool LLUndoBuffer::redoAction() { if (!canRedo()) { - return FALSE; + return false; } mOperationID++; @@ -146,7 +146,7 @@ BOOL LLUndoBuffer::redoAction() { if (mNextAction == mLastAction) { - return FALSE; + return false; } mActions[mNextAction]->redo(); @@ -155,7 +155,7 @@ BOOL LLUndoBuffer::redoAction() mNextAction = (mNextAction + 1) % mNumActions; } - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/llui/llundo.h b/indra/llui/llundo.h index a6da550126..f7ca6f66d2 100644 --- a/indra/llui/llundo.h +++ b/indra/llui/llundo.h @@ -48,11 +48,11 @@ public: LLUndoBuffer( LLUndoAction (*create_func()), S32 initial_count ); virtual ~LLUndoBuffer(); - LLUndoAction *getNextAction(BOOL setClusterBegin = TRUE); - BOOL undoAction(); - BOOL redoAction(); - BOOL canUndo() { return (mNextAction != mFirstAction); } - BOOL canRedo() { return (mNextAction != mLastAction); } + LLUndoAction *getNextAction(bool setClusterBegin = true); + bool undoAction(); + bool redoAction(); + bool canUndo() { return (mNextAction != mFirstAction); } + bool canRedo() { return (mNextAction != mLastAction); } void flushActions(); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 77e9edf5e5..08f5d011f1 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -395,7 +395,7 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0)) { - return TRUE; + return true; } } else if (path_parts == (actual_parts-1)) @@ -407,7 +407,7 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const ; if((x>= 0 && x<= 256) && (y>= 0 && y<= 256)) { - return TRUE; + return true; } } else if (path_parts == (actual_parts-2)) @@ -416,11 +416,11 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const LLStringUtil::convertToS32(path_array[path_parts-1],x); if(x>= 0 && x<= 256) { - return TRUE; + return true; } } - return FALSE; + return false; } // diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 5d0f5479f6..7d3728d790 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -107,7 +107,7 @@ public: bool isWikiLinkCorrect(const std::string &url) const; - virtual bool isSLURLvalid(const std::string &url) const { return TRUE; }; + virtual bool isSLURLvalid(const std::string &url) const { return true; }; protected: std::string getIDStringFromUrl(const std::string &url) const; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 4a6d10a790..894c8f6a32 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -66,11 +66,11 @@ bool LLView::sDebugRectsShowNames = true; bool LLView::sDebugKeys = false; bool LLView::sDebugMouseHandling = false; std::string LLView::sMouseHandlerMessage; -BOOL LLView::sForceReshape = FALSE; +bool LLView::sForceReshape = false; std::set<LLView*> LLView::sPreviewHighlightedElements; -BOOL LLView::sHighlightingDiffs = FALSE; +bool LLView::sHighlightingDiffs = false; LLView* LLView::sPreviewClickedElement = NULL; -BOOL LLView::sDrawPreviewHighlights = FALSE; +bool LLView::sDrawPreviewHighlights = false; S32 LLView::sLastLeftXML = S32_MIN; S32 LLView::sLastBottomXML = S32_MIN; std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack; @@ -79,12 +79,12 @@ LLView::DrilldownFunc LLView::sDrilldown = boost::bind(&LLView::pointInView, _1, _2, _3, HIT_TEST_USE_BOUNDING_RECT); //#if LL_DEBUG -BOOL LLView::sIsDrawing = FALSE; +bool LLView::sIsDrawing = false; //#endif // Compiler optimization, generate extern template template class LLView* LLView::getChild<class LLView>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; static LLDefaultChildRegistry::Register<LLView> r("view"); @@ -147,7 +147,7 @@ LLView::LLView(const LLView::Params& p) mReshapeFlags(FOLLOWS_NONE), mFromXUI(p.from_xui), mIsFocusRoot(p.focus_root), - mLastVisible(FALSE), + mLastVisible(false), mHoverCursor(getCursorFromString(p.hover_cursor)), mEnabled(p.enabled), mMouseOpaque(p.mouse_opaque), @@ -171,7 +171,7 @@ LLView::~LLView() { LL_DEBUGS() << "Deleting view " << mName << " during UI draw() phase" << LL_ENDL; } -// llassert(LLView::sIsDrawing == FALSE); +// llassert(LLView::sIsDrawing == false); // llassert_always(sDepth == 0); // avoid deleting views while drawing! It can subtly break list iterators @@ -196,15 +196,15 @@ LLView::~LLView() } // virtual -BOOL LLView::isCtrl() const +bool LLView::isCtrl() const { - return FALSE; + return false; } // virtual -BOOL LLView::isPanel() const +bool LLView::isPanel() const { - return FALSE; + return false; } void LLView::setToolTip(const LLStringExplicit& msg) @@ -212,10 +212,10 @@ void LLView::setToolTip(const LLStringExplicit& msg) mToolTipMsg = msg; } -BOOL LLView::setToolTipArg(const LLStringExplicit& key, const LLStringExplicit& text) +bool LLView::setToolTipArg(const LLStringExplicit& key, const LLStringExplicit& text) { mToolTipMsg.setArg(key, text); - return TRUE; + return true; } void LLView::setToolTipArgs( const LLStringUtil::format_map_t& args ) @@ -230,7 +230,7 @@ void LLView::setRect(const LLRect& rect) updateBoundingRect(); } -void LLView::setUseBoundingRect( BOOL use_bounding_rect ) +void LLView::setUseBoundingRect( bool use_bounding_rect ) { if (mUseBoundingRect != use_bounding_rect) { @@ -239,7 +239,7 @@ void LLView::setUseBoundingRect( BOOL use_bounding_rect ) } } -BOOL LLView::getUseBoundingRect() const +bool LLView::getUseBoundingRect() const { return mUseBoundingRect; } @@ -357,16 +357,16 @@ void LLView::removeChild(LLView* child) updateBoundingRect(); } -BOOL LLView::isInVisibleChain() const +bool LLView::isInVisibleChain() const { - BOOL visible = TRUE; + bool visible = true; const LLView* viewp = this; while(viewp) { if (!viewp->getVisible()) { - visible = FALSE; + visible = false; break; } viewp = viewp->getParent(); @@ -375,16 +375,16 @@ BOOL LLView::isInVisibleChain() const return visible; } -BOOL LLView::isInEnabledChain() const +bool LLView::isInEnabledChain() const { - BOOL enabled = TRUE; + bool enabled = true; const LLView* viewp = this; while(viewp) { if (!viewp->getEnabled()) { - enabled = FALSE; + enabled = false; break; } viewp = viewp->getParent(); @@ -444,13 +444,13 @@ std::string LLView::getPathname(const LLView* view) } // virtual -BOOL LLView::canFocusChildren() const +bool LLView::canFocusChildren() const { - return TRUE; + return true; } //virtual -void LLView::setEnabled(BOOL enabled) +void LLView::setEnabled(bool enabled) { mEnabled = enabled; } @@ -468,9 +468,9 @@ bool LLView::isAvailable(const LLView* view) } //virtual -BOOL LLView::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLView::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - return FALSE; + return false; } //virtual @@ -485,20 +485,20 @@ LLRect LLView::getRequiredRect() return mRect; } -BOOL LLView::focusNextRoot() +bool LLView::focusNextRoot() { LLView::child_list_t result = LLView::getFocusRootsQuery().run(this); return LLView::focusNext(result); } -BOOL LLView::focusPrevRoot() +bool LLView::focusPrevRoot() { LLView::child_list_t result = LLView::getFocusRootsQuery().run(this); return LLView::focusPrev(result); } // static -BOOL LLView::focusNext(LLView::child_list_t & result) +bool LLView::focusNext(LLView::child_list_t & result) { LLView::child_list_reverse_iter_t focused = result.rend(); for(LLView::child_list_reverse_iter_t iter = result.rbegin(); @@ -523,18 +523,18 @@ BOOL LLView::focusNext(LLView::child_list_t & result) if((*next)->isCtrl()) { LLUICtrl * ctrl = static_cast<LLUICtrl*>(*next); - ctrl->setFocus(TRUE); + ctrl->setFocus(true); ctrl->onTabInto(); gFocusMgr.triggerFocusFlash(); - return TRUE; + return true; } ++next; } - return FALSE; + return false; } // static -BOOL LLView::focusPrev(LLView::child_list_t & result) +bool LLView::focusPrev(LLView::child_list_t & result) { LLView::child_list_iter_t focused = result.end(); for(LLView::child_list_iter_t iter = result.begin(); @@ -561,15 +561,15 @@ BOOL LLView::focusPrev(LLView::child_list_t & result) LLUICtrl * ctrl = static_cast<LLUICtrl*>(*next); if (!ctrl->hasFocus()) { - ctrl->setFocus(TRUE); + ctrl->setFocus(true); ctrl->onTabInto(); gFocusMgr.triggerFocusFlash(); } - return TRUE; + return true; } ++next; } - return FALSE; + return false; } // delete all children. Override this function if you need to @@ -590,7 +590,7 @@ void LLView::deleteAllChildren() updateBoundingRect(); } -void LLView::setAllChildrenEnabled(BOOL b) +void LLView::setAllChildrenEnabled(bool b) { BOOST_FOREACH(LLView* viewp, mChildList) { @@ -599,7 +599,7 @@ void LLView::setAllChildrenEnabled(BOOL b) } // virtual -void LLView::setVisible(BOOL visible) +void LLView::setVisible(bool visible) { if ( mVisible != visible ) { @@ -617,10 +617,10 @@ void LLView::setVisible(BOOL visible) } // virtual -void LLView::onVisibilityChange ( BOOL new_visibility ) +void LLView::onVisibilityChange ( bool new_visibility ) { - BOOL old_visibility; - BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus(); + bool old_visibility; + bool log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus(); BOOST_FOREACH(LLView* viewp, mChildList) { if (!viewp) @@ -673,7 +673,7 @@ void LLView::translate(S32 x, S32 y) } // virtual -BOOL LLView::canSnapTo(const LLView* other_view) +bool LLView::canSnapTo(const LLView* other_view) { return other_view != this && other_view->getVisible(); } @@ -727,7 +727,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m { BOOST_FOREACH(LLView* viewp, mChildList) { - if ((viewp->*method)(c, mask, TRUE)) + if ((viewp->*method)(c, mask, true)) { if (LLView::sDebugKeys) { @@ -796,7 +796,7 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, MASK mask) } LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -929,9 +929,9 @@ bool LLView::handleToolTip(S32 x, S32 y, MASK mask) return handled; } -BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLView::handleKey(KEY key, MASK mask, bool called_from_parent) { - BOOL handled = FALSE; + bool handled = false; if (getVisible() && getEnabled()) { @@ -956,14 +956,14 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) if( !handled && !called_from_parent && mParentView) { // Upward traversal - handled = mParentView->handleKey( key, mask, FALSE ); + handled = mParentView->handleKey( key, mask, false ); } return handled; } -BOOL LLView::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLView::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { - BOOL handled = FALSE; + bool handled = false; if (getVisible() && getEnabled()) { @@ -988,28 +988,28 @@ BOOL LLView::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) if (!handled && !called_from_parent && mParentView) { // Upward traversal - handled = mParentView->handleKeyUp(key, mask, FALSE); + handled = mParentView->handleKeyUp(key, mask, false); } return handled; } // Called from handleKey() // Handles key in this object. Checking parents and children happens in handleKey() -BOOL LLView::handleKeyHere(KEY key, MASK mask) +bool LLView::handleKeyHere(KEY key, MASK mask) { - return FALSE; + return false; } // Called from handleKey() // Handles key in this object. Checking parents and children happens in handleKey() -BOOL LLView::handleKeyUpHere(KEY key, MASK mask) +bool LLView::handleKeyUpHere(KEY key, MASK mask) { - return FALSE; + return false; } -BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLView::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { - BOOL handled = FALSE; + bool handled = false; if (getVisible() && getEnabled()) { @@ -1032,7 +1032,7 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) if (!handled && !called_from_parent && mParentView) { // Upward traversal - handled = mParentView->handleUnicodeChar(uni_char, FALSE); + handled = mParentView->handleUnicodeChar(uni_char, false); } if (handled) @@ -1050,7 +1050,7 @@ bool LLView::handleUnicodeCharHere(llwchar uni_char ) } -BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) @@ -1337,13 +1337,13 @@ void LLView::drawDebugRect() debug_rect.getWidth(), debug_rect.getHeight()); LLFontGL::getFontSansSerifSmall()->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color, LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, NULL, FALSE); + S32_MAX, S32_MAX, NULL, false); } } LLUI::popMatrix(); } -void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_draw) +void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, bool force_draw) { if (childp && childp->getParent() == this) { @@ -1366,7 +1366,7 @@ void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_dr } -void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLView::reshape(S32 width, S32 height, bool called_from_parent) { // compute how much things changed and apply reshape logic to children S32 delta_width = width - getRect().getWidth(); @@ -1440,7 +1440,7 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) { if (mParentView) { - mParentView->reshape(mParentView->getRect().getWidth(), mParentView->getRect().getHeight(), FALSE); + mParentView->reshape(mParentView->getRect().getWidth(), mParentView->getRect().getHeight(), false); } } @@ -1555,11 +1555,11 @@ LLRect LLView::getLocalSnapRect() const return local_snap_rect; } -BOOL LLView::hasAncestor(const LLView* parentp) const +bool LLView::hasAncestor(const LLView* parentp) const { if (!parentp) { - return FALSE; + return false; } LLView* viewp = getParent(); @@ -1567,17 +1567,17 @@ BOOL LLView::hasAncestor(const LLView* parentp) const { if (viewp == parentp) { - return TRUE; + return true; } viewp = viewp->getParent(); } - return FALSE; + return false; } //----------------------------------------------------------------------------- -BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const +bool LLView::childHasKeyboardFocus( const std::string& childname ) const { LLView *focus = dynamic_cast<LLView *>(gFocusMgr.getKeyboardFocus()); @@ -1585,18 +1585,18 @@ BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const { if (focus->getName() == childname) { - return TRUE; + return true; } focus = focus->getParent(); } - return FALSE; + return false; } //----------------------------------------------------------------------------- -BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const +bool LLView::hasChild(const std::string& childname, bool recurse) const { return findChildView(childname, recurse) != NULL; } @@ -1604,12 +1604,12 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const //----------------------------------------------------------------------------- // getChildView() //----------------------------------------------------------------------------- -LLView* LLView::getChildView(const std::string& name, BOOL recurse) const +LLView* LLView::getChildView(const std::string& name, bool recurse) const { return getChild<LLView>(name, recurse); } -LLView* LLView::findChildView(const std::string& name, BOOL recurse) const +LLView* LLView::findChildView(const std::string& name, bool recurse) const { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; @@ -1638,21 +1638,21 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const return NULL; } -BOOL LLView::parentPointInView(S32 x, S32 y, EHitTestType type) const +bool LLView::parentPointInView(S32 x, S32 y, EHitTestType type) const { return (getUseBoundingRect() && type == HIT_TEST_USE_BOUNDING_RECT) ? mBoundingRect.pointInRect( x, y ) : mRect.pointInRect( x, y ); } -BOOL LLView::pointInView(S32 x, S32 y, EHitTestType type) const +bool LLView::pointInView(S32 x, S32 y, EHitTestType type) const { return (getUseBoundingRect() && type == HIT_TEST_USE_BOUNDING_RECT) ? mBoundingRect.pointInRect( x + mRect.mLeft, y + mRect.mBottom ) : mRect.localPointInRect( x, y ); } -BOOL LLView::blockMouseEvent(S32 x, S32 y) const +bool LLView::blockMouseEvent(S32 x, S32 y) const { return mMouseOpaque && pointInView(x, y, HIT_TEST_IGNORE_BOUNDING_RECT); } @@ -1778,21 +1778,21 @@ LLCoordGL getNeededTranslation(const LLRect& input, const LLRect& constraint, S3 // Moves the view so that it is entirely inside of constraint. // If the view will not fit because it's too big, aligns with the top and left. // (Why top and left? That's where the drag bars are for floaters.) -BOOL LLView::translateIntoRect(const LLRect& constraint, S32 min_overlap_pixels) +bool LLView::translateIntoRect(const LLRect& constraint, S32 min_overlap_pixels) { LLCoordGL translation = getNeededTranslation(getRect(), constraint, min_overlap_pixels); if (translation.mX != 0 || translation.mY != 0) { translate(translation.mX, translation.mY); - return TRUE; + return true; } - return FALSE; + return false; } // move this view into "inside" but not onto "exclude" // NOTE: if this view is already contained in "inside", we ignore the "exclude" rect -BOOL LLView::translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, S32 min_overlap_pixels) +bool LLView::translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, S32 min_overlap_pixels) { LLCoordGL translation = getNeededTranslation(getRect(), inside, min_overlap_pixels); @@ -1828,9 +1828,9 @@ BOOL LLView::translateIntoRectWithExclusion( const LLRect& inside, const LLRect& } } - return TRUE; + return true; } - return FALSE; + return false; } @@ -1842,7 +1842,7 @@ void LLView::centerWithin(const LLRect& bounds) translate( left - getRect().mLeft, bottom - getRect().mBottom ); } -BOOL LLView::localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, const LLView* other_view) const +bool LLView::localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, const LLView* other_view) const { const LLView* cur_view = this; const LLView* root_view = NULL; @@ -1853,7 +1853,7 @@ BOOL LLView::localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, co { *other_x = x; *other_y = y; - return TRUE; + return true; } x += cur_view->getRect().mLeft; @@ -1876,16 +1876,16 @@ BOOL LLView::localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, co { *other_x = x; *other_y = y; - return TRUE; + return true; } } *other_x = x; *other_y = y; - return FALSE; + return false; } -BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, const LLView* other_view ) const +bool LLView::localRectToOtherView( const LLRect& local, LLRect* other, const LLView* other_view ) const { LLRect cur_rect = local; const LLView* cur_view = this; @@ -1896,7 +1896,7 @@ BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, const LLV if (cur_view == other_view) { *other = cur_rect; - return TRUE; + return true; } cur_rect.translate(cur_view->getRect().mLeft, cur_view->getRect().mBottom); @@ -1916,12 +1916,12 @@ BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, const LLV if (cur_view == root_view) { *other = cur_rect; - return TRUE; + return true; } } *other = cur_rect; - return FALSE; + return false; } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 39eaf12913..8ac23f9f88 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -61,8 +61,8 @@ const U32 FOLLOWS_TOP = 0x10; const U32 FOLLOWS_BOTTOM = 0x20; const U32 FOLLOWS_ALL = 0x33; -const BOOL MOUSE_OPAQUE = TRUE; -const BOOL NOT_MOUSE_OPAQUE = FALSE; +const bool MOUSE_OPAQUE = true; +const bool NOT_MOUSE_OPAQUE = false; const U32 GL_NAME_UI_RESERVED = 2; @@ -169,7 +169,7 @@ private: LLView(const LLView& other); public: //#if LL_DEBUG - static BOOL sIsDrawing; + static bool sIsDrawing; //#endif enum ESoundFlags { @@ -210,19 +210,19 @@ public: virtual ~LLView(); // Some UI widgets need to be added as controls. Others need to - // be added as regular view children. isCtrl should return TRUE + // be added as regular view children. isCtrl should return true // if a widget needs to be added as a ctrl - virtual BOOL isCtrl() const; + virtual bool isCtrl() const; - virtual BOOL isPanel() const; + virtual bool isPanel() const; // // MANIPULATORS // - void setMouseOpaque( BOOL b ) { mMouseOpaque = b; } - BOOL getMouseOpaque() const { return mMouseOpaque; } + void setMouseOpaque( bool b ) { mMouseOpaque = b; } + bool getMouseOpaque() const { return mMouseOpaque; } void setToolTip( const LLStringExplicit& msg ); - BOOL setToolTipArg( const LLStringExplicit& key, const LLStringExplicit& text ); + bool setToolTipArg( const LLStringExplicit& key, const LLStringExplicit& text ); void setToolTipArgs( const LLStringUtil::format_map_t& args ); virtual void setRect(const LLRect &rect); @@ -238,8 +238,8 @@ public: void setSoundFlags(U8 flags) { mSoundFlags = flags; } void setName(std::string name) { mName = name; } - void setUseBoundingRect( BOOL use_bounding_rect ); - BOOL getUseBoundingRect() const; + void setUseBoundingRect( bool use_bounding_rect ); + bool getUseBoundingRect() const; ECursorType getHoverCursor() { return mHoverCursor; } @@ -257,7 +257,7 @@ public: // remove the specified child from the view, and set it's parent to NULL. virtual void removeChild(LLView* view); - virtual BOOL postBuild() { return TRUE; } + virtual bool postBuild() { return true; } const child_tab_order_t& getTabOrder() const { return mTabOrder; } @@ -265,15 +265,15 @@ public: S32 getDefaultTabGroup() const { return mDefaultTabGroup; } S32 getLastTabGroup() { return mLastTabGroup; } - BOOL isInVisibleChain() const; - BOOL isInEnabledChain() const; + bool isInVisibleChain() const; + bool isInEnabledChain() const; - void setFocusRoot(BOOL b) { mIsFocusRoot = b; } - BOOL isFocusRoot() const { return mIsFocusRoot; } - virtual BOOL canFocusChildren() const; + void setFocusRoot(bool b) { mIsFocusRoot = b; } + bool isFocusRoot() const { return mIsFocusRoot; } + virtual bool canFocusChildren() const; - BOOL focusNextRoot(); - BOOL focusPrevRoot(); + bool focusNextRoot(); + bool focusPrevRoot(); // Normally we want the app menus to get priority on accelerated keys // However, sometimes we want to give specific views a first chance @@ -285,13 +285,13 @@ public: // children, etc. virtual void deleteAllChildren(); - void setAllChildrenEnabled(BOOL b); + void setAllChildrenEnabled(bool b); - virtual void setVisible(BOOL visible); - void setVisibleDirect(BOOL visible) { mVisible = visible; } - const BOOL& getVisible() const { return mVisible; } - virtual void setEnabled(BOOL enabled); - BOOL getEnabled() const { return mEnabled; } + virtual void setVisible(bool visible); + void setVisibleDirect(bool visible) { mVisible = visible; } + const bool& getVisible() const { return mVisible; } + virtual void setEnabled(bool enabled); + bool getEnabled() const { return mEnabled; } /// 'available' in this context means 'visible and enabled': in other /// words, can a user actually interact with this? virtual bool isAvailable() const; @@ -299,21 +299,21 @@ public: static bool isAvailable(const LLView* view); U8 getSoundFlags() const { return mSoundFlags; } - virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text ); - virtual void onVisibilityChange ( BOOL new_visibility ); + virtual void onVisibilityChange ( bool new_visibility ); virtual void onUpdateScrollToChild(const LLUICtrl * cntrl); - void pushVisible(BOOL visible) { mLastVisible = mVisible; setVisible(visible); } + void pushVisible(bool visible) { mLastVisible = mVisible; setVisible(visible); } void popVisible() { setVisible(mLastVisible); } - BOOL getLastVisible() const { return mLastVisible; } + bool getLastVisible() const { return mLastVisible; } U32 getFollows() const { return mReshapeFlags; } - BOOL followsLeft() const { return mReshapeFlags & FOLLOWS_LEFT; } - BOOL followsRight() const { return mReshapeFlags & FOLLOWS_RIGHT; } - BOOL followsTop() const { return mReshapeFlags & FOLLOWS_TOP; } - BOOL followsBottom() const { return mReshapeFlags & FOLLOWS_BOTTOM; } - BOOL followsAll() const { return mReshapeFlags & FOLLOWS_ALL; } + bool followsLeft() const { return mReshapeFlags & FOLLOWS_LEFT; } + bool followsRight() const { return mReshapeFlags & FOLLOWS_RIGHT; } + bool followsTop() const { return mReshapeFlags & FOLLOWS_TOP; } + bool followsBottom() const { return mReshapeFlags & FOLLOWS_BOTTOM; } + bool followsAll() const { return mReshapeFlags & FOLLOWS_ALL; } const LLRect& getRect() const { return mRect; } const LLRect& getBoundingRect() const { return mBoundingRect; } @@ -338,9 +338,9 @@ public: LLView* findNextSibling(LLView* child); S32 getChildCount() const { return (S32)mChildList.size(); } template<class _Pr3> void sortChildren(_Pr3 _Pred) { mChildList.sort(_Pred); } - BOOL hasAncestor(const LLView* parentp) const; - BOOL hasChild(const std::string& childname, BOOL recurse = FALSE) const; - BOOL childHasKeyboardFocus( const std::string& childname ) const; + bool hasAncestor(const LLView* parentp) const; + bool hasChild(const std::string& childname, bool recurse = false) const; + bool childHasKeyboardFocus( const std::string& childname ) const; // these iterators are used for collapsing various tree traversals into for loops typedef LLTreeDFSIter<LLView, child_list_const_iter_t> tree_iterator_t; @@ -365,25 +365,25 @@ public: // // Default behavior is to use reshape flags to resize child views - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); virtual void translate( S32 x, S32 y ); void setOrigin( S32 x, S32 y ) { mRect.translate( x - mRect.mLeft, y - mRect.mBottom ); } - BOOL translateIntoRect( const LLRect& constraint, S32 min_overlap_pixels = S32_MAX); - BOOL translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, S32 min_overlap_pixels = S32_MAX); + bool translateIntoRect( const LLRect& constraint, S32 min_overlap_pixels = S32_MAX); + bool translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, S32 min_overlap_pixels = S32_MAX); void centerWithin(const LLRect& bounds); void setShape(const LLRect& new_rect, bool by_user = false); virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0); virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); - virtual BOOL canSnapTo(const LLView* other_view); + virtual bool canSnapTo(const LLView* other_view); virtual void setSnappedTo(const LLView* snap_view); // inherited from LLFocusableElement - /* virtual */ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - /* virtual */ BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent); - /* virtual */ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); + /* virtual */ bool handleKey(KEY key, MASK mask, bool called_from_parent); + /* virtual */ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); + /* virtual */ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -394,8 +394,8 @@ public: void parseFollowsFlags(const LLView::Params& params); // Some widgets, like close box buttons, don't need to be saved - BOOL getFromXUI() const { return mFromXUI; } - void setFromXUI(BOOL b) { mFromXUI = b; } + bool getFromXUI() const { return mFromXUI; } + void setFromXUI(bool b) { mFromXUI = b; } typedef enum e_hit_test_type { @@ -403,13 +403,13 @@ public: HIT_TEST_IGNORE_BOUNDING_RECT }EHitTestType; - BOOL parentPointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; - BOOL pointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; - BOOL blockMouseEvent(S32 x, S32 y) const; + bool parentPointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; + bool pointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; + bool blockMouseEvent(S32 x, S32 y) const; // See LLMouseHandler virtuals for screenPointToLocal and localPointToScreen - BOOL localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, const LLView* other_view) const; - BOOL localRectToOtherView( const LLRect& local, LLRect* other, const LLView* other_view ) const; + bool localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, const LLView* other_view) const; + bool localRectToOtherView( const LLRect& local, LLRect* other, const LLView* other_view ) const; void screenRectToLocal( const LLRect& screen, LLRect* local ) const; void localRectToScreen( const LLRect& local, LLRect* screen ) const; @@ -449,22 +449,22 @@ public: // static method handles NULL pointer too static std::string getPathname(const LLView*); - template <class T> T* findChild(const std::string& name, BOOL recurse = TRUE) const + template <class T> T* findChild(const std::string& name, bool recurse = true) const { LLView* child = findChildView(name, recurse); T* result = dynamic_cast<T*>(child); return result; } - template <class T> T* getChild(const std::string& name, BOOL recurse = TRUE) const; + template <class T> T* getChild(const std::string& name, bool recurse = true) const; - template <class T> T& getChildRef(const std::string& name, BOOL recurse = TRUE) const + template <class T> T& getChildRef(const std::string& name, bool recurse = true) const { return *getChild<T>(name, recurse); } - virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE) const; - virtual LLView* findChildView(const std::string& name, BOOL recurse = TRUE) const; + virtual LLView* getChildView(const std::string& name, bool recurse = true) const; + virtual LLView* findChildView(const std::string& name, bool recurse = true) const; template <class T> T* getDefaultWidget(const std::string& name) const { @@ -492,9 +492,9 @@ public: //static LLFontGL::HAlign selectFontHAlign(LLXMLNodePtr node); // focuses the item in the list after the currently-focused item, wrapping if necessary - static BOOL focusNext(LLView::child_list_t & result); + static bool focusNext(LLView::child_list_t & result); // focuses the item in the list before the currently-focused item, wrapping if necessary - static BOOL focusPrev(LLView::child_list_t & result); + static bool focusPrev(LLView::child_list_t & result); // returns query for iterating over controls in tab order static const LLViewQuery & getTabOrderQuery(); @@ -511,9 +511,9 @@ public: // to be top-left based. static void setupParamsForExport(Params& p, LLView* parent); - //virtual BOOL addChildFromParam(const LLInitParam::BaseBlock& params) { return TRUE; } - virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual BOOL handleKeyUpHere(KEY key, MASK mask); + //virtual bool addChildFromParam(const LLInitParam::BaseBlock& params) { return true; } + virtual bool handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyUpHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); virtual void handleReshape(const LLRect& rect, bool by_user); @@ -536,7 +536,7 @@ public: protected: void drawDebugRect(); - void drawChild(LLView* childp, S32 x_offset = 0, S32 y_offset = 0, BOOL force_draw = FALSE); + void drawChild(LLView* childp, S32 x_offset = 0, S32 y_offset = 0, bool force_draw = false); void drawChildren(); bool visibleAndContains(S32 local_x, S32 local_Y); bool visibleEnabledAndContains(S32 local_x, S32 local_y); @@ -546,7 +546,7 @@ protected: LLView* childrenHandleKeyUp(KEY key, MASK mask); LLView* childrenHandleUnicodeChar(llwchar uni_char); LLView* childrenHandleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType type, void* data, EAcceptance* accept, @@ -578,7 +578,7 @@ private: // adapter to blur distinction between handleKey() and handleUnicodeChar() // for childrenHandleCharEvent() - BOOL handleUnicodeCharWithDummyMask(llwchar uni_char, MASK /* dummy */, BOOL from_parent) + bool handleUnicodeCharWithDummyMask(llwchar uni_char, MASK /* dummy */, bool from_parent) { return handleUnicodeChar(uni_char, from_parent); } @@ -587,7 +587,7 @@ private: child_list_t mChildList; // location in pixels, relative to surrounding structure, bottom,left=0,0 - BOOL mVisible; + bool mVisible; LLRect mRect; LLRect mBoundingRect; @@ -600,18 +600,18 @@ private: S32 mDefaultTabGroup; S32 mLastTabGroup; - BOOL mEnabled; // Enabled means "accepts input that has an effect on the state of the application." + bool mEnabled; // Enabled means "accepts input that has an effect on the state of the application." // A disabled view, for example, may still have a scrollbar that responds to mouse events. - BOOL mMouseOpaque; // Opaque views handle all mouse events that are over their rect. + bool mMouseOpaque; // Opaque views handle all mouse events that are over their rect. LLUIString mToolTipMsg; // isNull() is true if none. U8 mSoundFlags; - BOOL mFromXUI; + bool mFromXUI; - BOOL mIsFocusRoot; - BOOL mUseBoundingRect; // hit test against bounding rectangle that includes all child elements + bool mIsFocusRoot; + bool mUseBoundingRect; // hit test against bounding rectangle that includes all child elements - BOOL mLastVisible; + bool mLastVisible; bool mInDraw; @@ -670,12 +670,12 @@ public: static std::string sMouseHandlerMessage; static S32 sSelectID; static std::set<LLView*> sPreviewHighlightedElements; // DEV-16869 - static BOOL sHighlightingDiffs; // DEV-16869 + static bool sHighlightingDiffs; // DEV-16869 static LLView* sPreviewClickedElement; // DEV-16869 - static BOOL sDrawPreviewHighlights; + static bool sDrawPreviewHighlights; static S32 sLastLeftXML; static S32 sLastBottomXML; - static BOOL sForceReshape; + static bool sForceReshape; }; namespace LLInitParam @@ -687,7 +687,7 @@ struct TypeValues<LLView::EOrientation> : public LLInitParam::TypeValuesHelper<L }; } -template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) const +template <class T> T* LLView::getChild(const std::string& name, bool recurse) const { LLView* child = findChildView(name, recurse); T* result = dynamic_cast<T*>(child); @@ -726,7 +726,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co // require explicit specialization. See llbutton.cpp for an example. #ifndef LLVIEW_CPP extern template class LLView* LLView::getChild<class LLView>( - const std::string& name, BOOL recurse) const; + const std::string& name, bool recurse) const; #endif #endif //LL_LLVIEW_H diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index 919267dcc6..bca566b7df 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -63,7 +63,7 @@ LLViewBorder::Params::Params() LLViewBorder::LLViewBorder(const LLViewBorder::Params& p) : LLView(p), mTexture( NULL ), - mHasKeyboardFocus( FALSE ), + mHasKeyboardFocus( false ), mBorderWidth(p.border_thickness), mHighlightLight(p.highlight_light_color()), mHighlightDark(p.highlight_dark_color()), @@ -114,7 +114,7 @@ void LLViewBorder::draw() } else { - llassert( FALSE ); // not implemented + llassert( false ); // not implemented } } @@ -239,7 +239,7 @@ void LLViewBorder::drawTwoPixelLines() gl_line_2d(left+1, bottom+1, right-1, bottom+1); } -BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style) +bool LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style) { if (node->hasAttribute("bevel_style")) { @@ -263,8 +263,8 @@ BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel { bevel_style = LLViewBorder::BEVEL_BRIGHT; } - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h index 413ce39744..e287f79848 100644 --- a/indra/llui/llviewborder.h +++ b/indra/llui/llviewborder.h @@ -66,12 +66,12 @@ protected: public: virtual void setValue(const LLSD& val) { setRect(LLRect(val)); } - virtual BOOL isCtrl() const { return FALSE; } + virtual bool isCtrl() const { return false; } // llview functionality virtual void draw(); - static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style); + static bool getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style); void setBorderWidth(S32 width) { mBorderWidth = width; } S32 getBorderWidth() const { return mBorderWidth; } @@ -87,7 +87,7 @@ public: EStyle getStyle() const { return mStyle; } - void setKeyboardFocusHighlight( BOOL b ) { mHasKeyboardFocus = b; } + void setKeyboardFocusHighlight( bool b ) { mHasKeyboardFocus = b; } private: void drawOnePixelLines(); @@ -103,7 +103,7 @@ private: LLUIColor mBackgroundColor; S32 mBorderWidth; LLPointer<LLUIImage> mTexture; - BOOL mHasKeyboardFocus; + bool mHasKeyboardFocus; }; #endif // LL_LLVIEWBORDER_H diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp index cb000aef74..87f83a6493 100644 --- a/indra/llui/llviewereventrecorder.cpp +++ b/indra/llui/llviewereventrecorder.cpp @@ -124,7 +124,7 @@ void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 g LL_DEBUGS() << "LLViewerEventRecorder::updateMouseEventInfo after updatemouseeventinfo - local_x|global x "<< this->local_x << " " << this->global_x << "local/global y " << this->local_y << " " << this->global_y << " mname: " << mName << " xui: " << xui << LL_ENDL; } -void LLViewerEventRecorder::logVisibilityChange(std::string xui, std::string name, BOOL visibility, std::string event_subtype) { +void LLViewerEventRecorder::logVisibilityChange(std::string xui, std::string name, bool visibility, std::string event_subtype) { LLSD event=LLSD::emptyMap(); diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h index 6170005b2b..e749e1ab57 100644 --- a/indra/llui/llviewereventrecorder.h +++ b/indra/llui/llviewereventrecorder.h @@ -55,7 +55,7 @@ public: void logKeyEvent(KEY key, MASK mask); void logKeyUnicodeEvent(llwchar uni_char); - void logVisibilityChange(std::string xui, std::string name, BOOL visibility, std::string event_subtype); + void logVisibilityChange(std::string xui, std::string name, bool visibility, std::string event_subtype); void clear_xui(); std::string get_xui(); diff --git a/indra/llui/llviewquery.cpp b/indra/llui/llviewquery.cpp index 66262609ae..3ad5e71a2e 100644 --- a/indra/llui/llviewquery.cpp +++ b/indra/llui/llviewquery.cpp @@ -34,12 +34,12 @@ void LLQuerySorter::sort(LLView * parent, viewList_t &children) const {} filterResult_t LLLeavesFilter::operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(children.empty(), TRUE); + return filterResult_t(children.empty(), true); } filterResult_t LLRootsFilter::operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(TRUE, FALSE); + return filterResult_t(true, false); } filterResult_t LLVisibleFilter::operator() (const LLView* const view, const viewList_t & children) const @@ -58,7 +58,7 @@ filterResult_t LLTabStopFilter::operator() (const LLView* const view, const view filterResult_t LLCtrlFilter::operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(view->isCtrl(),TRUE); + return filterResult_t(view->isCtrl(),true); } // @@ -79,7 +79,7 @@ viewList_t LLViewQuery::run(LLView* view) const } viewList_t filtered_children; - filterResult_t post(TRUE, TRUE); + filterResult_t post(true, true); if(pre.second) { // run filters on children @@ -123,7 +123,7 @@ void LLViewQuery::filterChildren(LLView* parent_view, viewList_t & filtered_chil filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const { - filterResult_t result = filterResult_t(TRUE, TRUE); + filterResult_t result = filterResult_t(true, true); for(filterList_const_iter_t iter = filters.begin(); iter != filters.end(); iter++) diff --git a/indra/llui/llviewquery.h b/indra/llui/llviewquery.h index 21bb1be26f..780f74f03c 100644 --- a/indra/llui/llviewquery.h +++ b/indra/llui/llviewquery.h @@ -35,7 +35,7 @@ class LLView; typedef std::list<LLView *> viewList_t; -typedef std::pair<BOOL, BOOL> filterResult_t; +typedef std::pair<bool, bool> filterResult_t; // Abstract base class for all query filters. class LLQueryFilter @@ -93,7 +93,7 @@ class LLWidgetTypeFilter : public LLQueryFilter { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(dynamic_cast<const T*>(view) != NULL, TRUE); + return filterResult_t(dynamic_cast<const T*>(view) != NULL, true); } }; diff --git a/indra/llui/llvirtualtrackball.cpp b/indra/llui/llvirtualtrackball.cpp index 6e86c4671f..78b35621b3 100644 --- a/indra/llui/llvirtualtrackball.cpp +++ b/indra/llui/llvirtualtrackball.cpp @@ -165,9 +165,9 @@ LLVirtualTrackball::~LLVirtualTrackball() { } -BOOL LLVirtualTrackball::postBuild() +bool LLVirtualTrackball::postBuild() { - return TRUE; + return true; } @@ -233,7 +233,7 @@ void LLVirtualTrackball::draw() } // hide the direction labels when disabled - BOOL enabled = isInEnabledChain(); + bool enabled = isInEnabledChain(); mLabelN->setVisible(enabled); mLabelE->setVisible(enabled); mLabelS->setVisible(enabled); @@ -491,26 +491,26 @@ bool LLVirtualTrackball::handleRightMouseDown(S32 x, S32 y, MASK mask) return LLView::handleRightMouseDown(x, y, mask); } -BOOL LLVirtualTrackball::handleKeyHere(KEY key, MASK mask) +bool LLVirtualTrackball::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_DOWN: onRotateTopClick(); - handled = TRUE; + handled = true; break; case KEY_LEFT: onRotateRightClick(); - handled = TRUE; + handled = true; break; case KEY_UP: onRotateBottomClick(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: onRotateLeftClick(); - handled = TRUE; + handled = true; break; default: break; diff --git a/indra/llui/llvirtualtrackball.h b/indra/llui/llvirtualtrackball.h index 574847de75..ebf7c8ba7b 100644 --- a/indra/llui/llvirtualtrackball.h +++ b/indra/llui/llvirtualtrackball.h @@ -79,13 +79,13 @@ public: virtual ~LLVirtualTrackball(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); virtual void draw(); diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index c122ab1c9b..a60ccb537e 100644 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -365,7 +365,7 @@ void LLXSDWriter::writeXSD(const std::string& type_name, LLXMLNodePtr node, cons // duplicate element choices LLXMLNodeList children; - mElementNode->getChildren("xs:element", children, FALSE); + mElementNode->getChildren("xs:element", children, false); for (LLXMLNodeList::iterator child_it = children.begin(); child_it != children.end(); ++child_it) { LLXMLNodePtr child_copy = child_it->second->deepCopy(); @@ -1426,7 +1426,7 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl mEmptyLeafNode.push_back(false); - if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) ) + if( !XML_ParseBuffer(mParser, bytes_read, true ) ) { LL_WARNS("ReadXUI") << "Error while parsing file " << filename << LL_ENDL; XML_ParserFree( mParser ); diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp index 94dc72c86f..40d5d8c903 100644 --- a/indra/llui/llxyvector.cpp +++ b/indra/llui/llxyvector.cpp @@ -66,7 +66,7 @@ LLXYVector::Params::Params() ghost_color("ghost_color"), area_color("area_color", LLColor4::grey4), grid_color("grid_color", LLColor4::grey % 0.25f), - logarithmic("logarithmic", FALSE) + logarithmic("logarithmic", false) { } @@ -142,12 +142,12 @@ LLXYVector::~LLXYVector() { } -BOOL LLXYVector::postBuild() +bool LLXYVector::postBuild() { mLogScaleX = (2 * log(mMaxValueX)) / mTouchArea->getRect().getWidth(); mLogScaleY = (2 * log(mMaxValueY)) / mTouchArea->getRect().getHeight(); - return TRUE; + return true; } void drawArrow(S32 tailX, S32 tailY, S32 tipX, S32 tipY, LLColor4 color) diff --git a/indra/llui/llxyvector.h b/indra/llui/llxyvector.h index 1f6c73387e..4a20275267 100644 --- a/indra/llui/llxyvector.h +++ b/indra/llui/llxyvector.h @@ -59,14 +59,14 @@ public: Optional<LLUIColor> ghost_color; Optional<LLUIColor> area_color; Optional<LLUIColor> grid_color; - Optional<BOOL> logarithmic; + Optional<bool> logarithmic; Params(); }; virtual ~LLXYVector(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); @@ -113,7 +113,7 @@ private: LLUIColor mAreaColor; LLUIColor mGridColor; - BOOL mLogarithmic; + bool mLogarithmic; F32 mLogScaleX; F32 mLogScaleY; }; diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index d69be4c8fb..a7a987bf8a 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -500,9 +500,9 @@ bool LLAvatarList::handleHover(S32 x, S32 y, MASK mask) return handled; } -void LLAvatarList::setVisible(BOOL visible) +void LLAvatarList::setVisible(bool visible) { - if ( visible == FALSE && mContextMenu ) + if ( visible == false && mContextMenu ) { mContextMenu->hide(); } diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 0a9d32c4a9..33c9c2aaed 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -65,7 +65,7 @@ public: virtual void clear(); - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 6b87d52064..0df3f156ef 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -103,7 +103,7 @@ LLAvatarListItem::~LLAvatarListItem() } } -BOOL LLAvatarListItem::postBuild() +bool LLAvatarListItem::postBuild() { mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarName = getChild<LLTextBox>("avatar_name"); @@ -141,10 +141,10 @@ BOOL LLAvatarListItem::postBuild() sStaticInitialized = true; } - return TRUE; + return true; } -void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility ) +void LLAvatarListItem::handleVisibilityChange ( bool new_visibility ) { //Adjust positions of icons (info button etc) when //speaking indicator visibility was changed/toggled while panel was closed (not visible) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index f542fe2121..222b4089c3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -79,12 +79,12 @@ public: LLAvatarListItem(bool not_from_ui_factory = true); virtual ~LLAvatarListItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); /** * Processes notification from speaker indicator to update children when indicator's visibility is changed. */ - virtual void handleVisibilityChange ( BOOL new_visibility ); + virtual void handleVisibilityChange ( bool new_visibility ); virtual S32 notifyParent(const LLSD& info); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseEnter(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llblockedlistitem.cpp b/indra/newview/llblockedlistitem.cpp index d9afd2b629..5346b39120 100644 --- a/indra/newview/llblockedlistitem.cpp +++ b/indra/newview/llblockedlistitem.cpp @@ -51,7 +51,7 @@ LLBlockedListItem::LLBlockedListItem(const LLMute* item) buildFromFile("panel_blocked_list_item.xml"); } -BOOL LLBlockedListItem::postBuild() +bool LLBlockedListItem::postBuild() { mTitleCtrl = getChild<LLTextBox>("item_name"); mTitleCtrl->setValue(mItemName); @@ -62,27 +62,27 @@ BOOL LLBlockedListItem::postBuild() case LLMute::EXTERNAL: { LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); - avatar_icon->setVisible(TRUE); + avatar_icon->setVisible(true); avatar_icon->setValue(mItemID); } break; case LLMute::GROUP: { LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon"); - group_icon->setVisible(TRUE); + group_icon->setVisible(true); group_icon->setValue(mItemID); } break; case LLMute::OBJECT: case LLMute::BY_NAME: - getChild<LLUICtrl>("object_icon")->setVisible(TRUE); + getChild<LLUICtrl>("object_icon")->setVisible(true); break; default: break; } - return TRUE; + return true; } void LLBlockedListItem::onMouseEnter(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llblockedlistitem.h b/indra/newview/llblockedlistitem.h index 05409e8a3b..508614366a 100644 --- a/indra/newview/llblockedlistitem.h +++ b/indra/newview/llblockedlistitem.h @@ -49,7 +49,7 @@ class LLBlockedListItem : public LLPanel public: LLBlockedListItem(const LLMute* item); - virtual BOOL postBuild(); + virtual bool postBuild(); void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 8d3323aa66..cf5aafb845 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -63,7 +63,7 @@ // // Globals // -const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds +constexpr F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds LLChatBar *gChatBar = NULL; @@ -105,7 +105,7 @@ LLChatBar::~LLChatBar() // LLView destructor cleans up children } -BOOL LLChatBar::postBuild() +bool LLChatBar::postBuild() { getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); @@ -129,7 +129,7 @@ BOOL LLChatBar::postBuild() mIsBuilt = TRUE; - return TRUE; + return true; } //----------------------------------------------------------------------- @@ -137,9 +137,9 @@ BOOL LLChatBar::postBuild() //----------------------------------------------------------------------- // virtual -BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) +bool LLChatBar::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( KEY_RETURN == key ) { @@ -147,13 +147,13 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { // shout sendChat(CHAT_TYPE_SHOUT); - handled = TRUE; + handled = true; } else if (mask == MASK_NONE) { // say sendChat( CHAT_TYPE_NORMAL ); - handled = TRUE; + handled = true; } } // only do this in main chatbar @@ -161,7 +161,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { stopChat(); - handled = TRUE; + handled = true; } return handled; diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index 26ef5f1535..47f850ec88 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -47,9 +47,9 @@ public: // constructor for inline chat-bars (e.g. hosted in chat history window) LLChatBar(); ~LLChatBar(); - virtual BOOL postBuild(); + virtual bool postBuild(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void refresh(); void refreshGestures(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 707b1ceda8..fbcff0fc5a 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -577,7 +577,7 @@ public: return false; } - BOOL postBuild() + bool postBuild() { setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this)); diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 7ec1ebb9f7..f6cb39485a 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -43,9 +43,9 @@ #include "llslurl.h" -static const S32 msg_left_offset = 10; -static const S32 msg_right_offset = 10; -static const S32 msg_height_pad = 5; +static constexpr S32 msg_left_offset = 10; +static constexpr S32 msg_right_offset = 10; +static constexpr S32 msg_height_pad = 5; //******************************************************************************************************************* // LLObjectHandler @@ -93,7 +93,7 @@ LLFloaterIMNearbyChatToastPanel* LLFloaterIMNearbyChatToastPanel::createInstance return item; } -void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_parent ) +void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width, height,called_from_parent); @@ -122,7 +122,7 @@ void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL call msg_text->setRect(msg_text_rect); } -BOOL LLFloaterIMNearbyChatToastPanel::postBuild() +bool LLFloaterIMNearbyChatToastPanel::postBuild() { return LLPanel::postBuild(); } diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index c8c95426f8..1a6ad57641 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -69,9 +69,9 @@ public: bool handleMouseDown (S32 x, S32 y, MASK mask); bool handleMouseUp (S32 x, S32 y, MASK mask); - virtual BOOL postBuild(); + virtual bool postBuild(); - void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape (S32 width, S32 height, bool called_from_parent = true); void setHeaderVisibility(EShowItemHeader e); bool handleRightMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 5bd37b2158..6239c0946c 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -334,12 +334,12 @@ LLIMChiclet::~LLIMChiclet() } /* virtual*/ -BOOL LLIMChiclet::postBuild() +bool LLIMChiclet::postBuild() { mChicletButton = getChild<LLButton>("chiclet_button"); mChicletButton->setCommitCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); mChicletButton->setDoubleClickCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); - return TRUE; + return true; } void LLIMChiclet::enableCounterControl(bool enable) @@ -498,7 +498,7 @@ void LLChicletPanel::objectChicletCallback(const LLSD& data) } } -BOOL LLChicletPanel::postBuild() +bool LLChicletPanel::postBuild() { LLPanel::postBuild(); LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); @@ -520,7 +520,7 @@ BOOL LLChicletPanel::postBuild() mRightScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onRightScrollHeldDown,this)); mRightScrollButton->setEnabled(false); - return TRUE; + return true; } void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) @@ -706,7 +706,7 @@ void LLChicletPanel::scrollToChiclet(const LLChiclet* chiclet) } } -void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) +void LLChicletPanel::reshape(S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width,height,called_from_parent); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 7056b1be14..4e54712d74 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -257,7 +257,7 @@ public: /** * It is used for default setting up of chicklet:click handler, etc. */ - BOOL postBuild(); + bool postBuild(); /** * Sets IM session name. This name will be displayed in chiclet tooltip. @@ -660,7 +660,7 @@ public: boost::signals2::connection setChicletClickedCallback( const commit_callback_t& cb); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl @@ -670,7 +670,7 @@ public: /** * Reshapes controls and rearranges chiclets if needed. */ - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE ); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true ); /*virtual*/ void draw(); diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 91b9d68fd2..f9490dcba4 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -45,7 +45,7 @@ LLChicletBar::LLChicletBar() buildFromFile("panel_chiclet_bar.xml"); } -BOOL LLChicletBar::postBuild() +bool LLChicletBar::postBuild() { mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); @@ -55,7 +55,7 @@ BOOL LLChicletBar::postBuild() LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); - return TRUE; + return true; } void LLChicletBar::showWellButton(const std::string& well_name, bool visible) @@ -78,7 +78,7 @@ void LLChicletBar::log(LLView* panel, const std::string& descr) << LL_ENDL; } -void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLChicletBar::reshape(S32 width, S32 height, bool called_from_parent) { static S32 debug_calling_number = 0; LL_DEBUGS() << "**************************************** " << ++debug_calling_number << LL_ENDL; diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h index 6c521dc1d5..fb8c6d400a 100644 --- a/indra/newview/llchicletbar.h +++ b/indra/newview/llchicletbar.h @@ -43,11 +43,11 @@ class LLChicletBar public: - BOOL postBuild(); + bool postBuild() override; LLChicletPanel* getChicletPanel() { return mChicletPanel; } - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + void reshape(S32 width, S32 height, bool called_from_parent) override; /** diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index aa2ba752b7..bb3ce9eb00 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -307,7 +307,7 @@ LLCOFWearables::~LLCOFWearables() } // virtual -BOOL LLCOFWearables::postBuild() +bool LLCOFWearables::postBuild() { mAttachments = getChild<LLFlatListView>("list_attachments"); mClothing = getChild<LLFlatListView>("list_clothing"); diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 9957d6a64e..53d39671f6 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -68,7 +68,7 @@ public: LLCOFWearables(); virtual ~LLCOFWearables(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); LLUUID getSelectedUUID(); bool getSelectedUUIDs(uuid_vec_t& selected_ids); diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index e4d0c26c11..e0673e04cd 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -253,7 +253,7 @@ void LLColorSwatchCtrl::draw() LLUICtrl::draw(); } -void LLColorSwatchCtrl::setEnabled( BOOL enabled ) +void LLColorSwatchCtrl::setEnabled( bool enabled ) { mCaption->setEnabled( enabled ); LLView::setEnabled( enabled ); diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 80826da73b..c02919064e 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -95,7 +95,7 @@ public: /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char); /*virtual*/ void draw(); - /*virtual*/ void setEnabled( BOOL enabled ); + /*virtual*/ void setEnabled( bool enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); void closeFloaterColorPicker(); diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index eb2c156ca5..c93ce2c6a3 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -194,12 +194,12 @@ LLFloaterScriptQueue::~LLFloaterScriptQueue() { } -BOOL LLFloaterScriptQueue::postBuild() +bool LLFloaterScriptQueue::postBuild() { childSetAction("close",onCloseBtn,this); - getChildView("close")->setEnabled(FALSE); + getChildView("close")->setEnabled(false); setVisible(true); - return TRUE; + return true; } // static diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index a9bac345b5..1f36a775b0 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -53,7 +53,7 @@ public: LLFloaterScriptQueue(const LLSD& key); virtual ~LLFloaterScriptQueue(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void setMono(bool mono) { mMono = mono; } diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index 4e984d603b..94628e3bf9 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -62,7 +62,7 @@ LLConversationLogListItem::~LLConversationLogListItem() mIMFloaterShowedConnection.disconnect(); } -BOOL LLConversationLogListItem::postBuild() +bool LLConversationLogListItem::postBuild() { initIcons(); @@ -77,7 +77,7 @@ BOOL LLConversationLogListItem::postBuild() getChild<LLButton>("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this)); setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this)); - return TRUE; + return true; } void LLConversationLogListItem::initIcons() diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h index ee28456bbb..55c3377302 100644 --- a/indra/newview/llconversationloglistitem.h +++ b/indra/newview/llconversationloglistitem.h @@ -53,7 +53,7 @@ public: virtual void setValue(const LLSD& value); - virtual BOOL postBuild(); + virtual bool postBuild(); void onIMFloaterShown(const LLUUID& session_id); void onRemoveBtnClicked(); diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 3f426327b0..497046ee7e 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -75,27 +75,27 @@ public: virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;} virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer<LLUIImage> getIcon() const { return NULL; } + virtual LLPointer<LLUIImage> getIcon() const { return nullptr; } virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } - virtual BOOL isItemRenameable() const { return TRUE; } + virtual bool isItemRenameable() const { return true; } virtual bool renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return true; } - virtual BOOL isItemMovable( void ) const { return FALSE; } - virtual BOOL isItemRemovable( void ) const { return FALSE; } - virtual BOOL isItemInTrash( void) const { return FALSE; } - virtual BOOL removeItem() { return FALSE; } + virtual bool isItemMovable( void ) const { return false; } + virtual bool isItemRemovable( void ) const { return false; } + virtual bool isItemInTrash( void) const { return false; } + virtual bool removeItem() { return false; } virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) { } virtual void move( LLFolderViewModelItem* parent_listener ) { } virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } - virtual BOOL copyToClipboard() const { return FALSE; } - virtual BOOL cutToClipboard() { return FALSE; } - virtual BOOL isClipboardPasteable() const { return FALSE; } + virtual bool copyToClipboard() const { return false; } + virtual bool cutToClipboard() { return false; } + virtual bool isClipboardPasteable() const { return false; } virtual void pasteFromClipboard() { } virtual void pasteLinkFromClipboard() { } virtual void buildContextMenu(LLMenuGL& menu, U32 flags) { } - virtual BOOL isUpToDate() const { return TRUE; } - virtual bool hasChildren() const { return FALSE; } + virtual bool isUpToDate() const { return true; } + virtual bool hasChildren() const { return false; } virtual void addChild(LLFolderViewModelItem* child); virtual bool potentiallyVisible() { return true; } @@ -122,10 +122,10 @@ public: // performed, and will set drop to TRUE if a drop is // requested. // Returns TRUE if a drop is possible/happened, FALSE otherwise. - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, - std::string& tooltip_msg) { return FALSE; } + std::string& tooltip_msg) { return false; } // bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } @@ -159,7 +159,7 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); /*virtual*/ bool hasChildren() const; - LLPointer<LLUIImage> getIcon() const { return NULL; } + LLPointer<LLUIImage> getIcon() const { return nullptr; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); void updateName(LLConversationItemParticipant* participant); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 884d9376ec..5e18f7e045 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -204,7 +204,7 @@ bool LLConversationViewSession::isHighlightActive() return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection); } -BOOL LLConversationViewSession::postBuild() +bool LLConversationViewSession::postBuild() { LLFolderViewItem::postBuild(); @@ -276,7 +276,7 @@ BOOL LLConversationViewSession::postBuild() refresh(); // requires vmi } - return TRUE; + return true; } void LLConversationViewSession::draw() @@ -614,7 +614,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti addChild(outputMonitor); } -BOOL LLConversationViewParticipant::postBuild() +bool LLConversationViewParticipant::postBuild() { mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); @@ -638,7 +638,7 @@ BOOL LLConversationViewParticipant::postBuild() LLFolderViewItem::postBuild(); refresh(); } - return TRUE; + return true; } void LLConversationViewParticipant::draw() diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index fc5b0c21e8..5fb7dbb79e 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -69,7 +69,7 @@ public: /*virtual*/ void destroyView(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask ); @@ -158,7 +158,7 @@ protected: friend class LLUICtrlFactory; LLConversationViewParticipant( const Params& p ); void initFromParams(const Params& params); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); /*virtual*/ S32 arrange(S32* width, S32* height); diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp index 7c9dda6b1d..b8d5336ae4 100644 --- a/indra/newview/lldndbutton.cpp +++ b/indra/newview/lldndbutton.cpp @@ -35,7 +35,7 @@ LLDragAndDropButton::LLDragAndDropButton(const Params& params) : LLButton(params) {} -BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) +bool LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { if (mDragDropHandler) { diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 53ea2f5ea7..4f77219582 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -64,9 +64,9 @@ public: /** * Process Drag-And-Drop by delegating the event to drag_drop_handler_t. * - * @return BOOL - value returned by drag_drop_handler_t if it is set, FALSE otherwise. + * @return bool - value returned by drag_drop_handler_t if it is set, FALSE otherwise. */ - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 09cd7cb345..dea09276c2 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -119,7 +119,7 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) setMaxTextLength(p.max_text_length); } -void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, bool called_from_parent) { LLTextEditor::reshape(width, height, called_from_parent); } @@ -430,7 +430,7 @@ void LLExpandableTextBox::updateTextShape() updateTextBoxRect(); } -void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLExpandableTextBox::reshape(S32 width, S32 height, bool called_from_parent) { mExpanded = false; LLUICtrl::reshape(width, height, called_from_parent); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index aaf393277f..440262a522 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -52,7 +52,7 @@ protected: }; // adds or removes "More" link as needed - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()); void setTextBase(const std::string& text) { LLTextBase::setText(text); } @@ -147,7 +147,7 @@ public: * *HACK: Update the inner textbox shape. */ void updateTextShape(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); /** * Draws text box, collapses text box if its expanded and its parent's position changed diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b5650d719d..ee1e0ed00f 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -59,11 +59,11 @@ using namespace LLTrace; -static const S32 MAX_VISIBLE_HISTORY = 12; -static const S32 LINE_GRAPH_HEIGHT = 240; -static const S32 MIN_BAR_HEIGHT = 3; -static const S32 RUNNING_AVERAGE_WIDTH = 100; -static const S32 NUM_FRAMES_HISTORY = 200; +static constexpr S32 MAX_VISIBLE_HISTORY = 12; +static constexpr S32 LINE_GRAPH_HEIGHT = 240; +static constexpr S32 MIN_BAR_HEIGHT = 3; +static constexpr S32 RUNNING_AVERAGE_WIDTH = 100; +static constexpr S32 NUM_FRAMES_HISTORY = 200; std::vector<BlockTimerStatHandle*> ft_display_idx; // line of table entry for display purposes (for collapse) @@ -126,13 +126,13 @@ void LLFastTimerView::setPauseState(bool pause_state) mPauseHistory = pause_state; } -BOOL LLFastTimerView::postBuild() +bool LLFastTimerView::postBuild() { LLButton& pause_btn = getChildRef<LLButton>("pause_btn"); mScrollBar = getChild<LLScrollbar>("scroll_vert"); pause_btn.setCommitCallback(boost::bind(&LLFastTimerView::onPause, this)); - return TRUE; + return true; } bool LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 2207188009..b1320f74c8 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -40,7 +40,7 @@ class LLFastTimerView : public LLFloater public: LLFastTimerView(const LLSD&); ~LLFastTimerView(); - BOOL postBuild(); + bool postBuild(); static BOOL sAnalyzePerformance; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 84de9c594c..8f658b7de9 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -287,7 +287,7 @@ class LLFavoriteLandmarkToggleableMenu : public LLToggleableMenu { public: // virtual - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override { mToolbar->handleDragAndDropToMenu(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); @@ -304,7 +304,7 @@ public: } // virtual - void setVisible(BOOL visible) override + void setVisible(bool visible) override { // Avoid of hiding the menu during hovering if (visible || !mIsHovering) @@ -320,9 +320,9 @@ public: ~LLFavoriteLandmarkToggleableMenu() { - // Enable subsequent setVisible(FALSE) + // Enable subsequent setVisible(false) mIsHovering = false; - setVisible(FALSE); + setVisible(false); } protected: @@ -458,7 +458,7 @@ LLFavoritesBarCtrl::~LLFavoritesBarCtrl() mContextMenuHandle.get()->die(); } -BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { *accept = ACCEPT_NO; @@ -586,7 +586,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, break; } - return TRUE; + return true; } bool LLFavoritesBarCtrl::handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, @@ -801,7 +801,7 @@ void LLFavoritesBarCtrl::changed(U32 mask) } //virtual -void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFavoritesBarCtrl::reshape(S32 width, S32 height, bool called_from_parent) { S32 delta_width = width - getRect().getWidth(); S32 delta_height = height - getRect().getHeight(); @@ -1091,7 +1091,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem } -BOOL LLFavoritesBarCtrl::postBuild() +bool LLFavoritesBarCtrl::postBuild() { // make the popup menu available LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -1102,7 +1102,7 @@ BOOL LLFavoritesBarCtrl::postBuild() menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); mContextMenuHandle = menu->getHandle(); - return TRUE; + return true; } BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items) diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index a1a7cc42d3..2580b9e514 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -56,9 +56,9 @@ protected: public: virtual ~LLFavoritesBarCtrl(); - /*virtual*/ BOOL postBuild() override; + /*virtual*/ bool postBuild() override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); @@ -67,7 +67,7 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; // LLInventoryObserver observer trigger /*virtual*/ void changed(U32 mask) override; - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override; + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true) override; /*virtual*/ void draw() override; void showDragMarker(bool show) { mShowDragMarker = show; } @@ -83,7 +83,6 @@ protected: void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask); void onButtonMouseDown(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); - void onOverflowMenuItemMouseDown(LLUUID id, LLUICtrl* item, S32 x, S32 y, MASK mask); void onButtonMouseUp(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); void onEndDrag(); diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index a0890b7f9d..c1f6af9816 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -91,7 +91,7 @@ LLFloater360Capture::~LLFloater360Capture() } } -BOOL LLFloater360Capture::postBuild() +bool LLFloater360Capture::postBuild() { mCaptureBtn = getChild<LLUICtrl>("capture_button"); mCaptureBtn->setCommitCallback(boost::bind(&LLFloater360Capture::onCapture360ImagesBtn, this)); diff --git a/indra/newview/llfloater360capture.h b/indra/newview/llfloater360capture.h index 3fb2c7f3c7..f0b4057645 100644 --- a/indra/newview/llfloater360capture.h +++ b/indra/newview/llfloater360capture.h @@ -46,7 +46,7 @@ class LLFloater360Capture: LLFloater360Capture(const LLSD& key); ~LLFloater360Capture(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 1fbd198019..f971f22aed 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -83,7 +83,7 @@ private: virtual ~LLFloaterAbout(); public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; /// Obtain the data used to fill out the contents string. This is /// separated so that we can programmatically access the same info. @@ -122,7 +122,7 @@ LLFloaterAbout::~LLFloaterAbout() { } -BOOL LLFloaterAbout::postBuild() +bool LLFloaterAbout::postBuild() { center(); LLViewerTextEditor *support_widget = @@ -201,7 +201,7 @@ BOOL LLFloaterAbout::postBuild() licenses_widget->setEnabled(FALSE); licenses_widget->startOfDoc(); - return TRUE; + return true; } LLSD LLFloaterAbout::getInfo() diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp index 3952b48229..cd265707a5 100644 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -41,12 +41,12 @@ LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() { } -BOOL LLFloaterAddPaymentMethod::postBuild() +bool LLFloaterAddPaymentMethod::postBuild() { - setCanDrag(FALSE); + setCanDrag(false); getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this)); - return TRUE; + return true; } void LLFloaterAddPaymentMethod::onOpen(const LLSD& key) diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h index b3bb624484..d02b305d1b 100644 --- a/indra/newview/llfloateraddpaymentmethod.h +++ b/indra/newview/llfloateraddpaymentmethod.h @@ -34,8 +34,8 @@ class LLFloaterAddPaymentMethod: { friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; private: LLFloaterAddPaymentMethod(const LLSD& key); diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 6996224dcb..6bdc24fcd4 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -87,9 +87,9 @@ LLFloaterAuction::~LLFloaterAuction() { } -BOOL LLFloaterAuction::postBuild() +bool LLFloaterAuction::postBuild() { - return TRUE; + return true; } void LLFloaterAuction::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h index c83a11ba8b..a20144d4cf 100644 --- a/indra/newview/llfloaterauction.h +++ b/indra/newview/llfloaterauction.h @@ -63,7 +63,7 @@ private: bool onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response); // Sell confirmation clicked static void onClickStartAuction(void* data); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void doResetParcel(); void doSellToAnyone(); diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 0964daa4d5..9b541f8f15 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -82,7 +82,7 @@ void LLFloaterAutoReplaceSettings::onClose(bool app_quitting) cleanUp(); } -BOOL LLFloaterAutoReplaceSettings::postBuild(void) +bool LLFloaterAutoReplaceSettings::postBuild(void) { // get copies of the current settings that we will operate on mEnabled = gSavedSettings.getBOOL("AutoReplace"); diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h index 2109aa7026..863b3610bc 100644 --- a/indra/newview/llfloaterautoreplacesettings.h +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -40,10 +40,8 @@ class LLFloaterAutoReplaceSettings : public LLFloater public: LLFloaterAutoReplaceSettings(const LLSD& key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); - - void setData(void * data); + bool postBuild() override; + void onClose(bool app_quitting) override; private: diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp index f888d032ae..d76e6a2aa1 100644 --- a/indra/newview/llfloateravatar.cpp +++ b/indra/newview/llfloateravatar.cpp @@ -52,7 +52,7 @@ LLFloaterAvatar::~LLFloaterAvatar() } } -BOOL LLFloaterAvatar::postBuild() +bool LLFloaterAvatar::postBuild() { mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents"); if (mAvatarPicker) @@ -60,7 +60,7 @@ BOOL LLFloaterAvatar::postBuild() mAvatarPicker->clearCache(); } enableResizeCtrls(true, true, false); - return TRUE; + return true; } diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h index 76e9372709..30800dae2f 100644 --- a/indra/newview/llfloateravatar.h +++ b/indra/newview/llfloateravatar.h @@ -37,8 +37,8 @@ class LLFloaterAvatar: friend class LLFloaterReg; private: LLFloaterAvatar(const LLSD& key); - /*virtual*/ ~LLFloaterAvatar(); - /*virtual*/ BOOL postBuild(); + ~LLFloaterAvatar(); + bool postBuild() override; LLMediaCtrl* mAvatarPicker; }; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 2422596f60..9b5e084b34 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -118,19 +118,19 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime"); } -BOOL LLFloaterAvatarPicker::postBuild() +bool LLFloaterAvatarPicker::postBuild() { getChild<LLLineEditor>("Edit")->setKeystrokeCallback( boost::bind(&LLFloaterAvatarPicker::editKeystroke, this, _1, _2),NULL); childSetAction("Find", boost::bind(&LLFloaterAvatarPicker::onBtnFind, this)); - getChildView("Find")->setEnabled(FALSE); + getChildView("Find")->setEnabled(false); childSetAction("Refresh", boost::bind(&LLFloaterAvatarPicker::onBtnRefresh, this)); getChild<LLUICtrl>("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this)); LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults"); searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); - getChildView("SearchResults")->setEnabled(FALSE); + getChildView("SearchResults")->setEnabled(false); LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe"); nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); @@ -141,10 +141,10 @@ BOOL LLFloaterAvatarPicker::postBuild() getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("ok_btn")->setEnabled(false); childSetAction("cancel_btn", boost::bind(&LLFloaterAvatarPicker::onBtnClose, this)); - getChild<LLUICtrl>("Edit")->setFocus(TRUE); + getChild<LLUICtrl>("Edit")->setFocus(true); LLPanel* search_panel = getChild<LLPanel>("SearchPanel"); if (search_panel) @@ -164,7 +164,7 @@ BOOL LLFloaterAvatarPicker::postBuild() populateFriend(); - return TRUE; + return true; } void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb) @@ -540,8 +540,8 @@ LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList() return list; } -BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, +bool LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { @@ -553,7 +553,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, if (localRectToOtherView(rc_point, &rc_list, list)) { // Keep selected only one item - list->deselectAllItems(TRUE); + list->deselectAllItems(true); list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask); LLScrollListItem* selection = list->getFirstSelected(); if (selection) @@ -575,7 +575,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, } } *accept = ACCEPT_NO; - return TRUE; + return true; } @@ -748,7 +748,7 @@ void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data) } // virtual -BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) +bool LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { @@ -760,12 +760,12 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) { onBtnSelect(); } - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { closeFloater(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index fbee61b054..6a4e0a75d6 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -55,15 +55,15 @@ public: LLFloaterAvatarPicker(const LLSD& key); virtual ~LLFloaterAvatarPicker(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setOkBtnEnableCb(validate_callback_t cb); static void processAvatarPickerReply(class LLMessageSystem* msg, void**); void processResponse(const LLUUID& query_id, const LLSD& content); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); @@ -93,7 +93,7 @@ private: void drawFrustum(); virtual void draw(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); LLUUID mQueryID; int mNumResultsReturned; diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index 7d098e6c88..def260e639 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -84,13 +84,13 @@ LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings() LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver); } -BOOL LLFloaterAvatarRenderSettings::postBuild() +bool LLFloaterAvatarRenderSettings::postBuild() { LLFloater::postBuild(); mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); - return TRUE; + return true; } void LLFloaterAvatarRenderSettings::draw() @@ -259,14 +259,14 @@ void LLFloaterAvatarRenderSettings::setAvatarRenderSetting(const LLUUID& av_id, } } -BOOL LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if (KEY_DELETE == key) { setAvatarRenderSetting(mAvatarSettingsList->getCurrentID(), (S32)LLVOAvatar::AV_RENDER_NORMALLY); - handled = TRUE; + handled = true; } return handled; } diff --git a/indra/newview/llfloateravatarrendersettings.h b/indra/newview/llfloateravatarrendersettings.h index 2e0a844afd..962a810f2d 100644 --- a/indra/newview/llfloateravatarrendersettings.h +++ b/indra/newview/llfloateravatarrendersettings.h @@ -40,10 +40,10 @@ public: LLFloaterAvatarRenderSettings(const LLSD& key); virtual ~LLFloaterAvatarRenderSettings(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + bool postBuild() override; + void onOpen(const LLSD& key) override; + void draw() override; + bool handleKeyHere(KEY key, MASK mask) override; void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y); @@ -59,7 +59,6 @@ public: private: void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting); - void removePicker(); bool mNeedsUpdate; LLListContextMenu* mContextMenu; diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index ebb73fc1f7..895cd2a79e 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -51,7 +51,7 @@ LLFloaterAvatarTextures::~LLFloaterAvatarTextures() { } -BOOL LLFloaterAvatarTextures::postBuild() +bool LLFloaterAvatarTextures::postBuild() { for (U32 i=0; i < TEX_NUM_INDICES; i++) { @@ -63,7 +63,7 @@ BOOL LLFloaterAvatarTextures::postBuild() childSetAction("Dump", onClickDump, this); refresh(); - return TRUE; + return true; } void LLFloaterAvatarTextures::draw() diff --git a/indra/newview/llfloateravatartextures.h b/indra/newview/llfloateravatartextures.h index 02474a10e1..cbbb1b6a57 100644 --- a/indra/newview/llfloateravatartextures.h +++ b/indra/newview/llfloateravatartextures.h @@ -40,8 +40,8 @@ public: LLFloaterAvatarTextures(const LLSD& id); virtual ~LLFloaterAvatarTextures(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); + bool postBuild() override; + void draw() override; void refresh(); diff --git a/indra/newview/llfloaterbanduration.cpp b/indra/newview/llfloaterbanduration.cpp index 6ba6c30cab..1e26bd5f0b 100644 --- a/indra/newview/llfloaterbanduration.cpp +++ b/indra/newview/llfloaterbanduration.cpp @@ -35,7 +35,7 @@ LLFloaterBanDuration::LLFloaterBanDuration(const LLSD& target) { } -BOOL LLFloaterBanDuration::postBuild() +bool LLFloaterBanDuration::postBuild() { childSetAction("ok_btn", boost::bind(&LLFloaterBanDuration::onClickBan, this)); childSetAction("cancel_btn", boost::bind(&LLFloaterBanDuration::onClickCancel, this)); @@ -44,7 +44,7 @@ BOOL LLFloaterBanDuration::postBuild() getChild<LLRadioGroup>("ban_duration_radio")->setSelectedIndex(0); getChild<LLUICtrl>("ban_hours")->setEnabled(FALSE); - return TRUE; + return true; } LLFloaterBanDuration* LLFloaterBanDuration::show(select_callback_t callback, uuid_vec_t ids) diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h index e8ec7cc669..4793b524f7 100644 --- a/indra/newview/llfloaterbanduration.h +++ b/indra/newview/llfloaterbanduration.h @@ -35,7 +35,7 @@ class LLFloaterBanDuration : public LLFloater public: LLFloaterBanDuration(const LLSD& target); - BOOL postBuild(); + bool postBuild() override; static LLFloaterBanDuration* show(select_callback_t callback, uuid_vec_t id); private: diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index cf38a00499..b88ac72dd5 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -52,9 +52,9 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1)); } -BOOL LLFloaterBeacons::postBuild() +bool LLFloaterBeacons::postBuild() { - return TRUE; + return true; } // Callback attached to each check box control to both affect their main purpose diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h index 47d0696296..d83085a913 100644 --- a/indra/newview/llfloaterbeacons.h +++ b/indra/newview/llfloaterbeacons.h @@ -36,7 +36,7 @@ class LLFloaterBeacons : public LLFloater public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Needed to make the floater visibility toggle the beacons. // Too bad we can't just add control_name="BeaconAlwaysOn" to the XML. diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp index b516e9dd01..63439c816b 100644 --- a/indra/newview/llfloaterbigpreview.cpp +++ b/indra/newview/llfloaterbigpreview.cpp @@ -61,7 +61,7 @@ void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) } } -BOOL LLFloaterBigPreview::postBuild() +bool LLFloaterBigPreview::postBuild() { mPreviewPlaceholder = getChild<LLUICtrl>("big_preview_placeholder"); return LLFloater::postBuild(); diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h index 513ed8da6e..03a8699f3d 100644 --- a/indra/newview/llfloaterbigpreview.h +++ b/indra/newview/llfloaterbigpreview.h @@ -35,7 +35,7 @@ public: LLFloaterBigPreview(const LLSD& key); ~LLFloaterBigPreview(); - BOOL postBuild(); + bool postBuild(); void draw(); void onCancel(); diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp index 1b65d8d683..9eef704d65 100644 --- a/indra/newview/llfloaterbuildoptions.cpp +++ b/indra/newview/llfloaterbuildoptions.cpp @@ -49,9 +49,9 @@ LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key) LLFloaterBuildOptions::~LLFloaterBuildOptions() {} -BOOL LLFloaterBuildOptions::postBuild() +bool LLFloaterBuildOptions::postBuild() { - return TRUE; + return true; } // virtual @@ -63,5 +63,5 @@ void LLFloaterBuildOptions::onOpen(const LLSD& key) // virtual void LLFloaterBuildOptions::onClose(bool app_quitting) { - mObjectSelection = NULL; + mObjectSelection = nullptr; } diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h index 02c56cb6a9..b21a0117a3 100644 --- a/indra/newview/llfloaterbuildoptions.h +++ b/indra/newview/llfloaterbuildoptions.h @@ -43,10 +43,10 @@ class LLFloaterBuildOptions : public LLFloater { public: - virtual BOOL postBuild(); + bool postBuild() override; - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; private: friend class LLFloaterReg; diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 392866682d..d70b7996d3 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -64,7 +64,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) mCommitCallbackRegistrar.add("BulkPermission.CommitCopy", boost::bind(&LLFloaterBulkPermission::onCommitCopy, this)); } -BOOL LLFloaterBulkPermission::postBuild() +bool LLFloaterBulkPermission::postBuild() { mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations"); mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts"); @@ -89,7 +89,7 @@ BOOL LLFloaterBulkPermission::postBuild() { mBulkChangeNextOwnerTransfer = true; } - return TRUE; + return true; } void LLFloaterBulkPermission::doApply() diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index ab5d568667..dd0dd5f5a8 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -41,7 +41,7 @@ class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener friend class LLFloaterReg; public: - BOOL postBuild(); + bool postBuild(); private: diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 307ab8c4d1..707557d23d 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -77,7 +77,7 @@ LLFloaterBump::~LLFloaterBump() } } -BOOL LLFloaterBump::postBuild() +bool LLFloaterBump::postBuild() { mList = getChild<LLScrollListCtrl>("bump_list"); mList->setAllowMultipleSelection(false); @@ -93,7 +93,7 @@ BOOL LLFloaterBump::postBuild() menu->setItemVisible(std::string("Impostor seperator"), false); } - return TRUE; + return true; } // virtual void LLFloaterBump::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h index d2f9fabdd3..421d0b3f91 100644 --- a/indra/newview/llfloaterbump.h +++ b/indra/newview/llfloaterbump.h @@ -43,8 +43,8 @@ protected: void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y); public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; static LLFloaterBump* getInstance(); diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ea93d3bfaa..40d4ed7bfb 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -54,10 +54,10 @@ LLFloaterBuy::LLFloaterBuy(const LLSD& key) { } -BOOL LLFloaterBuy::postBuild() +bool LLFloaterBuy::postBuild() { - getChildView("object_list")->setEnabled(FALSE); - getChildView("item_list")->setEnabled(FALSE); + getChildView("object_list")->setEnabled(false); + getChildView("item_list")->setEnabled(false); getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickCancel, this)); getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickBuy, this)); @@ -70,12 +70,12 @@ BOOL LLFloaterBuy::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterBuy::~LLFloaterBuy() { - mObjectSelection = NULL; + mObjectSelection = nullptr; } void LLFloaterBuy::reset() diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h index e83b3c6ba6..fedbdce965 100644 --- a/indra/newview/llfloaterbuy.h +++ b/indra/newview/llfloaterbuy.h @@ -49,19 +49,18 @@ public: LLFloaterBuy(const LLSD& key); ~LLFloaterBuy(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); + bool postBuild() override; + void onClose(bool app_quitting) override; static void show(const LLSaleInfo& sale_info); protected: void reset(); - void requestObjectInventories(); - /*virtual*/ void inventoryChanged(LLViewerObject* obj, - LLInventoryObject::object_list_t* inv, - S32 serial_num, - void* data); + void inventoryChanged(LLViewerObject* obj, + LLInventoryObject::object_list_t* inv, + S32 serial_num, + void* data) override; void onSelectionChanged(); void showViews(bool show); diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index f9dfa0334f..317a23c82e 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -57,15 +57,15 @@ LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key) { } -BOOL LLFloaterBuyContents::postBuild() +bool LLFloaterBuyContents::postBuild() { getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickCancel, this)); getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickBuy, this)); - getChildView("item_list")->setEnabled(FALSE); - getChildView("buy_btn")->setEnabled(FALSE); - getChildView("wear_check")->setEnabled(FALSE); + getChildView("item_list")->setEnabled(false); + getChildView("buy_btn")->setEnabled(false); + getChildView("wear_check")->setEnabled(false); setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130) @@ -75,7 +75,7 @@ BOOL LLFloaterBuyContents::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterBuyContents::~LLFloaterBuyContents() diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h index 19393fb6af..93d53a8a89 100644 --- a/indra/newview/llfloaterbuycontents.h +++ b/indra/newview/llfloaterbuycontents.h @@ -48,14 +48,13 @@ public: LLFloaterBuyContents(const LLSD& key); ~LLFloaterBuyContents(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: - void requestObjectInventories(); - /*virtual*/ void inventoryChanged(LLViewerObject* obj, - LLInventoryObject::object_list_t* inv, - S32 serial_num, - void* data); + void inventoryChanged(LLViewerObject* obj, + LLInventoryObject::object_list_t* inv, + S32 serial_num, + void* data) override; void onClickBuy(); void onClickCancel(); diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 0cfac166c7..f9beb30510 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -66,13 +66,13 @@ public: void noTarget(); void target(const std::string& name, S32 price); - virtual BOOL postBuild(); + virtual bool postBuild(); void updateUI(); void collapsePanels(bool collapse); virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void onClickBuy(); void onClickCancel(); @@ -135,7 +135,7 @@ void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price) // virtual -BOOL LLFloaterBuyCurrencyUI::postBuild() +bool LLFloaterBuyCurrencyUI::postBuild() { mManager.prepare(); @@ -146,7 +146,7 @@ BOOL LLFloaterBuyCurrencyUI::postBuild() updateUI(); - return TRUE; + return true; } void LLFloaterBuyCurrencyUI::draw() @@ -169,7 +169,7 @@ void LLFloaterBuyCurrencyUI::draw() LLFloater::draw(); } -BOOL LLFloaterBuyCurrencyUI::canClose() +bool LLFloaterBuyCurrencyUI::canClose() { return mManager.canCancel(); } diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp index a69aa8d227..07d21df179 100644 --- a/indra/newview/llfloaterbuycurrencyhtml.cpp +++ b/indra/newview/llfloaterbuycurrencyhtml.cpp @@ -42,13 +42,13 @@ LLFloaterBuyCurrencyHTML::LLFloaterBuyCurrencyHTML( const LLSD& key ): //////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterBuyCurrencyHTML::postBuild() +bool LLFloaterBuyCurrencyHTML::postBuild() { // observer media events mBrowser = getChild<LLMediaCtrl>( "browser" ); mBrowser->addObserver( this ); - return TRUE; + return true; } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaterbuycurrencyhtml.h b/indra/newview/llfloaterbuycurrencyhtml.h index 6b1fc53f1f..53532d6265 100644 --- a/indra/newview/llfloaterbuycurrencyhtml.h +++ b/indra/newview/llfloaterbuycurrencyhtml.h @@ -37,7 +37,7 @@ class LLFloaterBuyCurrencyHTML : public: LLFloaterBuyCurrencyHTML( const LLSD& key ); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose( bool app_quitting ); // inherited from LLViewerMediaObserver diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 464e7ff4a2..62699c5ef3 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -187,7 +187,7 @@ public: void tellUserError(const std::string& message, const std::string& uri); - virtual BOOL postBuild(); + virtual bool postBuild(); void startBuyPreConfirm(); void startBuyPostConfirm(const std::string& password); @@ -197,7 +197,7 @@ public: void onClickErrorWeb(); virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void onVisibilityChanged ( const LLSD& new_visibility ); @@ -929,7 +929,7 @@ void LLFloaterBuyLandUI::tellUserError( // virtual -BOOL LLFloaterBuyLandUI::postBuild() +bool LLFloaterBuyLandUI::postBuild() { setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChanged, this, _2)); @@ -941,7 +941,7 @@ BOOL LLFloaterBuyLandUI::postBuild() center(); - return TRUE; + return true; } void LLFloaterBuyLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) @@ -994,7 +994,7 @@ void LLFloaterBuyLandUI::draw() } // virtual -BOOL LLFloaterBuyLandUI::canClose() +bool LLFloaterBuyLandUI::canClose() { // mTransactionType check for pre-buy estimation stage and mCurrency to allow exit after transaction bool can_close = !mTransaction && (mTransactionType != TransactionBuy || mCurrency.canCancel()); diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 810c4cfa36..a1d7bbe1a8 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -188,14 +188,14 @@ std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases() //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterBvhPreview::postBuild() +bool LLFloaterBvhPreview::postBuild() { LLKeyframeMotion* motionp = NULL; LLBVHLoader* loaderp = NULL; if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this)); @@ -372,7 +372,7 @@ BOOL LLFloaterBvhPreview::postBuild() delete loaderp; - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h index 9dc6ed62da..31eeefd357 100644 --- a/indra/newview/llfloaterbvhpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -73,7 +73,7 @@ public: LLFloaterBvhPreview(const std::string& filename); virtual ~LLFloaterBvhPreview(); - BOOL postBuild(); + bool postBuild(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 1c69b9d60b..e649c9f682 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -68,7 +68,7 @@ class LLPanelCameraZoom public: LLPanelCameraZoom(); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); /* virtual */ void draw(); protected: @@ -129,13 +129,13 @@ void set_view_visible(LLView* parent, const std::string& name, bool visible) parent->getChildView(name)->setVisible(visible); } -BOOL LLPanelCameraItem::postBuild() +bool LLPanelCameraItem::postBuild() { setMouseEnterCallback(boost::bind(set_view_visible, this, "hovered_icon", true)); setMouseLeaveCallback(boost::bind(set_view_visible, this, "hovered_icon", false)); setMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); setRightMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); - return TRUE; + return true; } void LLPanelCameraItem::onAnyMouseClick() @@ -170,7 +170,7 @@ LLPanelCameraZoom::LLPanelCameraZoom() mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this)); } -BOOL LLPanelCameraZoom::postBuild() +bool LLPanelCameraZoom::postBuild() { mPlusBtn = getChild <LLButton> ("zoom_plus_btn"); mMinusBtn = getChild <LLButton> ("zoom_minus_btn"); @@ -356,7 +356,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) } // virtual -BOOL LLFloaterCamera::postBuild() +bool LLFloaterCamera::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index a69b87ad16..6f10c4a064 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -89,7 +89,7 @@ private: /* return instance if it exists - created by LLFloaterReg */ static LLFloaterCamera* findInstance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); F32 getCurrentTransparency(); @@ -151,7 +151,7 @@ public: Optional<CommitCallbackParam> mousedown_callback; Params(); }; - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** setting on/off background icon to indicate selected state */ /*virtual*/ void setValue(const LLSD& value); // sends commit signal diff --git a/indra/newview/llfloatercamerapresets.cpp b/indra/newview/llfloatercamerapresets.cpp index a1cbffd094..76e24a9d16 100644 --- a/indra/newview/llfloatercamerapresets.cpp +++ b/indra/newview/llfloatercamerapresets.cpp @@ -38,14 +38,14 @@ LLFloaterCameraPresets::LLFloaterCameraPresets(const LLSD& key) LLFloaterCameraPresets::~LLFloaterCameraPresets() {} -BOOL LLFloaterCameraPresets::postBuild() +bool LLFloaterCameraPresets::postBuild() { mPresetList = getChild<LLFlatListView>("preset_list"); mPresetList->setCommitCallback(boost::bind(&LLFloaterCameraPresets::onSelectionChange, this)); mPresetList->setCommitOnSelectionChange(true); LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCameraPresets::populateList, this)); - return TRUE; + return true; } void LLFloaterCameraPresets::onOpen(const LLSD& key) { @@ -99,7 +99,7 @@ LLCameraPresetFlatItem::~LLCameraPresetFlatItem() { } -BOOL LLCameraPresetFlatItem::postBuild() +bool LLCameraPresetFlatItem::postBuild() { mDeleteBtn = getChild<LLButton>("delete_btn"); mDeleteBtn->setVisible(false); diff --git a/indra/newview/llfloatercamerapresets.h b/indra/newview/llfloatercamerapresets.h index 4430a4209e..9b07987755 100644 --- a/indra/newview/llfloatercamerapresets.h +++ b/indra/newview/llfloatercamerapresets.h @@ -34,7 +34,7 @@ class LLFloaterCameraPresets : public LLFloater { friend class LLFloaterReg; - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& key); void populateList(); @@ -55,7 +55,7 @@ public: void setValue(const LLSD& value); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp index cfdd7aa834..ca27739bd5 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.cpp +++ b/indra/newview/llfloaterchangeitemthumbnail.cpp @@ -114,7 +114,7 @@ LLFloaterChangeItemThumbnail::~LLFloaterChangeItemThumbnail() removeVOInventoryListener(); } -BOOL LLFloaterChangeItemThumbnail::postBuild() +bool LLFloaterChangeItemThumbnail::postBuild() { mItemNameText = getChild<LLUICtrl>("item_name"); mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon"); @@ -223,11 +223,11 @@ void LLFloaterChangeItemThumbnail::onMouseEnter(S32 x, S32 y, MASK mask) mPasteFromClipboardBtn->setEnabled(LLClipboard::instance().hasContents()); } -BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop( +bool LLFloaterChangeItemThumbnail::handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, @@ -257,7 +257,7 @@ BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop( LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterChangeItemThumbnail " << getKey() << LL_ENDL; - return TRUE; + return true; } void LLFloaterChangeItemThumbnail::changed(U32 mask) diff --git a/indra/newview/llfloaterchangeitemthumbnail.h b/indra/newview/llfloaterchangeitemthumbnail.h index c817ffb268..63bbb8e36f 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.h +++ b/indra/newview/llfloaterchangeitemthumbnail.h @@ -45,16 +45,16 @@ public: LLFloaterChangeItemThumbnail(const LLSD& key); ~LLFloaterChangeItemThumbnail(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void onFocusReceived() override; void onMouseEnter(S32 x, S32 y, MASK mask) override; - BOOL handleDragAndDrop( + bool handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, diff --git a/indra/newview/llfloaterclassified.cpp b/indra/newview/llfloaterclassified.cpp index 3520b0f67a..9001f2198e 100644 --- a/indra/newview/llfloaterclassified.cpp +++ b/indra/newview/llfloaterclassified.cpp @@ -51,9 +51,9 @@ void LLFloaterClassified::onOpen(const LLSD& key) LLFloater::onOpen(key); } -BOOL LLFloaterClassified::postBuild() +bool LLFloaterClassified::postBuild() { - return TRUE; + return true; } diff --git a/indra/newview/llfloaterclassified.h b/indra/newview/llfloaterclassified.h index 2c95d82b2c..45bd56695d 100644 --- a/indra/newview/llfloaterclassified.h +++ b/indra/newview/llfloaterclassified.h @@ -37,7 +37,7 @@ public: virtual ~LLFloaterClassified(); void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; bool matchesKey(const LLSD& key) override; }; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 0b904010a7..851d086feb 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -211,14 +211,14 @@ void LLFloaterColorPicker::showUI () ////////////////////////////////////////////////////////////////////////////// // called after the dialog is rendered -BOOL LLFloaterColorPicker::postBuild() +bool LLFloaterColorPicker::postBuild() { mCancelBtn = getChild<LLButton>( "cancel_btn" ); mCancelBtn->setClickedCallback ( onClickCancel, this ); mSelectBtn = getChild<LLButton>( "select_btn"); mSelectBtn->setClickedCallback ( onClickSelect, this ); - mSelectBtn->setFocus ( TRUE ); + mSelectBtn->setFocus ( true ); mPipetteBtn = getChild<LLButton>("color_pipette" ); @@ -239,7 +239,7 @@ BOOL LLFloaterColorPicker::postBuild() LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterColorPicker::onColorSelect, this, _1)); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index 9747ffac80..f42c05ee46 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -48,7 +48,7 @@ class LLFloaterColorPicker virtual ~LLFloaterColorPicker (); // overrides - virtual BOOL postBuild (); + virtual bool postBuild (); virtual void draw (); virtual bool handleMouseDown ( S32 x, S32 y, MASK mask ); virtual bool handleMouseUp ( S32 x, S32 y, MASK mask ); diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp index 4c910c5655..244f251e4b 100644 --- a/indra/newview/llfloaterconversationlog.cpp +++ b/indra/newview/llfloaterconversationlog.cpp @@ -39,7 +39,7 @@ LLFloaterConversationLog::LLFloaterConversationLog(const LLSD& key) mEnableCallbackRegistrar.add("CallLog.Check", boost::bind(&LLFloaterConversationLog::isActionChecked, this, _2)); } -BOOL LLFloaterConversationLog::postBuild() +bool LLFloaterConversationLog::postBuild() { mConversationLogList = getChild<LLConversationLogList>("conversation_log_list"); diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h index e971330f3d..b73878f401 100644 --- a/indra/newview/llfloaterconversationlog.h +++ b/indra/newview/llfloaterconversationlog.h @@ -37,9 +37,9 @@ public: LLFloaterConversationLog(const LLSD& key); virtual ~LLFloaterConversationLog(){}; - virtual BOOL postBuild(); + bool postBuild() override; - virtual void draw(); + void draw() override; void onFilterEdit(const std::string& search_string); diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 580a3f2610..d4833984e7 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -59,7 +59,7 @@ LLFloaterConversationPreview::~LLFloaterConversationPreview() { } -BOOL LLFloaterConversationPreview::postBuild() +bool LLFloaterConversationPreview::postBuild() { mChatHistory = getChild<LLChatHistory>("chat_history"); diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index 7ca4ee6945..1d9ceba6ea 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -41,12 +41,12 @@ public: LLFloaterConversationPreview(const LLSD& session_id); virtual ~LLFloaterConversationPreview(); - virtual BOOL postBuild(); + bool postBuild() override; void setPages(std::list<LLSD>* messages,const std::string& file_name); - virtual void draw(); - virtual void onOpen(const LLSD& key); - virtual void onClose(bool app_quitting); + void draw() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; private: void onMoreHistoryBtnClick(); diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp index 6faa659d87..9ffde4744a 100644 --- a/indra/newview/llfloatercreatelandmark.cpp +++ b/indra/newview/llfloatercreatelandmark.cpp @@ -116,7 +116,7 @@ LLFloaterCreateLandmark::~LLFloaterCreateLandmark() removeObserver(); } -BOOL LLFloaterCreateLandmark::postBuild() +bool LLFloaterCreateLandmark::postBuild() { mFolderCombo = getChild<LLComboBox>("folder_combo"); mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor"); @@ -131,7 +131,7 @@ BOOL LLFloaterCreateLandmark::postBuild() mLandmarksID = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - return TRUE; + return true; } void LLFloaterCreateLandmark::removeObserver() diff --git a/indra/newview/llfloatercreatelandmark.h b/indra/newview/llfloatercreatelandmark.h index d84f5ae1fc..abe901303f 100644 --- a/indra/newview/llfloatercreatelandmark.h +++ b/indra/newview/llfloatercreatelandmark.h @@ -45,8 +45,8 @@ public: LLFloaterCreateLandmark(const LLSD& key); ~LLFloaterCreateLandmark(); - BOOL postBuild(); - void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setItem(const uuid_set_t& items); void updateItem(const uuid_set_t& items, U32 mask); diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index 819b2bcee2..46fd1c5288 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -42,7 +42,7 @@ LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterDeletePrefPreset::postBuild() +bool LLFloaterDeletePrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -53,7 +53,7 @@ BOOL LLFloaterDeletePrefPreset::postBuild() getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterDeletePrefPreset::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterdeleteprefpreset.h b/indra/newview/llfloaterdeleteprefpreset.h index 0ab3da7139..e10bd79c81 100644 --- a/indra/newview/llfloaterdeleteprefpreset.h +++ b/indra/newview/llfloaterdeleteprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterDeletePrefPreset : public LLFloater public: LLFloaterDeletePrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnDelete(); void onBtnCancel(); diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index af21cb593f..5dcf68d864 100644 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -45,10 +45,10 @@ LLFloaterDestinations::~LLFloaterDestinations() { } -BOOL LLFloaterDestinations::postBuild() +bool LLFloaterDestinations::postBuild() { enableResizeCtrls(true, true, false); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterdestinations.h b/indra/newview/llfloaterdestinations.h index 85d9b3391e..b659ff4df7 100644 --- a/indra/newview/llfloaterdestinations.h +++ b/indra/newview/llfloaterdestinations.h @@ -36,8 +36,8 @@ class LLFloaterDestinations: friend class LLFloaterReg; private: LLFloaterDestinations(const LLSD& key); - /*virtual*/ ~LLFloaterDestinations(); - /*virtual*/ BOOL postBuild(); + ~LLFloaterDestinations(); + bool postBuild() override; }; #endif diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index ad2533debc..9dc602c6f6 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -45,7 +45,7 @@ class LLFloaterDisplayName : public LLFloater public: LLFloaterDisplayName(const LLSD& key); virtual ~LLFloaterDisplayName() { } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onSave(); void onReset(); void onCancel(); @@ -100,7 +100,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) } } -BOOL LLFloaterDisplayName::postBuild() +bool LLFloaterDisplayName::postBuild() { getChild<LLUICtrl>("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this)); getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this)); @@ -108,7 +108,7 @@ BOOL LLFloaterDisplayName::postBuild() center(); - return TRUE; + return true; } void LLFloaterDisplayName::onCacheSetName(bool success, diff --git a/indra/newview/llfloatereditenvironmentbase.h b/indra/newview/llfloatereditenvironmentbase.h index d900d7f003..96cb37c6ee 100644 --- a/indra/newview/llfloatereditenvironmentbase.h +++ b/indra/newview/llfloatereditenvironmentbase.h @@ -57,7 +57,7 @@ public: virtual LLSettingsBase::ptr_t getEditSettings() const = 0; - virtual BOOL isDirty() const override { return getIsDirty(); } + virtual bool isDirty() const override { return getIsDirty(); } protected: typedef std::function<void()> on_confirm_fn; diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index bb47feaa95..c1c6a82e29 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -203,7 +203,7 @@ LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle() } // virtual -BOOL LLFloaterEditExtDayCycle::postBuild() +bool LLFloaterEditExtDayCycle::postBuild() { getChild<LLLineEditor>(TXT_DAY_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL); @@ -264,7 +264,7 @@ BOOL LLFloaterEditExtDayCycle::postBuild() panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); }); } - return TRUE; + return true; } void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) @@ -423,7 +423,7 @@ void LLFloaterEditExtDayCycle::onClose(bool app_quitting) } -void LLFloaterEditExtDayCycle::onVisibilityChange(BOOL new_visibility) +void LLFloaterEditExtDayCycle::onVisibilityChange(bool new_visibility) { } @@ -534,7 +534,7 @@ void LLFloaterEditExtDayCycle::setEditName(const std::string &name) } /* virtual */ -BOOL LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { if (!mEditDay) { diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index 025a2ee5d1..e9acec0d12 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -79,12 +79,12 @@ public: LLFloaterEditExtDayCycle(const LLSD &key); virtual ~LLFloaterEditExtDayCycle(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; //virtual void onFocusReceived() override; //virtual void onFocusLost() override; - virtual void onVisibilityChange(BOOL new_visibility) override; + virtual void onVisibilityChange(bool new_visibility) override; connection_t setEditCommitSignal(edit_commit_signal_t::slot_type cb); @@ -100,7 +100,7 @@ public: virtual LLSettingsBase::ptr_t getEditSettings() const override { return mEditDay; } - BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override; + bool handleKeyUp(KEY key, MASK mask, bool called_from_parent) override; protected: virtual void setEditSettingsAndUpdate(const LLSettingsBase::ptr_t &settings) override; diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index c64ee5a69c..cc5936be03 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -84,7 +84,7 @@ LLFloaterEnvironmentAdjust::~LLFloaterEnvironmentAdjust() {} //------------------------------------------------------------------------- -BOOL LLFloaterEnvironmentAdjust::postBuild() +bool LLFloaterEnvironmentAdjust::postBuild() { getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); }); getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); }); @@ -122,7 +122,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild() getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); }); refresh(); - return TRUE; + return true; } void LLFloaterEnvironmentAdjust::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterenvironmentadjust.h b/indra/newview/llfloaterenvironmentadjust.h index db893cca12..228771418d 100644 --- a/indra/newview/llfloaterenvironmentadjust.h +++ b/indra/newview/llfloaterenvironmentadjust.h @@ -49,7 +49,7 @@ public: virtual ~LLFloaterEnvironmentAdjust(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index a3504ac6ee..52be7d76e3 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -71,7 +71,7 @@ LLFloaterEvent::~LLFloaterEvent() } -BOOL LLFloaterEvent::postBuild() +bool LLFloaterEvent::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); if (mBrowser) @@ -79,7 +79,7 @@ BOOL LLFloaterEvent::postBuild() mBrowser->addObserver(this); } - return TRUE; + return true; } void LLFloaterEvent::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h index ed90055d95..a0cd7de9e2 100644 --- a/indra/newview/llfloaterevent.h +++ b/indra/newview/llfloaterevent.h @@ -42,7 +42,7 @@ public: LLFloaterEvent(const LLSD& key); /*virtual*/ ~LLFloaterEvent(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void setEventID(const U32 event_id); diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp index c642da7b83..9858f38210 100644 --- a/indra/newview/llfloaterexperiencepicker.cpp +++ b/indra/newview/llfloaterexperiencepicker.cpp @@ -102,7 +102,7 @@ LLFloaterExperiencePicker::~LLFloaterExperiencePicker() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterExperiencePicker::postBuild() +bool LLFloaterExperiencePicker::postBuild() { mSearchPanel = new LLPanelExperiencePicker(); addChild(mSearchPanel); diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h index 29054a57db..5ef3281a82 100644 --- a/indra/newview/llfloaterexperiencepicker.h +++ b/indra/newview/llfloaterexperiencepicker.h @@ -48,9 +48,9 @@ public: LLFloaterExperiencePicker(const LLSD& key); virtual ~LLFloaterExperiencePicker(); - BOOL postBuild(); + bool postBuild() override; - virtual void draw(); + void draw() override; private: LLPanelExperiencePicker* mSearchPanel; diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index f6afdd29fb..931cfee735 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -140,7 +140,7 @@ LLFloaterExperienceProfile::~LLFloaterExperienceProfile() } -BOOL LLFloaterExperienceProfile::postBuild() +bool LLFloaterExperienceProfile::postBuild() { if (mExperienceId.notNull()) @@ -190,7 +190,7 @@ BOOL LLFloaterExperienceProfile::postBuild() changeToEdit(); } - return TRUE; + return true; } void LLFloaterExperienceProfile::experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience ) @@ -533,17 +533,17 @@ void LLFloaterExperienceProfile::onFieldChanged() } -BOOL LLFloaterExperienceProfile::canClose() +bool LLFloaterExperienceProfile::canClose() { if(mForceClose || !mDirty) { - return TRUE; + return true; } else { // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLFloaterExperienceProfile::handleSaveChangesDialog, this, _1, _2, CLOSE)); - return FALSE; + return false; } } diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h index f9b6e2e2eb..0f4a3eeea2 100644 --- a/indra/newview/llfloaterexperienceprofile.h +++ b/indra/newview/llfloaterexperienceprofile.h @@ -60,7 +60,7 @@ public: void refreshExperience(const LLSD& experience); void onSaveComplete( const LLSD& content ); - virtual BOOL canClose(); + virtual bool canClose(); virtual void onClose(bool app_quitting); protected: @@ -87,7 +87,7 @@ protected: static void experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience); static bool experiencePermission(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& permission); - BOOL postBuild(); + bool postBuild(); bool setMaturityString(U8 maturity, LLTextBox* child, LLComboBox* combo); bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response, PostSaveAction action); void doSave( int success_action ); diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index 184e39402a..2dcda52b53 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -58,7 +58,7 @@ LLPanelExperiences* LLFloaterExperiences::addTab(const std::string& name, bool s return newPanel; } -BOOL LLFloaterExperiences::postBuild() +bool LLFloaterExperiences::postBuild() { getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperiencePicker()); addTab("Allowed_Experiences_Tab", true); @@ -74,7 +74,7 @@ BOOL LLFloaterExperiences::postBuild() getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperienceLog()); resizeToTabs(); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h index 6d0559af7c..241798490c 100644 --- a/indra/newview/llfloaterexperiences.h +++ b/indra/newview/llfloaterexperiences.h @@ -47,7 +47,7 @@ protected: void clearFromRecent(const LLSD& ids); void resizeToTabs(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refreshContents(); void setupRecentTabs(); LLPanelExperiences* addTab(const std::string& name, bool select); diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 8e28fd6234..04fd6cb1c8 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -94,7 +94,7 @@ LLFloaterFixedEnvironment::~LLFloaterFixedEnvironment() delete mFlyoutControl; } -BOOL LLFloaterFixedEnvironment::postBuild() +bool LLFloaterFixedEnvironment::postBuild() { mTab = getChild<LLTabContainer>(CONTROL_TAB_AREA); mTxtName = getChild<LLLineEditor>(FIELD_SETTINGS_NAME); @@ -110,7 +110,7 @@ BOOL LLFloaterFixedEnvironment::postBuild() mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); }); mFlyoutControl->setMenuItemVisible(ACTION_COMMIT, false); - return TRUE; + return true; } void LLFloaterFixedEnvironment::onOpen(const LLSD& key) @@ -411,10 +411,10 @@ LLFloaterFixedEnvironmentWater::LLFloaterFixedEnvironmentWater(const LLSD &key): LLFloaterFixedEnvironment(key) {} -BOOL LLFloaterFixedEnvironmentWater::postBuild() +bool LLFloaterFixedEnvironmentWater::postBuild() { if (!LLFloaterFixedEnvironment::postBuild()) - return FALSE; + return false; LLPanelSettingsWater * panel; panel = new LLPanelSettingsWaterMainTab; @@ -423,7 +423,7 @@ BOOL LLFloaterFixedEnvironmentWater::postBuild() panel->setOnDirtyFlagChanged( [this] (LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); - return TRUE; + return true; } void LLFloaterFixedEnvironmentWater::updateEditEnvironment(void) @@ -478,10 +478,10 @@ LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) : LLFloaterFixedEnvironment(key) {} -BOOL LLFloaterFixedEnvironmentSky::postBuild() +bool LLFloaterFixedEnvironmentSky::postBuild() { if (!LLFloaterFixedEnvironment::postBuild()) - return FALSE; + return false; LLPanelSettingsSky * panel; panel = new LLPanelSettingsSkyAtmosTab; @@ -502,7 +502,7 @@ BOOL LLFloaterFixedEnvironmentSky::postBuild() panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false)); - return TRUE; + return true; } void LLFloaterFixedEnvironmentSky::updateEditEnvironment(void) diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h index f35f4a4368..a5d3e50f7c 100644 --- a/indra/newview/llfloaterfixedenvironment.h +++ b/indra/newview/llfloaterfixedenvironment.h @@ -50,7 +50,7 @@ public: LLFloaterFixedEnvironment(const LLSD &key); ~LLFloaterFixedEnvironment(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; @@ -101,7 +101,7 @@ class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment public: LLFloaterFixedEnvironmentWater(const LLSD &key); - BOOL postBuild() override; + bool postBuild() override; virtual void onOpen(const LLSD& key) override; @@ -121,7 +121,7 @@ class LLFloaterFixedEnvironmentSky : public LLFloaterFixedEnvironment public: LLFloaterFixedEnvironmentSky(const LLSD &key); - BOOL postBuild() override; + bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp index f576ce7a76..b51a2812b1 100644 --- a/indra/newview/llfloaterforgetuser.cpp +++ b/indra/newview/llfloaterforgetuser.cpp @@ -56,7 +56,7 @@ LLFloaterForgetUser::~LLFloaterForgetUser() } } -BOOL LLFloaterForgetUser::postBuild() +bool LLFloaterForgetUser::postBuild() { mScrollList = getChild<LLScrollListCtrl>("user_list"); @@ -120,12 +120,12 @@ BOOL LLFloaterForgetUser::postBuild() bool enable_button = mScrollList->getFirstSelectedIndex() != -1; LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data"); chk_box->setEnabled(enable_button); - chk_box->set(FALSE); + chk_box->set(false); LLButton *button = getChild<LLButton>("forget"); button->setEnabled(enable_button); button->setCommitCallback(boost::bind(&LLFloaterForgetUser::onForgetClicked, this)); - return TRUE; + return true; } void LLFloaterForgetUser::onForgetClicked() diff --git a/indra/newview/llfloaterforgetuser.h b/indra/newview/llfloaterforgetuser.h index 801fcbb412..2bbccc8192 100644 --- a/indra/newview/llfloaterforgetuser.h +++ b/indra/newview/llfloaterforgetuser.h @@ -37,7 +37,7 @@ public: LLFloaterForgetUser(const LLSD &key); ~LLFloaterForgetUser(); - BOOL postBuild(); + bool postBuild() override; void onForgetClicked(); private: diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 2ebe67e600..3191e5f566 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -188,7 +188,7 @@ LLFloaterGesture::~LLFloaterGesture() } // virtual -BOOL LLFloaterGesture::postBuild() +bool LLFloaterGesture::postBuild() { std::string label; @@ -224,9 +224,9 @@ BOOL LLFloaterGesture::postBuild() { buildGestureList(); - mGestureList->setFocus(TRUE); + mGestureList->setFocus(true); - const BOOL ascending = TRUE; + constexpr bool ascending = true; mGestureList->sortByColumn(std::string("name"), ascending); mGestureList->selectFirstItem(); } @@ -234,7 +234,7 @@ BOOL LLFloaterGesture::postBuild() // Update button labels onCommitList(); - return TRUE; + return true; } diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 1d702c6704..63d7e0e548 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -56,7 +56,7 @@ public: LLFloaterGesture(const LLSD& key); virtual ~LLFloaterGesture(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void done (); void refreshAll(); /** diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 24e7d8af04..6c50369c8b 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -124,11 +124,11 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key) mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this); } -BOOL LLFloaterGodTools::postBuild() +bool LLFloaterGodTools::postBuild() { sendRegionInfoRequest(); getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region"); - return TRUE; + return true; } // static void* LLFloaterGodTools::createPanelGrid(void *userdata) @@ -442,22 +442,22 @@ LLPanelRegionTools::LLPanelRegionTools() mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this)); } -BOOL LLPanelRegionTools::postBuild() +bool LLPanelRegionTools::postBuild() { getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this); getChild<LLLineEditor>("region name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLLineEditor>("estate")->setPrevalidate(&LLTextValidate::validatePositiveS32); getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("parentestate")->setEnabled(FALSE); + getChildView("parentestate")->setEnabled(false); getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("gridposx")->setEnabled(FALSE); + getChildView("gridposx")->setEnabled(false); getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("gridposy")->setEnabled(FALSE); + getChildView("gridposy")->setEnabled(false); getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLTextValidate::validatePositiveS32); getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLTextValidate::validatePositiveS32); - return TRUE; + return true; } // Destroys the object @@ -862,9 +862,9 @@ LLPanelGridTools::~LLPanelGridTools() { } -BOOL LLPanelGridTools::postBuild() +bool LLPanelGridTools::postBuild() { - return TRUE; + return true; } void LLPanelGridTools::refresh() @@ -946,10 +946,10 @@ LLPanelObjectTools::~LLPanelObjectTools() // base class will take care of everything } -BOOL LLPanelObjectTools::postBuild() +bool LLPanelObjectTools::postBuild() { refresh(); - return TRUE; + return true; } void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id) @@ -1231,11 +1231,11 @@ LLPanelRequestTools::~LLPanelRequestTools() { } -BOOL LLPanelRequestTools::postBuild() +bool LLPanelRequestTools::postBuild() { refresh(); - return TRUE; + return true; } void LLPanelRequestTools::refresh() diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h index cbaeee7051..71396c8716 100644 --- a/indra/newview/llfloatergodtools.h +++ b/indra/newview/llfloatergodtools.h @@ -102,7 +102,7 @@ protected: protected: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // When the floater is going away, reset any options that need to be // cleared. void resetToolState(); @@ -127,7 +127,7 @@ public: LLPanelRegionTools(); /*virtual*/ ~LLPanelRegionTools(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void refresh(); @@ -189,7 +189,7 @@ public: LLPanelGridTools(); virtual ~LLPanelGridTools(); - BOOL postBuild(); + bool postBuild(); void refresh(); @@ -213,7 +213,7 @@ public: LLPanelObjectTools(); /*virtual*/ ~LLPanelObjectTools(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void refresh(); @@ -254,7 +254,7 @@ public: LLPanelRequestTools(); /*virtual*/ ~LLPanelRequestTools(); - BOOL postBuild(); + bool postBuild(); void refresh(); diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index 3b34f03532..2b3c55c831 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -58,16 +58,16 @@ LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core) } } -BOOL LLFloaterGotoLine::postBuild() +bool LLFloaterGotoLine::postBuild() { mGotoBox = getChild<LLLineEditor>("goto_line"); mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this)); - mGotoBox->setCommitOnFocusLost(FALSE); + mGotoBox->setCommitOnFocusLost(false); getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32); childSetAction("goto_btn", onBtnGoto,this); setDefaultBtn("goto_btn"); - return TRUE; + return true; } //static @@ -122,17 +122,17 @@ bool LLFloaterGotoLine::hasAccelerators() const { return mEditorCore->hasAccelerators(); } - return FALSE; + return false; } -BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask) +bool LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask) { if (mEditorCore) { return mEditorCore->handleKeyHere(key, mask); } - return FALSE; + return false; } void LLFloaterGotoLine::onGotoBoxCommit() diff --git a/indra/newview/llfloatergotoline.h b/indra/newview/llfloatergotoline.h index 058d601752..ae388ee33c 100644 --- a/indra/newview/llfloatergotoline.h +++ b/indra/newview/llfloatergotoline.h @@ -40,7 +40,7 @@ public: LLFloaterGotoLine(LLScriptEdCore* editor_core); ~LLFloaterGotoLine(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; static void show(LLScriptEdCore* editor_core); static void onBtnGoto(void* userdata); @@ -49,8 +49,8 @@ public: LLScriptEdCore* getEditorCore() { return mEditorCore; } static LLFloaterGotoLine* getInstance() { return sInstance; } - virtual bool hasAccelerators() const; - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool hasAccelerators() const override; + bool handleKeyHere(KEY key, MASK mask) override; private: diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index 9745e17bbb..64f4de262f 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -47,12 +47,12 @@ LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : { } -BOOL LLFloaterGridStatus::postBuild() +bool LLFloaterGridStatus::postBuild() { LLFloaterWebContent::postBuild(); mWebBrowser->addObserver(this); - return TRUE; + return true; } void LLFloaterGridStatus::onOpen(const LLSD& key) diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 0c3deb7d4c..a6a2f48631 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -57,7 +57,7 @@ public: private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void applyPreferredRect(); diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index f341e2ebcb..41c4d62826 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -75,7 +75,7 @@ void LLFloaterGroupPicker::setPowersMask(U64 powers_mask) } -BOOL LLFloaterGroupPicker::postBuild() +bool LLFloaterGroupPicker::postBuild() { LLScrollListCtrl* list_ctrl = getChild<LLScrollListCtrl>("group list"); if (list_ctrl) @@ -91,9 +91,9 @@ BOOL LLFloaterGroupPicker::postBuild() setDefaultBtn("OK"); - getChildView("OK")->setEnabled(TRUE); + getChildView("OK")->setEnabled(true); - return TRUE; + return true; } void LLFloaterGroupPicker::removeNoneOption() @@ -179,7 +179,7 @@ void LLPanelGroups::reset() enableButtons(); } -BOOL LLPanelGroups::postBuild() +bool LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); @@ -210,7 +210,7 @@ BOOL LLPanelGroups::postBuild() reset(); - return TRUE; + return true; } void LLPanelGroups::enableButtons() @@ -224,23 +224,23 @@ void LLPanelGroups::enableButtons() if(group_id != gAgent.getGroupID()) { - getChildView("Activate")->setEnabled(TRUE); + getChildView("Activate")->setEnabled(true); } else { - getChildView("Activate")->setEnabled(FALSE); + getChildView("Activate")->setEnabled(false); } if (group_id.notNull()) { - getChildView("Info")->setEnabled(TRUE); - getChildView("IM")->setEnabled(TRUE); - getChildView("Leave")->setEnabled(TRUE); + getChildView("Info")->setEnabled(true); + getChildView("IM")->setEnabled(true); + getChildView("Leave")->setEnabled(true); } else { - getChildView("Info")->setEnabled(FALSE); - getChildView("IM")->setEnabled(FALSE); - getChildView("Leave")->setEnabled(FALSE); + getChildView("Info")->setEnabled(false); + getChildView("IM")->setEnabled(false); + getChildView("Leave")->setEnabled(false); } getChildView("Create")->setEnabled(gAgent.canJoinGroups()); } diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h index 1ad27cea19..10c060ee70 100644 --- a/indra/newview/llfloatergroups.h +++ b/indra/newview/llfloatergroups.h @@ -60,11 +60,7 @@ public: typedef boost::signals2::signal<void (LLUUID id)> signal_t; void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); } void setPowersMask(U64 powers_mask); - BOOL postBuild(); - - // implementation of factory policy - static LLFloaterGroupPicker* findInstance(const LLSD& seed); - static LLFloaterGroupPicker* createInstance(const LLSD& seed); + bool postBuild(); // for cases like inviting avatar to group we don't want the none option void removeNoneOption(); @@ -97,7 +93,7 @@ public: protected: // initialize based on the type - BOOL postBuild(); + bool postBuild(); // highlight_id is a group id to highlight void enableButtons(); @@ -109,8 +105,6 @@ protected: static void onBtnIM(void* userdata); static void onBtnLeave(void* userdata); static void onBtnSearch(void* userdata); - static void onBtnVote(void* userdata); - static void onDoubleClickGroup(void* userdata); void create(); void activate(); @@ -118,10 +112,6 @@ protected: void startIM(); void leave(); void search(); - void callVote(); - - static bool callbackLeaveGroup(const LLSD& notification, const LLSD& response); - }; diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp index eb1f7f7965..4ec56cb092 100644 --- a/indra/newview/llfloaterhelpbrowser.cpp +++ b/indra/newview/llfloaterhelpbrowser.cpp @@ -47,7 +47,7 @@ LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key) { } -BOOL LLFloaterHelpBrowser::postBuild() +bool LLFloaterHelpBrowser::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); mBrowser->addObserver(this); @@ -56,7 +56,7 @@ BOOL LLFloaterHelpBrowser::postBuild() childSetAction("open_browser", onClickOpenWebBrowser, this); buildURLHistory(); - return TRUE; + return true; } void LLFloaterHelpBrowser::buildURLHistory() diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h index bf4f544a14..aaec3cde86 100644 --- a/indra/newview/llfloaterhelpbrowser.h +++ b/indra/newview/llfloaterhelpbrowser.h @@ -40,7 +40,7 @@ class LLFloaterHelpBrowser : public: LLFloaterHelpBrowser(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onOpen(const LLSD& key); diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index a00fc4aa84..56656d8dac 100644 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -56,7 +56,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool updat } } -BOOL LLFloaterHoverHeight::postBuild() +bool LLFloaterHoverHeight::postBuild() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setMinValue(MIN_HOVER_Z); @@ -86,7 +86,7 @@ BOOL LLFloaterHoverHeight::postBuild() // Set up based on initial region. onRegionChanged(); - return TRUE; + return true; } void LLFloaterHoverHeight::onClose(bool app_quitting) diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index a643fa2516..08d3f26acb 100644 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -33,7 +33,7 @@ class LLFloaterHoverHeight: public LLFloater { public: LLFloaterHoverHeight(const LLSD& key); - BOOL postBuild(); + bool postBuild(); static void onSliderMoved(LLUICtrl* ctrl, void* userData); diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp index a359fb7c7d..2cbff9de28 100644 --- a/indra/newview/llfloaterhowto.cpp +++ b/indra/newview/llfloaterhowto.cpp @@ -33,8 +33,8 @@ #include "llweb.h" -const S32 STACK_WIDTH = 300; -const S32 STACK_HEIGHT = 505; // content will be 500 +constexpr S32 STACK_WIDTH = 300; +constexpr S32 STACK_HEIGHT = 505; // content will be 500 LLFloaterHowTo::LLFloaterHowTo(const Params& key) : LLFloaterWebContent(key) @@ -42,11 +42,11 @@ LLFloaterHowTo::LLFloaterHowTo(const Params& key) : mShowPageTitle = false; } -BOOL LLFloaterHowTo::postBuild() +bool LLFloaterHowTo::postBuild() { LLFloaterWebContent::postBuild(); - return TRUE; + return true; } void LLFloaterHowTo::onOpen(const LLSD& key) @@ -78,14 +78,14 @@ LLFloaterHowTo* LLFloaterHowTo::getInstance() return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook"); } -BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask) +bool LLFloaterHowTo::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; if (KEY_F1 == key ) { closeFloater(); - handled = TRUE; + handled = true; } return handled; diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h index d8da355600..c6dee0099a 100644 --- a/indra/newview/llfloaterhowto.h +++ b/indra/newview/llfloaterhowto.h @@ -44,14 +44,14 @@ public: void onOpen(const LLSD& key) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; static LLFloaterHowTo* getInstance(); bool matchesKey(const LLSD& key) override { return true; /*single instance*/ }; private: - BOOL postBuild() override; + bool postBuild() override; }; #endif // LL_LLFLOATERHOWTO_H diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 58c76a0b85..9de78bb8ab 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -55,10 +55,10 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key) } // Opaque background since we never get the focus - setBackgroundOpaque(TRUE); + setBackgroundOpaque(true); } -BOOL LLFloaterHUD::postBuild() +bool LLFloaterHUD::postBuild() { mWebBrowser = getChild<LLMediaCtrl>("floater_hud_browser" ); if (mWebBrowser) @@ -75,7 +75,7 @@ BOOL LLFloaterHUD::postBuild() mWebBrowser->navigateTo(url); } - return TRUE; + return true; } // Destructor diff --git a/indra/newview/llfloaterhud.h b/indra/newview/llfloaterhud.h index e560d6320b..8940e5fe2f 100644 --- a/indra/newview/llfloaterhud.h +++ b/indra/newview/llfloaterhud.h @@ -36,7 +36,7 @@ class LLFloaterHUD : public LLFloater friend class LLFloaterReg; public: - BOOL postBuild(); + bool postBuild() override; private: // Handles its own construction and destruction, so private. diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index f4d203aac5..c63312e199 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -86,11 +86,11 @@ LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) : //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterImagePreview::postBuild() +bool LLFloaterImagePreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo"); @@ -106,7 +106,7 @@ BOOL LLFloaterImagePreview::postBuild() PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f); - getChildView("bad_image_text")->setVisible(FALSE); + getChildView("bad_image_text")->setVisible(false); if (mRawImagep.notNull() && gAgent.getRegion() != NULL) { @@ -121,7 +121,7 @@ BOOL LLFloaterImagePreview::postBuild() // We want "lossless_check" to be unchecked when it is disabled, regardless of // LosslessJ2CUpload state, so only assign control when enabling checkbox LLCheckBoxCtrl* check_box = getChild<LLCheckBoxCtrl>("lossless_check"); - check_box->setEnabled(TRUE); + check_box->setEnabled(true); check_box->setControlVariable(gSavedSettings.getControl("LosslessJ2CUpload")); } } @@ -129,9 +129,9 @@ BOOL LLFloaterImagePreview::postBuild() { mAvatarPreview = NULL; mSculptedPreview = NULL; - getChildView("bad_image_text")->setVisible(TRUE); - getChildView("clothing_type_combo")->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("bad_image_text")->setVisible(true); + getChildView("clothing_type_combo")->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); if(!mImageLoadError.empty()) { @@ -141,7 +141,7 @@ BOOL LLFloaterImagePreview::postBuild() getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 9658afffff..109a1ce457 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -113,7 +113,7 @@ public: LLFloaterImagePreview(const std::string& filename); virtual ~LLFloaterImagePreview(); - virtual BOOL postBuild(); + virtual bool postBuild(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 635aee64ff..65d002e77c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -183,7 +183,7 @@ void LLFloaterIMContainer::onCurrentChannelChanged(const LLUUID& session_id) } } -BOOL LLFloaterIMContainer::postBuild() +bool LLFloaterIMContainer::postBuild() { mOrigMinWidth = getMinWidth(); mOrigMinHeight = getMinHeight(); @@ -295,7 +295,7 @@ BOOL LLFloaterIMContainer::postBuild() mParticipantRefreshTimer.setTimerExpirySec(0); mParticipantRefreshTimer.start(); - return TRUE; + return true; } void LLFloaterIMContainer::onOpen(const LLSD& key) @@ -310,7 +310,7 @@ void LLFloaterIMContainer::onOpen(const LLSD& key) // virtual void LLFloaterIMContainer::addFloater(LLFloater* floaterp, - BOOL select_added_floater, + bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point) { if(!floaterp) return; @@ -373,7 +373,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, void LLFloaterIMContainer::onCloseFloater(LLUUID& id) { mSessions.erase(id); - setFocus(TRUE); + setFocus(true); } void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data) @@ -719,7 +719,7 @@ void LLFloaterIMContainer::returnFloaterToHost() floater->onTearOffClicked(); } -void LLFloaterIMContainer::setMinimized(BOOL b) +void LLFloaterIMContainer::setMinimized(bool b) { bool was_minimized = isMinimized(); LLMultiFloater::setMinimized(b); @@ -742,7 +742,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b) } } -void LLFloaterIMContainer::setVisible(BOOL visible) +void LLFloaterIMContainer::setVisible(bool visible) { LLFloaterIMNearbyChat* nearby_chat; if (visible) @@ -825,7 +825,7 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float } } -void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +void LLFloaterIMContainer::setVisibleAndFrontmost(bool take_focus, const LLSD& key) { LLMultiFloater::setVisibleAndFrontmost(take_focus, key); // Do not select "Nearby Chat" conversation, since it will bring its window to front @@ -2312,27 +2312,27 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve return !mConversationsRoot->getVisibleRect().overlaps(widget_rect); } -BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if(mask == MASK_ALT) { if (KEY_RETURN == key ) { expandConversation(); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } if ((KEY_UP == key) || (KEY_LEFT == key)) { selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } } return handled; @@ -2410,7 +2410,7 @@ bool LLFloaterIMContainer::isParticipantListExpanded() // Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought // to front independently /*virtual*/ -BOOL LLFloaterIMContainer::isFrontmost() +bool LLFloaterIMContainer::isFrontmost() { LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession); LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 82f3b00ebc..fb74d3c7ef 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -56,19 +56,19 @@ public: LLFloaterIMContainer(const LLSD& seed, const Params& params = getDefaultParams()); virtual ~LLFloaterIMContainer(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); - /*virtual*/ void setMinimized(BOOL b); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + /*virtual*/ void setMinimized(bool b); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); /*virtual*/ void updateResizeLimits(); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onCloseFloater(LLUUID& id); /*virtual*/ void addFloater(LLFloater* floaterp, - BOOL select_added_floater, + bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); void returnFloaterToHost(); void showConversation(const LLUUID& session_id); @@ -83,7 +83,6 @@ public: /*virtual*/ void tabClose(); void showStub(bool visible); - static LLFloater* getCurrentVoiceFloater(); static LLFloaterIMContainer* findInstance(); static LLFloaterIMContainer* getInstance(); @@ -116,11 +115,11 @@ public: void doToParticipants(const std::string& item, uuid_vec_t& selectedIDS); void assignResizeLimits(); - virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual bool handleKeyHere(KEY key, MASK mask ); /*virtual*/ void closeFloater(bool app_quitting = false); void closeAllConversations(); void closeSelectedConversations(const uuid_vec_t& ids); - /*virtual*/ BOOL isFrontmost(); + /*virtual*/ bool isFrontmost(); private: diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index bb4cc9bca3..62ced2b710 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -71,9 +71,9 @@ S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0; -const S32 EXPANDED_HEIGHT = 266; -const S32 COLLAPSED_HEIGHT = 60; -const S32 EXPANDED_MIN_HEIGHT = 150; +constexpr S32 EXPANDED_HEIGHT = 266; +constexpr S32 COLLAPSED_HEIGHT = 60; +constexpr S32 EXPANDED_MIN_HEIGHT = 150; // legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); @@ -120,10 +120,10 @@ LLFloaterIMNearbyChat* LLFloaterIMNearbyChat::buildFloater(const LLSD& key) } //virtual -BOOL LLFloaterIMNearbyChat::postBuild() +bool LLFloaterIMNearbyChat::postBuild() { setIsSingleInstance(TRUE); - BOOL result = LLFloaterIMSessionTab::postBuild(); + bool result = LLFloaterIMSessionTab::postBuild(); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); mInputEditor->setCommitCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxCommit, this)); @@ -268,7 +268,7 @@ void LLFloaterIMNearbyChat::removeScreenChat() } -void LLFloaterIMNearbyChat::setVisible(BOOL visible) +void LLFloaterIMNearbyChat::setVisible(bool visible) { LLFloaterIMSessionTab::setVisible(visible); @@ -279,7 +279,7 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible) } -void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +void LLFloaterIMNearbyChat::setVisibleAndFrontmost(bool take_focus, const LLSD& key) { LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key); @@ -391,21 +391,21 @@ std::string LLFloaterIMNearbyChat::getCurrentChat() } // virtual -BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) +bool LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( KEY_RETURN == key && mask == MASK_CONTROL) { // shout sendChat(CHAT_TYPE_SHOUT); - handled = TRUE; + handled = true; } else if (KEY_RETURN == key && mask == MASK_SHIFT) { // whisper sendChat(CHAT_TYPE_WHISPER); - handled = TRUE; + handled = true; } @@ -415,12 +415,12 @@ BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) if ((KEY_UP == key) || (KEY_LEFT == key)) { floater_container->selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { floater_container->selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } } diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h index f0daacd6a9..67f7808021 100644 --- a/indra/newview/llfloaterimnearbychat.h +++ b/indra/newview/llfloaterimnearbychat.h @@ -50,11 +50,11 @@ public: static LLFloaterIMNearbyChat* buildFloater(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); /*virtual*/ void closeHostedFloater(); void loadHistory(); @@ -72,7 +72,7 @@ public: std::string getCurrentChat(); S32 getMessageArchiveLength() {return mMessageArchive.size();} - virtual BOOL handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ); static void startChat(const char* line); static void stopChat(); diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index ee9dc35283..58788603f4 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -340,9 +340,9 @@ void LLFloaterIMSession::initIMFloater() } //virtual -BOOL LLFloaterIMSession::postBuild() +bool LLFloaterIMSession::postBuild() { - BOOL result = LLFloaterIMSessionTab::postBuild(); + bool result = LLFloaterIMSessionTab::postBuild(); mInputEditor->setMaxTextLength(1023); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); @@ -666,7 +666,7 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock) } } -void LLFloaterIMSession::setMinimized(BOOL b) +void LLFloaterIMSession::setMinimized(bool b) { bool wasMinimized = isMinimized(); LLFloaterIMSessionTab::setMinimized(b); @@ -683,7 +683,7 @@ void LLFloaterIMSession::setMinimized(BOOL b) } } -void LLFloaterIMSession::setVisible(BOOL visible) +void LLFloaterIMSession::setVisible(bool visible) { LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> (LLNotificationsUI::LLChannelManager::getInstance()-> @@ -719,7 +719,7 @@ void LLFloaterIMSession::setVisible(BOOL visible) } -BOOL LLFloaterIMSession::getVisible() +bool LLFloaterIMSession::getVisible() { bool visible; @@ -751,7 +751,7 @@ BOOL LLFloaterIMSession::getVisible() return visible; } -void LLFloaterIMSession::setFocus(BOOL focus) +void LLFloaterIMSession::setFocus(bool focus) { LLFloaterIMSessionTab::setFocus(focus); @@ -1128,7 +1128,7 @@ void LLFloaterIMSession::draw() } // virtual -BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1151,7 +1151,7 @@ BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, cargo_type, cargo_data, accept); } - return TRUE; + return true; } bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop) diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 28464fc14b..d942aa3192 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -64,15 +64,15 @@ public: void initIMFloater(); // LLView overrides - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setMinimized(BOOL b); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ BOOL getVisible(); - /*virtual*/ void setFocus(BOOL focus); + /*virtual*/ bool postBuild(); + /*virtual*/ void setMinimized(bool b); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ bool getVisible(); + /*virtual*/ void setFocus(bool focus); // Check typing timeout timer. /*virtual*/ void draw(); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 0b0dce29fb..0a62481468 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -136,7 +136,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid return conv; }; -void LLFloaterIMSessionTab::setVisible(BOOL visible) +void LLFloaterIMSessionTab::setVisible(bool visible) { if(visible && !mHasVisibleBeenInitialized) { @@ -159,7 +159,7 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) } /*virtual*/ -void LLFloaterIMSessionTab::setFocus(BOOL focus) +void LLFloaterIMSessionTab::setFocus(bool focus) { LLTransientDockableFloater::setFocus(focus); @@ -170,7 +170,7 @@ void LLFloaterIMSessionTab::setFocus(BOOL focus) if (mInputEditor) { - mInputEditor->setFocus(TRUE); + mInputEditor->setFocus(true); } } } @@ -233,9 +233,9 @@ void LLFloaterIMSessionTab::assignResizeLimits() this->mParticipantListAndHistoryStack->updateLayout(); } -BOOL LLFloaterIMSessionTab::postBuild() +bool LLFloaterIMSessionTab::postBuild() { - BOOL result; + bool result; mBodyStack = getChild<LLLayoutStack>("main_stack"); mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels"); @@ -283,8 +283,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this)); mInputEditor->setMouseUpCallback(boost::bind(&LLFloaterIMSessionTab::onInputEditorClicked, this)); - mInputEditor->setCommitOnFocusLost( FALSE ); - mInputEditor->setPassDelete(TRUE); + mInputEditor->setCommitOnFocusLost(false); + mInputEditor->setPassDelete(true); mInputEditor->setFont(LLViewerChat::getChatFont()); mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight(); @@ -1019,8 +1019,7 @@ void LLFloaterIMSessionTab::onTearOffClicked() void LLFloaterIMSessionTab::updateGearBtn() { - - BOOL prevVisibility = mGearBtn->getVisible(); + bool prevVisibility = mGearBtn->getVisible(); mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat); @@ -1165,9 +1164,9 @@ LLView* LLFloaterIMSessionTab::getChatHistory() return mChatHistory; } -BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if(mask == MASK_ALT) { @@ -1175,17 +1174,17 @@ BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) if (KEY_RETURN == key && !isTornOff()) { floater_container->expandConversation(); - handled = TRUE; + handled = true; } if ((KEY_UP == key) || (KEY_LEFT == key)) { floater_container->selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { floater_container->selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } } return handled; diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index d478922617..a54c463470 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -76,10 +76,10 @@ public: // LLFloater overrides /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setFocus(BOOL focus); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setFocus(bool focus); // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); @@ -95,7 +95,7 @@ public: virtual void updateMessages() {} LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); - virtual BOOL handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ); bool isMessagePaneExpanded(){return mMessagePaneExpanded;} void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} void restoreFloater(); diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 10088d20c2..45ec1f03cb 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -56,7 +56,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key) mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this)); } -BOOL LLFloaterInspect::postBuild() +bool LLFloaterInspect::postBuild() { mObjectList = getChild<LLScrollListCtrl>("object_list"); // childSetAction("button owner",onClickOwnerProfile, this); @@ -65,7 +65,7 @@ BOOL LLFloaterInspect::postBuild() refresh(); - return TRUE; + return true; } LLFloaterInspect::~LLFloaterInspect(void) diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index 44381eac96..d6eb23b2e8 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -44,12 +44,12 @@ public: // static void show(void* ignored = NULL); void onOpen(const LLSD& key); - virtual BOOL postBuild(); + virtual bool postBuild(); void dirty(); LLUUID getSelectedUUID(); virtual void draw(); virtual void refresh(); -// static BOOL isVisible(); +// static bool isVisible(); virtual void onFocusReceived(); void onClickCreatorProfile(); void onClickOwnerProfile(); diff --git a/indra/newview/llfloaterinventorysettings.cpp b/indra/newview/llfloaterinventorysettings.cpp index 29d6e90a33..e5ee69f240 100644 --- a/indra/newview/llfloaterinventorysettings.cpp +++ b/indra/newview/llfloaterinventorysettings.cpp @@ -36,9 +36,9 @@ LLFloaterInventorySettings::LLFloaterInventorySettings(const LLSD& key) LLFloaterInventorySettings::~LLFloaterInventorySettings() {} -BOOL LLFloaterInventorySettings::postBuild() +bool LLFloaterInventorySettings::postBuild() { getChild<LLButton>("ok_btn")->setCommitCallback(boost::bind(&LLFloater::closeFloater, this, false)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterinventorysettings.h b/indra/newview/llfloaterinventorysettings.h index 50304276c7..3fe3a001b9 100644 --- a/indra/newview/llfloaterinventorysettings.h +++ b/indra/newview/llfloaterinventorysettings.h @@ -35,7 +35,7 @@ class LLFloaterInventorySettings friend class LLFloaterReg; public: - virtual BOOL postBuild(); + bool postBuild() override; private: LLFloaterInventorySettings(const LLSD& key); diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 558b14bba7..f847ccdd9e 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -132,7 +132,7 @@ void LLFloaterJoystick::draw() LLFloater::draw(); } -BOOL LLFloaterJoystick::postBuild() +bool LLFloaterJoystick::postBuild() { center(); F32 range = gSavedSettings.getBOOL("Cursor3D") ? 128.f : 2.f; @@ -160,7 +160,7 @@ BOOL LLFloaterJoystick::postBuild() refresh(); refreshListOfDevices(); - return TRUE; + return true; } LLFloaterJoystick::~LLFloaterJoystick() diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h index 1d46efd3f6..97eee0a630 100644 --- a/indra/newview/llfloaterjoystick.h +++ b/indra/newview/llfloaterjoystick.h @@ -39,7 +39,7 @@ class LLFloaterJoystick : public LLFloater public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void refresh(); virtual void apply(); // Apply the changed values. virtual void cancel(); // Cancel the changed values. diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index db00f69f03..071c73ca6a 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -50,11 +50,11 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); } -BOOL LLFloaterLagMeter::postBuild() +bool LLFloaterLagMeter::postBuild() { // Don't let this window take keyboard focus -- it's confusing to // lose arrow-key driving when testing lag. - setIsChrome(TRUE); + setIsChrome(true); // were we shrunk last time? if (isShrunk()) @@ -117,7 +117,7 @@ BOOL LLFloaterLagMeter::postBuild() // childSetAction("minimize", onClickShrink, this); updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079) - return TRUE; + return true; } LLFloaterLagMeter::~LLFloaterLagMeter() { diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h index 929ea40629..559e462b5d 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -37,7 +37,7 @@ class LLFloaterLagMeter : public LLFloater public: /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); private: LLFloaterLagMeter(const LLSD& key); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 07bd77460f..6ed958f12a 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -125,7 +125,7 @@ class LLPanelLandExperiences { public: LLPanelLandExperiences(LLSafeHandle<LLParcelSelection>& parcelp); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); void experienceAdded(const LLUUID& id, U32 xp_type, U32 access_type); @@ -155,7 +155,7 @@ public: return ((parcelp) ? (parcelp->getArea() >= MINIMUM_PARCEL_SIZE) : false); } - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void refresh() override; virtual LLParcel * getParcel() override; @@ -318,7 +318,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed) LLViewerParcelMgr::getInstance()->addObserver( sObserver ); } -BOOL LLFloaterLand::postBuild() +bool LLFloaterLand::postBuild() { setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChanged, this, _2)); @@ -331,7 +331,7 @@ BOOL LLFloaterLand::postBuild() tab->selectTab(sLastTab); } - return TRUE; + return true; } @@ -444,7 +444,7 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel) { } -BOOL LLPanelLandGeneral::postBuild() +bool LLPanelLandGeneral::postBuild() { mEditName = getChild<LLLineEditor>("Name"); mEditName->setCommitCallback(onCommitAny, this); @@ -544,7 +544,7 @@ BOOL LLPanelLandGeneral::postBuild() if(gDisconnected) { - return TRUE; + return true; } // note: on region change this will not be re checked, should not matter on Agni as @@ -566,7 +566,7 @@ BOOL LLPanelLandGeneral::postBuild() } } - return TRUE; + return true; } @@ -1191,7 +1191,7 @@ LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel) -BOOL LLPanelLandObjects::postBuild() +bool LLPanelLandObjects::postBuild() { mFirstReply = TRUE; @@ -1245,7 +1245,7 @@ BOOL LLPanelLandObjects::postBuild() mOwnerList->setDoubleClickCallback(onDoubleClickOwner, this); mOwnerList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); - return TRUE; + return true; } @@ -1934,7 +1934,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel) } -BOOL LLPanelLandOptions::postBuild() +bool LLPanelLandOptions::postBuild() { mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check"); childSetCommitCallback("edit objects check", onCommitAny, this); @@ -2024,7 +2024,7 @@ BOOL LLPanelLandOptions::postBuild() mLandingTypeCombo = getChild<LLComboBox>( "landing type"); childSetCommitCallback("landing type", onCommitAny, this); - return TRUE; + return true; } @@ -2441,7 +2441,7 @@ LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel) } -BOOL LLPanelLandAccess::postBuild() +bool LLPanelLandAccess::postBuild() { childSetCommitCallback("public_access", onCommitPublicAccess, this); childSetCommitCallback("limit_payment", onCommitAny, this); @@ -2472,7 +2472,7 @@ BOOL LLPanelLandAccess::postBuild() mListBanned->setAlternateSort(); } - return TRUE; + return true; } @@ -3051,13 +3051,13 @@ LLPanelLandCovenant::~LLPanelLandCovenant() { } -BOOL LLPanelLandCovenant::postBuild() +bool LLPanelLandCovenant::postBuild() { mLastRegionID = LLUUID::null; mNextUpdateTime = 0; mTextEstateOwner = getChild<LLTextBox>("estate_owner_text"); mTextEstateOwner->setIsFriendCallback(LLAvatarActions::isFriend); - return TRUE; + return true; } // virtual @@ -3224,7 +3224,7 @@ LLPanelLandExperiences::LLPanelLandExperiences( LLSafeHandle<LLParcelSelection>& } -BOOL LLPanelLandExperiences::postBuild() +bool LLPanelLandExperiences::postBuild() { mAllowed = setupList("panel_allowed", EXPERIENCE_KEY_TYPE_ALLOWED, AL_ALLOW_EXPERIENCE); mBlocked = setupList("panel_blocked", EXPERIENCE_KEY_TYPE_BLOCKED, AL_BLOCK_EXPERIENCE); @@ -3326,17 +3326,17 @@ LLPanelLandEnvironment::LLPanelLandEnvironment(LLParcelSelectionHandle& parcel) { } -BOOL LLPanelLandEnvironment::postBuild() +bool LLPanelLandEnvironment::postBuild() { if (!LLPanelEnvironmentInfo::postBuild()) - return FALSE; + return false; getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION)); - getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(FALSE); - getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(FALSE); - getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE); + getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(false); + getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false); + getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true); - return TRUE; + return true; } void LLPanelLandEnvironment::refresh() diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 684950d88b..3f154b55e9 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -82,7 +82,7 @@ public: LLParcel* getCurrentSelectedParcel(); virtual void onOpen(const LLSD& key); - virtual BOOL postBuild(); + virtual bool postBuild(); private: // Does its own instance management, so clients not allowed @@ -175,7 +175,7 @@ public: static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata); static void callbackConfirmSaleChange(S32 option, void* userdata); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change @@ -274,7 +274,7 @@ public: static void onCommitClean(LLUICtrl* caller, void* user_data); static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: @@ -319,7 +319,7 @@ class LLPanelLandOptions public: LLPanelLandOptions(LLSafeHandle<LLParcelSelection>& parcelp); virtual ~LLPanelLandOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ void refresh(); @@ -378,7 +378,7 @@ public: static void onClickRemoveAccess(void*); static void onClickRemoveBanned(void*); - virtual BOOL postBuild(); + virtual bool postBuild(); void onClickAddAccess(); void onClickAddBanned(); @@ -400,7 +400,7 @@ class LLPanelLandCovenant public: LLPanelLandCovenant(LLSafeHandle<LLParcelSelection>& parcelp); virtual ~LLPanelLandCovenant(); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); static void updateCovenantText(const std::string& string); static void updateEstateName(const std::string& name); diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index a3222d622f..7260b61781 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -66,14 +66,14 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key) { } -BOOL LLFloaterLandHoldings::postBuild() +bool LLFloaterLandHoldings::postBuild() { childSetAction("Teleport", onClickTeleport, this); childSetAction("Show on Map", onClickMap, this); // Grant list LLScrollListCtrl* grant_list = getChild<LLScrollListCtrl>("grant list"); - grant_list->sortByColumnIndex(0, TRUE); + grant_list->sortByColumnIndex(0, true); grant_list->setDoubleClickCallback(onGrantList, this); S32 count = gAgent.mGroups.size(); @@ -99,7 +99,7 @@ BOOL LLFloaterLandHoldings::postBuild() center(); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterlandholdings.h b/indra/newview/llfloaterlandholdings.h index 90e75b1062..c3279d2bc6 100644 --- a/indra/newview/llfloaterlandholdings.h +++ b/indra/newview/llfloaterlandholdings.h @@ -41,7 +41,7 @@ public: LLFloaterLandHoldings(const LLSD& key); virtual ~LLFloaterLandHoldings(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& key); virtual void draw(); diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index 459fff0812..3f90ba6118 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -52,7 +52,7 @@ LLFloaterLinkReplace::~LLFloaterLinkReplace() { } -BOOL LLFloaterLinkReplace::postBuild() +bool LLFloaterLinkReplace::postBuild() { mStartBtn = getChild<LLButton>("btn_start"); mStartBtn->setCommitCallback(boost::bind(&LLFloaterLinkReplace::onStartClicked, this)); @@ -68,7 +68,7 @@ BOOL LLFloaterLinkReplace::postBuild() mStatusText = getChild<LLTextBox>("status_text"); - return TRUE; + return true; } void LLFloaterLinkReplace::onOpen(const LLSD& key) @@ -378,7 +378,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items) static LLDefaultChildRegistry::Register<LLInventoryLinkReplaceDropTarget> r("inventory_link_replace_drop_target"); -BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -411,7 +411,7 @@ BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask *accept = ACCEPT_NO; } - return TRUE; + return true; } void LLInventoryLinkReplaceDropTarget::setItem(LLInventoryItem* item) diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h index ab2ff87042..7096eedd4b 100644 --- a/indra/newview/llfloaterlinkreplace.h +++ b/indra/newview/llfloaterlinkreplace.h @@ -56,13 +56,13 @@ public: return mDADSignal.connect(cb); } - virtual BOOL postBuild() + virtual bool postBuild() { - setEnabled(FALSE); + setEnabled(false); return LLLineEditor::postBuild(); } - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -86,7 +86,7 @@ public: LLFloaterLinkReplace(const LLSD& key); virtual ~LLFloaterLinkReplace(); - BOOL postBuild(); + bool postBuild(); virtual void onOpen(const LLSD& key); virtual bool tick(); diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp index 8ed76b1df4..8281cc3f4b 100644 --- a/indra/newview/llfloaterloadprefpreset.cpp +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -41,7 +41,7 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterLoadPrefPreset::postBuild() +bool LLFloaterLoadPrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -52,7 +52,7 @@ BOOL LLFloaterLoadPrefPreset::postBuild() getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterLoadPrefPreset::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterloadprefpreset.h b/indra/newview/llfloaterloadprefpreset.h index 9471f6f1e1..cae05bc062 100644 --- a/indra/newview/llfloaterloadprefpreset.h +++ b/indra/newview/llfloaterloadprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterLoadPrefPreset : public LLFloater public: LLFloaterLoadPrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnOk(); void onBtnCancel(); diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index e8c65e2768..8cf6e2e307 100755 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -75,7 +75,7 @@ LLFloaterMap::~LLFloaterMap() { } -BOOL LLFloaterMap::postBuild() +bool LLFloaterMap::postBuild() { mMap = getChild<LLNetMap>("Net Map"); mMap->setToolTipMsg(getString("ToolTipMsg")); @@ -241,7 +241,7 @@ void LLFloaterMap::draw() LLFloater::draw(); } -void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterMap::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 10934b4c5c..8005e40327 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -42,10 +42,10 @@ public: static LLFloaterMap* getInstance(); virtual ~LLFloaterMap(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask ); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void draw(); + bool postBuild() override; + bool handleDoubleClick( S32 x, S32 y, MASK mask ) override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; + void draw() override; private: void setDirectionPos( LLTextBox* text_box, F32 rotation ); diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index de9fb5255e..e97a37a85b 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -62,7 +62,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings() mEnableCallbackRegistrar.add("Marketplace.ViewSort.CheckItem", boost::bind(&LLPanelMarketplaceListings::onViewSortMenuItemCheck, this, _2)); } -BOOL LLPanelMarketplaceListings::postBuild() +bool LLPanelMarketplaceListings::postBuild() { childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this)); childSetAction("audit_btn", boost::bind(&LLPanelMarketplaceListings::onAuditButtonClicked, this)); @@ -76,14 +76,14 @@ BOOL LLPanelMarketplaceListings::postBuild() return LLPanel::postBuild(); } -BOOL LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - BOOL handled = (handled_view != NULL); + bool handled = (handled_view != NULL); // Special case the drop zone if (handled && (handled_view->getName() == "marketplace_drop_zone")) { @@ -394,7 +394,7 @@ LLFloaterMarketplaceListings::~LLFloaterMarketplaceListings() delete mCategoryAddedObserver; } -BOOL LLFloaterMarketplaceListings::postBuild() +bool LLFloaterMarketplaceListings::postBuild() { mInventoryStatus = getChild<LLTextBox>("marketplace_status"); mInventoryInitializationInProgress = getChild<LLView>("initialization_progress_indicator"); @@ -413,7 +413,7 @@ BOOL LLFloaterMarketplaceListings::postBuild() // Fetch aggressively so we can interact with listings right onOpen() fetchContents(); - return TRUE; + return true; } void LLFloaterMarketplaceListings::onClose(bool app_quitting) @@ -695,7 +695,7 @@ bool LLFloaterMarketplaceListings::isAccepted(EAcceptance accept) return (accept >= ACCEPT_YES_COPY_SINGLE); } -BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -704,7 +704,7 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO // If there's no panel to accept drops or no existing marketplace listings folder, we refuse all drop if (!mPanelListings || mRootFolderId.isNull()) { - return FALSE; + return false; } tooltip_msg = ""; @@ -776,7 +776,7 @@ LLFloaterAssociateListing::~LLFloaterAssociateListing() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterAssociateListing::postBuild() +bool LLFloaterAssociateListing::postBuild() { getChild<LLButton>("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, TRUE)); getChild<LLButton>("Cancel")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::cancel, this)); @@ -786,17 +786,17 @@ BOOL LLFloaterAssociateListing::postBuild() return LLFloater::postBuild(); } -BOOL LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask) +bool LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { apply(); - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { cancel(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); @@ -867,17 +867,17 @@ mEditor(NULL) { } -BOOL LLFloaterMarketplaceValidation::postBuild() +bool LLFloaterMarketplaceValidation::postBuild() { childSetAction("OK", onOK, this); // This widget displays the validation messages mEditor = getChild<LLTextEditor>("validation_text"); - mEditor->setEnabled(FALSE); - mEditor->setFocus(TRUE); + mEditor->setEnabled(false); + mEditor->setFocus(true); mEditor->setValue(LLSD()); - return TRUE; + return true; } LLFloaterMarketplaceValidation::~LLFloaterMarketplaceValidation() @@ -1012,7 +1012,7 @@ LLFloaterItemProperties::~LLFloaterItemProperties() { } -BOOL LLFloaterItemProperties::postBuild() +bool LLFloaterItemProperties::postBuild() { return LLFloater::postBuild(); } diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 15854f67ee..7e6b2c9957 100644 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -52,8 +52,8 @@ class LLPanelMarketplaceListings : public LLPanel { public: LLPanelMarketplaceListings(); - BOOL postBuild(); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild(); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -99,8 +99,8 @@ public: void initializeMarketPlace(); // virtuals - BOOL postBuild(); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild(); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -152,8 +152,8 @@ class LLFloaterAssociateListing : public LLFloater { friend class LLFloaterReg; public: - virtual BOOL postBuild(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool postBuild(); + virtual bool handleKeyHere(KEY key, MASK mask); static LLFloaterAssociateListing* show(const LLUUID& folder_id); @@ -184,7 +184,7 @@ public: LLFloaterMarketplaceValidation(const LLSD& key); virtual ~LLFloaterMarketplaceValidation(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); virtual void onOpen(const LLSD& key); @@ -219,7 +219,7 @@ public: LLFloaterItemProperties(const LLSD& key); virtual ~LLFloaterItemProperties(); - BOOL postBuild(); + bool postBuild(); virtual void onOpen(const LLSD& key); private: diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index b34961e8a2..3749ee3aa7 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -80,7 +80,7 @@ LLFloaterMediaSettings::~LLFloaterMediaSettings() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterMediaSettings::postBuild() +bool LLFloaterMediaSettings::postBuild() { mApplyBtn = getChild<LLButton>("Apply"); mApplyBtn->setClickedCallback(onBtnApply, this); @@ -121,7 +121,7 @@ BOOL LLFloaterMediaSettings::postBuild() sInstance = this; - return TRUE; + return true; } //static diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index 151e43e6b9..c3070241b8 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -41,9 +41,9 @@ public: LLFloaterMediaSettings(const LLSD& key); ~LLFloaterMediaSettings(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + bool postBuild() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; static LLFloaterMediaSettings* getInstance(); static bool instanceExists(); diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp index c43526acaf..50be7ec6c6 100644 --- a/indra/newview/llfloatermemleak.cpp +++ b/indra/newview/llfloatermemleak.cpp @@ -57,7 +57,7 @@ LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key) } //---------------------------------------------- -BOOL LLFloaterMemLeak::postBuild(void) +bool LLFloaterMemLeak::postBuild(void) { F32 a, b ; a = getChild<LLUICtrl>("leak_speed")->getValue().asReal(); @@ -80,7 +80,7 @@ BOOL LLFloaterMemLeak::postBuild(void) } sbAllocationFailed = FALSE ; - return TRUE ; + return true ; } LLFloaterMemLeak::~LLFloaterMemLeak() { diff --git a/indra/newview/llfloatermemleak.h b/indra/newview/llfloatermemleak.h index 86416eaa07..932a838a96 100644 --- a/indra/newview/llfloatermemleak.h +++ b/indra/newview/llfloatermemleak.h @@ -35,8 +35,8 @@ class LLFloaterMemLeak : public LLFloater public: /// initialize all the callbacks for the menu - virtual BOOL postBuild() ; - virtual void draw() ; + bool postBuild() override; + void draw() override; void onChangeLeakingSpeed(); void onChangeMaxMemLeaking(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 1993b6b2a3..a6eaf2d4e1 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -75,15 +75,15 @@ LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; // should be represented by Retain spinner with values from 1 to 100 by 1. // To achieve this, RETAIN_COEFFICIENT is used while creating spinner // and when value is requested from spinner. -const double RETAIN_COEFFICIENT = 100; +constexpr double RETAIN_COEFFICIENT = 100; // "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001 // But according to the UI spec for upload model floater, this parameter // should be represented by Smooth combobox with only 10 values. // So this const is used as a size of Smooth combobox list. -const S32 SMOOTH_VALUES_NUMBER = 10; -const S32 PREVIEW_RENDER_SIZE = 1024; -const F32 PREVIEW_CAMERA_DISTANCE = 16.f; +constexpr S32 SMOOTH_VALUES_NUMBER = 10; +constexpr S32 PREVIEW_RENDER_SIZE = 1024; +constexpr F32 PREVIEW_CAMERA_DISTANCE = 16.f; class LLMeshFilePicker : public LLFilePickerThread { @@ -148,11 +148,11 @@ mAvatarTabIndex(0) //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterModelPreview::postBuild() +bool LLFloaterModelPreview::postBuild() { if (!LLFloater::postBuild()) { - return FALSE; + return false; } childSetCommitCallback("cancel_btn", onCancel, this); @@ -283,14 +283,14 @@ BOOL LLFloaterModelPreview::postBuild() mCalculateBtn->setEnabled(false); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // reshape() //----------------------------------------------------------------------------- -void LLFloaterModelPreview::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterModelPreview::reshape(S32 width, S32 height, bool called_from_parent) { LLFloaterModelUploadBase::reshape(width, height, called_from_parent); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index cb5d5a36e7..72d191f8ee 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -69,8 +69,8 @@ public: LLFloaterModelPreview(const LLSD& key); virtual ~LLFloaterModelPreview(); - virtual BOOL postBuild(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual bool postBuild(); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); void initModelPreview(); static bool showModelPreview(); diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index ba1ca868bc..b6b6a7308b 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -97,7 +97,7 @@ LLFloaterMyEnvironment::~LLFloaterMyEnvironment() } -BOOL LLFloaterMyEnvironment::postBuild() +bool LLFloaterMyEnvironment::postBuild() { mInventoryList = getChild<LLInventoryPanel>(PANEL_SETTINGS); @@ -122,8 +122,8 @@ BOOL LLFloaterMyEnvironment::postBuild() mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); }); childSetCommitCallback(BUTTON_DELETE, [this](LLUICtrl *, void*) { onDeleteSelected(); }, nullptr); - mSavedFolderState.setApply(FALSE); - return TRUE; + mSavedFolderState.setApply(false); + return true; } void LLFloaterMyEnvironment::refresh() diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h index fea0981590..b98ccc52db 100644 --- a/indra/newview/llfloatermyenvironment.h +++ b/indra/newview/llfloatermyenvironment.h @@ -43,7 +43,7 @@ public: LLFloaterMyEnvironment(const LLSD& key); virtual ~LLFloaterMyEnvironment(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void refresh() override; virtual void onOpen(const LLSD& key) override; diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp index 6f9a6c9066..e3c0523b74 100644 --- a/indra/newview/llfloatermyscripts.cpp +++ b/indra/newview/llfloatermyscripts.cpp @@ -36,7 +36,7 @@ #include "lltrans.h" #include "llviewerregion.h" -const S32 SIZE_OF_ONE_KB = 1024; +constexpr S32 SIZE_OF_ONE_KB = 1024; LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed) : LLFloater(seed), @@ -50,14 +50,14 @@ LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed) { } -BOOL LLFloaterMyScripts::postBuild() +bool LLFloaterMyScripts::postBuild() { childSetAction("refresh_list_btn", onClickRefresh, this); std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting)); mAttachmentDetailsRequested = requestAttachmentDetails(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatermyscripts.h b/indra/newview/llfloatermyscripts.h index 3c053a0223..d22286814a 100644 --- a/indra/newview/llfloatermyscripts.h +++ b/indra/newview/llfloatermyscripts.h @@ -35,8 +35,8 @@ class LLFloaterMyScripts : public LLFloater public: LLFloaterMyScripts(const LLSD& seed); - BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setAttachmentDetails(LLSD content); void setAttachmentSummary(LLSD content); bool requestAttachmentDetails(); diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 1e9549a04e..bbe125659f 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -64,7 +64,7 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; //----------------------------------------------------------------------------- LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) : LLFloater(filename), - mIsAudio(FALSE) + mIsAudio(false) { mFilenameAndPath = filename.asString(); mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false); @@ -73,7 +73,7 @@ LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterNameDesc::postBuild() +bool LLFloaterNameDesc::postBuild() { LLRect r; @@ -135,7 +135,7 @@ BOOL LLFloaterNameDesc::postBuild() setDefaultBtn("ok_btn"); - return TRUE; + return true; } S32 LLFloaterNameDesc::getExpectedUploadCost() const @@ -186,7 +186,7 @@ void LLFloaterNameDesc::doCommit() //----------------------------------------------------------------------------- void LLFloaterNameDesc::onBtnOK( ) { - getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads + getChildView("ok_btn")->setEnabled(false); // don't allow inadvertent extra uploads LLAssetStorage::LLStoreAssetCallback callback; S32 expected_upload_cost = getExpectedUploadCost(); @@ -233,17 +233,17 @@ void LLFloaterNameDesc::onBtnCancel() LLFloaterSoundPreview::LLFloaterSoundPreview(const LLSD& filename ) : LLFloaterNameDesc(filename) { - mIsAudio = TRUE; + mIsAudio = true; } -BOOL LLFloaterSoundPreview::postBuild() +bool LLFloaterSoundPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } @@ -256,14 +256,14 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename ) { } -BOOL LLFloaterAnimPreview::postBuild() +bool LLFloaterAnimPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -273,15 +273,15 @@ BOOL LLFloaterAnimPreview::postBuild() LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& filename ) : LLFloaterNameDesc(filename) { - mIsText = TRUE; + mIsText = true; } -BOOL LLFloaterScriptPreview::postBuild() +bool LLFloaterScriptPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 589f470e82..e6a7c71141 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -41,7 +41,7 @@ class LLFloaterNameDesc : public LLFloater public: LLFloaterNameDesc(const LLSD& filename); virtual ~LLFloaterNameDesc(); - virtual BOOL postBuild(); + bool postBuild() override; void onBtnOK(); void onBtnCancel(); @@ -53,7 +53,7 @@ protected: virtual void onCommit(); protected: - BOOL mIsAudio; + bool mIsAudio; bool mIsText; std::string mFilenameAndPath; @@ -64,21 +64,21 @@ class LLFloaterSoundPreview : public LLFloaterNameDesc { public: LLFloaterSoundPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; class LLFloaterAnimPreview : public LLFloaterNameDesc { public: LLFloaterAnimPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; class LLFloaterScriptPreview : public LLFloaterNameDesc { public: LLFloaterScriptPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; #endif // LL_LLFLOATERNAMEDESC_H diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index 1e50024967..20469db509 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -38,7 +38,7 @@ LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification() { } -BOOL LLFloaterNewFeatureNotification::postBuild() +bool LLFloaterNewFeatureNotification::postBuild() { setCanDrag(FALSE); getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); @@ -57,7 +57,7 @@ BOOL LLFloaterNewFeatureNotification::postBuild() reshape(rect.getWidth() + 90, rect.getHeight() + 45); } - return TRUE; + return true; } void LLFloaterNewFeatureNotification::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaternewfeaturenotification.h b/indra/newview/llfloaternewfeaturenotification.h index 95501451dc..c007e01d9f 100644 --- a/indra/newview/llfloaternewfeaturenotification.h +++ b/indra/newview/llfloaternewfeaturenotification.h @@ -34,7 +34,7 @@ class LLFloaterNewFeatureNotification: { friend class LLFloaterReg; public: - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; private: diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index fd03efa061..ce32630eee 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -42,7 +42,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel public: LLNotificationChannelPanel(const Params& p); ~LLNotificationChannelPanel(); - BOOL postBuild(); + bool postBuild(); private: bool update(const LLSD& payload); @@ -72,7 +72,7 @@ LLNotificationChannelPanel::~LLNotificationChannelPanel() } } -BOOL LLNotificationChannelPanel::postBuild() +bool LLNotificationChannelPanel::postBuild() { LLButton* header_button = getChild<LLButton>("header"); header_button->setLabel(mChannelPtr->getName()); @@ -83,7 +83,7 @@ BOOL LLNotificationChannelPanel::postBuild() LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("notifications_list"); scroll->setDoubleClickCallback(onClickNotification, this); scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0)); - return TRUE; + return true; } //static @@ -154,7 +154,7 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key) mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this)); } -BOOL LLFloaterNotificationConsole::postBuild() +bool LLFloaterNotificationConsole::postBuild() { // these are in the order of processing addChannel("Unexpired"); @@ -181,7 +181,7 @@ BOOL LLFloaterNotificationConsole::postBuild() } notifications->sortByName(); - return TRUE; + return true; } void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open) @@ -240,7 +240,7 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) buildFromFile("floater_notification.xml"); } -BOOL LLFloaterNotification::postBuild() +bool LLFloaterNotification::postBuild() { setTitle(mNote->getName()); getChild<LLUICtrl>("payload")->setValue(mNote->getMessage()); @@ -250,7 +250,7 @@ BOOL LLFloaterNotification::postBuild() LLNotificationFormPtr form(mNote->getForm()); if(!form) { - return TRUE; + return true; } responses_combo->setCommitCallback(onCommitResponse, this); @@ -264,7 +264,7 @@ BOOL LLFloaterNotification::postBuild() response_list->addSimpleElement(text); } - return TRUE; + return true; } void LLFloaterNotification::respond() diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h index 4e92b7d857..c3bc2d39be 100644 --- a/indra/newview/llfloaternotificationsconsole.h +++ b/indra/newview/llfloaternotificationsconsole.h @@ -41,7 +41,7 @@ class LLFloaterNotificationConsole : public: // LLPanel - BOOL postBuild(); + bool postBuild(); void addChannel(const std::string& type, bool open = false); void updateResizeLimits(LLLayoutStack &stack); @@ -64,7 +64,7 @@ public: LLFloaterNotification(LLNotification* note); // LLPanel - BOOL postBuild(); + bool postBuild(); void respond(); private: diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index d1679fd936..1cea7d03fe 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -58,7 +58,7 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL } //--------------------------------------------------------------------------------- -BOOL LLFloaterNotificationsTabbed::postBuild() +bool LLFloaterNotificationsTabbed::postBuild() { mGroupInviteMessageList = getChild<LLNotificationListView>("group_invite_notification_list"); mGroupNoticeMessageList = getChild<LLNotificationListView>("group_notice_notification_list"); @@ -78,14 +78,14 @@ BOOL LLFloaterNotificationsTabbed::postBuild() // get a corresponding channel initChannel(); - BOOL rv = LLTransientDockableFloater::postBuild(); + bool rv = LLTransientDockableFloater::postBuild(); setTitle(getString("title_notification_tabbed_window")); return rv; } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize) +void LLFloaterNotificationsTabbed::setMinimized(bool minimize) { LLTransientDockableFloater::setMinimized(minimize); } @@ -168,7 +168,7 @@ void LLFloaterNotificationsTabbed::initChannel() } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::setVisible(BOOL visible) +void LLFloaterNotificationsTabbed::setVisible(bool visible) { if (visible) { diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 8dd20b18c4..a8ff3d8002 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -72,7 +72,7 @@ public: LLFloaterNotificationsTabbed(const LLSD& key); virtual ~LLFloaterNotificationsTabbed(); - BOOL postBuild(); + bool postBuild(); // other interface functions // check is window empty @@ -85,11 +85,11 @@ public: void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName); // Operating with outfit - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void setMinimized(bool minimize); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -101,8 +101,8 @@ public: static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static constexpr S32 MAX_WINDOW_HEIGHT = 200; + static constexpr S32 MIN_WINDOW_WIDTH = 318; private: // init Window's channel diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index ed1ad4426f..96e7ae8b98 100644 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -84,7 +84,7 @@ LLFloaterObjectWeights::~LLFloaterObjectWeights() } // virtual -BOOL LLFloaterObjectWeights::postBuild() +bool LLFloaterObjectWeights::postBuild() { mSelectedObjects = getChild<LLTextBox>("objects"); mSelectedPrims = getChild<LLTextBox>("prims"); @@ -99,7 +99,7 @@ BOOL LLFloaterObjectWeights::postBuild() mRemainingCapacity = getChild<LLTextBox>("remaining_capacity"); mTotalCapacity = getChild<LLTextBox>("total_capacity"); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 1a2c317bad..90df0a47ee 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -58,7 +58,7 @@ public: LLFloaterObjectWeights(const LLSD& key); ~LLFloaterObjectWeights(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index d3ab22f792..b246f6283d 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -65,13 +65,13 @@ LLFloaterOpenObject::~LLFloaterOpenObject() } // virtual -BOOL LLFloaterOpenObject::postBuild() +bool LLFloaterOpenObject::postBuild() { getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", std::string("Object") ); // *Note: probably do not want to translate this mPanelInventoryObject = getChild<LLPanelObjectInventory>("object_contents"); refresh(); - return TRUE; + return true; } void LLFloaterOpenObject::onOpen(const LLSD& key) diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h index 745753316b..3b81601eb6 100644 --- a/indra/newview/llfloateropenobject.h +++ b/indra/newview/llfloateropenobject.h @@ -55,7 +55,7 @@ public: protected: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); void draw(); virtual void onOpen(const LLSD& key); diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 87f927ff65..2be10dc57a 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -117,7 +117,7 @@ LLFloaterPathfindingCharacters::~LLFloaterPathfindingCharacters() { } -BOOL LLFloaterPathfindingCharacters::postBuild() +bool LLFloaterPathfindingCharacters::postBuild() { mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingCharacterBeaconColor"); diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h index 4021f4f119..6c68d027d4 100644 --- a/indra/newview/llfloaterpathfindingcharacters.h +++ b/indra/newview/llfloaterpathfindingcharacters.h @@ -58,7 +58,7 @@ protected: LLFloaterPathfindingCharacters(const LLSD& pSeed); virtual ~LLFloaterPathfindingCharacters(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index ccf3e723fd..f2e4421705 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -95,7 +95,7 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::sInstanceHand // LLFloaterPathfindingConsole //--------------------------------------------------------------------------- -BOOL LLFloaterPathfindingConsole::postBuild() +bool LLFloaterPathfindingConsole::postBuild() { mViewTestTabContainer = findChild<LLTabContainer>("view_test_tab_container"); llassert(mViewTestTabContainer != NULL); diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index e999e57741..bfd267ca10 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -55,7 +55,7 @@ class LLFloaterPathfindingConsole friend class LLFloaterReg; public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& pKey); virtual void onClose(bool pIsAppQuitting); diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 03aede94c6..fa423a819a 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -111,7 +111,7 @@ LLFloaterPathfindingLinksets::~LLFloaterPathfindingLinksets() { } -BOOL LLFloaterPathfindingLinksets::postBuild() +bool LLFloaterPathfindingLinksets::postBuild() { mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingLinksetBeaconColor"); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index a954d8a8ec..efdbc573ec 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -55,7 +55,7 @@ protected: LLFloaterPathfindingLinksets(const LLSD& pSeed); virtual ~LLFloaterPathfindingLinksets(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index 5cf16f3ad6..84b10a900c 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -194,7 +194,7 @@ LLFloaterPathfindingObjects::~LLFloaterPathfindingObjects() clearAllObjects(); } -BOOL LLFloaterPathfindingObjects::postBuild() +bool LLFloaterPathfindingObjects::postBuild() { mDefaultBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconColor"); mDefaultBeaconTextColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconTextColor"); @@ -204,7 +204,7 @@ BOOL LLFloaterPathfindingObjects::postBuild() mObjectsScrollList = findChild<LLScrollListCtrl>("objects_scroll_list"); llassert(mObjectsScrollList != NULL); mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onScrollListSelectionChanged, this)); - mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), TRUE); + mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), true); mMessagingStatus = findChild<LLTextBase>("messaging_status"); llassert(mMessagingStatus != NULL); diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 752f741959..15008a5af5 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -73,7 +73,7 @@ protected: LLFloaterPathfindingObjects(const LLSD &pSeed); virtual ~LLFloaterPathfindingObjects(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); LLPathfindingManager::request_id_t getNewRequestId(); diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index bab6631d54..14587592e0 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -83,7 +83,7 @@ class LLFloaterPay : public LLFloater public: LLFloaterPay(const LLSD& key); virtual ~LLFloaterPay(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); void setCallback(money_callback callback) { mCallback = callback; } @@ -150,7 +150,7 @@ LLFloaterPay::~LLFloaterPay() gMessageSystem->setHandlerFuncFast(_PREHASH_PayPriceReply, 0, 0); } -BOOL LLFloaterPay::postBuild() +bool LLFloaterPay::postBuild() { S32 i = 0; @@ -158,7 +158,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 1")->setVisible(FALSE); + getChildView("fastpay 1")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 1"); mQuickPayInfo[i] = info; @@ -168,7 +168,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 5")->setVisible(FALSE); + getChildView("fastpay 5")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 5"); mQuickPayInfo[i] = info; @@ -178,7 +178,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 10")->setVisible(FALSE); + getChildView("fastpay 10")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 10"); mQuickPayInfo[i] = info; @@ -188,15 +188,15 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 20")->setVisible(FALSE); + getChildView("fastpay 20")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 20"); mQuickPayInfo[i] = info; ++i; - getChildView("amount text")->setVisible(FALSE); - getChildView("amount")->setVisible(FALSE); + getChildView("amount text")->setVisible(false); + getChildView("amount")->setVisible(false); getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); getChild<LLLineEditor>("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); @@ -206,12 +206,12 @@ BOOL LLFloaterPay::postBuild() childSetAction("pay btn", boost::bind(LLFloaterPay::onGive, info)); setDefaultBtn("pay btn"); - getChildView("pay btn")->setVisible(FALSE); - getChildView("pay btn")->setEnabled(FALSE); + getChildView("pay btn")->setVisible(false); + getChildView("pay btn")->setEnabled(false); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index fe85672c54..cb1c10090b 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -91,7 +91,7 @@ LLFloaterPerformance::~LLFloaterPerformance() delete mUpdateTimer; } -BOOL LLFloaterPerformance::postBuild() +bool LLFloaterPerformance::postBuild() { mMainPanel = getChild<LLPanel>("panel_performance_main"); mNearbyPanel = getChild<LLPanel>("panel_performance_nearby"); @@ -154,7 +154,7 @@ BOOL LLFloaterPerformance::postBuild() gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", FALSE, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS); - return TRUE; + return true; } void LLFloaterPerformance::showSelectedPanel(LLPanel* selected_panel) diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h index 620dbac5bb..5fecd99825 100644 --- a/indra/newview/llfloaterperformance.h +++ b/indra/newview/llfloaterperformance.h @@ -38,7 +38,7 @@ public: LLFloaterPerformance(const LLSD& key); virtual ~LLFloaterPerformance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); void showSelectedPanel(LLPanel* selected_panel); diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 4f67bead78..2a223124a8 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -46,9 +46,9 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed) { } -BOOL LLFloaterPerms::postBuild() +bool LLFloaterPerms::postBuild() { - return TRUE; + return true; } //static @@ -126,7 +126,7 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = "Materials" }; -BOOL LLFloaterPermsDefault::postBuild() +bool LLFloaterPermsDefault::postBuild() { if(!gSavedSettings.getBOOL("DefaultUploadPermissionsConverted")) { @@ -171,8 +171,8 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) xfer->setEnabled(copyable); } -const int MAX_HTTP_RETRIES = 5; -const float RETRY_TIMEOUT = 5.0; +constexpr int MAX_HTTP_RETRIES = 5; +constexpr float RETRY_TIMEOUT = 5.0; void LLFloaterPermsDefault::sendInitialPerms() { diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 97ddec7cba..873c6a262a 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -37,7 +37,7 @@ class LLFloaterPerms : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Convenience methods to get current permission preference bitfields from saved settings: static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy" @@ -55,7 +55,7 @@ class LLFloaterPermsDefault : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void ok(); void cancel(); void onClickOK(); diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index 2d61109e17..376d36f61a 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -49,7 +49,7 @@ LLFloaterPostProcess::~LLFloaterPostProcess() } -BOOL LLFloaterPostProcess::postBuild() +bool LLFloaterPostProcess::postBuild() { /// Color Filter Callbacks childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); @@ -84,7 +84,7 @@ BOOL LLFloaterPostProcess::postBuild() getChild<LLComboBox>("PPSaveEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onSaveEffect, this, editBox)); syncMenu(); - return TRUE; + return true; } // Bool Toggle diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h index 424a5fc8f0..bc978efdb7 100644 --- a/indra/newview/llfloaterpostprocess.h +++ b/indra/newview/llfloaterpostprocess.h @@ -49,7 +49,7 @@ public: LLFloaterPostProcess(const LLSD& key); virtual ~LLFloaterPostProcess(); - /*virtual*/ BOOL postBuild(); + bool postBuild(); /// post process callbacks static void onBoolToggle(LLUICtrl* ctrl, void* userData); @@ -67,11 +67,6 @@ public: /// sync up sliders void syncMenu(); - -/* - void refresh(); -*/ -public: }; #endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 19a4081eba..d925ab5ece 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -427,7 +427,7 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo LL_DEBUGS("Preferences") << "Agent id: " << gAgentID << " Data: " << data << " Result: " << httpResults << LL_ENDL; } -BOOL LLFloaterPreference::postBuild() +bool LLFloaterPreference::postBuild() { gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); @@ -504,7 +504,7 @@ BOOL LLFloaterPreference::postBuild() getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true); } - return TRUE; + return true; } void LLFloaterPreference::updateDeleteTranscriptsButton() @@ -2007,7 +2007,7 @@ LLPanelPreference::LLPanelPreference() } //virtual -BOOL LLPanelPreference::postBuild() +bool LLPanelPreference::postBuild() { ////////////////////// PanelGeneral /////////////////// if (hasChild("display_names_check", TRUE)) @@ -2324,7 +2324,7 @@ private: static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy"); -BOOL LLPanelPreferenceGraphics::postBuild() +bool LLPanelPreferenceGraphics::postBuild() { LLFloaterReg::showInstance("prefs_graphics_advanced"); LLFloaterReg::hideInstance("prefs_graphics_advanced"); @@ -2511,7 +2511,7 @@ LLPanelPreferenceControls::~LLPanelPreferenceControls() { } -BOOL LLPanelPreferenceControls::postBuild() +bool LLPanelPreferenceControls::postBuild() { // populate list of controls pControlsTable = getChild<LLScrollListCtrl>("controls_list"); @@ -2521,7 +2521,7 @@ BOOL LLPanelPreferenceControls::postBuild() pKeyModeBox->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onModeCommit, this)); getChild<LLButton>("restore_defaults")->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onRestoreDefaultsBtn, this)); - return TRUE; + return true; } void LLPanelPreferenceControls::regenerateControls() @@ -3113,12 +3113,12 @@ LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy() { } -BOOL LLFloaterPreferenceProxy::postBuild() +bool LLFloaterPreferenceProxy::postBuild() { LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type"); if (!socksAuth) { - return FALSE; + return false; } if (socksAuth->getSelectedValue().asString() == "None") { @@ -3133,7 +3133,7 @@ BOOL LLFloaterPreferenceProxy::postBuild() getChild<LLLineEditor>("socks5_password")->setValue(socks_cred->getAuthenticator()["creds"].asString()); } - return TRUE; + return true; } void LLFloaterPreferenceProxy::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index bdade3c1b9..8a231cc10b 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -81,7 +81,7 @@ public: void apply(); void cancel(const std::vector<std::string> settings_to_skip = {}); /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void changed(); @@ -246,7 +246,7 @@ class LLPanelPreference : public LLPanel { public: LLPanelPreference(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual ~LLPanelPreference(); @@ -292,7 +292,7 @@ private: class LLPanelPreferenceGraphics : public LLPanelPreference { public: - BOOL postBuild(); + bool postBuild(); void draw(); void cancel(const std::vector<std::string> settings_to_skip = {}); void saveSettings(); @@ -315,7 +315,7 @@ public: LLPanelPreferenceControls(); virtual ~LLPanelPreferenceControls(); - BOOL postBuild(); + bool postBuild(); void apply(); void cancel(const std::vector<std::string> settings_to_skip = {}); @@ -386,7 +386,7 @@ public: void cancel(); protected: - BOOL postBuild(); + bool postBuild(); void onOpen(const LLSD& key); void onClose(bool app_quitting); void saveSettings(); diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index f83ce868a3..364ebe93c4 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -61,7 +61,7 @@ LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() mLODFactorChangedSignal.disconnect(); } -BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() +bool LLFloaterPreferenceGraphicsAdvanced::postBuild() { // Don't do this on Mac as their braindead GL versioning // sets this when 8x and 16x are indeed available @@ -80,7 +80,7 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this)); mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this)); - return TRUE; + return true; } void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h index 2c92f3dbf1..ed7c1fc926 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h @@ -37,7 +37,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater public: LLFloaterPreferenceGraphicsAdvanced(const LLSD& key); ~LLFloaterPreferenceGraphicsAdvanced(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onOpen(const LLSD& key); void onClickCloseBtn(bool app_quitting); void disableUnavailableSettings(); diff --git a/indra/newview/llfloaterpreviewtrash.cpp b/indra/newview/llfloaterpreviewtrash.cpp index cf4e3f04e6..52f87571d8 100644 --- a/indra/newview/llfloaterpreviewtrash.cpp +++ b/indra/newview/llfloaterpreviewtrash.cpp @@ -37,7 +37,7 @@ LLFloaterPreviewTrash::LLFloaterPreviewTrash(const LLSD& key) { } -BOOL LLFloaterPreviewTrash::postBuild() +bool LLFloaterPreviewTrash::postBuild() { getChild<LLUICtrl>("empty_btn")->setCommitCallback( boost::bind(&LLFloaterPreviewTrash::onClickEmpty, this)); @@ -49,7 +49,7 @@ BOOL LLFloaterPreviewTrash::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterPreviewTrash::~LLFloaterPreviewTrash() diff --git a/indra/newview/llfloaterpreviewtrash.h b/indra/newview/llfloaterpreviewtrash.h index 465c0c677f..ec071931a5 100644 --- a/indra/newview/llfloaterpreviewtrash.h +++ b/indra/newview/llfloaterpreviewtrash.h @@ -39,7 +39,7 @@ public: LLFloaterPreviewTrash(const LLSD& key); ~LLFloaterPreviewTrash(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: void onClickEmpty(); diff --git a/indra/newview/llfloaterprofile.cpp b/indra/newview/llfloaterprofile.cpp index 6ccdace6c5..33d5114c98 100644 --- a/indra/newview/llfloaterprofile.cpp +++ b/indra/newview/llfloaterprofile.cpp @@ -59,11 +59,11 @@ void LLFloaterProfile::onOpen(const LLSD& key) mNameCallbackConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLFloaterProfile::onAvatarNameCache, this, _1, _2)); } -BOOL LLFloaterProfile::postBuild() +bool LLFloaterProfile::postBuild() { mPanelProfile = findChild<LLPanelProfile>(PANEL_PROFILE_VIEW); - return TRUE; + return true; } void LLFloaterProfile::onClickCloseBtn(bool app_quitting) diff --git a/indra/newview/llfloaterprofile.h b/indra/newview/llfloaterprofile.h index b3ed02fc2c..20c82c07b1 100644 --- a/indra/newview/llfloaterprofile.h +++ b/indra/newview/llfloaterprofile.h @@ -40,7 +40,7 @@ public: LLFloaterProfile(const LLSD& key); virtual ~LLFloaterProfile(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void onClickCloseBtn(bool app_quitting = false) override; diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp index bf1f56a6d1..425f0c1687 100644 --- a/indra/newview/llfloaterprofiletexture.cpp +++ b/indra/newview/llfloaterprofiletexture.cpp @@ -61,18 +61,18 @@ LLFloaterProfileTexture::~LLFloaterProfileTexture() } // virtual -BOOL LLFloaterProfileTexture::postBuild() +bool LLFloaterProfileTexture::postBuild() { mProfileIcon = getChild<LLIconCtrl>("profile_pic"); mCloseButton = getChild<LLButton>("close_btn"); mCloseButton->setCommitCallback([this](LLUICtrl*, void*) { closeFloater(); }, nullptr); - return TRUE; + return true; } // virtual -void LLFloaterProfileTexture::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterProfileTexture::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); } diff --git a/indra/newview/llfloaterprofiletexture.h b/indra/newview/llfloaterprofiletexture.h index 66a61213dd..8d51b4fe91 100644 --- a/indra/newview/llfloaterprofiletexture.h +++ b/indra/newview/llfloaterprofiletexture.h @@ -56,9 +56,9 @@ public: BOOL final, void* userdata); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; protected: - BOOL postBuild() override; + bool postBuild() override; private: void updateDimensions(); diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp index e817589622..1e3be4ce71 100644 --- a/indra/newview/llfloaterregiondebugconsole.cpp +++ b/indra/newview/llfloaterregiondebugconsole.cpp @@ -106,7 +106,7 @@ LLFloaterRegionDebugConsole::~LLFloaterRegionDebugConsole() mReplySignalConnection.disconnect(); } -BOOL LLFloaterRegionDebugConsole::postBuild() +bool LLFloaterRegionDebugConsole::postBuild() { LLLineEditor* input = getChild<LLLineEditor>("region_debug_console_input"); input->setEnableLineHistory(true); @@ -126,12 +126,12 @@ BOOL LLFloaterRegionDebugConsole::postBuild() mOutput->appendText( CONSOLE_NOT_SUPPORTED + PROMPT, false); - return TRUE; + return true; } } mOutput->appendText("> ", false); - return TRUE; + return true; } void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterregiondebugconsole.h b/indra/newview/llfloaterregiondebugconsole.h index f55d964924..05b6f7d356 100644 --- a/indra/newview/llfloaterregiondebugconsole.h +++ b/indra/newview/llfloaterregiondebugconsole.h @@ -43,8 +43,7 @@ public: LLFloaterRegionDebugConsole(LLSD const & key); virtual ~LLFloaterRegionDebugConsole(); - // virtual - BOOL postBuild(); + bool postBuild() override; void onInput(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index f9bb954b82..03245e6b3c 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -196,7 +196,7 @@ public: bool refreshFromRegion(LLViewerRegion* region); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override {}; virtual S32 getParcelId() override { return INVALID_PARCEL_ID; } @@ -234,7 +234,7 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) mRegionChangedCallback() {} -BOOL LLFloaterRegionInfo::postBuild() +bool LLFloaterRegionInfo::postBuild() { mTab = getChild<LLTabContainer>("region_panels"); mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2)); @@ -279,7 +279,7 @@ BOOL LLFloaterRegionInfo::postBuild() if(gDisconnected) { - return TRUE; + return true; } if(!gAgent.getRegionCapability("RegionExperiences").empty()) @@ -297,7 +297,7 @@ BOOL LLFloaterRegionInfo::postBuild() // Request region info when agent region changes. mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionInfo::onRegionChanged, this)); - return TRUE; + return true; } LLFloaterRegionInfo::~LLFloaterRegionInfo() @@ -742,7 +742,7 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) // virtual -BOOL LLPanelRegionInfo::postBuild() +bool LLPanelRegionInfo::postBuild() { // If the panel has an Apply button, set a callback for it. LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn"); @@ -752,7 +752,7 @@ BOOL LLPanelRegionInfo::postBuild() } refresh(); - return TRUE; + return true; } // virtual @@ -844,7 +844,7 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) return LLPanelRegionInfo::refreshFromRegion(region); } -BOOL LLPanelRegionGeneralInfo::postBuild() +bool LLPanelRegionGeneralInfo::postBuild() { // Enable the "Apply" button if something is changed. JC initCtrl("block_terraform_check"); @@ -871,7 +871,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild() } refresh(); - return TRUE; + return true; } void LLPanelRegionGeneralInfo::onBtnSet() @@ -1091,7 +1091,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionDebugInfo ///////////////////////////////////////////////////////////////////////////// -BOOL LLPanelRegionDebugInfo::postBuild() +bool LLPanelRegionDebugInfo::postBuild() { LLPanelRegionInfo::postBuild(); initCtrl("disable_scripts_check"); @@ -1106,7 +1106,7 @@ BOOL LLPanelRegionDebugInfo::postBuild() childSetAction("cancel_restart_btn", onClickCancelRestart, this); childSetAction("region_debug_console_btn", onClickDebugConsole, this); - return TRUE; + return true; } // virtual @@ -1372,7 +1372,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights() ///////////////////////////////////////////////////////////////////////////// // Initialize statics -BOOL LLPanelRegionTerrainInfo::postBuild() +bool LLPanelRegionTerrainInfo::postBuild() { LLPanelRegionInfo::postBuild(); @@ -1859,7 +1859,7 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) } -BOOL LLPanelEstateInfo::postBuild() +bool LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls initCtrl("externally_visible_radio"); @@ -2125,7 +2125,7 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) } // virtual -BOOL LLPanelEstateCovenant::postBuild() +bool LLPanelEstateCovenant::postBuild() { mEstateNameText = getChild<LLTextBox>("estate_name_text"); mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); @@ -2145,7 +2145,7 @@ void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl) } // virtual -BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -2176,7 +2176,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop break; } - return TRUE; + return true; } // static @@ -2498,7 +2498,7 @@ bool LLDispatchSetEstateExperience::operator()( return true; } -BOOL LLPanelRegionExperiences::postBuild() +bool LLPanelRegionExperiences::postBuild() { mAllowed = setupList("panel_allowed", ESTATE_EXPERIENCE_ALLOWED_ADD, ESTATE_EXPERIENCE_ALLOWED_REMOVE); mTrusted = setupList("panel_trusted", ESTATE_EXPERIENCE_TRUSTED_ADD, ESTATE_EXPERIENCE_TRUSTED_REMOVE); @@ -2762,13 +2762,13 @@ LLPanelEstateAccess::LLPanelEstateAccess() : LLPanelRegionInfo(), mPendingUpdate(false) {} -BOOL LLPanelEstateAccess::postBuild() +bool LLPanelEstateAccess::postBuild() { getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); if (avatar_name_list) { - avatar_name_list->setCommitOnSelectionChange(TRUE); + avatar_name_list->setCommitOnSelectionChange(true); avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2781,7 +2781,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list"); if (group_name_list) { - group_name_list->setCommitOnSelectionChange(TRUE); + group_name_list->setCommitOnSelectionChange(true); group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2794,7 +2794,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); if (banned_name_list) { - banned_name_list->setCommitOnSelectionChange(TRUE); + banned_name_list->setCommitOnSelectionChange(true); banned_name_list->setMaxItemCount(ESTATE_MAX_BANNED_IDS); } @@ -2807,14 +2807,14 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list"); if (manager_name_list) { - manager_name_list->setCommitOnSelectionChange(TRUE); + manager_name_list->setCommitOnSelectionChange(true); manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue } childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickAddEstateManager, this)); childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveEstateManager, this)); - return TRUE; + return true; } void LLPanelEstateAccess::updateControls(LLViewerRegion* region) @@ -3737,12 +3737,12 @@ LLPanelRegionEnvironment::~LLPanelRegionEnvironment() mCommitConnect.disconnect(); } -BOOL LLPanelRegionEnvironment::postBuild() +bool LLPanelRegionEnvironment::postBuild() { LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); if (!LLPanelEnvironmentInfo::postBuild()) - return FALSE; + return false; getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT)); getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(TRUE); @@ -3751,7 +3751,7 @@ BOOL LLPanelRegionEnvironment::postBuild() getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); }); mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 3eb39b250f..601f3e7455 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -77,7 +77,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static void processEstateOwnerRequest(LLMessageSystem* msg, void**); @@ -144,7 +144,7 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg) { return true; } - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); void enableButton(const std::string& btn_name, BOOL enable = TRUE); @@ -187,7 +187,7 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); void onBtnSet(); void setObjBonusFactor(F32 object_bonus_factor) {mObjBonusFactor = object_bonus_factor;} @@ -215,7 +215,7 @@ public: : LLPanelRegionInfo(), mTargetAvatar() {} ~LLPanelRegionDebugInfo() {} // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual bool refreshFromRegion(LLViewerRegion* region); @@ -247,7 +247,7 @@ public: LLPanelRegionTerrainInfo() : LLPanelRegionInfo() {} ~LLPanelRegionTerrainInfo() {} - virtual BOOL postBuild(); // LLPanel + virtual bool postBuild(); // LLPanel virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator void setEnvControls(bool available); // Whether environment settings are available for this region @@ -307,7 +307,7 @@ public: virtual bool estateUpdate(LLMessageSystem* msg); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); virtual void refresh(); @@ -340,14 +340,14 @@ public: ~LLPanelEstateCovenant() {} // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg); // LLView overrides - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); static bool confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response); @@ -401,7 +401,7 @@ class LLPanelRegionExperiences : public LLPanelRegionInfo public: LLPanelRegionExperiences(){} - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual BOOL sendUpdate(); static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response); @@ -435,7 +435,7 @@ class LLPanelEstateAccess : public LLPanelRegionInfo public: LLPanelEstateAccess(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); void updateControls(LLViewerRegion* region); diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 6817cce5f6..d370106d49 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -50,7 +50,7 @@ LLFloaterRegionRestarting::~LLFloaterRegionRestarting() mRegionChangedConnection.disconnect(); } -BOOL LLFloaterRegionRestarting::postBuild() +bool LLFloaterRegionRestarting::postBuild() { mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this)); @@ -66,7 +66,7 @@ BOOL LLFloaterRegionRestarting::postBuild() refresh(); - return TRUE; + return true; } void LLFloaterRegionRestarting::regionChange() diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 5b46f72b09..b31005cc2d 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -42,7 +42,7 @@ public: private: LLFloaterRegionRestarting(const LLSD& key); virtual ~LLFloaterRegionRestarting(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual bool tick(); virtual void refresh(); virtual void draw(); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 847bba3e9d..3e9b88a499 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -162,7 +162,7 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) } // virtual -BOOL LLFloaterReporter::postBuild() +bool LLFloaterReporter::postBuild() { LLSLURL slurl; LLAgentUI::buildSLURL(slurl); @@ -229,7 +229,7 @@ BOOL LLFloaterReporter::postBuild() center(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index b6c70e866d..b732446dff 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -80,7 +80,7 @@ class LLFloaterReporter public: LLFloaterReporter(const LLSD& key); /*virtual*/ ~LLFloaterReporter(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp index 11809f9c82..4ed4b25fc3 100644 --- a/indra/newview/llfloatersavecamerapreset.cpp +++ b/indra/newview/llfloatersavecamerapreset.cpp @@ -47,7 +47,7 @@ LLFloaterSaveCameraPreset::LLFloaterSaveCameraPreset(const LLSD &key) } // virtual -BOOL LLFloaterSaveCameraPreset::postBuild() +bool LLFloaterSaveCameraPreset::postBuild() { mPresetCombo = getChild<LLComboBox>("preset_combo"); @@ -64,7 +64,7 @@ BOOL LLFloaterSaveCameraPreset::postBuild() LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSaveCameraPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterSaveCameraPreset::onPresetNameEdited() diff --git a/indra/newview/llfloatersavecamerapreset.h b/indra/newview/llfloatersavecamerapreset.h index 282f213438..26d9716b35 100644 --- a/indra/newview/llfloatersavecamerapreset.h +++ b/indra/newview/llfloatersavecamerapreset.h @@ -40,8 +40,8 @@ class LLFloaterSaveCameraPreset : public LLModalDialog public: LLFloaterSaveCameraPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnSave(); void onBtnCancel(); diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index dd47d02bfa..ce16056700 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -42,7 +42,7 @@ LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterSavePrefPreset::postBuild() +bool LLFloaterSavePrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -61,7 +61,7 @@ BOOL LLFloaterSavePrefPreset::postBuild() mSaveButton = getChild<LLButton>("save"); mPresetCombo = getChild<LLComboBox>("preset_combo"); - return TRUE; + return true; } void LLFloaterSavePrefPreset::onPresetNameEdited() diff --git a/indra/newview/llfloatersaveprefpreset.h b/indra/newview/llfloatersaveprefpreset.h index ae58180e7f..e62e054b1d 100644 --- a/indra/newview/llfloatersaveprefpreset.h +++ b/indra/newview/llfloatersaveprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterSavePrefPreset : public LLFloater public: LLFloaterSavePrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnSave(); void onBtnCancel(); diff --git a/indra/newview/llfloatersceneloadstats.cpp b/indra/newview/llfloatersceneloadstats.cpp index 8aa93eae96..8e2120c5ba 100644 --- a/indra/newview/llfloatersceneloadstats.cpp +++ b/indra/newview/llfloatersceneloadstats.cpp @@ -34,7 +34,7 @@ LLFloaterSceneLoadStats::LLFloaterSceneLoadStats( const LLSD& key ) : LLFloater(key) {} -BOOL LLFloaterSceneLoadStats::postBuild() +bool LLFloaterSceneLoadStats::postBuild() { - return TRUE; + return true; } diff --git a/indra/newview/llfloatersceneloadstats.h b/indra/newview/llfloatersceneloadstats.h index aa414bf544..530367303a 100644 --- a/indra/newview/llfloatersceneloadstats.h +++ b/indra/newview/llfloatersceneloadstats.h @@ -36,7 +36,7 @@ private: LLFloaterSceneLoadStats(const LLSD& key); public: - BOOL postBuild(); + bool postBuild() override; }; diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 1ea3a07536..6e396f795e 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -69,26 +69,26 @@ void LLFloaterScriptDebug::show(const LLUUID& object_id) addOutputWindow(object_id); } -BOOL LLFloaterScriptDebug::postBuild() +bool LLFloaterScriptDebug::postBuild() { LLMultiFloater::postBuild(); if (mTabContainer) { - return TRUE; + return true; } - return FALSE; + return false; } -void LLFloaterScriptDebug::setVisible(BOOL visible) +void LLFloaterScriptDebug::setVisible(bool visible) { if(visible) { LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null); if (floater_output == NULL) { - floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE)); + floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, false)); if (floater_output) { addFloater(floater_output, false); @@ -119,7 +119,7 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) LLFloater::setFloaterHost(host); // prevent stealing focus, see EXT-8040 - LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE); + LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, false); LLFloater::setFloaterHost(NULL); return floaterp; @@ -184,14 +184,14 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id) mObjectID(object_id.asUUID()) { // enabled autocous blocks controling focus via LLFloaterReg::showInstance - setAutoFocus(FALSE); + setAutoFocus(false); } -BOOL LLFloaterScriptDebugOutput::postBuild() +bool LLFloaterScriptDebugOutput::postBuild() { LLFloater::postBuild(); mHistoryEditor = getChild<LLViewerTextEditor>("Chat History Editor"); - return TRUE; + return true; } LLFloaterScriptDebugOutput::~LLFloaterScriptDebugOutput() @@ -202,8 +202,8 @@ void LLFloaterScriptDebugOutput::addLine(const std::string &utf8mesg, const std: { if (mObjectID.isNull()) { - setCanTearOff(FALSE); - setCanClose(FALSE); + setCanTearOff(false); + setCanClose(false); } else { diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 8c08b234f3..dd5a8fbdaf 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -37,8 +37,8 @@ class LLFloaterScriptDebug : public LLMultiFloater public: LLFloaterScriptDebug(const LLSD& key); virtual ~LLFloaterScriptDebug(); - virtual BOOL postBuild(); - virtual void setVisible(BOOL visible); + virtual bool postBuild(); + virtual void setVisible(bool visible); static void show(const LLUUID& object_id); /*virtual*/ void closeFloater(bool app_quitting = false); @@ -59,7 +59,7 @@ public: void addLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: LLTextEditor* mHistoryEditor; diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp index 2484a08626..742b512872 100644 --- a/indra/newview/llfloaterscriptedprefs.cpp +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -40,7 +40,7 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2)); } -BOOL LLFloaterScriptEdPrefs::postBuild() +bool LLFloaterScriptEdPrefs::postBuild() { mEditor = getChild<LLScriptEditor>("Script Preview"); if (mEditor) @@ -48,7 +48,7 @@ BOOL LLFloaterScriptEdPrefs::postBuild() mEditor->initKeywords(); mEditor->loadKeywords(); } - return TRUE; + return true; } void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h index 31df897aac..f6a9027bfa 100644 --- a/indra/newview/llfloaterscriptedprefs.h +++ b/indra/newview/llfloaterscriptedprefs.h @@ -37,7 +37,7 @@ class LLFloaterScriptEdPrefs : public LLFloater { public: LLFloaterScriptEdPrefs(const LLSD& key); - BOOL postBuild(); + bool postBuild() override; private: ~LLFloaterScriptEdPrefs() {}; diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 40fe11b309..24e30e6c33 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -88,14 +88,14 @@ LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed) { } -BOOL LLFloaterScriptLimits::postBuild() +bool LLFloaterScriptLimits::postBuild() { mTab = getChild<LLTabContainer>("scriptlimits_panels"); if(!mTab) { LL_WARNS() << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << LL_ENDL; - return FALSE; + return false; } // contruct the panel @@ -104,7 +104,7 @@ BOOL LLFloaterScriptLimits::postBuild() panel_memory->buildFromFile( "panel_script_limits_region_memory.xml"); mTab->addTabPanel(panel_memory); mTab->selectTab(0); - return TRUE; + return true; } LLFloaterScriptLimits::~LLFloaterScriptLimits() @@ -132,10 +132,10 @@ LLPanelScriptLimitsInfo::LLPanelScriptLimitsInfo() // virtual -BOOL LLPanelScriptLimitsInfo::postBuild() +bool LLPanelScriptLimitsInfo::postBuild() { refresh(); - return TRUE; + return true; } // virtual @@ -640,7 +640,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) } } -BOOL LLPanelScriptLimitsRegionMemory::postBuild() +bool LLPanelScriptLimitsRegionMemory::postBuild() { childSetAction("refresh_list_btn", onClickRefresh, this); childSetAction("highlight_btn", onClickHighlight, this); @@ -652,7 +652,7 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild() LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); if(!list) { - return FALSE; + return false; } list->setCommitCallback(boost::bind(&LLPanelScriptLimitsRegionMemory::checkButtonsEnabled, this)); checkButtonsEnabled(); @@ -661,7 +661,7 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild() for(S32 column = 0; column < list->getNumColumns(); column++) { LLScrollListColumn* columnp = list->getColumn(column); - columnp->mHeader->setHasResizableElement(TRUE); + columnp->mHeader->setHasResizableElement(true); } return StartRequestChain(); diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index d2192f9d01..39a03924f6 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -47,7 +47,7 @@ class LLFloaterScriptLimits : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // from LLPanel virtual void refresh(); @@ -71,7 +71,7 @@ class LLPanelScriptLimitsInfo : public LLPanel public: LLPanelScriptLimitsInfo(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); protected: @@ -102,7 +102,7 @@ public: ~LLPanelScriptLimitsRegionMemory(); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); void setRegionDetails(LLSD content); void setRegionSummary(LLSD content); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 37ae80fa8f..ff2aef6a04 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -106,12 +106,12 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) : mCollectionType.insert("people"); } -BOOL LLFloaterSearch::postBuild() +bool LLFloaterSearch::postBuild() { LLFloaterWebContent::postBuild(); mWebBrowser->addObserver(this); - return TRUE; + return true; } void LLFloaterSearch::onOpen(const LLSD& key) @@ -121,7 +121,7 @@ void LLFloaterSearch::onOpen(const LLSD& key) p.allow_address_entry = false; LLFloaterWebContent::onOpen(p); - mWebBrowser->setFocus(TRUE); + mWebBrowser->setFocus(true); search(p.search); } diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index cc77ce696f..03cdae042e 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -83,7 +83,7 @@ public: void godLevelChanged(U8 godlevel); private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); std::set<std::string> mSearchType; std::set<std::string> mCollectionType; diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index b139e5daf5..01c5aacfef 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -99,7 +99,7 @@ private: void onBuyerNameCache(const LLAvatarName& av_name); public: - virtual BOOL postBuild(); + virtual bool postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); @@ -165,7 +165,7 @@ void LLFloaterSellLandUI::SelectionObserver::changed() } } -BOOL LLFloaterSellLandUI::postBuild() +bool LLFloaterSellLandUI::postBuild() { childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); @@ -177,7 +177,7 @@ BOOL LLFloaterSellLandUI::postBuild() childSetAction("show_objects", doShowObjects, this); center(); getChild<LLUICtrl>("profile_scroll")->setTabStop(true); - return TRUE; + return true; } bool LLFloaterSellLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 3c7f341613..0aeeba81af 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -47,7 +47,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) LLFloaterSettingsDebug::~LLFloaterSettingsDebug() {} -BOOL LLFloaterSettingsDebug::postBuild() +bool LLFloaterSettingsDebug::postBuild() { enableResizeCtrls(true, false, true); @@ -56,14 +56,14 @@ BOOL LLFloaterSettingsDebug::postBuild() getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2)); mSettingList = getChild<LLScrollListCtrl>("setting_list"); - mSettingList->setCommitOnSelectionChange(TRUE); + mSettingList->setCommitOnSelectionChange(true); mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); updateList(); gSavedSettings.getControl("DebugSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsDebug::updateList, this, false)); - return TRUE; + return true; } void LLFloaterSettingsDebug::draw() diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h index 888eaadcbd..75e5752d29 100644 --- a/indra/newview/llfloatersettingsdebug.h +++ b/indra/newview/llfloatersettingsdebug.h @@ -39,7 +39,7 @@ class LLFloaterSettingsDebug public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); void updateControl(LLControlVariable* control); diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index 63802de6b3..b944253159 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -268,7 +268,7 @@ LLFloaterSimpleSnapshot::~LLFloaterSimpleSnapshot() { } -BOOL LLFloaterSimpleSnapshot::postBuild() +bool LLFloaterSimpleSnapshot::postBuild() { childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this); childSetAction("save_btn", boost::bind(&LLFloaterSimpleSnapshot::onSend, this)); @@ -296,10 +296,10 @@ BOOL LLFloaterSimpleSnapshot::postBuild() previewp->setAllowRenderUI(false); previewp->setThumbnailSubsampled(TRUE); - return TRUE; + return true; } -const S32 PREVIEW_OFFSET_Y = 70; +constexpr S32 PREVIEW_OFFSET_Y = 70; void LLFloaterSimpleSnapshot::draw() { diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h index 04a66daedb..0baed9c26b 100644 --- a/indra/newview/llfloatersimplesnapshot.h +++ b/indra/newview/llfloatersimplesnapshot.h @@ -44,7 +44,7 @@ public: LLFloaterSimpleSnapshot(const LLSD& key); ~LLFloaterSimpleSnapshot(); - BOOL postBuild(); + bool postBuild(); void onOpen(const LLSD& key); void draw(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 0c8a93dc2a..ee5d8dae61 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -982,7 +982,7 @@ LLFloaterSnapshot::~LLFloaterSnapshot() } // virtual -BOOL LLFloaterSnapshot::postBuild() +bool LLFloaterSnapshot::postBuild() { mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this); @@ -1064,7 +1064,7 @@ BOOL LLFloaterSnapshot::postBuild() previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect()); - return TRUE; + return true; } // virtual @@ -1424,7 +1424,7 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView() } // virtual -BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLSnapshotFloaterView::handleKey(KEY key, MASK mask, bool called_from_parent) { // use default handler when not in freeze-frame mode if(!gSavedSettings.getBOOL("FreezeTime")) @@ -1440,9 +1440,9 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren else { // bounce keystrokes back down - LLFloaterView::handleKey(key, mask, TRUE); + LLFloaterView::handleKey(key, mask, true); } - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index a4bd194fd7..31351510b6 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -150,7 +150,7 @@ public: LLFloaterSnapshot(const LLSD& key); /*virtual*/ ~LLFloaterSnapshot(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ S32 notify(const LLSD& info); @@ -232,7 +232,7 @@ protected: public: virtual ~LLSnapshotFloaterView(); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 72c077d215..87ac37a003 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -51,7 +51,7 @@ LLFloaterSoundDevices::~LLFloaterSoundDevices() } // virtual -BOOL LLFloaterSoundDevices::postBuild() +bool LLFloaterSoundDevices::postBuild() { LLTransientDockableFloater::postBuild(); @@ -65,7 +65,7 @@ BOOL LLFloaterSoundDevices::postBuild() getChild<LLUICtrl>("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); getChild<LLUICtrl>("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); } - return TRUE; + return true; } //virtual @@ -75,7 +75,7 @@ void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/ } // virtual -void LLFloaterSoundDevices::setFocus( BOOL b ) +void LLFloaterSoundDevices::setFocus(bool b) { LLTransientDockableFloater::setFocus(b); diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h index f09ee3b069..0073a1419b 100644 --- a/indra/newview/llfloatersounddevices.h +++ b/indra/newview/llfloatersounddevices.h @@ -39,9 +39,9 @@ public: LLFloaterSoundDevices(const LLSD& key); ~LLFloaterSoundDevices(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); - /*virtual*/ void setFocus( BOOL b ); + bool postBuild() override; + void setDocked(bool docked, bool pop_on_undock = true) override; + void setFocus(bool b) override; }; diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 32eb70cd39..e0eb5261d6 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -61,7 +61,7 @@ void LLFloaterSpellCheckerSettings::draw() getChild<LLUICtrl>("spellcheck_remove_btn")->setEnabled(enable_remove); } -BOOL LLFloaterSpellCheckerSettings::postBuild(void) +bool LLFloaterSpellCheckerSettings::postBuild(void) { gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); @@ -248,7 +248,7 @@ LLFloaterSpellCheckerImport::LLFloaterSpellCheckerImport(const LLSD& key) { } -BOOL LLFloaterSpellCheckerImport::postBuild(void) +bool LLFloaterSpellCheckerImport::postBuild() { getChild<LLUICtrl>("dictionary_path_browse")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnBrowse, this)); getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnOK, this)); diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index f9bbefafb7..e15b60037f 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -34,10 +34,10 @@ class LLFloaterSpellCheckerSettings : public LLFloater public: LLFloaterSpellCheckerSettings(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + void draw() override; + bool postBuild() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; protected: void onBtnImport(); @@ -52,7 +52,7 @@ class LLFloaterSpellCheckerImport : public LLFloater public: LLFloaterSpellCheckerImport(const LLSD& key); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: void onBtnBrowse(); diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index b845fd132d..86bf57887e 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -53,7 +53,7 @@ LLFloaterTelehub::LLFloaterTelehub(const LLSD& key) { } -BOOL LLFloaterTelehub::postBuild() +bool LLFloaterTelehub::postBuild() { gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo); @@ -66,10 +66,10 @@ BOOL LLFloaterTelehub::postBuild() if (list) { // otherwise you can't walk with arrow keys while floater is up - list->setAllowKeyboardMovement(FALSE); + list->setAllowKeyboardMovement(false); } - return TRUE; + return true; } void LLFloaterTelehub::onOpen(const LLSD& key) { @@ -100,23 +100,23 @@ void LLFloaterTelehub::draw() // Per-frame updates, because we don't have a selection manager observer. void LLFloaterTelehub::refresh() { - const BOOL children_ok = TRUE; + constexpr bool children_ok = true; LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok); - BOOL have_selection = (object != NULL); + bool have_selection = (object != NULL); BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); getChildView("connect_btn")->setEnabled(have_selection && all_volume); - BOOL have_telehub = mTelehubObjectID.notNull(); + bool have_telehub = mTelehubObjectID.notNull(); getChildView("disconnect_btn")->setEnabled(have_telehub); - BOOL space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB); + bool space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB); getChildView("add_spawn_point_btn")->setEnabled(have_selection && all_volume && space_avail); LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list"); if (list) { - BOOL enable_remove = (list->getFirstSelected() != NULL); + bool enable_remove = (list->getFirstSelected() != NULL); getChildView("remove_spawn_point_btn")->setEnabled(enable_remove); } } diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h index 9b9b11fb29..1ee2227f9b 100644 --- a/indra/newview/llfloatertelehub.h +++ b/indra/newview/llfloatertelehub.h @@ -41,10 +41,10 @@ public: LLFloaterTelehub(const LLSD& key); ~LLFloaterTelehub(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; - /*virtual*/ void draw(); + void draw() override; static BOOL renderBeacons(); static void addBeacons(); diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp index 8a1582569b..7dd6a86f33 100644 --- a/indra/newview/llfloatertestinspectors.cpp +++ b/indra/newview/llfloatertestinspectors.cpp @@ -45,7 +45,7 @@ LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed) LLFloaterTestInspectors::~LLFloaterTestInspectors() {} -BOOL LLFloaterTestInspectors::postBuild() +bool LLFloaterTestInspectors::postBuild() { // Test the dummy widget construction code getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true); diff --git a/indra/newview/llfloatertestinspectors.h b/indra/newview/llfloatertestinspectors.h index 1724a2e076..621094f7fe 100644 --- a/indra/newview/llfloatertestinspectors.h +++ b/indra/newview/llfloatertestinspectors.h @@ -40,7 +40,7 @@ private: LLFloaterTestInspectors(const LLSD& seed); ~LLFloaterTestInspectors(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Button callback to show void showAvatarInspector(LLUICtrl*, const LLSD& avatar_id); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index ff7214def0..b165349a5a 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -217,10 +217,10 @@ LLPCode toolData[]={ LL_PCODE_LEGACY_TREE, LL_PCODE_LEGACY_GRASS}; -BOOL LLFloaterTools::postBuild() +bool LLFloaterTools::postBuild() { // Hide until tool selected - setVisible(FALSE); + setVisible(false); // Since we constantly show and hide this during drags, don't // make sounds on visibility changes. @@ -305,7 +305,7 @@ BOOL LLFloaterTools::postBuild() sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); - return TRUE; + return true; } // Create the popupview with a dummy center. It will be moved into place @@ -855,7 +855,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // virtual -BOOL LLFloaterTools::canClose() +bool LLFloaterTools::canClose() { // don't close when quitting, so camera will stay put return !LLApp::isExiting(); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 3bb6492a6e..066d6579af 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -55,7 +55,7 @@ class LLFloaterTools : public LLFloater { public: - virtual BOOL postBuild(); + virtual bool postBuild(); static void* createPanelPermissions(void* vdata); static void* createPanelObject(void* vdata); static void* createPanelVolume(void* vdata); @@ -67,7 +67,7 @@ public: virtual ~LLFloaterTools(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL canClose(); + /*virtual*/ bool canClose(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 9f277021c8..4dca7c2f4e 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -93,7 +93,7 @@ LLFloaterTopObjects::~LLFloaterTopObjects() } // virtual -BOOL LLFloaterTopObjects::postBuild() +bool LLFloaterTopObjects::postBuild() { mObjectsScrollList = getChild<LLScrollListCtrl>("objects_list"); mObjectsScrollList->setFocus(TRUE); @@ -107,7 +107,7 @@ BOOL LLFloaterTopObjects::postBuild() mFlags = 0; mFilter.clear(); - return TRUE; + return true; } // static void LLFloaterTopObjects::setMode(U32 mode) diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index b73401e50d..d0a7a481cd 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -62,7 +62,7 @@ public: void clearList(); void updateSelectionInfo(); - virtual BOOL postBuild(); + virtual bool postBuild(); void onRefresh(); diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 1aeb727172..db5b25a8f7 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -56,7 +56,7 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& data) { } -BOOL LLFloaterTOS::postBuild() +bool LLFloaterTOS::postBuild() { childSetAction("Continue", onContinue, this); childSetAction("Cancel", onCancel, this); @@ -66,11 +66,11 @@ BOOL LLFloaterTOS::postBuild() { // this displays the critical message LLUICtrl *tos_text = getChild<LLUICtrl>("tos_text"); - tos_text->setEnabled( FALSE ); - tos_text->setFocus(TRUE); + tos_text->setEnabled(false); + tos_text->setFocus(true); tos_text->setValue(LLSD(mMessage)); - return TRUE; + return true; } // disable Agree to TOS radio button until the page has fully loaded @@ -78,7 +78,7 @@ BOOL LLFloaterTOS::postBuild() // hide the SL text widget if we're displaying TOS with using a browser widget. LLUICtrl *editor = getChild<LLUICtrl>("tos_text"); - editor->setVisible( FALSE ); + editor->setVisible(false); LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); if ( web_browser ) @@ -111,7 +111,7 @@ BOOL LLFloaterTOS::postBuild() #endif } - return TRUE; + return true; } void LLFloaterTOS::setSiteIsAlive( bool alive ) diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 7c2f0705b7..d59ddbe1c4 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -47,9 +47,9 @@ public: LLFloaterTOS(const LLSD& data); virtual ~LLFloaterTOS(); - BOOL postBuild(); - - virtual void draw(); + bool postBuild() override; + + void draw() override; static void updateAgree( LLUICtrl *, void* userdata ); static void onContinue( void* userdata ); @@ -70,8 +70,6 @@ private: bool mSiteAlive; bool mRealNavigateBegun; std::string mReplyPumpName; - - }; #endif // LL_LLFLOATERTOS_H diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index a025a859e7..6cfc1828dc 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -57,7 +57,7 @@ bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2) return (lab1 < lab2); } -BOOL LLFloaterToybox::postBuild() +bool LLFloaterToybox::postBuild() { mToolBar = getChild<LLToolBar>("toybox_toolbar"); @@ -94,7 +94,7 @@ BOOL LLFloaterToybox::postBuild() mToolBar->addCommand((*it)->id()); } - return TRUE; + return true; } void LLFloaterToybox::draw() @@ -151,7 +151,7 @@ void LLFloaterToybox::onBtnClearAll() LLNotificationsUtil::add("ConfirmClearAllToybox"); } -BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index 10aee0e6f5..d180cc4337 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -41,13 +41,13 @@ public: virtual ~LLFloaterToybox(); // virtuals - BOOL postBuild(); - void draw(); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild() override; + void draw() override; + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, - std::string& tooltip_msg); + std::string& tooltip_msg) override; protected: void onBtnClearAll(); diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index d29ecbbf95..e9b7a4a815 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -52,7 +52,7 @@ LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key) } // virtual -BOOL LLFloaterTranslationSettings::postBuild() +bool LLFloaterTranslationSettings::postBuild() { mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox"); mLanguageCombo = getChild<LLComboBox>("translate_language_combo"); @@ -106,7 +106,7 @@ BOOL LLFloaterTranslationSettings::postBuild() }); center(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index eff0803fdd..64b21e078d 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -39,8 +39,8 @@ class LLFloaterTranslationSettings : public LLFloater { public: LLFloaterTranslationSettings(const LLSD& key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setAzureVerified(bool ok, bool alert, S32 status); void setGoogleVerified(bool ok, bool alert, S32 status); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 3bdfe4a7d0..845956a833 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -140,7 +140,7 @@ public: std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); void refreshList(); // refresh list (empty it out and fill it up from scratch) @@ -423,7 +423,7 @@ LLFloaterUIPreview::~LLFloaterUIPreview() } // Perform post-build setup (defined in superclass) -BOOL LLFloaterUIPreview::postBuild() +bool LLFloaterUIPreview::postBuild() { LLPanel* main_panel_tmp = getChild<LLPanel>("main_panel"); // get a pointer to the main panel in order to... mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("name_list"); // save pointer to file list @@ -481,8 +481,8 @@ BOOL LLFloaterUIPreview::postBuild() mDelim = gDirUtilp->getDirDelimiter(); // initialize delimiter to dir sep slash // refresh list of available languages (EN will still be default) - BOOL found = TRUE; - BOOL found_en_us = FALSE; + bool found = true; + bool found_en_us = false; std::string language_directory; std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim mLanguageSelection->removeall(); // clear out anything temporarily in list from XML @@ -502,7 +502,7 @@ BOOL LLFloaterUIPreview::postBuild() { if(!strncmp("en",language_directory.c_str(),5)) // remember if we've seen en, so we can make it default { - found_en_us = TRUE; + found_en_us = true; } else { @@ -527,7 +527,7 @@ BOOL LLFloaterUIPreview::postBuild() refreshList(); // refresh the list of available floaters - return TRUE; + return true; } // Callback for language combo box selection: refresh current floater when you change languages diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 48d6e01d32..de37c92326 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -60,7 +60,7 @@ LLFloaterURLEntry::~LLFloaterURLEntry() sInstance = NULL; } -BOOL LLFloaterURLEntry::postBuild() +bool LLFloaterURLEntry::postBuild() { mMediaURLEdit = getChild<LLComboBox>("media_entry"); @@ -80,7 +80,7 @@ BOOL LLFloaterURLEntry::postBuild() setDefaultBtn("ok_btn"); buildURLHistory(); - return TRUE; + return true; } void LLFloaterURLEntry::buildURLHistory() { diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h index 04a8eca069..e991b96383 100644 --- a/indra/newview/llfloaterurlentry.h +++ b/indra/newview/llfloaterurlentry.h @@ -41,8 +41,8 @@ public: // Can only be shown by LLPanelLandMedia, and pushes data back into // that panel via the handle. static LLHandle<LLFloater> show(LLHandle<LLPanel> panel_land_media_handle, const std::string media_url); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose( bool app_quitting ); + bool postBuild() override; + void onClose( bool app_quitting ) override; void headerFetchComplete(S32 status, const std::string& mime_type); bool addURLToCombobox(const std::string& media_url); diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp index 227720bee3..8b824cb63e 100644 --- a/indra/newview/llfloatervoiceeffect.cpp +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -56,7 +56,7 @@ LLFloaterVoiceEffect::~LLFloaterVoiceEffect() } // virtual -BOOL LLFloaterVoiceEffect::postBuild() +bool LLFloaterVoiceEffect::postBuild() { setDefaultBtn("record_btn"); getChild<LLButton>("record_btn")->setFocus(true); @@ -81,7 +81,7 @@ BOOL LLFloaterVoiceEffect::postBuild() refreshEffectList(); updateControls(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h index 4d432c46cc..cc6ca002a2 100644 --- a/indra/newview/llfloatervoiceeffect.h +++ b/indra/newview/llfloatervoiceeffect.h @@ -44,8 +44,8 @@ public: LLFloaterVoiceEffect(const LLSD& key); virtual ~LLFloaterVoiceEffect(); - virtual BOOL postBuild(); - virtual void onClose(bool app_quitting); + bool postBuild() override; + void onClose(bool app_quitting) override; private: enum ColumnIndex diff --git a/indra/newview/llfloatervoicevolume.cpp b/indra/newview/llfloatervoicevolume.cpp index 23f19dd5aa..0cde73f0ab 100644 --- a/indra/newview/llfloatervoicevolume.cpp +++ b/indra/newview/llfloatervoicevolume.cpp @@ -60,7 +60,7 @@ public: LLFloaterVoiceVolume(const LLSD& avatar_id); virtual ~LLFloaterVoiceVolume(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -104,7 +104,7 @@ LLFloaterVoiceVolume::~LLFloaterVoiceVolume() } /*virtual*/ -BOOL LLFloaterVoiceVolume::postBuild(void) +bool LLFloaterVoiceVolume::postBuild(void) { getChild<LLUICtrl>("mute_btn")->setCommitCallback( boost::bind(&LLFloaterVoiceVolume::onClickMuteVolume, this) ); @@ -112,7 +112,7 @@ BOOL LLFloaterVoiceVolume::postBuild(void) getChild<LLUICtrl>("volume_slider")->setCommitCallback( boost::bind(&LLFloaterVoiceVolume::onVolumeChange, this, _2)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index ceab472c55..b3a9e5c8e3 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -84,7 +84,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mCommitCallbackRegistrar.add( "WebContent.TestURL", boost::bind(&LLFloaterWebContent::onTestURL, this, _2)); } -BOOL LLFloaterWebContent::postBuild() +bool LLFloaterWebContent::postBuild() { // these are used in a bunch of places so cache them mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" ); @@ -111,7 +111,7 @@ BOOL LLFloaterWebContent::postBuild() // initialize the URL history using the system URL History manager initializeURLHistory(); - return TRUE; + return true; } void LLFloaterWebContent::initializeURLHistory() diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index 0bf93504c2..3a1d019186 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -77,7 +77,7 @@ public: static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height); void geometryChanged(S32 x, S32 y, S32 width, S32 height); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); /* virtual */ void onOpen(const LLSD& key); /* virtual */ bool matchesKey(const LLSD& key); /* virtual */ void onClose(bool app_quitting); diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 2a499f681b..4bc6aa2953 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -51,7 +51,7 @@ LLFloaterWhiteListEntry::~LLFloaterWhiteListEntry() /////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterWhiteListEntry::postBuild() +bool LLFloaterWhiteListEntry::postBuild() { mWhiteListEdit = getChild<LLLineEditor>("whitelist_entry"); @@ -60,7 +60,7 @@ BOOL LLFloaterWhiteListEntry::postBuild() setDefaultBtn("ok_btn"); - return TRUE; + return true; } /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaterwhitelistentry.h b/indra/newview/llfloaterwhitelistentry.h index deab49c523..650195b076 100644 --- a/indra/newview/llfloaterwhitelistentry.h +++ b/indra/newview/llfloaterwhitelistentry.h @@ -38,7 +38,7 @@ class LLFloaterWhiteListEntry : LLFloaterWhiteListEntry(const LLSD& key); ~LLFloaterWhiteListEntry(); - BOOL postBuild(); + bool postBuild() override; private: LLLineEditor* mWhiteListEdit; diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp index 863b7cbb12..1d17654c53 100644 --- a/indra/newview/llfloaterwindowsize.cpp +++ b/indra/newview/llfloaterwindowsize.cpp @@ -63,7 +63,7 @@ LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key) LLFloaterWindowSize::~LLFloaterWindowSize() {} -BOOL LLFloaterWindowSize::postBuild() +bool LLFloaterWindowSize::postBuild() { center(); initWindowSizeControls(); @@ -72,7 +72,7 @@ BOOL LLFloaterWindowSize::postBuild() getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterWindowSize::onClickCancel, this)); setDefaultBtn("set_btn"); - return TRUE; + return true; } void LLFloaterWindowSize::initWindowSizeControls() diff --git a/indra/newview/llfloaterwindowsize.h b/indra/newview/llfloaterwindowsize.h index a71e5e273c..a2eab5b822 100644 --- a/indra/newview/llfloaterwindowsize.h +++ b/indra/newview/llfloaterwindowsize.h @@ -40,7 +40,7 @@ private: virtual ~LLFloaterWindowSize(); public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void initWindowSizeControls(); void onClickSet(); void onClickCancel(); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b699b98154..f727db9a64 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -324,7 +324,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data) return new LLWorldMapView(); } -BOOL LLFloaterWorldMap::postBuild() +bool LLFloaterWorldMap::postBuild() { mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview")); @@ -356,7 +356,7 @@ BOOL LLFloaterWorldMap::postBuild() onChangeMaturity(); - return TRUE; + return true; } // virtual @@ -476,7 +476,7 @@ bool LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks) // virtual -void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLFloaterWorldMap::reshape( S32 width, S32 height, bool called_from_parent ) { LLFloater::reshape( width, height, called_from_parent ); } @@ -1718,14 +1718,14 @@ LLPanelHideBeacon* LLPanelHideBeacon::getInstance() } -BOOL LLPanelHideBeacon::postBuild() +bool LLPanelHideBeacon::postBuild() { mHideButton = getChild<LLButton>("hide_beacon_btn"); mHideButton->setCommitCallback(boost::bind(&LLPanelHideBeacon::onHideButtonClick, this)); gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelHideBeacon::updatePosition, this)); - return TRUE; + return true; } //virtual @@ -1742,7 +1742,7 @@ void LLPanelHideBeacon::draw() } //virtual -void LLPanelHideBeacon::setVisible(BOOL visible) +void LLPanelHideBeacon::setVisible(bool visible) { if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index d4913e317f..13a002577a 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -56,14 +56,14 @@ public: static LLFloaterWorldMap* getInstance(); static void *createWorldMapView(void* data); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); static void reloadIcons(void*); - /*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE ); + /*virtual*/ void reshape( S32 width, S32 height, bool called_from_parent = true ); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ void draw(); @@ -207,8 +207,8 @@ public: static LLPanelHideBeacon* getInstance(); LLPanelHideBeacon(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); /*virtual*/ void draw(); private: diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index cab3f00f03..c447f74ec1 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -424,7 +424,7 @@ LLGroupListItem::~LLGroupListItem() } //virtual -BOOL LLGroupListItem::postBuild() +bool LLGroupListItem::postBuild() { mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); mGroupNameBox = getChild<LLTextBox>("group_name"); @@ -452,7 +452,7 @@ BOOL LLGroupListItem::postBuild() // have icons of different sizes so we need to figure it per file. mIconWidth = mGroupNameBox->getRect().mLeft - mGroupIcon->getRect().mLeft; - return TRUE; + return true; } //virtual diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 110e221832..6af073e364 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -103,7 +103,7 @@ class LLGroupListItem : public LLPanel public: LLGroupListItem(bool for_agent, bool show_icons); ~LLGroupListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void setValue(const LLSD& value); void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index 7271376a3c..090222cf47 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -110,7 +110,7 @@ public: LLHintPopup(const Params&); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onClickClose() { @@ -180,7 +180,7 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p) } } -BOOL LLHintPopup::postBuild() +bool LLHintPopup::postBuild() { LLTextBox& hint_text = getChildRef<LLTextBox>("hint_text"); hint_text.setText(mNotification->getMessage()); @@ -193,7 +193,7 @@ BOOL LLHintPopup::postBuild() reshape(getRect().getWidth(), getRect().getHeight() + delta_height); hint_text.reshape(hint_text.getRect().getWidth(), hint_text.getRect().getHeight() + delta_height); // hint_text.translate(0, -delta_height); - return TRUE; + return true; } void LLHintPopup::draw() diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e3567f4595..c17418c6b6 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2351,14 +2351,14 @@ LLCallDialog::~LLCallDialog() LLUI::getInstance()->removePopup(this); } -BOOL LLCallDialog::postBuild() +bool LLCallDialog::postBuild() { if (!LLDockableFloater::postBuild() || !gToolBarView) - return FALSE; + return false; dockToToolbarButton("speak"); - return TRUE; + return true; } void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName) @@ -2621,13 +2621,13 @@ void LLOutgoingCallDialog::onCancel(void* user_data) } -BOOL LLOutgoingCallDialog::postBuild() +bool LLOutgoingCallDialog::postBuild() { - BOOL success = LLCallDialog::postBuild(); + bool success = LLCallDialog::postBuild(); childSetAction("Cancel", onCancel, this); - setCanDrag(FALSE); + setCanDrag(false); return success; } @@ -2675,14 +2675,14 @@ void LLIncomingCallDialog::onLifetimeExpired() } } -BOOL LLIncomingCallDialog::postBuild() +bool LLIncomingCallDialog::postBuild() { LLCallDialog::postBuild(); if (!mPayload.isMap() || mPayload.size() == 0) { LL_INFOS("IMVIEW") << "IncomingCall: invalid argument" << LL_ENDL; - return TRUE; + return true; } LLUUID session_id = mPayload["session_id"].asUUID(); @@ -2692,14 +2692,14 @@ BOOL LLIncomingCallDialog::postBuild() if (session_id.isNull() && caller_id.asUUID().isNull()) { LL_INFOS("IMVIEW") << "IncomingCall: invalid ids" << LL_ENDL; - return TRUE; + return true; } std::string notify_box_type = mPayload["notify_box_type"].asString(); if (!is_voice_call_type(notify_box_type)) { LL_INFOS("IMVIEW") << "IncomingCall: notify_box_type was not provided" << LL_ENDL; - return TRUE; + return true; } // init notification's lifetime @@ -2761,8 +2761,8 @@ BOOL LLIncomingCallDialog::postBuild() bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); - setCanDrag(FALSE); - return TRUE; + setCanDrag(false); + return true; } void LLIncomingCallDialog::setCallerName(const std::string& ui_title, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index b9c7065872..afb9b68995 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -554,7 +554,7 @@ public: LLCallDialog(const LLSD& payload); virtual ~LLCallDialog(); - virtual BOOL postBuild(); + virtual bool postBuild(); void dockToToolbarButton(const std::string& toolbarButtonName); @@ -599,7 +599,7 @@ public: } } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); static void onAccept(void* user_data); @@ -625,7 +625,7 @@ class LLOutgoingCallDialog : public LLCallDialog public: LLOutgoingCallDialog(const LLSD& payload); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void show(const LLSD& key); static void onCancel(void* user_data); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index b11c440015..e883abf5c2 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -67,7 +67,7 @@ public: LLInspectAvatar(const LLSD& avatar_id); virtual ~LLInspectAvatar(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -179,7 +179,7 @@ LLInspectAvatar::~LLInspectAvatar() } /*virtual*/ -BOOL LLInspectAvatar::postBuild(void) +bool LLInspectAvatar::postBuild(void) { getChild<LLUICtrl>("mute_btn")->setCommitCallback( boost::bind(&LLInspectAvatar::onClickMuteVolume, this) ); @@ -187,7 +187,7 @@ BOOL LLInspectAvatar::postBuild(void) getChild<LLUICtrl>("volume_slider")->setCommitCallback( boost::bind(&LLInspectAvatar::onVolumeChange, this, _2)); - return TRUE; + return true; } // Multiple calls to showInstance("inspect_avatar", foo) will provide different diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 491c90c571..a6d61a72fd 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -70,7 +70,7 @@ public: LLInspectObject(const LLSD& object_id); virtual ~LLInspectObject(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -149,7 +149,7 @@ LLInspectObject::~LLInspectObject() } /*virtual*/ -BOOL LLInspectObject::postBuild(void) +bool LLInspectObject::postBuild(void) { // The XML file has sample data in it. Clear that out so we don't // flicker when data arrives off network. @@ -187,7 +187,7 @@ BOOL LLInspectObject::postBuild(void) boost::bind(&LLInspectObject::update, this)); } - return TRUE; + return true; } // Multiple calls to showInstance("inspect_avatar", foo) will provide different diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 77320510a6..5b63eb045d 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -51,7 +51,7 @@ public: LLInspectRemoteObject(const LLSD& object_id); virtual ~LLInspectRemoteObject() {}; - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); /*virtual*/ void onOpen(const LLSD& avatar_id); void onClickMap(); @@ -80,7 +80,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) : } /*virtual*/ -BOOL LLInspectRemoteObject::postBuild(void) +bool LLInspectRemoteObject::postBuild(void) { // hook up the inspector's buttons getChild<LLUICtrl>("map_btn")->setCommitCallback( @@ -90,7 +90,7 @@ BOOL LLInspectRemoteObject::postBuild(void) getChild<LLUICtrl>("close_btn")->setCommitCallback( boost::bind(&LLInspectRemoteObject::onClickClose, this)); - return TRUE; + return true; } /*virtual*/ diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2f2b5a7b88..7a62d4999a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -308,15 +308,15 @@ void LLInvFVBridge::setCreationDate(time_t creation_date_utc) // Can be destroyed (or moved to trash) -BOOL LLInvFVBridge::isItemRemovable() const +bool LLInvFVBridge::isItemRemovable() const { return get_is_item_removable(getInventoryModel(), mUUID); } // Can be moved to another folder -BOOL LLInvFVBridge::isItemMovable() const +bool LLInvFVBridge::isItemMovable() const { - return TRUE; + return true; } BOOL LLInvFVBridge::isLink() const @@ -333,7 +333,7 @@ BOOL LLInvFVBridge::isLibraryItem() const /** * @brief Adds this item into clipboard storage */ -BOOL LLInvFVBridge::cutToClipboard() +bool LLInvFVBridge::cutToClipboard() { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) @@ -355,7 +355,7 @@ BOOL LLInvFVBridge::cutToClipboard() return perform_cutToClipboard(); } } - return FALSE; + return false; } // virtual @@ -390,14 +390,14 @@ BOOL LLInvFVBridge::perform_cutToClipboard() return FALSE; } -BOOL LLInvFVBridge::copyToClipboard() const +bool LLInvFVBridge::copyToClipboard() const { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemCopyable()) { return LLClipboard::instance().addToClipboard(mUUID); } - return FALSE; + return false; } void LLInvFVBridge::showProperties() @@ -619,23 +619,23 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba model->notifyObservers(); } -BOOL LLInvFVBridge::isClipboardPasteable() const +bool LLInvFVBridge::isClipboardPasteable() const { // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { - return FALSE; + return false; } LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } // In cut mode, whatever is on the clipboard is always pastable if (LLClipboard::instance().isCutMode()) { - return TRUE; + return true; } // In normal mode, we need to check each element of the clipboard to know if we can paste or not @@ -652,7 +652,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const { LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, item_id); if (!cat_br.isItemCopyable(false)) - return FALSE; + return false; // Skip to the next item in the clipboard continue; } @@ -661,10 +661,10 @@ BOOL LLInvFVBridge::isClipboardPasteable() const LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id); if (!item_br.isItemCopyable(false)) { - return FALSE; + return false; } } - return TRUE; + return true; } BOOL LLInvFVBridge::isClipboardPasteableAsLink() const @@ -2087,7 +2087,7 @@ time_t LLItemBridge::getCreationDate() const } -BOOL LLItemBridge::isItemRenameable() const +bool LLItemBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if(item) @@ -2096,22 +2096,22 @@ BOOL LLItemBridge::isItemRenameable() const // what the calling card points to. if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD) { - return FALSE; + return false; } if (!item->isFinished()) // EXT-8662 { - return FALSE; + return false; } if (isInboxFolder()) { - return FALSE; + return false; } return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } bool LLItemBridge::renameItem(const std::string& new_name) @@ -2134,25 +2134,25 @@ bool LLItemBridge::renameItem(const std::string& new_name) return false; } -BOOL LLItemBridge::removeItem() +bool LLItemBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } // move it to the trash LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); LLViewerInventoryItem* item = getItem(); - if (!item) return FALSE; + if (!item) return false; if (item->getType() != LLAssetType::AT_LSL_TEXT) { LLPreview::hide(mUUID, TRUE); } // Already in trash - if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; + if (model->isObjectDescendentOf(mUUID, trash_id)) return false; LLNotification::Params params("ConfirmItemDeleteHasLinks"); params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); @@ -2172,14 +2172,14 @@ BOOL LLItemBridge::removeItem() { // Warn if the user is will break any links when deleting this item. LLNotifications::instance().add(params); - return FALSE; + return false; } } } LLNotifications::instance().forceResponse(params, 0); model->checkTrashOverflow(); - return TRUE; + return true; } BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) @@ -2269,17 +2269,17 @@ BOOL LLItemBridge::isItemPermissive() const LLHandle<LLFolderBridge> LLFolderBridge::sSelf; // Can be moved to another folder -BOOL LLFolderBridge::isItemMovable() const +bool LLFolderBridge::isItemMovable() const { LLInventoryObject* obj = getInventoryObject(); if(obj) { // If it's a protected type folder, we can't move it if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType())) - return FALSE; - return TRUE; + return false; + return true; } - return FALSE; + return false; } void LLFolderBridge::selectItem() @@ -2418,7 +2418,7 @@ void LLFolderBridge::update() class LLIsItemRemovable : public LLFolderViewFunctor { public: - LLIsItemRemovable() : mPassed(TRUE) {} + LLIsItemRemovable() : mPassed(true) {} virtual void doFolder(LLFolderViewFolder* folder) { mPassed &= folder->getViewModelItem()->isItemRemovable(); @@ -2427,15 +2427,15 @@ public: { mPassed &= item->getViewModelItem()->isItemRemovable(); } - BOOL mPassed; + bool mPassed; }; // Can be destroyed (or moved to trash) -BOOL LLFolderBridge::isItemRemovable() const +bool LLFolderBridge::isItemRemovable() const { if (!get_is_category_removable(getInventoryModel(), mUUID)) { - return FALSE; + return false; } LLInventoryPanel* panel = mInventoryPanel.get(); @@ -2446,16 +2446,16 @@ BOOL LLFolderBridge::isItemRemovable() const folderp->applyFunctorToChildren(folder_test); if (!folder_test.mPassed) { - return FALSE; + return false; } } if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) { - return FALSE; + return false; } - return TRUE; + return true; } BOOL LLFolderBridge::isUpToDate() const @@ -2513,10 +2513,10 @@ bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const return true; } -BOOL LLFolderBridge::isClipboardPasteable() const +bool LLFolderBridge::isClipboardPasteable() const { if ( ! LLInvFVBridge::isClipboardPasteable() ) - return FALSE; + return false; // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599 if ( LLFriendCardsManager::instance().isCategoryInFriendFolder( getCategory() ) ) @@ -2524,7 +2524,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const LLInventoryModel* model = getInventoryModel(); if ( !model ) { - return FALSE; + return false; } std::vector<LLUUID> objects; @@ -2538,12 +2538,12 @@ BOOL LLFolderBridge::isClipboardPasteable() const const LLUUID &obj_id = objects.at(i); if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) ) { - return FALSE; + return false; } } } - return TRUE; + return true; } BOOL LLFolderBridge::isClipboardPasteableAsLink() const @@ -3705,7 +3705,7 @@ void LLFolderBridge::determineFolderType() } } -BOOL LLFolderBridge::isItemRenameable() const +bool LLFolderBridge::isItemRenameable() const { return get_is_category_renameable(getInventoryModel(), mUUID); } @@ -3780,11 +3780,11 @@ bool LLFolderBridge::renameItem(const std::string& new_name) return false; } -BOOL LLFolderBridge::removeItem() +bool LLFolderBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } const LLViewerInventoryCategory *cat = getCategory(); @@ -3795,7 +3795,7 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); LLNotifications::instance().forceResponse(params, 0); - return TRUE; + return true; } @@ -4661,7 +4661,7 @@ bool LLFolderBridge::hasChildren() const return has_children != LLInventoryModel::CHILDREN_NO; } -BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) @@ -4681,7 +4681,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, //LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; switch(cargo_type) { case DAD_TEXTURE: @@ -4720,7 +4720,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_CATEGORY: if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID)) { - accept = FALSE; + accept = false; } else { @@ -6238,13 +6238,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLCallingCardBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { LLViewerInventoryItem* item = getItem(); - BOOL rv = FALSE; + bool rv = false; if(item) { // check the type @@ -6269,7 +6269,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, if(gInventory.getItem(inv_item->getUUID()) && perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryItem(item->getCreatorUUID(), @@ -6281,7 +6281,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6290,7 +6290,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, LLInventoryCategory* inv_cat = (LLInventoryCategory*)cargo_data; if( gInventory.getCategory( inv_cat->getUUID() ) ) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryCategory( @@ -6303,7 +6303,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6444,14 +6444,14 @@ void LLGestureBridge::openItem() */ } -BOOL LLGestureBridge::removeItem() +bool LLGestureBridge::removeItem() { // Grab class information locally since *this may be deleted // within this function. Not a great pattern... const LLInventoryModel* model = getInventoryModel(); if(!model) { - return FALSE; + return false; } const LLUUID item_id = mUUID; @@ -6462,7 +6462,7 @@ BOOL LLGestureBridge::removeItem() // If deactivateGesture deleted *this, then return out immediately. if (!model->getObject(item_id)) { - return TRUE; + return true; } return LLItemBridge::removeItem(); @@ -7433,14 +7433,14 @@ bool LLSettingsBridge::renameItem(const std::string& new_name) return LLItemBridge::renameItem(new_name); } -BOOL LLSettingsBridge::isItemRenameable() const +bool LLSettingsBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if (item) { return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } bool LLSettingsBridge::canUpdateParcel() const diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 854113df5c..686fc9ff43 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -111,11 +111,11 @@ public: virtual void closeItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false); virtual void showProperties(); - virtual BOOL isItemRenameable() const { return TRUE; } + virtual bool isItemRenameable() const { return true; } virtual BOOL isMultiPreviewAllowed() { return TRUE; } //virtual bool renameItem(const std::string& new_name) {} - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const; + virtual bool isItemRemovable() const; + virtual bool isItemMovable() const; virtual BOOL isItemInTrash() const; virtual bool isItemInOutfits() const; virtual BOOL isLink() const; @@ -124,10 +124,10 @@ public: virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); virtual void move(LLFolderViewModelItem* new_parent_bridge) {} virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); + virtual bool copyToClipboard() const; + virtual bool cutToClipboard(); virtual bool isCutToClipboard(); - virtual BOOL isClipboardPasteable() const; + virtual bool isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} @@ -136,7 +136,7 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLToolDragAndDrop::ESource getDragSource() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { return FALSE; } @@ -246,9 +246,9 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const; virtual PermissionMask getPermissionMask() const; virtual time_t getCreationDate() const; - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); - virtual BOOL removeItem(); + virtual bool removeItem(); virtual bool isItemCopyable(bool can_copy_as_link = true) const; virtual bool hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } @@ -290,7 +290,7 @@ public: virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual void selectItem(); virtual void restoreItem(); @@ -307,7 +307,7 @@ public: virtual bool renameItem(const std::string& new_name); - virtual BOOL removeItem(); + virtual bool removeItem(); BOOL removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); void updateHierarchyCreationDate(time_t date); @@ -316,16 +316,16 @@ public: virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const ; + virtual bool isItemRemovable() const; + virtual bool isItemMovable() const ; virtual BOOL isUpToDate() const; virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL isClipboardPasteable() const; + virtual bool isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; EInventorySortGroup getSortGroup() const; @@ -456,7 +456,7 @@ public: virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -491,7 +491,7 @@ public: virtual std::string getLabelSuffix() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void playGesture(const LLUUID& item_id); }; @@ -519,7 +519,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL isItemWearable() const { return TRUE; } + virtual bool isItemWearable() const { return true; } virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool renameItem(const std::string& new_name); @@ -552,7 +552,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL isItemWearable() const { return TRUE; } + virtual bool isItemWearable() const { return true; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; virtual bool renameItem(const std::string& new_name); @@ -571,7 +571,6 @@ public: void editOnAvatar(); static BOOL canRemoveFromAvatar( void* userdata ); - static void removeAllClothesFromAvatar(); void removeFromAvatar(); protected: LLAssetType::EType mAssetType; @@ -633,7 +632,7 @@ public: virtual BOOL isMultiPreviewAllowed() { return FALSE; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; } protected: diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0d393952c7..712f8dbb78 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2788,7 +2788,7 @@ bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem (item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID. } -void LLSaveFolderState::setApply(BOOL apply) +void LLSaveFolderState::setApply(bool apply) { mApply = apply; // before generating new list of open folders, clear the old one diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index b7b29e2d19..77303645c0 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -69,10 +69,10 @@ class LLGalleryPanel: public LLPanel { public: - BOOL canFocusChildren() const override + bool canFocusChildren() const override { // Tell Tab to not focus children - return FALSE; + return false; } protected: @@ -144,7 +144,7 @@ const LLInventoryGallery::Params& LLInventoryGallery::getDefaultParams() return LLUICtrlFactory::getDefaultParams<LLInventoryGallery>(); } -BOOL LLInventoryGallery::postBuild() +bool LLInventoryGallery::postBuild() { mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel"); LLPanel::Params params = LLPanel::getDefaultParams(); @@ -153,7 +153,7 @@ BOOL LLInventoryGallery::postBuild() mInventoryGalleryMenu = new LLInventoryGalleryContextMenu(this); mRootGalleryMenu = new LLInventoryGalleryContextMenu(this); mRootGalleryMenu->setRootFolder(true); - return TRUE; + return true; } LLInventoryGallery::~LLInventoryGallery() @@ -367,7 +367,7 @@ void LLInventoryGallery::draw() } } -void LLInventoryGallery::onVisibilityChange(BOOL new_visibility) +void LLInventoryGallery::onVisibilityChange(bool new_visibility) { if (new_visibility) { @@ -1046,9 +1046,9 @@ bool LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask) } -BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) +bool LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -1060,7 +1060,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) if (category) { setRootFolder(*iter); - handled = TRUE; + handled = true; } else { @@ -1071,7 +1071,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) } } } - handled = TRUE; + handled = true; break; case KEY_DELETE: #if LL_DARWIN @@ -1083,7 +1083,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { deleteSelection(); } - handled = TRUE; + handled = true; break; case KEY_F2: @@ -1092,7 +1092,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mInventoryGalleryMenu->rename(mSelectedItemIDs.front()); } - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -1101,7 +1101,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -1110,7 +1110,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -1119,7 +1119,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -1128,27 +1128,27 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToBottom(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: moveLeft(mask); - handled = TRUE; + handled = true; break; case KEY_RIGHT: moveRight(mask); - handled = TRUE; + handled = true; break; case KEY_UP: moveUp(mask); - handled = TRUE; + handled = true; break; case KEY_DOWN: moveDown(mask); - handled = TRUE; + handled = true; break; default: @@ -1631,22 +1631,22 @@ void LLInventoryGallery::copy() mFilterSubString.clear(); } -BOOL LLInventoryGallery::canCopy() const +bool LLInventoryGallery::canCopy() const { if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty()) { - return FALSE; + return false; } for (const LLUUID& id : mSelectedItemIDs) { if (!isItemCopyable(id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::cut() @@ -1668,11 +1668,11 @@ void LLInventoryGallery::cut() mFilterSubString.clear(); } -BOOL LLInventoryGallery::canCut() const +bool LLInventoryGallery::canCut() const { if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty()) { - return FALSE; + return false; } for (const LLUUID& id : mSelectedItemIDs) @@ -1682,16 +1682,16 @@ BOOL LLInventoryGallery::canCut() const { if (!get_is_category_removable(&gInventory, id)) { - return FALSE; + return false; } } else if (!get_is_item_removable(&gInventory, id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::paste() @@ -1828,18 +1828,18 @@ void LLInventoryGallery::paste(const LLUUID& dest, LLClipboard::instance().setCutMode(false); } -BOOL LLInventoryGallery::canPaste() const +bool LLInventoryGallery::canPaste() const { // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents()) { - return FALSE; + return false; } // In cut mode, whatever is on the clipboard is always pastable if (LLClipboard::instance().isCutMode()) { - return TRUE; + return true; } // In normal mode, we need to check each element of the clipboard to know if we can paste or not @@ -1853,10 +1853,10 @@ BOOL LLInventoryGallery::canPaste() const // Each item must be copyable to be pastable if (!isItemCopyable(item_id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids) @@ -2414,12 +2414,12 @@ bool LLInventoryGallery::isForwardAvailable() return (!mForwardFolders.empty() && (mFolderID != mForwardFolders.back())); } -BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { // have children handle it first - BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, + bool handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); // when drop is not handled by child, it should be handled by the root folder . @@ -2598,13 +2598,13 @@ LLInventoryGalleryItem::~LLInventoryGalleryItem() { } -BOOL LLInventoryGalleryItem::postBuild() +bool LLInventoryGalleryItem::postBuild() { mNameText = getChild<LLTextBox>("item_name"); mTextBgPanel = getChild<LLPanel>("text_bg_panel"); mThumbnailCtrl = getChild<LLThumbnailCtrl>("preview_thumbnail"); - return TRUE; + return true; } void LLInventoryGalleryItem::setType(LLAssetType::EType type, LLInventoryType::EType inventory_type, U32 flags, bool is_link) @@ -2832,7 +2832,7 @@ bool LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) return true; } -BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -2840,19 +2840,19 @@ BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro { if (!mIsFolder) { - return FALSE; + return false; } return mGallery->baseHandleDragAndDrop(mUUID, drop, cargo_type, cargo_data, accept, tooltip_msg); } -BOOL LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask) +bool LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask) { if (!mGallery) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_LEFT: diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e14aa56d3c..72aaaa2ade 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -75,15 +75,15 @@ public: LLInventoryGallery(const LLInventoryGallery::Params& params = getDefaultParams()); ~LLInventoryGallery(); - BOOL postBuild() override; + bool postBuild() override; void initGallery(); void draw() override; - void onVisibilityChange(BOOL new_visibility) override; - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, + void onVisibilityChange(bool new_visibility) override; + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; void startDrag(); bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void moveUp(MASK mask); void moveDown(MASK mask); void moveLeft(MASK mask); @@ -153,13 +153,13 @@ public: // Copy & paste (LLEditMenuHandler) void copy() override; - BOOL canCopy() const override; + bool canCopy() const override; void cut() override; - BOOL canCut() const override; + bool canCut() const override; void paste() override; - BOOL canPaste() const override; + bool canPaste() const override; // Copy & paste & delete static void onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids); @@ -299,19 +299,19 @@ public: LLInventoryGalleryItem(const Params& p); virtual ~LLInventoryGalleryItem(); - BOOL postBuild(); + bool postBuild(); void draw(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleRightMouseDown(S32 x, S32 y, MASK mask); bool handleDoubleClick(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); bool handleHover(S32 x, S32 y, MASK mask); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask); void onFocusLost(); void onFocusReceived(); diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 10a69432c9..b8099a762b 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -158,7 +158,7 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) ctrl->setEnabled(show); } -BOOL LLPanelInventoryListItemBase::postBuild() +bool LLPanelInventoryListItemBase::postBuild() { LLViewerInventoryItem* inv_item = getItem(); if (inv_item) @@ -172,7 +172,7 @@ BOOL LLPanelInventoryListItemBase::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } void LLPanelInventoryListItemBase::setValue(const LLSD& value) diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index fb848e9f5a..964659a85a 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -117,7 +117,7 @@ public: /** * Inheritors need to call base implementation of postBuild() */ - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Handles item selection diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 8214f4ed6d..05a7e35829 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -377,7 +377,7 @@ void LLInventoryPanel::initializeViewBuilding() } /*virtual*/ -void LLInventoryPanel::onVisibilityChange(BOOL new_visibility) +void LLInventoryPanel::onVisibilityChange(bool new_visibility) { if (new_visibility && mViewsInitialized == VIEWS_UNINITIALIZED) { @@ -1404,13 +1404,13 @@ bool LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask) return LLPanel::handleToolTip(x, y, mask); } -BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryPanel::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 (mAcceptsDragAndDrop) { @@ -2091,9 +2091,9 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata) return; } -BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) +bool LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -2113,7 +2113,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) } } LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open"); - handled = TRUE; + handled = true; } break; case KEY_DELETE: @@ -2125,7 +2125,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) if (isSelectionRemovable() && (mask == MASK_NONE)) { LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "delete"); - handled = TRUE; + handled = true; } break; } @@ -2483,13 +2483,13 @@ void LLAssetFilteredInventoryPanel::initFromParams(const Params& p) getFilter().setFilterNoMarketplaceFolder(); } -BOOL LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL result = FALSE; + bool result = false; if (mAcceptsDragAndDrop) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 8b85326468..deaa46fecb 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -161,11 +161,11 @@ public: LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } // LLView methods - /*virtual*/ void onVisibilityChange(BOOL new_visibility) override; + /*virtual*/ void onVisibilityChange(bool new_visibility) override; void draw() override; - /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ) override; + /*virtual*/ bool handleKeyHere( KEY key, MASK mask ) override; bool handleHover(S32 x, S32 y, MASK mask) override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -471,7 +471,7 @@ protected: public: ~LLAssetFilteredInventoryPanel() {} - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 99412c0b16..c455a5e75b 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -455,7 +455,7 @@ LLLocationInputCtrl::~LLLocationInputCtrl() mLocationHistoryConnection.disconnect(); } -void LLLocationInputCtrl::setEnabled(BOOL enabled) +void LLLocationInputCtrl::setEnabled(bool enabled) { LLComboBox::setEnabled(enabled); mAddLandmarkBtn->setEnabled(enabled); @@ -502,9 +502,9 @@ bool LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask) return false; } -BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) +bool LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) { - BOOL result = LLComboBox::handleKeyHere(key, mask); + bool result = LLComboBox::handleKeyHere(key, mask); if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0 && !mList->getVisible()) { @@ -560,13 +560,13 @@ void LLLocationInputCtrl::setText(const LLStringExplicit& text) mHasAutocompletedText = FALSE; } -void LLLocationInputCtrl::setFocus(BOOL b) +void LLLocationInputCtrl::setFocus(bool b) { LLComboBox::setFocus(b); if (mTextEntry && b && !mList->getVisible()) { - mTextEntry->setFocus(TRUE); + mTextEntry->setFocus(true); } } @@ -613,7 +613,7 @@ void LLLocationInputCtrl::draw() LLComboBox::draw(); } -void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLLocationInputCtrl::reshape(S32 width, S32 height, bool called_from_parent) { LLComboBox::reshape(width, height, called_from_parent); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 2cfd456bdb..193b5b8258 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -88,17 +88,17 @@ public: }; // LLView interface - /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setEnabled(bool enabled); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ void onFocusReceived(); /*virtual*/ void onFocusLost(); /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); //======================================================================== // LLUICtrl interface - /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void setFocus(bool b); //======================================================================== // LLComboBox interface diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index c066a7b5c3..cba8195763 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -103,17 +103,17 @@ LLFloaterComboOptions::~LLFloaterComboOptions() } -BOOL LLFloaterComboOptions::postBuild() +bool LLFloaterComboOptions::postBuild() { - mConfirmButton = getChild<LLButton>("combo_ok", TRUE); - mCancelButton = getChild<LLButton>("combo_cancel", TRUE); - mComboOptions = getChild<LLComboBox>("combo_options", TRUE); - mComboText = getChild<LLTextBox>("combo_text", TRUE); + mConfirmButton = getChild<LLButton>("combo_ok", true); + mCancelButton = getChild<LLButton>("combo_cancel", true); + mComboOptions = getChild<LLComboBox>("combo_options", true); + mComboText = getChild<LLTextBox>("combo_text", true); mConfirmButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onConfirm(); }); mCancelButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onCancel(); }); - return TRUE; + return true; } LLFloaterComboOptions* LLFloaterComboOptions::showUI( @@ -420,7 +420,7 @@ void LLMaterialEditor::setAuxItem(const LLInventoryItem* item) } } -BOOL LLMaterialEditor::postBuild() +bool LLMaterialEditor::postBuild() { // if this is a 'live editor' instance, it is also // single instance and uses live overrides diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 4e0350b4cc..782b47bcc0 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -55,7 +55,7 @@ public: LLFloaterComboOptions(); virtual ~LLFloaterComboOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static LLFloaterComboOptions* showUI( combo_callback callback, @@ -164,7 +164,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener void setAuxItem(const LLInventoryItem* item) override; // llpanel - BOOL postBuild() override; + bool postBuild() override; void onClickCloseBtn(bool app_quitting = false) override; void onClose(bool app_quitting) override; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index e8450f8d6b..0361b33875 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -431,11 +431,11 @@ void LLMediaCtrl::onFocusLost() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::postBuild () +bool LLMediaCtrl::postBuild () { setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2)); - return TRUE; + return true; } void LLMediaCtrl::onOpenWebInspector() @@ -446,9 +446,9 @@ void LLMediaCtrl::onOpenWebInspector() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) +bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { @@ -463,9 +463,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) +bool LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { @@ -480,7 +480,7 @@ BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility ) +void LLMediaCtrl::onVisibilityChange ( bool new_visibility ) { LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL; if(mMediaSource) @@ -523,7 +523,7 @@ void LLMediaCtrl::onVisibilityChanged ( const LLSD& new_visibility ) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLMediaCtrl::reshape( S32 width, S32 height, bool called_from_parent ) { if(!getDecoupleTextureSize()) { diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 251d6ae5f6..4d4600cb72 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -154,13 +154,13 @@ public: void setAllowFileDownload(bool allow) { mAllowFileDownload = allow; } // over-rides - virtual BOOL handleKeyHere( KEY key, MASK mask); - virtual BOOL handleKeyUpHere(KEY key, MASK mask); - virtual void onVisibilityChange ( BOOL new_visibility ); + virtual bool handleKeyHere( KEY key, MASK mask); + virtual bool handleKeyUpHere(KEY key, MASK mask); + virtual void onVisibilityChange ( bool new_visibility ); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape( S32 width, S32 height, bool called_from_parent = true); virtual void draw(); - virtual BOOL postBuild(); + virtual bool postBuild(); // focus overrides void onFocusLost(); @@ -178,7 +178,7 @@ public: virtual bool wantsKeyUpKeyDown() const; virtual bool wantsReturnKey() const; - virtual BOOL acceptsTextInput() const {return TRUE;} + virtual bool acceptsTextInput() const { return true; } protected: void convertInputCoords(S32& x, S32& y); diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index ff86400a56..532876a4ea 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -47,7 +47,7 @@ LLMorphView *gMorphView = NULL; -const F32 MORPH_NEAR_CLIP = 0.1f; +constexpr F32 MORPH_NEAR_CLIP = 0.1f; //----------------------------------------------------------------------------- // LLMorphView() @@ -103,7 +103,7 @@ void LLMorphView::shutdown() //----------------------------------------------------------------------------- // setVisible() //----------------------------------------------------------------------------- -void LLMorphView::setVisible(BOOL visible) +void LLMorphView::setVisible(bool visible) { if( visible != getVisible() ) { diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h index 318d49bba5..6c06947fc3 100644 --- a/indra/newview/llmorphview.h +++ b/indra/newview/llmorphview.h @@ -49,7 +49,7 @@ public: void shutdown(); // inherited methods - /*virtual*/ void setVisible(BOOL visible); + void setVisible(bool visible) override; void setCameraTargetJoint(LLJoint *joint) {mCameraTargetJoint = joint;} LLJoint* getCameraTargetJoint() {return mCameraTargetJoint;} diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 733d5b1f11..9dd8b489e4 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -88,7 +88,7 @@ LLFloaterMove::~LLFloaterMove() } // virtual -BOOL LLFloaterMove::postBuild() +bool LLFloaterMove::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) @@ -142,12 +142,12 @@ BOOL LLFloaterMove::postBuild() gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus); - return TRUE; + return true; } // *NOTE: we assume that setVisible() is called on floater close. // virtual -void LLFloaterMove::setVisible(BOOL visible) +void LLFloaterMove::setVisible(bool visible) { // Do nothing with Stand/Stop Flying panel in excessive calls of this method. if (getVisible() == visible) @@ -451,7 +451,7 @@ void LLFloaterMove::sUpdateFlyingStatus() } -void LLFloaterMove::showModeButtons(BOOL bShow) +void LLFloaterMove::showModeButtons(bool bShow) { if (mModeActionsPanel->getVisible() == bShow) return; @@ -562,26 +562,26 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode) } -BOOL LLPanelStandStopFlying::postBuild() +bool LLPanelStandStopFlying::postBuild() { mStandButton = getChild<LLButton>("stand_btn"); mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this)); mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance)); - mStandButton->setVisible(FALSE); + mStandButton->setVisible(false); LLHints::getInstance()->registerHintTarget("stand_btn", mStandButton->getHandle()); mStopFlyingButton = getChild<LLButton>("stop_fly_btn"); //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE)); mStopFlyingButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStopFlyingButtonClick, this)); - mStopFlyingButton->setVisible(FALSE); + mStopFlyingButton->setVisible(false); gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelStandStopFlying::updatePosition, this)); - return TRUE; + return true; } //virtual -void LLPanelStandStopFlying::setVisible(BOOL visible) +void LLPanelStandStopFlying::setVisible(bool visible) { //we dont need to show the panel if these buttons are not activated if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index c4d56fc2bd..3862b2fdca 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -48,8 +48,8 @@ private: ~LLFloaterMove(); public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); void setFlyingModeImpl(BOOL fly); @@ -86,7 +86,7 @@ private: void initModeButtonMap(); void setModeButtonToggleState(const EMovementMode mode); void updateButtonsWithMovementMode(const EMovementMode newMode); - void showModeButtons(BOOL bShow); + void showModeButtons(bool bShow); public: @@ -141,8 +141,8 @@ public: static LLPanelStandStopFlying* getInstance(); static void setStandStopFlyingMode(EStandStopFlyingMode mode); static void clearStandStopFlyingMode(EStandStopFlyingMode mode); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); // *HACK: due to hard enough to have this control aligned with "Move" button while resizing // let update its position in each frame diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 034ba38f8d..e0e9d50d49 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -45,7 +45,7 @@ static LLDefaultChildRegistry::Register<LLNameListCtrl> r("name_list"); -static const S32 info_icon_size = 16; +static constexpr S32 info_icon_size = 16; void LLNameListCtrl::NameTypeNames::declareValues() { @@ -87,19 +87,19 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi } // virtual, public -BOOL LLNameListCtrl::handleDragAndDrop( +bool LLNameListCtrl::handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { if (!mAllowCallingCardDrop) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; if (cargo_type == DAD_CALLINGCARD) { @@ -128,7 +128,7 @@ BOOL LLNameListCtrl::handleDragAndDrop( } } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << LL_ENDL; return handled; diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index d2c374ca33..83e6cacdb1 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -166,8 +166,8 @@ public: LLUUID getSelectedSpecialId(); // LLView interface - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e98c06d518..4057050946 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -286,7 +286,7 @@ LLNavigationBar::~LLNavigationBar() mTeleportFailedConnection.disconnect(); } -BOOL LLNavigationBar::postBuild() +bool LLNavigationBar::postBuild() { mBtnBack = getChild<LLPullButton>("back_btn"); mBtnForward = getChild<LLPullButton>("forward_btn"); @@ -331,10 +331,10 @@ BOOL LLNavigationBar::postBuild() mNavigationPanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this)); mFavoritePanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this)); - return TRUE; + return true; } -void LLNavigationBar::setVisible(BOOL visible) +void LLNavigationBar::setVisible(bool visible) { // change visibility of grandparent layout_panel to animate in and out if (getParent()) diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 5b39c00e46..4df26ff1a9 100755 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -94,8 +94,8 @@ public: /*virtual*/ void draw(); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); void handleLoginComplete(); void clearHistoryCache(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1299739857..5cf2d80ee2 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -69,20 +69,20 @@ static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map"); -const F32 LLNetMap::MAP_SCALE_MIN = 32; -const F32 LLNetMap::MAP_SCALE_FAR = 32; -const F32 LLNetMap::MAP_SCALE_MEDIUM = 128; -const F32 LLNetMap::MAP_SCALE_CLOSE = 256; -const F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024; -const F32 LLNetMap::MAP_SCALE_MAX = 4096; +constexpr F32 LLNetMap::MAP_SCALE_MIN = 32; +constexpr F32 LLNetMap::MAP_SCALE_FAR = 32; +constexpr F32 LLNetMap::MAP_SCALE_MEDIUM = 128; +constexpr F32 LLNetMap::MAP_SCALE_CLOSE = 256; +constexpr F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024; +constexpr F32 LLNetMap::MAP_SCALE_MAX = 4096; -const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) -const F32 MIN_DOT_RADIUS = 3.5f; -const F32 DOT_SCALE = 0.75f; -const F32 MIN_PICK_SCALE = 2.f; -const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag +constexpr F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) +constexpr F32 MIN_DOT_RADIUS = 3.5f; +constexpr F32 DOT_SCALE = 0.75f; +constexpr F32 MIN_PICK_SCALE = 2.f; +constexpr S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag -const F64 COARSEUPDATE_MAX_Z = 1020.0f; +constexpr F64 COARSEUPDATE_MAX_Z = 1020.0f; LLNetMap::LLNetMap (const Params & p) : LLUICtrl (p), @@ -126,7 +126,7 @@ LLNetMap::~LLNetMap() } } -BOOL LLNetMap::postBuild() +bool LLNetMap::postBuild() { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commitRegistrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enableRegistrar; @@ -142,7 +142,7 @@ BOOL LLNetMap::postBuild() LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandle = menu->getHandle(); menu->setItemEnabled("Re-center map", false); - return TRUE; + return true; } void LLNetMap::setScale( F32 scale ) @@ -544,7 +544,7 @@ void LLNetMap::draw() LLUICtrl::draw(); } -void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLNetMap::reshape(S32 width, S32 height, bool called_from_parent) { LLUICtrl::reshape(width, height, called_from_parent); createObjectImage(); @@ -1067,14 +1067,14 @@ bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLNetMap::handleClick(S32 x, S32 y, MASK mask) +bool LLNetMap::handleClick(S32 x, S32 y, MASK mask) { // TODO: allow clicking an avatar on minimap to select avatar in the nearby avatar list // if(mClosestAgentToCursor.notNull()) // mNearbyList->selectUser(mClosestAgentToCursor); // Needs a registered observer i guess to accomplish this without using // globals to tell the mNearbyList in llpeoplepanel to select the user - return TRUE; + return true; } bool LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index c574a32dab..0b35f2d6bf 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -75,11 +75,11 @@ public: /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleToolTip( S32 x, S32 y, MASK mask); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask ); - /*virtual*/ BOOL handleClick(S32 x, S32 y, MASK mask); + /*virtual*/ bool handleClick(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask ); void setScale(F32 scale); diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index bc5cf173a4..d73f338878 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -56,9 +56,9 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mNotificationName = p.notification_name; } -BOOL LLNotificationListItem::postBuild() +bool LLNotificationListItem::postBuild() { - BOOL rv = LLPanel::postBuild(); + bool rv = LLPanel::postBuild(); mTitleBox = getChild<LLTextBox>("notification_title"); mTitleBoxExp = getChild<LLTextBox>("notification_title_exp"); mNoticeTextExp = getChild<LLChatEntry>("notification_text_exp"); @@ -278,12 +278,12 @@ LLGroupInviteNotificationListItem::LLGroupInviteNotificationListItem(const Param buildFromFile("panel_notification_list_item.xml"); } -BOOL LLGroupInviteNotificationListItem::postBuild() +bool LLGroupInviteNotificationListItem::postBuild() { - BOOL rv = LLGroupNotificationListItem::postBuild(); + bool rv = LLGroupNotificationListItem::postBuild(); setFee(mParams.fee); mInviteButtonPanel = getChild<LLPanel>("button_panel"); - mInviteButtonPanel->setVisible(TRUE); + mInviteButtonPanel->setVisible(true); mJoinBtn = getChild<LLButton>("join_btn"); mDeclineBtn = getChild<LLButton>("decline_btn"); mInfoBtn = getChild<LLButton>("info_btn"); @@ -363,9 +363,9 @@ LLGroupNotificationListItem::~LLGroupNotificationListItem() LLGroupMgr::getInstance()->removeObserver(this); } -BOOL LLGroupNoticeNotificationListItem::postBuild() +bool LLGroupNoticeNotificationListItem::postBuild() { - BOOL rv = LLGroupNotificationListItem::postBuild(); + bool rv = LLGroupNotificationListItem::postBuild(); mAttachmentTextBox = getChild<LLTextBox>("attachment_text"); mAttachmentIcon = getChild<LLIconCtrl>("attachment_icon"); @@ -410,9 +410,9 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() return rv; } -BOOL LLGroupNotificationListItem::postBuild() +bool LLGroupNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); mGroupIconExp = getChild<LLGroupIconCtrl>("group_icon_exp"); @@ -559,9 +559,9 @@ LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Param buildFromFile("panel_notification_list_item.xml"); } -BOOL LLTransactionNotificationListItem::postBuild() +bool LLTransactionNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarIconExp = getChild<LLAvatarIconCtrl>("avatar_icon_exp"); mAvatarIcon->setValue("System_Notification"); @@ -606,9 +606,9 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) } } -BOOL LLSystemNotificationListItem::postBuild() +bool LLSystemNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon"); mSystemNotificationIconExp = getChild<LLIconCtrl>("system_notification_icon_exp"); if (mSystemNotificationIcon) diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 8aa0a62dca..ee8d243a71 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -93,7 +93,7 @@ public: virtual bool showPopup() { return true; } void setExpanded(BOOL value); - virtual BOOL postBuild(); + virtual bool postBuild(); void reshapeNotification(); typedef enum e_time_type @@ -138,7 +138,7 @@ class LLGroupNotificationListItem { public: virtual ~LLGroupNotificationListItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setGroupId(const LLUUID& value); // LLGroupMgrObserver observer trigger @@ -168,7 +168,7 @@ class LLGroupInviteNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ bool showPopup() { return false; } @@ -195,7 +195,7 @@ class LLGroupNoticeNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ bool showPopup() { return false; } @@ -222,7 +222,7 @@ class LLTransactionNotificationListItem : public LLNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); @@ -235,7 +235,7 @@ private: class LLSystemNotificationListItem : public LLNotificationListItem { public: - virtual BOOL postBuild(); + virtual bool postBuild(); private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 56ec03fcd6..9b8e781441 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -107,9 +107,9 @@ const LLOutfitGallery::Params& LLOutfitGallery::getDefaultParams() return LLUICtrlFactory::getDefaultParams<LLOutfitGallery>(); } -BOOL LLOutfitGallery::postBuild() +bool LLOutfitGallery::postBuild() { - BOOL rv = LLOutfitListBase::postBuild(); + bool rv = LLOutfitListBase::postBuild(); mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel"); LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params); @@ -146,9 +146,9 @@ void LLOutfitGallery::draw() } } -BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -158,7 +158,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) // Or should it wearSelectedOutfit? getSelectedItem()->openOutfitsContent(); } - handled = TRUE; + handled = true; break; case KEY_DELETE: #if LL_DARWIN @@ -170,12 +170,12 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { onRemoveOutfit(mSelectedOutfitUUID); } - handled = TRUE; + handled = true; break; case KEY_F2: LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID); - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -183,7 +183,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -191,7 +191,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -199,7 +199,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -207,27 +207,27 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToBottom(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: moveLeft(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: moveRight(); - handled = TRUE; + handled = true; break; case KEY_UP: moveUp(); - handled = TRUE; + handled = true; break; case KEY_DOWN: moveDown(); - handled = TRUE; + handled = true; break; default: @@ -943,7 +943,7 @@ LLOutfitGalleryItem::~LLOutfitGalleryItem() } -BOOL LLOutfitGalleryItem::postBuild() +bool LLOutfitGalleryItem::postBuild() { setDefaultImage(); @@ -952,7 +952,7 @@ BOOL LLOutfitGalleryItem::postBuild() mTextBgPanel = getChild<LLPanel>("text_bg_panel"); setOutfitWorn(false); mHidden = false; - return TRUE; + return true; } void LLOutfitGalleryItem::draw() @@ -1036,14 +1036,14 @@ bool LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) return openOutfitsContent() || LLPanel::handleDoubleClick(x, y, mask); } -BOOL LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) { if (!mGallery) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_LEFT: diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 4d026ad3f4..577ec5cc47 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -71,10 +71,10 @@ public: LLOutfitGallery(const LLOutfitGallery::Params& params = getDefaultParams()); virtual ~LLOutfitGallery(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); void moveUp(); void moveDown(); void moveLeft(); @@ -232,12 +232,12 @@ public: LLOutfitGalleryItem(const Params& p); virtual ~LLOutfitGalleryItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 5c7792b0df..b445f0c04e 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -109,7 +109,7 @@ LLOutfitsList::~LLOutfitsList() { } -BOOL LLOutfitsList::postBuild() +bool LLOutfitsList::postBuild() { mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); @@ -982,7 +982,7 @@ void LLOutfitListBase::ChangeOutfitSelection(LLWearableItemsList* list, const LL signalSelectionOutfitUUID(category_id); } -BOOL LLOutfitListBase::postBuild() +bool LLOutfitListBase::postBuild() { mGearMenu = createGearMenu(); @@ -990,7 +990,7 @@ BOOL LLOutfitListBase::postBuild() menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu)); menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; + return true; } void LLOutfitListBase::collapseAllFolders() diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 66b3165169..6cd4af8e64 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -69,7 +69,7 @@ public: LLOutfitListBase(); virtual ~LLOutfitListBase(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); void refreshList(const LLUUID& category_id); @@ -209,7 +209,7 @@ public: LLOutfitsList(); virtual ~LLOutfitsList(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index e3d887d943..c50b5b8c10 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -39,7 +39,7 @@ LLProfileDropTarget::LLProfileDropTarget(const LLProfileDropTarget::Params& p) mAgentID(p.agent_id) {} -BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -50,10 +50,10 @@ BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop, cargo_type, cargo_data, accept); - return TRUE; + return true; } - return FALSE; + return false; } static LLDefaultChildRegistry::Register<LLProfileDropTarget> r("profile_drop_target"); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index bfde921df0..c8f49ccf1f 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -61,7 +61,7 @@ public: // // LLView functionality - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp index fb48bf3b47..10f9a3be34 100644 --- a/indra/newview/llpanelavatartag.cpp +++ b/indra/newview/llpanelavatartag.cpp @@ -48,12 +48,12 @@ LLPanelAvatarTag::~LLPanelAvatarTag() // Name callbacks will be automatically disconnected since LLPanel is trackable } -BOOL LLPanelAvatarTag::postBuild() +bool LLPanelAvatarTag::postBuild() { mIcon = getChild<LLAvatarIconCtrl>("avatar_tag_icon"); mName = getChild<LLTextBox>("sender_tag_name"); mTime = getChild<LLTextBox>("tag_time"); - return TRUE; + return true; } void LLPanelAvatarTag::draw() diff --git a/indra/newview/llpanelavatartag.h b/indra/newview/llpanelavatartag.h index 4edec5f452..5d775a09ff 100644 --- a/indra/newview/llpanelavatartag.h +++ b/indra/newview/llpanelavatartag.h @@ -57,7 +57,7 @@ public: const LLUUID& getAvatarId() const { return mAvatarId; } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); virtual boost::signals2::connection setLeftButtonClickCallback( diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 3a4fc613b7..3c710c7ba0 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -74,7 +74,7 @@ void LLPanelBlockedList::removePicker() } } -BOOL LLPanelBlockedList::postBuild() +bool LLPanelBlockedList::postBuild() { mBlockedList = getChild<LLBlockList>("blocked"); mBlockedList->setCommitOnSelectionChange(TRUE); @@ -267,7 +267,7 @@ LLFloaterGetBlockedObjectName::~LLFloaterGetBlockedObjectName() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterGetBlockedObjectName::postBuild() +bool LLFloaterGetBlockedObjectName::postBuild() { getChild<LLButton>("OK")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::applyBlocking, this)); getChild<LLButton>("Cancel")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::cancelBlocking, this)); @@ -276,17 +276,17 @@ BOOL LLFloaterGetBlockedObjectName::postBuild() return LLFloater::postBuild(); } -BOOL LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask) +bool LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { applyBlocking(); - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { cancelBlocking(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index 07f0437656..e2c7ef819d 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -40,9 +40,9 @@ public: LLPanelBlockedList(); ~LLPanelBlockedList(){}; - virtual BOOL postBuild(); - virtual void draw(); - virtual void onOpen(const LLSD& key); + bool postBuild() override; + void draw() override; + void onOpen(const LLSD& key) override; void selectBlocked(const LLUUID& id); @@ -92,9 +92,9 @@ class LLFloaterGetBlockedObjectName : public LLFloater public: typedef boost::function<void (const std::string&)> get_object_name_callback_t; - virtual BOOL postBuild(); + bool postBuild() override; - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask) override; static LLFloaterGetBlockedObjectName* show(get_object_name_callback_t callback); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 183000ceac..b97e9ddcc8 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -106,7 +106,7 @@ LLPanelClassifiedInfo::~LLPanelClassifiedInfo() sAllPanels.remove(this); } -BOOL LLPanelClassifiedInfo::postBuild() +bool LLPanelClassifiedInfo::postBuild() { childSetAction("show_on_map_btn", boost::bind(&LLPanelClassifiedInfo::onMapClick, this)); childSetAction("teleport_btn", boost::bind(&LLPanelClassifiedInfo::onTeleportClick, this)); @@ -120,10 +120,10 @@ BOOL LLPanelClassifiedInfo::postBuild() mSnapshotCtrl = getChild<LLTextureCtrl>("classified_snapshot"); mSnapshotRect = getDefaultSnapshotRect(); - return TRUE; + return true; } -void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLPanelClassifiedInfo::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { LLPanel::reshape(width, height, called_from_parent); diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 471becd0f7..1ddd53612f 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -49,7 +49,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); @@ -112,7 +112,7 @@ public: const LLVector3d& global_pos, const std::string& sim_name); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 3bae0cebfb..ca4ebf621d 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -76,7 +76,7 @@ const char* LLPanelContents::PERMS_GROUP_CONTROL_KEY = "perms_group_control"; const char* LLPanelContents::PERMS_ANYONE_INTERACT_KEY = "perms_anyone_interact"; const char* LLPanelContents::PERMS_ANYONE_CONTROL_KEY = "perms_anyone_control"; -BOOL LLPanelContents::postBuild() +bool LLPanelContents::postBuild() { setMouseOpaque(FALSE); @@ -85,7 +85,7 @@ BOOL LLPanelContents::postBuild() mPanelInventoryObject = getChild<LLPanelObjectInventory>("contents_inventory"); - return TRUE; + return true; } LLPanelContents::LLPanelContents() diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h index 6ecc78afa0..da02353613 100644 --- a/indra/newview/llpanelcontents.h +++ b/indra/newview/llpanelcontents.h @@ -43,7 +43,7 @@ class LLSpinCtrl; class LLPanelContents : public LLPanel { public: - virtual BOOL postBuild(); + virtual bool postBuild(); LLPanelContents(); virtual ~LLPanelContents(); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 839f25761a..5f5dda12c7 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -139,7 +139,7 @@ LLPanelSettingsSkyAtmosTab::LLPanelSettingsSkyAtmosTab() : } -BOOL LLPanelSettingsSkyAtmosTab::postBuild() +bool LLPanelSettingsSkyAtmosTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); }); getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); }); @@ -156,11 +156,11 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild() getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); }); refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyAtmosTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -184,8 +184,8 @@ void LLPanelSettingsSkyAtmosTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -357,7 +357,7 @@ LLPanelSettingsSkyCloudTab::LLPanelSettingsSkyCloudTab() : { } -BOOL LLPanelSettingsSkyCloudTab::postBuild() +bool LLPanelSettingsSkyCloudTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); }); getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); }); @@ -378,11 +378,11 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyCloudTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -405,8 +405,8 @@ void LLPanelSettingsSkyCloudTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -510,7 +510,7 @@ LLPanelSettingsSkySunMoonTab::LLPanelSettingsSkySunMoonTab() : } -BOOL LLPanelSettingsSkySunMoonTab::postBuild() +bool LLPanelSettingsSkySunMoonTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_SUN_MOON_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoonColorChanged(); }); getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); }); @@ -536,11 +536,11 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkySunMoonTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -553,8 +553,8 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(true); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(true); } } @@ -562,18 +562,18 @@ void LLPanelSettingsSkySunMoonTab::refresh() { if (!mSkySettings || !getCanChangeSettings()) { - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE); - getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(false); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(false); + getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(true); + getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(true); if (!mSkySettings) return; } else { - setEnabled(TRUE); - setAllChildrenEnabled(TRUE); + setEnabled(true); + setAllChildrenEnabled(true); } getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT); @@ -780,7 +780,7 @@ LLPanelSettingsSkyDensityTab::LLPanelSettingsSkyDensityTab() { } -BOOL LLPanelSettingsSkyDensityTab::postBuild() +bool LLPanelSettingsSkyDensityTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialChanged(); }); getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialScaleChanged(); }); @@ -803,10 +803,10 @@ BOOL LLPanelSettingsSkyDensityTab::postBuild() getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAbsorptionMaxAltitudeChanged(); }); refresh(); - return TRUE; + return true; } -void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyDensityTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -838,8 +838,8 @@ void LLPanelSettingsSkyDensityTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h index 523cc134a8..b0d8bc3ff5 100644 --- a/indra/newview/llpaneleditsky.h +++ b/indra/newview/llpaneleditsky.h @@ -60,8 +60,8 @@ class LLPanelSettingsSkyAtmosTab : public LLPanelSettingsSky public: LLPanelSettingsSkyAtmosTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -91,8 +91,8 @@ class LLPanelSettingsSkyCloudTab : public LLPanelSettingsSky public: LLPanelSettingsSkyCloudTab(); - virtual BOOL postBuild() override; - void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -115,8 +115,8 @@ class LLPanelSettingsSkySunMoonTab : public LLPanelSettingsSky public: LLPanelSettingsSkySunMoonTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -144,8 +144,8 @@ class LLPanelSettingsSkyDensityTab : public LLPanelSettingsSky public: LLPanelSettingsSkyDensityTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp index a09964e17d..50b9908404 100644 --- a/indra/newview/llpaneleditwater.cpp +++ b/indra/newview/llpaneleditwater.cpp @@ -76,7 +76,7 @@ LLPanelSettingsWaterMainTab::LLPanelSettingsWaterMainTab(): } -BOOL LLPanelSettingsWaterMainTab::postBuild() +bool LLPanelSettingsWaterMainTab::postBuild() { mClrFogColor = getChild<LLColorSwatchCtrl>(FIELD_WATER_FOG_COLOR); mTxtNormalMap = getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP); @@ -106,11 +106,11 @@ BOOL LLPanelSettingsWaterMainTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled) +void LLPanelSettingsWaterMainTab::setEnabled(bool enabled) { LLPanelSettingsWater::setEnabled(enabled); getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setEnabled(enabled); @@ -132,8 +132,8 @@ void LLPanelSettingsWaterMainTab::refresh() { if (!mWaterSettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } diff --git a/indra/newview/llpaneleditwater.h b/indra/newview/llpaneleditwater.h index 4b7ec903c9..c617316463 100644 --- a/indra/newview/llpaneleditwater.h +++ b/indra/newview/llpaneleditwater.h @@ -65,8 +65,8 @@ class LLPanelSettingsWaterMainTab : public LLPanelSettingsWater public: LLPanelSettingsWaterMainTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index cb69f72288..5ce2b9db8f 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -707,7 +707,7 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body } // virtual -BOOL LLPanelEditWearable::postBuild() +bool LLPanelEditWearable::postBuild() { // buttons mBtnRevert = getChild<LLButton>("revert_button"); @@ -824,20 +824,20 @@ BOOL LLPanelEditWearable::postBuild() gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2)); updateMetricLayout(gSavedSettings.getBOOL("HeightUnits")); - return TRUE; + return true; } // virtual // LLUICtrl -BOOL LLPanelEditWearable::isDirty() const +bool LLPanelEditWearable::isDirty() const { - BOOL isDirty = FALSE; + bool isDirty = false; if (mWearablePtr) { if (mWearablePtr->isDirty() || ( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 )) { - isDirty = TRUE; + isDirty = true; } } return isDirty; @@ -861,7 +861,7 @@ void LLPanelEditWearable::onClose() revertChanges(); } -void LLPanelEditWearable::setVisible(BOOL visible) +void LLPanelEditWearable::setVisible(bool visible) { if (!visible) { @@ -1539,7 +1539,7 @@ void LLPanelEditWearable::updateVerbs() can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); } - BOOL is_dirty = isDirty(); + bool is_dirty = isDirty(); mBtnRevert->setEnabled(is_dirty); getChildView("save_as_button")->setEnabled(is_dirty && can_copy); @@ -1552,7 +1552,7 @@ void LLPanelEditWearable::updateVerbs() } // update back button and title according to dirty state. - static BOOL was_dirty = FALSE; + static bool was_dirty = false; if (was_dirty != is_dirty) // to avoid redundant changes because this method is called from draw { static S32 label_width = mBtnBack->getFont()->getWidth(mBackBtnLabel); diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 43d6a3595f..f40af6d5cb 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -51,8 +51,8 @@ public: LLPanelEditWearable( ); virtual ~LLPanelEditWearable(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ BOOL isDirty() const; // LLUICtrl + /*virtual*/ bool postBuild(); + /*virtual*/ bool isDirty() const; // LLUICtrl /*virtual*/ void draw(); void onClose(); @@ -76,7 +76,7 @@ public: void onSaveAsButtonClicked(); void saveAsCallback(const LLSD& notification, const LLSD& response); - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 2ad7a23278..bc2c930459 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -165,7 +165,7 @@ LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo() mUpdateConnection.disconnect(); } -BOOL LLPanelEnvironmentInfo::postBuild() +bool LLPanelEnvironmentInfo::postBuild() { getChild<LLUICtrl>(BTN_USEDEFAULT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); }); @@ -198,7 +198,7 @@ BOOL LLPanelEnvironmentInfo::postBuild() getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]); getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]); - return TRUE; + return true; } // virtual @@ -208,7 +208,7 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key) } // virtual -void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) +void LLPanelEnvironmentInfo::onVisibilityChange(bool new_visibility) { if (new_visibility) { @@ -1133,17 +1133,17 @@ LLSettingsDropTarget::LLSettingsDropTarget(const LLSettingsDropTarget::Params& p : LLView(p), mEnvironmentInfoPanel(NULL), mDndEnabled(false) {} -BOOL LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLSettingsDropTarget::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 (getParent() && mDndEnabled) { - handled = TRUE; + handled = true; switch (cargo_type) { diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 38e3f09e34..ff39714cea 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -47,11 +47,11 @@ public: LLPanelEnvironmentInfo(); virtual ~LLPanelEnvironmentInfo(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; - virtual BOOL isDirty() const override { return getIsDirty(); } - virtual void onVisibilityChange(BOOL new_visibility) override; + virtual bool isDirty() const override { return getIsDirty(); } + virtual void onVisibilityChange(bool new_visibility) override; virtual void refresh() override; @@ -206,7 +206,7 @@ public: LLSettingsDropTarget(const Params&); ~LLSettingsDropTarget() {}; - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 0fdb9a57f3..b6ff033d05 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -55,7 +55,7 @@ LLPanelExperienceListEditor::LLPanelExperienceListEditor() { } -BOOL LLPanelExperienceListEditor::postBuild() +bool LLPanelExperienceListEditor::postBuild() { mItems = getChild<LLNameListCtrl>("experience_list"); mAdd = getChild<LLButton>("btn_add"); @@ -69,7 +69,7 @@ BOOL LLPanelExperienceListEditor::postBuild() mItems->setCommitCallback(boost::bind(&LLPanelExperienceListEditor::checkButtonsEnabled, this)); checkButtonsEnabled(); - return TRUE; + return true; } const uuid_list_t& LLPanelExperienceListEditor::getExperienceIds() const diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h index bc9867752d..1579e14c29 100644 --- a/indra/newview/llpanelexperiencelisteditor.h +++ b/indra/newview/llpanelexperiencelisteditor.h @@ -47,7 +47,7 @@ public: typedef LLHandle<LLFloaterExperiencePicker> PickerHandle; LLPanelExperienceListEditor(); ~LLPanelExperienceListEditor(); - BOOL postBuild(); + bool postBuild(); void loading(); diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp index e5c637938f..5690384b8a 100644 --- a/indra/newview/llpanelexperiencelog.cpp +++ b/indra/newview/llpanelexperiencelog.cpp @@ -54,7 +54,7 @@ LLPanelExperienceLog::LLPanelExperienceLog( ) buildFromFile("panel_experience_log.xml"); } -BOOL LLPanelExperienceLog::postBuild( void ) +bool LLPanelExperienceLog::postBuild() { LLExperienceLog* log = LLExperienceLog::getInstance(); mEventList = getChild<LLScrollListCtrl>("experience_log_list"); @@ -82,7 +82,7 @@ BOOL LLPanelExperienceLog::postBuild( void ) mPageSize = log->getPageSize(); refresh(); mNewEvent = LLExperienceLog::instance().addUpdateSignal(boost::bind(&LLPanelExperienceLog::refresh, this)); - return TRUE; + return true; } LLPanelExperienceLog* LLPanelExperienceLog::create() diff --git a/indra/newview/llpanelexperiencelog.h b/indra/newview/llpanelexperiencelog.h index 4135d9cac9..1436bbad41 100644 --- a/indra/newview/llpanelexperiencelog.h +++ b/indra/newview/llpanelexperiencelog.h @@ -40,7 +40,7 @@ public: static LLPanelExperienceLog* create(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(); void refresh(); protected: diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp index 6dfdbaf63f..dd17606fc5 100644 --- a/indra/newview/llpanelexperiencepicker.cpp +++ b/indra/newview/llpanelexperiencepicker.cpp @@ -70,7 +70,7 @@ LLPanelExperiencePicker::~LLPanelExperiencePicker() { } -BOOL LLPanelExperiencePicker::postBuild() +bool LLPanelExperiencePicker::postBuild() { getChild<LLLineEditor>(TEXT_EDIT)->setKeystrokeCallback( boost::bind(&LLPanelExperiencePicker::editKeystroke, this, _1, _2),NULL); @@ -102,7 +102,7 @@ BOOL LLPanelExperiencePicker::postBuild() // Start searching when Return is pressed in the line editor. search_panel->setDefaultBtn(BTN_FIND); } - return TRUE; + return true; } void LLPanelExperiencePicker::editKeystroke( class LLLineEditor* caller, void* user_data ) diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index 97aa04cf4c..c1b8c27b2c 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -47,7 +47,7 @@ public: LLPanelExperiencePicker(); virtual ~LLPanelExperiencePicker(); - BOOL postBuild(); + bool postBuild(); void addFilter(filter_function func){mFilters.push_back(func);} template <class IT> diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp index 91d3b523fb..8ae407f5c7 100644 --- a/indra/newview/llpanelexperiences.cpp +++ b/indra/newview/llpanelexperiences.cpp @@ -51,7 +51,7 @@ LLPanelExperiences::LLPanelExperiences( ) buildFromFile("panel_experiences.xml"); } -BOOL LLPanelExperiences::postBuild( void ) +bool LLPanelExperiences::postBuild( void ) { mExperiencesList = getChild<LLFlatListView>("experiences_list"); if (hasString("loading_experiences")) @@ -64,7 +64,7 @@ BOOL LLPanelExperiences::postBuild( void ) } mExperiencesList->setComparator(&NAME_COMPARATOR); - return TRUE; + return true; } @@ -212,10 +212,10 @@ LLPanelSearchExperiences* LLPanelSearchExperiences::create( const std::string& n return panel; } -BOOL LLPanelSearchExperiences::postBuild( void ) +bool LLPanelSearchExperiences::postBuild( void ) { childSetAction("search_button", boost::bind(&LLPanelSearchExperiences::doSearch, this)); - return TRUE; + return true; } bool LLExperienceItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const diff --git a/indra/newview/llpanelexperiences.h b/indra/newview/llpanelexperiences.h index 11111f2a2e..70b93fd25b 100644 --- a/indra/newview/llpanelexperiences.h +++ b/indra/newview/llpanelexperiences.h @@ -40,7 +40,7 @@ class LLPanelSearchExperiences public: LLPanelSearchExperiences(){} static LLPanelSearchExperiences* create(const std::string& name); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); void doSearch(); }; @@ -53,8 +53,7 @@ public: static LLPanelExperiences* create(const std::string& name); - /*virtual*/ BOOL postBuild(void); - /*virtual*/ void onClosePanel(); + /*virtual*/ bool postBuild(void); void setExperienceList(const LLSD& experiences); void getExperienceIdsList(std::vector<LLUUID>& result); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 5f8071d3eb..ea1ac602a8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -252,7 +252,7 @@ F32 LLPanelFace::getCurrentShinyOffsetV() { return getChild<LLUICtrl>("shinyOf // Methods // -BOOL LLPanelFace::postBuild() +bool LLPanelFace::postBuild() { childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this); childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this); @@ -311,7 +311,7 @@ BOOL LLPanelFace::postBuild() LLSpinCtrl* mCtrlGlow; - setMouseOpaque(FALSE); + setMouseOpaque(false); LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control"); if (pbr_ctrl) @@ -471,7 +471,7 @@ BOOL LLPanelFace::postBuild() clearCtrls(); - return TRUE; + return true; } LLPanelFace::LLPanelFace() @@ -492,7 +492,7 @@ LLPanelFace::~LLPanelFace() unloadMedia(); } -void LLPanelFace::onVisibilityChange(BOOL new_visibility) +void LLPanelFace::onVisibilityChange(bool new_visibility) { if (new_visibility) { diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 5ca6a95699..681f758856 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -100,7 +100,7 @@ public: class LLPanelFace : public LLPanel { public: - virtual BOOL postBuild(); + virtual bool postBuild(); LLPanelFace(); virtual ~LLPanelFace(); @@ -110,7 +110,7 @@ public: static void onMaterialOverrideReceived(const LLUUID& object_id, S32 side); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); /*virtual*/ void draw(); LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material) diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index ab255d5215..4c0384d168 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -78,9 +78,9 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) return TRUE; } -BOOL LLPanelGroupTab::postBuild() +bool LLPanelGroupTab::postBuild() { - return TRUE; + return true; } LLPanelGroup::LLPanelGroup() @@ -137,7 +137,7 @@ void LLPanelGroup::onOpen(const LLSD& key) } -BOOL LLPanelGroup::postBuild() +bool LLPanelGroup::postBuild() { mDefaultNeedsApplyMesg = getString("default_needs_apply_text"); mWantApplyMesg = getString("want_apply_text"); @@ -187,7 +187,7 @@ BOOL LLPanelGroup::postBuild() LLVoiceClient::getInstance()->addObserver(this); - return TRUE; + return true; } void LLPanelGroup::reposButton(const std::string& name) @@ -221,7 +221,7 @@ void LLPanelGroup::reposButtons() reposButton("btn_call"); } -void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) +void LLPanelGroup::reshape(S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width, height, called_from_parent ); diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index be40b08a6d..28ba790a74 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -49,7 +49,7 @@ public: LLPanelGroup(); virtual ~LLPanelGroup(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setGroupID(const LLUUID& group_id); @@ -77,7 +77,7 @@ public: void callGroup(); void chatGroup(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); static void showNotice(const std::string& subject, const std::string& message, @@ -148,7 +148,7 @@ public: virtual void update(LLGroupChange gc) { } // This just connects the help button callback. - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index cf1f0bc32f..c047ffb270 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -57,9 +57,9 @@ LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupB buildFromFile( "panel_group_bulk_ban.xml"); } -BOOL LLPanelGroupBulkBan::postBuild() +bool LLPanelGroupBulkBan::postBuild() { - BOOL recurse = TRUE; + constexpr bool recurse = true; mImplementation->mLoadingText = getString("loading"); mImplementation->mGroupName = getChild<LLTextBox>("group_name_text", recurse); @@ -83,7 +83,7 @@ BOOL LLPanelGroupBulkBan::postBuild() if ( mImplementation->mRemoveButton ) { mImplementation->mRemoveButton->setClickedCallback(LLPanelGroupBulkImpl::callbackClickRemove, mImplementation); - mImplementation->mRemoveButton->setEnabled(FALSE); + mImplementation->mRemoveButton->setEnabled(false); } mImplementation->mOKButton = @@ -91,7 +91,7 @@ BOOL LLPanelGroupBulkBan::postBuild() if ( mImplementation->mOKButton ) { mImplementation->mOKButton->setClickedCallback(LLPanelGroupBulkBan::callbackClickSubmit, this); - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); } button = getChild<LLButton>("cancel_button", recurse); @@ -106,7 +106,7 @@ BOOL LLPanelGroupBulkBan::postBuild() mImplementation->mCannotBanYourself = getString("cant_ban_yourself"); update(); - return TRUE; + return true; } // TODO: Refactor the shitty callback functions with void* -- just use boost::bind to call submit() instead. diff --git a/indra/newview/llpanelgroupbulkban.h b/indra/newview/llpanelgroupbulkban.h index 9060d275f9..2ceb9df679 100644 --- a/indra/newview/llpanelgroupbulkban.h +++ b/indra/newview/llpanelgroupbulkban.h @@ -38,7 +38,7 @@ public: LLPanelGroupBulkBan(const LLUUID& group_id); ~LLPanelGroupBulkBan() {} - virtual BOOL postBuild(); + virtual bool postBuild(); static void callbackClickSubmit(void* userdata); virtual void submit(); diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 01a4ab0455..dcdc5821ef 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -66,28 +66,28 @@ LLPanelGroupCreate::~LLPanelGroupCreate() { } -BOOL LLPanelGroupCreate::postBuild() +bool LLPanelGroupCreate::postBuild() { childSetCommitCallback("back", boost::bind(&LLPanelGroupCreate::onBackBtnClick, this), NULL); - mComboMature = getChild<LLComboBox>("group_mature_check", TRUE); - mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", TRUE); - mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", TRUE); - mEditCharter = getChild<LLTextEditor>("charter", TRUE); - mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", TRUE); - mMembershipList = getChild<LLScrollListCtrl>("membership_list", TRUE); + mComboMature = getChild<LLComboBox>("group_mature_check", true); + mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", true); + mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", true); + mEditCharter = getChild<LLTextEditor>("charter", true); + mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", true); + mMembershipList = getChild<LLScrollListCtrl>("membership_list", true); - mCreateButton = getChild<LLButton>("btn_create", TRUE); + mCreateButton = getChild<LLButton>("btn_create", true); mCreateButton->setCommitCallback(boost::bind(&LLPanelGroupCreate::onBtnCreate, this)); - mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", TRUE); + mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", true); mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace); - mInsignia = getChild<LLTextureCtrl>("insignia", TRUE); + mInsignia = getChild<LLTextureCtrl>("insignia", true); mInsignia->setAllowLocalTexture(FALSE); mInsignia->setCanApplyImmediately(FALSE); - return TRUE; + return true; } void LLPanelGroupCreate::onOpen(const LLSD& key) @@ -97,8 +97,8 @@ void LLPanelGroupCreate::onOpen(const LLSD& key) mGroupNameEditor->clear(); mEditCharter->clear(); mSpinEnrollmentFee->set(0.f); - mCtrlEnrollmentFee->set(FALSE); - mCtrlOpenEnrollment->set(FALSE); + mCtrlEnrollmentFee->set(false); + mCtrlOpenEnrollment->set(false); mMembershipList->clearRows(); // populate list diff --git a/indra/newview/llpanelgroupcreate.h b/indra/newview/llpanelgroupcreate.h index 3ae2e7f24a..fd0b6e243d 100644 --- a/indra/newview/llpanelgroupcreate.h +++ b/indra/newview/llpanelgroupcreate.h @@ -46,9 +46,9 @@ public: LLPanelGroupCreate(); virtual ~LLPanelGroupCreate(); - virtual BOOL postBuild(); + bool postBuild() override; - void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; static void refreshCreatedGroup(const LLUUID& group_id); diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp index 6c40499208..d5fa4d1a73 100644 --- a/indra/newview/llpanelgroupexperiences.cpp +++ b/indra/newview/llpanelgroupexperiences.cpp @@ -50,7 +50,7 @@ LLPanelGroupExperiences::~LLPanelGroupExperiences() { } -BOOL LLPanelGroupExperiences::postBuild() +bool LLPanelGroupExperiences::postBuild() { mExperiencesList = getChild<LLFlatListView>("experiences_list"); if (hasString("loading_experiences")) diff --git a/indra/newview/llpanelgroupexperiences.h b/indra/newview/llpanelgroupexperiences.h index 7c79f77332..58d5397bb5 100644 --- a/indra/newview/llpanelgroupexperiences.h +++ b/indra/newview/llpanelgroupexperiences.h @@ -40,7 +40,7 @@ public: // LLPanelGroupTab virtual void activate(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void setGroupID(const LLUUID& id); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 04d3236bf1..d16dde667a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -87,9 +87,9 @@ LLPanelGroupGeneral::~LLPanelGroupGeneral() { } -BOOL LLPanelGroupGeneral::postBuild() +bool LLPanelGroupGeneral::postBuild() { - bool recurse = true; + constexpr bool recurse = true; mEditCharter = getChild<LLTextEditor>("charter", recurse); if(mEditCharter) @@ -139,8 +139,8 @@ BOOL LLPanelGroupGeneral::postBuild() mSpinEnrollmentFee->resetDirty(); } - BOOL accept_notices = FALSE; - BOOL list_in_profile = FALSE; + bool accept_notices = false; + bool list_in_profile = false; LLGroupData data; if(gAgent.getGroupData(mGroupID,data)) { @@ -177,13 +177,13 @@ BOOL LLPanelGroupGeneral::postBuild() // If the group_id is null, then we are creating a new group if (mGroupID.isNull()) { - mEditCharter->setEnabled(TRUE); + mEditCharter->setEnabled(true); - mCtrlShowInGroupList->setEnabled(TRUE); - mComboMature->setEnabled(TRUE); - mCtrlOpenEnrollment->setEnabled(TRUE); - mCtrlEnrollmentFee->setEnabled(TRUE); - mSpinEnrollmentFee->setEnabled(TRUE); + mCtrlShowInGroupList->setEnabled(true); + mComboMature->setEnabled(true); + mCtrlOpenEnrollment->setEnabled(true); + mCtrlEnrollmentFee->setEnabled(true); + mSpinEnrollmentFee->setEnabled(true); } diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 1d0789521c..79a9895029 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -54,7 +54,7 @@ public: virtual void update(LLGroupChange gc); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index d6b66ee622..cdc619e362 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -642,9 +642,9 @@ void LLPanelGroupInvite::updateLists() } } -BOOL LLPanelGroupInvite::postBuild() +bool LLPanelGroupInvite::postBuild() { - BOOL recurse = TRUE; + constexpr bool recurse = true; mImplementation->mLoadingText = getString("loading"); mImplementation->mRoleNames = getChild<LLComboBox>("role_name", @@ -654,7 +654,7 @@ BOOL LLPanelGroupInvite::postBuild() getChild<LLNameListCtrl>("invitee_list", recurse); if ( mImplementation->mInvitees ) { - mImplementation->mInvitees->setCommitOnSelectionChange(TRUE); + mImplementation->mInvitees->setCommitOnSelectionChange(true); mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation); } @@ -671,7 +671,7 @@ BOOL LLPanelGroupInvite::postBuild() if ( mImplementation->mRemoveButton ) { mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation); - mImplementation->mRemoveButton->setEnabled(FALSE); + mImplementation->mRemoveButton->setEnabled(false); } mImplementation->mOKButton = @@ -679,7 +679,7 @@ BOOL LLPanelGroupInvite::postBuild() if ( mImplementation->mOKButton ) { mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation); - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); } button = getChild<LLButton>("cancel_button", recurse); diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index 9f7b5ae9be..c1d2e3defe 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -48,8 +48,8 @@ public: void setCloseCallback(void (*close_callback)(void*), void* data); - virtual void draw(); - virtual BOOL postBuild(); + void draw() override; + bool postBuild() override; protected: class impl; impl* mImplementation; diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index f276d6d785..fd25148e25 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -674,7 +674,7 @@ void LLPanelGroupLandMoney::cancel() } -BOOL LLPanelGroupLandMoney::postBuild() +bool LLPanelGroupLandMoney::postBuild() { /* This power was removed to make group roles simpler bool has_parcel_view = gAgent.hasPowerInGroup(mGroupID, @@ -722,12 +722,12 @@ BOOL LLPanelGroupLandMoney::postBuild() if ( mImplementationp->mGroupOverLimitTextp ) { - mImplementationp->mGroupOverLimitTextp->setVisible(FALSE); + mImplementationp->mGroupOverLimitTextp->setVisible(false); } if ( mImplementationp->mGroupOverLimitIconp ) { - mImplementationp->mGroupOverLimitIconp->setVisible(FALSE); + mImplementationp->mGroupOverLimitIconp->setVisible(false); } if ( !can_view ) diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h index 3cec6065e7..0df34d26ba 100644 --- a/indra/newview/llpanelgrouplandmoney.h +++ b/indra/newview/llpanelgrouplandmoney.h @@ -36,7 +36,7 @@ class LLPanelGroupLandMoney : public LLPanelGroupTab public: LLPanelGroupLandMoney(); virtual ~LLPanelGroupLandMoney(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); virtual void activate(); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index b007291179..05d4ff409f 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -91,7 +91,7 @@ public: // // LLView functionality - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -112,18 +112,18 @@ LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p) mGroupID(p.group_id) {} -BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLGroupDropTarget::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 (!gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND)) { *accept = ACCEPT_NO; - return TRUE; + return true; } if(getParent()) @@ -131,7 +131,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // check if inside //LLRect parent_rect = mParentView->getRect(); //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); - handled = TRUE; + handled = true; // check the type switch(cargo_type) @@ -236,9 +236,9 @@ BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp) agentp->hasPowerInGroup(mGroupID, GP_NOTICES_SEND | GP_NOTICES_RECEIVE); } -BOOL LLPanelGroupNotices::postBuild() +bool LLPanelGroupNotices::postBuild() { - bool recurse = true; + constexpr bool recurse = true; mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse); mNoticesList->setCommitOnSelectionChange(TRUE); @@ -256,29 +256,29 @@ BOOL LLPanelGroupNotices::postBuild() mCreateMessage = getChild<LLTextEditor>("create_message",recurse); mCreateInventoryName = getChild<LLLineEditor>("create_inventory_name",recurse); - mCreateInventoryName->setTabStop(FALSE); - mCreateInventoryName->setEnabled(FALSE); + mCreateInventoryName->setTabStop(false); + mCreateInventoryName->setEnabled(false); mCreateInventoryIcon = getChild<LLIconCtrl>("create_inv_icon",recurse); - mCreateInventoryIcon->setVisible(FALSE); + mCreateInventoryIcon->setVisible(false); mBtnSendMessage = getChild<LLButton>("send_notice",recurse); mBtnSendMessage->setClickedCallback(onClickSendMessage, this); mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse); mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment, this); - mBtnRemoveAttachment->setEnabled(FALSE); + mBtnRemoveAttachment->setEnabled(false); // View mViewSubject = getChild<LLLineEditor>("view_subject",recurse); mViewMessage = getChild<LLTextEditor>("view_message",recurse); mViewInventoryName = getChild<LLLineEditor>("view_inventory_name",recurse); - mViewInventoryName->setTabStop(FALSE); - mViewInventoryName->setEnabled(FALSE); + mViewInventoryName->setTabStop(false); + mViewInventoryName->setEnabled(false); mViewInventoryIcon = getChild<LLIconCtrl>("view_inv_icon",recurse); - mViewInventoryIcon->setVisible(FALSE); + mViewInventoryIcon->setVisible(false); mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse); mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment, this); diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h index 55319cb9ae..02bd063017 100644 --- a/indra/newview/llpanelgroupnotices.h +++ b/indra/newview/llpanelgroupnotices.h @@ -50,7 +50,7 @@ public: //virtual bool apply(std::string& mesg); //virtual void update(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); void setItem(LLPointer<LLInventoryItem> inv_item); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index e3d75d5604..c427b57545 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -127,13 +127,13 @@ LLPanelGroupRoles::~LLPanelGroupRoles() { } -BOOL LLPanelGroupRoles::postBuild() +bool LLPanelGroupRoles::postBuild() { LL_DEBUGS() << "LLPanelGroupRoles::postBuild()" << LL_ENDL; mSubTabContainer = getChild<LLTabContainer>("roles_tab_container"); - if (!mSubTabContainer) return FALSE; + if (!mSubTabContainer) return false; // Hook up each sub-tabs callback and widgets. for (S32 i = 0; i < mSubTabContainer->getTabCount(); ++i) @@ -143,13 +143,13 @@ BOOL LLPanelGroupRoles::postBuild() if (!subtabp) { LL_WARNS() << "Invalid subtab panel: " << panel->getName() << LL_ENDL; - return FALSE; + return false; } // Hand the subtab a pointer to this LLPanelGroupRoles, so that it can // look around for the widgets it is interested in. if (!subtabp->postBuildSubTab(this)) - return FALSE; + return false; //subtabp->addObserver(this); } @@ -165,7 +165,7 @@ BOOL LLPanelGroupRoles::postBuild() mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); } - if (!mCurrentTab) return FALSE; + if (!mCurrentTab) return false; // Act as though this tab was just activated. mCurrentTab->activate(); @@ -461,10 +461,10 @@ BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) return TRUE; } -BOOL LLPanelGroupSubTab::postBuild() +bool LLPanelGroupSubTab::postBuild() { // Hook up the search widgets. - bool recurse = true; + constexpr bool recurse = true; mSearchEditor = findChild<LLFilterEditor>("filter_input", recurse); if (mSearchEditor) // SubTab doesn't implement this, only some of derived classes diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 459b77703f..8426d8fc06 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -53,7 +53,7 @@ public: friend class LLPanelGroupRolesSubTab; friend class LLPanelGroupActionsSubTab; - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); @@ -97,7 +97,7 @@ public: LLPanelGroupSubTab(); virtual ~LLPanelGroupSubTab(); - virtual BOOL postBuild(); + virtual bool postBuild(); // This allows sub-tabs to collect child widgets from a higher level in the view hierarchy. virtual BOOL postBuildSubTab(LLView* root); diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index ab0ccffae4..b8b1d45d95 100644 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -52,7 +52,7 @@ void LLPanelHome::onOpen(const LLSD& key) mFirstView = false; } -BOOL LLPanelHome::postBuild() +bool LLPanelHome::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); if (mBrowser) @@ -64,7 +64,7 @@ BOOL LLPanelHome::postBuild() mBrowser->setHomePageUrl(url); } - return TRUE; + return true; } void LLPanelHome::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) diff --git a/indra/newview/llpanelhome.h b/indra/newview/llpanelhome.h index 748566326f..809e8edf8c 100644 --- a/indra/newview/llpanelhome.h +++ b/indra/newview/llpanelhome.h @@ -44,7 +44,7 @@ class LLPanelHome : public: LLPanelHome(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index acdb16f432..65ef1023ea 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -56,7 +56,7 @@ public: }; -BOOL LLPanelLandInfo::postBuild() +bool LLPanelLandInfo::postBuild() { childSetAction("button buy land",boost::bind(onClickClaim)); childSetAction("button abandon land", boost::bind(onClickRelease)); @@ -67,7 +67,7 @@ BOOL LLPanelLandInfo::postBuild() mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); getChild<LLUICtrl>("checkbox show owners")->setValue(gSavedSettings.getBOOL("ShowParcelOwners")); - return TRUE; + return true; } // // Methods diff --git a/indra/newview/llpanelland.h b/indra/newview/llpanelland.h index 2ab1618d47..aa2a14d440 100644 --- a/indra/newview/llpanelland.h +++ b/indra/newview/llpanelland.h @@ -56,7 +56,7 @@ protected: static void onClickAbout(); protected: - virtual BOOL postBuild(); + bool postBuild() override; static LLPanelLandSelectObserver* sObserver; static LLPanelLandInfo* sInstance; diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index 9e3fc54477..fd83586a86 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -74,7 +74,7 @@ LLPanelLandAudio::~LLPanelLandAudio() } -BOOL LLPanelLandAudio::postBuild() +bool LLPanelLandAudio::postBuild() { mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local"); childSetCommitCallback("check sound local", onCommitAny, this); @@ -100,7 +100,7 @@ BOOL LLPanelLandAudio::postBuild() mCheckObscureMOAP = getChild<LLCheckBoxCtrl>("obscure_moap"); childSetCommitCallback("obscure_moap", onCommitAny, this); - return TRUE; + return true; } diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h index b54fe62179..f805338086 100644 --- a/indra/newview/llpanellandaudio.h +++ b/indra/newview/llpanellandaudio.h @@ -39,7 +39,7 @@ class LLPanelLandAudio public: LLPanelLandAudio(LLSafeHandle<LLParcelSelection>& parcelp); /*virtual*/ ~LLPanelLandAudio(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); private: diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index cea078bc23..3c166f2c28 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -69,7 +69,7 @@ LLPanelLandmarkInfo::~LLPanelLandmarkInfo() {} // virtual -BOOL LLPanelLandmarkInfo::postBuild() +bool LLPanelLandmarkInfo::postBuild() { LLPanelPlaceInfo::postBuild(); @@ -86,7 +86,7 @@ BOOL LLPanelLandmarkInfo::postBuild() icon_m = getString("icon_M"); icon_r = getString("icon_R"); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 8802ce066e..f607126328 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -40,7 +40,7 @@ public: LLPanelLandmarkInfo(); /*virtual*/ ~LLPanelLandmarkInfo(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void resetLocation(); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c3334605ae..d573660668 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -175,7 +175,7 @@ LLLandmarksPanel::~LLLandmarksPanel() { } -BOOL LLLandmarksPanel::postBuild() +bool LLLandmarksPanel::postBuild() { if (!gInventory.isInventoryUsable()) return FALSE; @@ -184,7 +184,7 @@ BOOL LLLandmarksPanel::postBuild() initListCommandsHandlers(); initLandmarksInventoryPanel(); - return TRUE; + return true; } // virtual @@ -1225,17 +1225,17 @@ LLFavoritesPanel::LLFavoritesPanel() buildFromFile("panel_favorites.xml"); } -BOOL LLFavoritesPanel::postBuild() +bool LLFavoritesPanel::postBuild() { if (!gInventory.isInventoryUsable()) - return FALSE; + return false; // mast be called before any other initXXX methods to init Gear menu LLLandmarksPanel::initListCommandsHandlers(); initFavoritesInventoryPanel(); - return TRUE; + return true; } void LLFavoritesPanel::initFavoritesInventoryPanel() diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 16f3a5dc24..305d1bf035 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -52,7 +52,7 @@ public: LLLandmarksPanel(bool is_landmark_panel); virtual ~LLLandmarksPanel(); - BOOL postBuild() override; + bool postBuild() override; void onSearchEdit(const std::string& string) override; void onShowOnMap() override; void onShowProfile() override; @@ -162,7 +162,7 @@ class LLFavoritesPanel : public LLLandmarksPanel public: LLFavoritesPanel(); - BOOL postBuild() override; + bool postBuild() override; void initFavoritesInventoryPanel(); }; diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index ed4ed2c610..1c2e5aa94d 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -78,7 +78,7 @@ LLPanelLandMedia::~LLPanelLandMedia() { } -BOOL LLPanelLandMedia::postBuild() +bool LLPanelLandMedia::postBuild() { mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); @@ -112,7 +112,7 @@ BOOL LLPanelLandMedia::postBuild() mSetURLButton = getChild<LLButton>("set_media_url"); childSetAction("set_media_url", onSetBtn, this); - return TRUE; + return true; } diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h index 63cfa01470..b841ded56d 100644 --- a/indra/newview/llpanellandmedia.h +++ b/indra/newview/llpanellandmedia.h @@ -39,7 +39,7 @@ class LLPanelLandMedia public: LLPanelLandMedia(LLSafeHandle<LLParcelSelection>& parcelp); /*virtual*/ ~LLPanelLandMedia(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); void setMediaType(const std::string& media_type); void setMediaURL(const std::string& media_type); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1fd1462d66..399cb34a11 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -451,7 +451,7 @@ LLPanelLogin::~LLPanelLogin() } // virtual -void LLPanelLogin::setFocus(BOOL b) +void LLPanelLogin::setFocus(bool b) { if(b != hasFocus()) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index c6254f72cf..c2353c06c9 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -49,7 +49,7 @@ public: void *callback_data); ~LLPanelLogin(); - virtual void setFocus( BOOL b ); + virtual void setFocus( bool b ); static void show(const LLRect &rect, void (*callback)(S32 option, void* user_data), @@ -71,8 +71,6 @@ public: static void closePanel(); - void setSiteIsAlive( bool alive ); - static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); @@ -93,14 +91,12 @@ public: private: friend class LLPanelLoginListener; void addFavoritesToStartLocation(); - void addUsersWithFavoritesToUsername(); void onSelectServer(); void onLocationSLURL(); static void setFields(LLPointer<LLCredential> credential); static void onClickConnect(bool commit_fields = true); - static void onClickNewAccount(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onClickSignUp(void*); @@ -109,7 +105,6 @@ private: static void onRememberUserCheck(void*); static void onRememberPasswordCheck(void*); static void onPassKey(LLLineEditor* caller, void* user_data); - static void updateServerCombo(); private: boost::scoped_ptr<LLPanelLoginListener> mListener; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a5a768776a..47f952781d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -80,7 +80,7 @@ class LLFloaterInventoryFinder : public LLFloater public: LLFloaterInventoryFinder( LLPanelMainInventory* inventory_view); virtual void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void changeFilter(LLInventoryFilter* filter); void updateElementsFromFilter(); BOOL getCheckShowEmpty(); @@ -142,7 +142,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mSavedFolderState->setApply(FALSE); } -BOOL LLPanelMainInventory::postBuild() +bool LLPanelMainInventory::postBuild() { gInventory.addObserver(this); @@ -386,7 +386,7 @@ void LLPanelMainInventory::startSearch() } } -BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) +bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) { LLFolderView* root_folder = mActivePanel ? mActivePanel->getRootFolder() : NULL; if (root_folder) @@ -399,7 +399,7 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) && mask == MASK_NONE) { // move focus to inventory proper - mActivePanel->setFocus(TRUE); + mActivePanel->setFocus(true); root_folder->scrollToShowSelection(); return TRUE; } @@ -914,7 +914,7 @@ void LLPanelMainInventory::setFilterSubString(const std::string& string) mActivePanel->setFilterSubString(string); } -BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -922,7 +922,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { // Check to see if we are auto scrolling from the last frame LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel(); - BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y); + bool needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y); if(mFilterTabs) { if(needsToScroll) @@ -931,7 +931,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } } - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + bool handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); return handled; } @@ -1108,7 +1108,7 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento updateElementsFromFilter(); } -BOOL LLFloaterInventoryFinder::postBuild() +bool LLFloaterInventoryFinder::postBuild() { const LLRect& viewrect = mPanelMainInventory->getRect(); setRect(LLRect(viewrect.mLeft - getRect().getWidth(), viewrect.mTop, viewrect.mLeft, viewrect.mTop - getRect().getHeight())); @@ -1130,7 +1130,7 @@ BOOL LLFloaterInventoryFinder::postBuild() childSetAction("Close", onCloseBtn, this); updateElementsFromFilter(); - return TRUE; + return true; } void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data) { @@ -2002,14 +2002,14 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } -void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) +void LLPanelMainInventory::onVisibilityChange( bool new_visibility ) { if(!new_visibility) { LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) { - menu->setVisible(FALSE); + menu->setVisible(false); } getActivePanel()->getRootFolder()->finishRenamingItem(); } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index fbfca43f64..b6eb055270 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -65,7 +65,7 @@ public: LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams()); ~LLPanelMainInventory(); - BOOL postBuild(); + bool postBuild(); enum EViewModeType { @@ -74,17 +74,17 @@ public: MODE_COMBINATION }; - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); // Inherited functionality - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ void changed(U32); /*virtual*/ void draw(); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 3638ee14fc..a46fbf0a82 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -63,14 +63,14 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() } // virtual -BOOL LLPanelMarketplaceInbox::postBuild() +bool LLPanelMarketplaceInbox::postBuild() { LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this)); mFreshCountCtrl = getChild<LLUICtrl>("inbox_fresh_new_count"); mInboxButton = getChild<LLButton>("inbox_btn"); - return TRUE; + return true; } void LLPanelMarketplaceInbox::onSelectionChange() @@ -122,10 +122,10 @@ void LLPanelMarketplaceInbox::onFocusReceived() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) +bool LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { *accept = ACCEPT_NO; - return TRUE; + return true; } U32 LLPanelMarketplaceInbox::getFreshItemCount() const diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h index 952e3a333a..199d98366f 100644 --- a/indra/newview/llpanelmarketplaceinbox.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -48,11 +48,11 @@ public: LLPanelMarketplaceInbox(const Params& p = getDefaultParams()); ~LLPanelMarketplaceInbox(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) override; - /*virtual*/ void draw(); + void draw() override; LLInventoryPanel * setupInventoryPanel(); diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 8380394f2c..ffbf91b522 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -80,7 +80,7 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsGeneral::postBuild() +bool LLPanelMediaSettingsGeneral::postBuild() { // connect member vars with UI widgets mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY ); diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 06793d91fc..0950ae9c55 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -53,7 +53,7 @@ public: // Hook that the floater calls after applying changes to the panel void postApply(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); /*virtual*/ void onClose(bool app_quitting); diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index cb0b7789ff..99b158550b 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -64,7 +64,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsPermissions::postBuild() +bool LLPanelMediaSettingsPermissions::postBuild() { // connect member vars with UI widgets mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h index f976720180..b2611745fa 100644 --- a/indra/newview/llpanelmediasettingspermissions.h +++ b/indra/newview/llpanelmediasettingspermissions.h @@ -44,7 +44,7 @@ public: LLPanelMediaSettingsPermissions(); ~LLPanelMediaSettingsPermissions(); - BOOL postBuild(); + bool postBuild(); virtual void draw(); // XXX TODO: put these into a common parent class? diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index b588e8f930..d6ee15b7b9 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -58,7 +58,7 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsSecurity::postBuild() +bool LLPanelMediaSettingsSecurity::postBuild() { mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY ); mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY ); diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index fe8e843571..0660182f23 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -40,7 +40,7 @@ public: LLPanelMediaSettingsSecurity(); ~LLPanelMediaSettingsSecurity(); - BOOL postBuild(); + bool postBuild(); virtual void draw(); // XXX TODO: put these into a common parent class? diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index aed7c34a64..a8553b654e 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -120,7 +120,7 @@ LLPanelNearByMedia::~LLPanelNearByMedia() { } -BOOL LLPanelNearByMedia::postBuild() +bool LLPanelNearByMedia::postBuild() { LLPanelPulldown::postBuild(); @@ -171,8 +171,8 @@ BOOL LLPanelNearByMedia::postBuild() mPlayingString = getString("playing_suffix"); mMediaList->setDoubleClickCallback(onZoomMedia, this); - mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, TRUE); - mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, FALSE); + mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, true); + mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, false); refreshList(); updateControls(); @@ -191,7 +191,7 @@ BOOL LLPanelNearByMedia::postBuild() gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - return TRUE; + return true; } void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) @@ -211,7 +211,7 @@ void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) } /*virtual*/ -void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPanelNearByMedia::reshape(S32 width, S32 height, bool called_from_parent) { LLPanelPulldown::reshape(width, height, called_from_parent); @@ -276,7 +276,7 @@ bool LLPanelNearByMedia::handleRightMouseDown(S32 x, S32 y, MASK mask) } -void LLPanelNearByMedia::onVisibilityChange(BOOL new_visibility) +void LLPanelNearByMedia::onVisibilityChange(bool new_visibility) { if (!new_visibility && mContextMenu->getVisible()) { diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index fc58d14381..22f154f388 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -44,12 +44,12 @@ class LLPanelNearByMedia : public LLPanelPulldown { public: - BOOL postBuild() override; + bool postBuild() override; void draw() override; - void reshape(S32 width, S32 height, BOOL called_from_parent) override; + void reshape(S32 width, S32 height, bool called_from_parent) override; bool handleHover(S32 x, S32 y, MASK mask) override; bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; - void onVisibilityChange(BOOL new_visibility) override; + void onVisibilityChange(bool new_visibility) override; // this is part of the nearby media *dialog* so we can track whether // the user *implicitly* wants audio on or off via their *explicit* diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0704fc881d..3423e07dec 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -97,9 +97,9 @@ const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters //static const std::string LEGACY_FULLBRIGHT_DESC =LLTrans::getString("Fullbright"); -BOOL LLPanelObject::postBuild() +bool LLPanelObject::postBuild() { - setMouseOpaque(FALSE); + setMouseOpaque(false); //-------------------------------------------------------- // Top @@ -280,7 +280,7 @@ BOOL LLPanelObject::postBuild() // Start with everyone disabled clearCtrls(); - return TRUE; + return true; } LLPanelObject::LLPanelObject() diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 515dd27c0a..dd9ed1a122 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -51,7 +51,7 @@ public: LLPanelObject(); virtual ~LLPanelObject(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); virtual void clearCtrls(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 18e134e4e4..4af8f9efdc 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -127,17 +127,17 @@ public: virtual void closeItem() {} virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemMovable() const; - virtual BOOL isItemRemovable() const; - virtual BOOL removeItem(); + virtual bool isItemMovable() const; + virtual bool isItemRemovable() const; + virtual bool removeItem(); virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); virtual void move(LLFolderViewModelItem* parent_listener); virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); - virtual BOOL isClipboardPasteable() const; + virtual bool copyToClipboard() const; + virtual bool cutToClipboard(); + virtual bool isClipboardPasteable() const; virtual void pasteFromClipboard(); virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -154,7 +154,7 @@ public: // LLDragAndDropBridge functionality virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -288,9 +288,9 @@ void LLTaskInvFVBridge::openItem() LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL; } -BOOL LLTaskInvFVBridge::isItemRenameable() const +bool LLTaskInvFVBridge::isItemRenameable() const { - if(gAgent.isGodlike()) return TRUE; + if(gAgent.isGodlike()) return true; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -298,10 +298,10 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE, GOD_LIKE)) { - return TRUE; + return true; } } - return FALSE; + return false; } bool LLTaskInvFVBridge::renameItem(const std::string& new_name) @@ -325,26 +325,26 @@ bool LLTaskInvFVBridge::renameItem(const std::string& new_name) return true; } -BOOL LLTaskInvFVBridge::isItemMovable() const +bool LLTaskInvFVBridge::isItemMovable() const { //LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); //if(object && (object->permModify() || gAgent.isGodlike())) //{ - // return TRUE; + // return true; //} - //return FALSE; + //return false; return true; } -BOOL LLTaskInvFVBridge::isItemRemovable() const +bool LLTaskInvFVBridge::isItemRemovable() const { const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object && (object->permModify() || object->permYouOwner())) { - return TRUE; + return true; } - return FALSE; + return false; } bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel) @@ -372,7 +372,7 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon // ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently. typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t; typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t; -BOOL LLTaskInvFVBridge::removeItem() +bool LLTaskInvFVBridge::removeItem() { if(isItemRemovable() && mPanel) { @@ -383,7 +383,7 @@ BOOL LLTaskInvFVBridge::removeItem() { // just do it. object->removeInventory(mUUID); - return TRUE; + return true; } else { @@ -391,11 +391,11 @@ BOOL LLTaskInvFVBridge::removeItem() payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); - return FALSE; + return false; } } } - return FALSE; + return false; } void LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) @@ -450,19 +450,19 @@ bool LLTaskInvFVBridge::isItemCopyable(bool can_link) const GP_OBJECT_MANIPULATE); } -BOOL LLTaskInvFVBridge::copyToClipboard() const +bool LLTaskInvFVBridge::copyToClipboard() const { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::cutToClipboard() +bool LLTaskInvFVBridge::cutToClipboard() { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::isClipboardPasteable() const +bool LLTaskInvFVBridge::isClipboardPasteable() const { - return FALSE; + return false; } void LLTaskInvFVBridge::pasteFromClipboard() @@ -511,13 +511,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL; - return FALSE; + return false; } // virtual @@ -585,14 +585,14 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemRemovable() const; + virtual bool isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -638,9 +638,9 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const return mDisplayName; } -BOOL LLTaskCategoryBridge::isItemRenameable() const +bool LLTaskCategoryBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCategoryBridge::renameItem(const std::string& new_name) @@ -648,9 +648,9 @@ bool LLTaskCategoryBridge::renameItem(const std::string& new_name) return false; } -BOOL LLTaskCategoryBridge::isItemRemovable() const +bool LLTaskCategoryBridge::isItemRemovable() const { - return FALSE; + return false; } void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -664,7 +664,7 @@ bool LLTaskCategoryBridge::hasChildren() const { // return TRUE if we have or do know know if we have children. // *FIX: For now, return FALSE - we will know for sure soon enough. - return FALSE; + return false; } void LLTaskCategoryBridge::openItem() @@ -691,13 +691,13 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -739,7 +739,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, && (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource()) && (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource())) { - accept = TRUE; + accept = true; } if(accept && drop) { @@ -905,13 +905,13 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); }; -BOOL LLTaskCallingCardBridge::isItemRenameable() const +bool LLTaskCallingCardBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCallingCardBridge::renameItem(const std::string& new_name) @@ -945,7 +945,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); //static void copyToInventory(void* userdata); @@ -976,7 +976,7 @@ void LLTaskLSLBridge::openItem() } } -BOOL LLTaskLSLBridge::removeItem() +bool LLTaskLSLBridge::removeItem() { LLFloaterReg::hideInstance("preview_scriptedit", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1010,7 +1010,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskNotecardBridge::openItem() @@ -1039,7 +1039,7 @@ void LLTaskNotecardBridge::openItem() } } -BOOL LLTaskNotecardBridge::removeItem() +bool LLTaskNotecardBridge::removeItem() { LLFloaterReg::hideInstance("preview_notecard", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1059,7 +1059,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskGestureBridge::openItem() @@ -1072,7 +1072,7 @@ void LLTaskGestureBridge::openItem() LLPreviewGesture::show(mUUID, mPanel->getTaskUUID()); } -BOOL LLTaskGestureBridge::removeItem() +bool LLTaskGestureBridge::removeItem() { // Don't need to deactivate gesture because gestures inside objects can never be active. LLFloaterReg::hideInstance("preview_gesture", LLSD(mUUID)); @@ -1093,7 +1093,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskAnimationBridge::openItem() @@ -1111,7 +1111,7 @@ void LLTaskAnimationBridge::openItem() } } -BOOL LLTaskAnimationBridge::removeItem() +bool LLTaskAnimationBridge::removeItem() { LLFloaterReg::hideInstance("preview_anim", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1179,7 +1179,7 @@ public: BOOL canOpenItem() const override { return TRUE; } void openItem() override; - BOOL removeItem() override; + bool removeItem() override; }; void LLTaskMaterialBridge::openItem() @@ -1210,7 +1210,7 @@ void LLTaskMaterialBridge::openItem() } } -BOOL LLTaskMaterialBridge::removeItem() +bool LLTaskMaterialBridge::removeItem() { LLFloaterReg::hideInstance("material_editor", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1359,7 +1359,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory() } } -BOOL LLPanelObjectInventory::postBuild() +bool LLPanelObjectInventory::postBuild() { // clear contents and initialize menus, sets up mFolders reset(); @@ -1367,7 +1367,7 @@ BOOL LLPanelObjectInventory::postBuild() // Register an idle update callback gIdleCallbacks.addFunction(idle, this); - return TRUE; + return true; } void LLPanelObjectInventory::doToSelected(const LLSD& userdata) @@ -1789,14 +1789,14 @@ void LLPanelObjectInventory::deleteAllChildren() LLView::deleteAllChildren(); } -BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) +bool LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { if (mFolders) { LLFolderViewItem* folderp = mFolders->getNextFromChild(NULL); if (!folderp) { - return FALSE; + return false; } // Try to pass on unmodified mouse coordinates S32 local_x = x - mFolders->getRect().mLeft; @@ -1814,7 +1814,7 @@ BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro } else { - return FALSE; + return false; } } @@ -1880,9 +1880,9 @@ void LLPanelObjectInventory::clearItemIDs() mItemMap.clear(); } -BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) +bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_DELETE: @@ -1894,7 +1894,7 @@ BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) if (isSelectionRemovable() && mask == MASK_NONE) { LLInventoryAction::doToSelected(&gInventory, mFolders, "delete"); - handled = TRUE; + handled = true; } break; } diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 0e450d8ce9..50ca2372ca 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -60,7 +60,7 @@ public: LLPanelObjectInventory(const Params&); virtual ~LLPanelObjectInventory(); - virtual BOOL postBuild(); + virtual bool postBuild(); LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } @@ -76,7 +76,7 @@ public: virtual void draw(); virtual void deleteAllChildren(); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); @@ -101,7 +101,7 @@ protected: void removeItemID(const LLUUID& id); void clearItemIDs(); - BOOL handleKeyHere( KEY key, MASK mask ); + bool handleKeyHere( KEY key, MASK mask ); BOOL isSelectionRemovable(); private: diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 4a755a6e93..71027e1f87 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -440,7 +440,7 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() } } -BOOL LLPanelOutfitEdit::postBuild() +bool LLPanelOutfitEdit::postBuild() { // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels @@ -568,7 +568,7 @@ BOOL LLPanelOutfitEdit::postBuild() getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); onOutfitChanging(gAgentWearables.isCOFChangeInProgress()); - return TRUE; + return true; } // virtual @@ -1168,7 +1168,7 @@ void LLPanelOutfitEdit::update() updateVerbs(); } -BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1215,7 +1215,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } } - return TRUE; + return true; } void LLPanelOutfitEdit::displayCurrentOutfit() diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index d0597fb72b..ec88018f8f 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -124,7 +124,7 @@ public: LLPanelOutfitEdit(); /*virtual*/ ~LLPanelOutfitEdit(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void moveWearable(bool closer_to_body); @@ -181,7 +181,7 @@ public: void resetAccordionState(); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index d8c34d5c40..a6f5c906c2 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -78,7 +78,7 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() } // virtual -BOOL LLPanelOutfitsInventory::postBuild() +bool LLPanelOutfitsInventory::postBuild() { initTabPanels(); initListCommandsHandlers(); @@ -96,7 +96,7 @@ BOOL LLPanelOutfitsInventory::postBuild() getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, false)); getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, true)); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 50d7074d4b..a2d83dc46e 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -46,7 +46,7 @@ public: LLPanelOutfitsInventory(); virtual ~LLPanelOutfitsInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void onSearchEdit(const std::string& string); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 31fe6bc49b..09f58f5626 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -609,7 +609,7 @@ void LLPanelPeople::removePicker() } } -BOOL LLPanelPeople::postBuild() +bool LLPanelPeople::postBuild() { S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); @@ -729,7 +729,7 @@ BOOL LLPanelPeople::postBuild() mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 25abebc576..807384f50c 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -50,12 +50,12 @@ public: LLPanelPeople(); virtual ~LLPanelPeople(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ bool notifyChildren(const LLSD& info); + bool postBuild() override; + void onOpen(const LLSD& key) override; + bool notifyChildren(const LLSD& info) override; // Implements LLVoiceClientStatusObserver::onChange() to enable call buttons // when voice is available - /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); + void onChange(EStatusType status, const std::string &channelURI, bool proximal) override; // internals class Updater; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 8a8518ce0d..c6e63c731c 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -154,7 +154,7 @@ LLPanelPermissions::LLPanelPermissions() : setMouseOpaque(FALSE); } -BOOL LLPanelPermissions::postBuild() +bool LLPanelPermissions::postBuild() { childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this); getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); @@ -188,7 +188,7 @@ BOOL LLPanelPermissions::postBuild() mLabelOwnerName = getChild<LLTextBox>("Owner Name"); mLabelCreatorName = getChild<LLTextBox>("Creator Name"); - return TRUE; + return true; } diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index e657f8f8b7..5be9d9efe6 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -48,7 +48,7 @@ public: LLPanelPermissions(); virtual ~LLPanelPermissions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void updateOwnerName(const LLUUID& owner_id, const LLAvatarName& owner_name, const LLStyle::Params& style_params); void updateCreatorName(const LLUUID& creator_id, const LLAvatarName& creator_name, const LLStyle::Params& style_params); void refresh(); // refresh all labels as needed diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index fb5957ff8f..4f6e025bf5 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -72,7 +72,7 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo() } //virtual -BOOL LLPanelPlaceInfo::postBuild() +bool LLPanelPlaceInfo::postBuild() { mTitle = getChild<LLTextBox>("title"); mCurrentTitle = mTitle->getText(); @@ -92,7 +92,7 @@ BOOL LLPanelPlaceInfo::postBuild() mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight(); mScrollingPanelWidth = mScrollingPanel->getRect().getWidth(); - return TRUE; + return true; } //virtual @@ -194,7 +194,7 @@ void LLPanelPlaceInfo::setErrorStatus(S32 status, const std::string& reason) mRegionTitle.clear(); // Enable "Back" button that was disabled when parcel request was sent. - getChild<LLButton>("back_btn")->setEnabled(TRUE); + getChild<LLButton>("back_btn")->setEnabled(true); } // virtual @@ -258,7 +258,7 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } // virtual -void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPanelPlaceInfo::reshape(S32 width, S32 height, bool called_from_parent) { // This if was added to force collapsing description textbox on Windows at the beginning of reshape diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 533215016a..c9dfca6b62 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -62,7 +62,7 @@ public: LLPanelPlaceInfo(); /*virtual*/ ~LLPanelPlaceInfo(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // Ignore all old location information, useful if you are // recycling an existing dialog and need to clear it. @@ -89,7 +89,7 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Create a pick for the location specified // by global_pos. diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 9283dfa218..4087380519 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -92,7 +92,7 @@ LLPanelPlaceProfile::~LLPanelPlaceProfile() } // virtual -BOOL LLPanelPlaceProfile::postBuild() +bool LLPanelPlaceProfile::postBuild() { LLPanelPlaceInfo::postBuild(); @@ -166,7 +166,7 @@ BOOL LLPanelPlaceProfile::postBuild() mLastSelectedRegionID = LLUUID::null; mNextCovenantUpdateTime = 0; - return TRUE; + return true; } // virtual @@ -312,7 +312,7 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) } // virtual -void LLPanelPlaceProfile::onVisibilityChange(BOOL new_visibility) +void LLPanelPlaceProfile::onVisibilityChange(bool new_visibility) { LLPanel::onVisibilityChange(new_visibility); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 16478bc179..ce0b89f5f7 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -39,7 +39,7 @@ public: LLPanelPlaceProfile(); /*virtual*/ ~LLPanelPlaceProfile(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void resetLocation(); @@ -47,7 +47,7 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); // Displays information about the currently selected parcel // without sending a request to the server. diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b603c361d8..31413900a1 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -275,7 +275,7 @@ LLPanelPlaces::~LLPanelPlaces() } } -BOOL LLPanelPlaces::postBuild() +bool LLPanelPlaces::postBuild() { mTeleportBtn = getChild<LLButton>("teleport_btn"); mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onTeleportButtonClicked, this)); @@ -323,7 +323,7 @@ BOOL LLPanelPlaces::postBuild() mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (mPlaceMenu) { - mPlaceMenu->setAlwaysShowMenu(TRUE); + mPlaceMenu->setAlwaysShowMenu(true); } else { @@ -360,7 +360,7 @@ BOOL LLPanelPlaces::postBuild() mPlaceProfile = findChild<LLPanelPlaceProfile>("panel_place_profile"); mLandmarkInfo = findChild<LLPanelLandmarkInfo>("panel_landmark_info"); if (!mPlaceProfile || !mLandmarkInfo) - return FALSE; + return false; mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn"); mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); @@ -382,7 +382,7 @@ BOOL LLPanelPlaces::postBuild() createTabs(); updateVerbs(); - return TRUE; + return true; } void LLPanelPlaces::onOpen(const LLSD& key) @@ -1107,7 +1107,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) } // virtual -void LLPanelPlaces::onVisibilityChange(BOOL new_visibility) +void LLPanelPlaces::onVisibilityChange(bool new_visibility) { LLPanel::onVisibilityChange(new_visibility); diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index e554099343..baa20d2e66 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -57,7 +57,7 @@ public: LLPanelPlaces(); virtual ~LLPanelPlaces(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); // Called on parcel selection change to update place information. @@ -103,7 +103,7 @@ private: void togglePlaceInfoPanel(BOOL visible); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); void updateVerbs(); diff --git a/indra/newview/llpanelpresetscamerapulldown.cpp b/indra/newview/llpanelpresetscamerapulldown.cpp index 4c9c30160c..56c8c771b9 100644 --- a/indra/newview/llpanelpresetscamerapulldown.cpp +++ b/indra/newview/llpanelpresetscamerapulldown.cpp @@ -54,7 +54,7 @@ LLPanelPresetsCameraPulldown::LLPanelPresetsCameraPulldown() buildFromFile( "panel_presets_camera_pulldown.xml"); } -BOOL LLPanelPresetsCameraPulldown::postBuild() +bool LLPanelPresetsCameraPulldown::postBuild() { LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); if (presetsMgr) diff --git a/indra/newview/llpanelpresetscamerapulldown.h b/indra/newview/llpanelpresetscamerapulldown.h index c49bab042e..b313e5785e 100644 --- a/indra/newview/llpanelpresetscamerapulldown.h +++ b/indra/newview/llpanelpresetscamerapulldown.h @@ -35,7 +35,7 @@ class LLPanelPresetsCameraPulldown : public LLPanelPulldown { public: LLPanelPresetsCameraPulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void populatePanel(); private: diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index f6e501f147..ac84d7ac56 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -57,7 +57,7 @@ LLPanelPresetsPulldown::LLPanelPresetsPulldown() buildFromFile( "panel_presets_pulldown.xml"); } -BOOL LLPanelPresetsPulldown::postBuild() +bool LLPanelPresetsPulldown::postBuild() { LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); presetsMgr->setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this)); diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h index 79bd6886b1..cc3ea7f038 100644 --- a/indra/newview/llpanelpresetspulldown.h +++ b/indra/newview/llpanelpresetspulldown.h @@ -36,7 +36,7 @@ class LLPanelPresetsPulldown : public LLPanelPulldown { public: LLPanelPresetsPulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void populatePanel(); private: diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 986b846d0c..2eacebf623 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -141,7 +141,7 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls() { } -BOOL LLPanelPrimMediaControls::postBuild() +bool LLPanelPrimMediaControls::postBuild() { mMediaRegion = getChild<LLView>("media_region"); mBackCtrl = getChild<LLUICtrl>("back"); @@ -223,8 +223,8 @@ BOOL LLPanelPrimMediaControls::postBuild() mCurrentZoom = ZOOM_NONE; // clicks on buttons do not remove keyboard focus from media - setIsChrome(TRUE); - return TRUE; + setIsChrome(true); + return true; } void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal) @@ -876,7 +876,7 @@ bool LLPanelPrimMediaControls::handleMouseUp(S32 x, S32 y, MASK mask) return LLPanel::handleMouseUp(x, y, mask); } -BOOL LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask ) +bool LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask ) { mInactivityTimer.start(); return LLPanel::handleKeyHere(key, mask); diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 62ed4badaf..1b8f106f7b 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -46,14 +46,14 @@ class LLPanelPrimMediaControls : public LLPanel public: LLPanelPrimMediaControls(); virtual ~LLPanelPrimMediaControls(); - /*virtual*/ BOOL postBuild(); - virtual void draw(); - virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks); - virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks); - - virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual bool handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool postBuild() override; + void draw() override; + bool handleScrollWheel(S32 x, S32 y, S32 clicks) override; + bool handleScrollHWheel(S32 x, S32 y, S32 clicks) override; + + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void updateShape(); bool isMouseOver(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 00fa3853f7..be5783dd50 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -534,7 +534,7 @@ public: { if (params.size() < 2) return false; LLUUID avatar_id; - if (!avatar_id.set(params[0], FALSE)) + if (!avatar_id.set(params[0], false)) { return false; } @@ -661,7 +661,7 @@ class LLFloaterProfilePermissions public: LLFloaterProfilePermissions(LLView * owner, const LLUUID &avatar_id); ~LLFloaterProfilePermissions(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void draw() override; void changed(U32 mask) override; // LLFriendObserver @@ -713,7 +713,7 @@ LLFloaterProfilePermissions::~LLFloaterProfilePermissions() } } -BOOL LLFloaterProfilePermissions::postBuild() +bool LLFloaterProfilePermissions::postBuild() { mDescription = getChild<LLTextBase>("perm_description"); mOnlineStatus = getChild<LLCheckBoxCtrl>("online_check"); @@ -728,7 +728,7 @@ BOOL LLFloaterProfilePermissions::postBuild() mOkBtn->setCommitCallback([this](LLUICtrl*, void*) { onApplyRights(); }, nullptr); mCancelBtn->setCommitCallback([this](LLUICtrl*, void*) { onCancel(); }, nullptr); - return TRUE; + return true; } void LLFloaterProfilePermissions::onOpen(const LLSD& key) @@ -925,7 +925,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife() } } -BOOL LLPanelProfileSecondLife::postBuild() +bool LLPanelProfileSecondLife::postBuild() { mGroupList = getChild<LLGroupList>("group_list"); mShowInSearchCombo = getChild<LLComboBox>("show_in_search"); @@ -957,7 +957,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mCantEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); }); mSecondLifePic->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentProfileTexture(); }); - return TRUE; + return true; } void LLPanelProfileSecondLife::onOpen(const LLSD& key) @@ -1014,7 +1014,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) } -BOOL LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1024,13 +1024,13 @@ BOOL LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL d if (LLPanelProfileTab::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) && *accept != ACCEPT_NO) { - return TRUE; + return true; } // No point sharing with own profile if (getSelfProfile()) { - return FALSE; + return false; } // Exclude fields that look like they are editable. @@ -2124,13 +2124,13 @@ void LLPanelProfileWeb::onOpen(const LLSD& key) mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileWeb::onAvatarNameCache, this, _1, _2)); } -BOOL LLPanelProfileWeb::postBuild() +bool LLPanelProfileWeb::postBuild() { mWebBrowser = getChild<LLMediaCtrl>("profile_html"); mWebBrowser->addObserver(this); mWebBrowser->setHomePageUrl("about:blank"); - return TRUE; + return true; } void LLPanelProfileWeb::resetData() @@ -2249,7 +2249,7 @@ LLPanelProfileFirstLife::~LLPanelProfileFirstLife() { } -BOOL LLPanelProfileFirstLife::postBuild() +bool LLPanelProfileFirstLife::postBuild() { mDescriptionEdit = getChild<LLTextEditor>("fl_description_edit"); mPicture = getChild<LLThumbnailCtrl>("real_world_pic"); @@ -2267,7 +2267,7 @@ BOOL LLPanelProfileFirstLife::postBuild() mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr); mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); }); - return TRUE; + return true; } void LLPanelProfileFirstLife::onOpen(const LLSD& key) @@ -2544,7 +2544,7 @@ void LLPanelProfileNotes::commitUnsavedChanges() } } -BOOL LLPanelProfileNotes::postBuild() +bool LLPanelProfileNotes::postBuild() { mNotesEditor = getChild<LLTextEditor>("notes_edit"); mSaveChanges = getChild<LLButton>("notes_save_changes"); @@ -2554,7 +2554,7 @@ BOOL LLPanelProfileNotes::postBuild() mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardNotesChanges(); }, nullptr); mNotesEditor->setKeystrokeCallback([this](LLTextEditor* caller) { onSetNotesDirty(); }); - return TRUE; + return true; } void LLPanelProfileNotes::onOpen(const LLSD& key) @@ -2639,9 +2639,9 @@ LLPanelProfile::~LLPanelProfile() { } -BOOL LLPanelProfile::postBuild() +bool LLPanelProfile::postBuild() { - return TRUE; + return true; } void LLPanelProfile::onTabChange() diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 45655cd67b..554a217575 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -78,7 +78,7 @@ public: void onOpen(const LLSD& key) override; - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -95,7 +95,7 @@ public: void setAvatarId(const LLUUID& avatar_id) override; - BOOL postBuild() override; + bool postBuild() override; void resetData() override; @@ -240,7 +240,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void resetData() override; @@ -281,7 +281,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void processProperties(const LLAvatarData* avatar_data); @@ -336,7 +336,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void processProperties(LLAvatarNotes* avatar_notes); @@ -372,7 +372,7 @@ public: LLPanelProfile(); /*virtual*/ ~LLPanelProfile(); - BOOL postBuild() override; + bool postBuild() override; void updateData() override; void refreshName(); diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 3fbaad4dee..1eb12051ee 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -300,7 +300,7 @@ void LLPanelProfileClassifieds::createClassified() } } -BOOL LLPanelProfileClassifieds::postBuild() +bool LLPanelProfileClassifieds::postBuild() { mTabContainer = getChild<LLTabContainer>("tab_classifieds"); mNoItemsLabel = getChild<LLUICtrl>("classifieds_panel_text"); @@ -310,7 +310,7 @@ BOOL LLPanelProfileClassifieds::postBuild() mNewButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickNewBtn, this)); mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickDelete, this)); - return TRUE; + return true; } void LLPanelProfileClassifieds::onClickNewBtn() @@ -605,7 +605,7 @@ LLPanelProfileClassified* LLPanelProfileClassified::create() return panel; } -BOOL LLPanelProfileClassified::postBuild() +bool LLPanelProfileClassified::postBuild() { mScrollContainer = getChild<LLScrollContainer>("profile_scroll"); mInfoPanel = getChild<LLView>("info_panel"); @@ -673,7 +673,7 @@ BOOL LLPanelProfileClassified::postBuild() mContentTypeCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this)); mAutoRenewEdit->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this)); - return TRUE; + return true; } void LLPanelProfileClassified::onOpen(const LLSD& key) @@ -1238,14 +1238,14 @@ void LLPanelProfileClassified::onTeleportClick() } } -BOOL LLPanelProfileClassified::isDirty() const +bool LLPanelProfileClassified::isDirty() const { if(mIsNew) { - return TRUE; + return true; } - BOOL dirty = false; + bool dirty = false; dirty |= mSnapshotCtrl->isDirty(); dirty |= mClassifiedNameEdit->isDirty(); dirty |= mClassifiedDescEdit->isDirty(); @@ -1507,14 +1507,14 @@ LLPublishClassifiedFloater::~LLPublishClassifiedFloater() { } -BOOL LLPublishClassifiedFloater::postBuild() +bool LLPublishClassifiedFloater::postBuild() { LLFloater::postBuild(); childSetAction("publish_btn", boost::bind(&LLFloater::closeFloater, this, false)); childSetAction("cancel_btn", boost::bind(&LLFloater::closeFloater, this, false)); - return TRUE; + return true; } void LLPublishClassifiedFloater::setPrice(S32 price) diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h index 912819e86b..d05c7f6b79 100644 --- a/indra/newview/llpanelprofileclassifieds.h +++ b/indra/newview/llpanelprofileclassifieds.h @@ -54,7 +54,7 @@ public: LLPublishClassifiedFloater(const LLSD& key); virtual ~LLPublishClassifiedFloater(); - BOOL postBuild() override; + bool postBuild() override; void setPrice(S32 price); S32 getPrice(); @@ -74,7 +74,7 @@ public: LLPanelProfileClassifieds(); /*virtual*/ ~LLPanelProfileClassifieds(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -125,7 +125,7 @@ public: /*virtual*/ ~LLPanelProfileClassified(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -171,7 +171,7 @@ public: void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; } - BOOL isDirty() const override; + bool isDirty() const override; void resetDirty() override; diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index ff3f654d0e..e24438f272 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -228,7 +228,7 @@ void LLPanelProfilePicks::selectPick(const LLUUID& pick_id) } } -BOOL LLPanelProfilePicks::postBuild() +bool LLPanelProfilePicks::postBuild() { mTabContainer = getChild<LLTabContainer>("tab_picks"); mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text"); @@ -238,12 +238,12 @@ BOOL LLPanelProfilePicks::postBuild() mNewButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickNewBtn, this)); mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickDelete, this)); - return TRUE; + return true; } void LLPanelProfilePicks::onClickNewBtn() { - mNoItemsLabel->setVisible(FALSE); + mNoItemsLabel->setVisible(false); LLPanelProfilePick* pick_panel = LLPanelProfilePick::create(); pick_panel->setAvatarId(getAvatarId()); mTabContainer->addTabPanel( @@ -570,7 +570,7 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) } } -BOOL LLPanelProfilePick::postBuild() +bool LLPanelProfilePick::postBuild() { mPickName = getChild<LLLineEditor>("pick_name"); mPickDescription = getChild<LLTextEditor>("pick_desc"); @@ -591,14 +591,14 @@ BOOL LLPanelProfilePick::postBuild() mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this)); mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL); - mPickName->setEnabled(FALSE); + mPickName->setEnabled(false); mPickDescription->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1)); mPickDescription->setFocusReceivedCallback(boost::bind(&LLPanelProfilePick::onDescriptionFocusReceived, this)); - getChild<LLUICtrl>("pick_location")->setEnabled(FALSE); + getChild<LLUICtrl>("pick_location")->setEnabled(false); - return TRUE; + return true; } void LLPanelProfilePick::onDescriptionFocusReceived() @@ -736,7 +736,7 @@ void LLPanelProfilePick::resetDirty() mLocationChanged = false; } -BOOL LLPanelProfilePick::isDirty() const +bool LLPanelProfilePick::isDirty() const { if (mNewPick || LLPanel::isDirty() @@ -745,9 +745,9 @@ BOOL LLPanelProfilePick::isDirty() const || mPickName->isDirty() || mPickDescription->isDirty()) { - return TRUE; + return true; } - return FALSE; + return false; } void LLPanelProfilePick::onClickSetLocation() diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index f84463cc9b..bb38896476 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -50,7 +50,7 @@ public: LLPanelProfilePicks(); /*virtual*/ ~LLPanelProfilePicks(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -110,7 +110,7 @@ public: /*virtual*/ ~LLPanelProfilePick(); - BOOL postBuild() override; + bool postBuild() override; void setAvatarId(const LLUUID& avatar_id) override; @@ -126,7 +126,7 @@ public: /** * Returns true if any of Pick properties was changed by user. */ - BOOL isDirty() const override; + bool isDirty() const override; /** * Saves changes. diff --git a/indra/newview/llpanelpulldown.cpp b/indra/newview/llpanelpulldown.cpp index b8c57301a4..102ccb9bea 100644 --- a/indra/newview/llpanelpulldown.cpp +++ b/indra/newview/llpanelpulldown.cpp @@ -90,7 +90,7 @@ void LLPanelPulldown::onMouseLeave(S32 x, S32 y, MASK mask) } /*virtual*/ -void LLPanelPulldown::onVisibilityChange(BOOL new_visibility) +void LLPanelPulldown::onVisibilityChange(bool new_visibility) { if (new_visibility) { diff --git a/indra/newview/llpanelpulldown.h b/indra/newview/llpanelpulldown.h index f7819c22e3..834bd2595c 100644 --- a/indra/newview/llpanelpulldown.h +++ b/indra/newview/llpanelpulldown.h @@ -37,16 +37,16 @@ class LLPanelPulldown : public LLPanel { public: LLPanelPulldown(); - /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); - /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); - /*virtual*/ void onTopLost(); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); - - /*virtual*/ void draw(); + void onMouseEnter(S32 x, S32 y, MASK mask) override; + void onMouseLeave(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; + bool handleDoubleClick(S32 x, S32 y, MASK mask) override; + bool handleScrollWheel(S32 x, S32 y, S32 clicks) override; + void onTopLost() override; + void onVisibilityChange(bool new_visibility) override; + + void draw() override; protected: LLFrameTimer mHoverTimer; diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index c3524a8c87..5353fb0925 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -41,7 +41,7 @@ #include "llagentbenefits.h" -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 S32 power_of_two(S32 sz, S32 upper) { @@ -59,7 +59,7 @@ LLPanelSnapshot::LLPanelSnapshot() {} // virtual -BOOL LLPanelSnapshot::postBuild() +bool LLPanelSnapshot::postBuild() { getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost())); getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1)); @@ -78,7 +78,7 @@ BOOL LLPanelSnapshot::postBuild() updateControls(LLSD()); mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>(); - return TRUE; + return true; } // virtual @@ -104,7 +104,7 @@ LLSnapshotModel::ESnapshotFormat LLPanelSnapshot::getImageFormat() const return LLSnapshotModel::SNAPSHOT_FORMAT_JPEG; } -void LLPanelSnapshot::enableControls(BOOL enable) +void LLPanelSnapshot::enableControls(bool enable) { setCtrlsEnabled(enable); } diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h index 55273797cc..8ebd92600d 100644 --- a/indra/newview/llpanelsnapshot.h +++ b/indra/newview/llpanelsnapshot.h @@ -43,8 +43,8 @@ class LLPanelSnapshot: public LLPanel public: LLPanelSnapshot(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; virtual std::string getWidthSpinnerName() const = 0; virtual std::string getHeightSpinnerName() const = 0; @@ -60,7 +60,7 @@ public: virtual LLSnapshotModel::ESnapshotFormat getImageFormat() const; virtual LLSnapshotModel::ESnapshotType getSnapshotType(); virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings - void enableControls(BOOL enable); + void enableControls(bool enable); protected: LLSideTrayPanelContainer* getParentContainer(); diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 9e56a04b3b..7bbe8a363c 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -50,7 +50,7 @@ class LLPanelSnapshotInventoryBase public: LLPanelSnapshotInventoryBase(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); protected: void onSend(); /*virtual*/ LLSnapshotModel::ESnapshotType getSnapshotType(); @@ -63,7 +63,7 @@ class LLPanelSnapshotInventory public: LLPanelSnapshotInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void onResolutionCommit(LLUICtrl* ctrl); @@ -85,7 +85,7 @@ class LLPanelOutfitSnapshotInventory public: LLPanelOutfitSnapshotInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -107,7 +107,7 @@ LLPanelSnapshotInventoryBase::LLPanelSnapshotInventoryBase() { } -BOOL LLPanelSnapshotInventoryBase::postBuild() +bool LLPanelSnapshotInventoryBase::postBuild() { return LLPanelSnapshot::postBuild(); } @@ -124,10 +124,10 @@ LLPanelSnapshotInventory::LLPanelSnapshotInventory() } // virtual -BOOL LLPanelSnapshotInventory::postBuild() +bool LLPanelSnapshotInventory::postBuild() { - getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); + getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(false); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(false); getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); return LLPanelSnapshotInventoryBase::postBuild(); @@ -183,7 +183,7 @@ LLPanelOutfitSnapshotInventory::LLPanelOutfitSnapshotInventory() } // virtual -BOOL LLPanelOutfitSnapshotInventory::postBuild() +bool LLPanelOutfitSnapshotInventory::postBuild() { return LLPanelSnapshotInventoryBase::postBuild(); } diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index e7fced92a7..4d9368bd72 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -47,7 +47,7 @@ class LLPanelSnapshotLocal public: LLPanelSnapshotLocal(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -79,7 +79,7 @@ LLPanelSnapshotLocal::LLPanelSnapshotLocal() } // virtual -BOOL LLPanelSnapshotLocal::postBuild() +bool LLPanelSnapshotLocal::postBuild() { getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onQualitySliderCommit, this, _1)); getChild<LLUICtrl>("local_format_combo")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onFormatComboCommit, this, _1)); diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 8cc2fbc770..42f0731172 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -46,7 +46,7 @@ class LLPanelSnapshotOptions public: LLPanelSnapshotOptions(); ~LLPanelSnapshotOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -75,7 +75,7 @@ LLPanelSnapshotOptions::~LLPanelSnapshotOptions() } // virtual -BOOL LLPanelSnapshotOptions::postBuild() +bool LLPanelSnapshotOptions::postBuild() { mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>(); return LLPanel::postBuild(); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 05fa2b58b1..db8fc421cf 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -56,7 +56,7 @@ class LLPanelSnapshotPostcard public: LLPanelSnapshotPostcard(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -92,12 +92,12 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() } // virtual -BOOL LLPanelSnapshotPostcard::postBuild() +bool LLPanelSnapshotPostcard::postBuild() { // For the first time a user focuses to .the msg box, all text will be selected. getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); - getChild<LLUICtrl>("to_form")->setFocus(TRUE); + getChild<LLUICtrl>("to_form")->setFocus(true); getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp index 38dec78030..84742fad64 100644 --- a/indra/newview/llpanelsnapshotprofile.cpp +++ b/indra/newview/llpanelsnapshotprofile.cpp @@ -49,7 +49,7 @@ class LLPanelSnapshotProfile public: LLPanelSnapshotProfile(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -73,7 +73,7 @@ LLPanelSnapshotProfile::LLPanelSnapshotProfile() } // virtual -BOOL LLPanelSnapshotProfile::postBuild() +bool LLPanelSnapshotProfile::postBuild() { return LLPanelSnapshot::postBuild(); } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index b4704d153a..c7b4cc7cee 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -60,7 +60,7 @@ public: LLDate date, const std::string &hl); virtual ~LLTeleportHistoryFlatItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ S32 notify(const LLSD& info); @@ -148,7 +148,7 @@ LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem() } //virtual -BOOL LLTeleportHistoryFlatItem::postBuild() +bool LLTeleportHistoryFlatItem::postBuild() { mTitle = getChild<LLTextBox>("region"); @@ -400,14 +400,14 @@ LLTeleportHistoryPanel::~LLTeleportHistoryPanel() mTeleportHistoryChangedConnection.disconnect(); } -BOOL LLTeleportHistoryPanel::postBuild() +bool LLTeleportHistoryPanel::postBuild() { mCommitCallbackRegistrar.add("TeleportHistory.GearMenu.Action", boost::bind(&LLTeleportHistoryPanel::onGearMenuAction, this, _2)); mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2)); // init menus before list, since menus are passed to list mGearItemMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_item.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGearItemMenu->setAlwaysShowMenu(TRUE); // all items can be disabled if nothing is selected, show anyway + mGearItemMenu->setAlwaysShowMenu(true); // all items can be disabled if nothing is selected, show anyway mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mTeleportHistory = LLTeleportHistoryStorage::getInstance(); @@ -461,7 +461,7 @@ BOOL LLTeleportHistoryPanel::postBuild() } } - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 058fee0170..9343c1eb5e 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -46,7 +46,7 @@ public: LLTeleportHistoryPanel(); virtual ~LLTeleportHistoryPanel(); - BOOL postBuild() override; + bool postBuild() override; void draw() override; void onSearchEdit(const std::string& string) override; diff --git a/indra/newview/llpaneltiptoast.cpp b/indra/newview/llpaneltiptoast.cpp index 35009a552d..61808ab788 100644 --- a/indra/newview/llpaneltiptoast.cpp +++ b/indra/newview/llpaneltiptoast.cpp @@ -28,7 +28,7 @@ #include "llpaneltiptoast.h" -BOOL LLPanelTipToast::postBuild() +bool LLPanelTipToast::postBuild() { mMessageText= findChild<LLUICtrl>("message"); @@ -40,10 +40,10 @@ BOOL LLPanelTipToast::postBuild() else { llassert(!"Can't find child 'message' text box."); - return FALSE; + return false; } - return TRUE; + return true; } void LLPanelTipToast::onMessageTextClick() diff --git a/indra/newview/llpaneltiptoast.h b/indra/newview/llpaneltiptoast.h index cb09f1dca6..e6f871ffc1 100644 --- a/indra/newview/llpaneltiptoast.h +++ b/indra/newview/llpaneltiptoast.h @@ -40,7 +40,7 @@ class LLPanelTipToast : public LLToastPanel LOG_CLASS(LLPanelTipToast); public: LLPanelTipToast(const LLNotificationPtr& notification): LLToastPanel(notification) {} - virtual BOOL postBuild(); + bool postBuild() override; private: void onMessageTextClick(); void onPanelClick(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 264c70777c..6fbf07644d 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -139,7 +139,7 @@ bool LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLPanelTopInfoBar::postBuild() +bool LLPanelTopInfoBar::postBuild() { mInfoBtn = getChild<LLButton>("place_info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this)); @@ -172,7 +172,7 @@ BOOL LLPanelTopInfoBar::postBuild() setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChanged, this, _2)); - return TRUE; + return true; } void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged() diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h index 5688af58a0..c1c8bad218 100644 --- a/indra/newview/llpaneltopinfobar.h +++ b/indra/newview/llpaneltopinfobar.h @@ -46,8 +46,8 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>, public: typedef boost::signals2::signal<void ()> resize_signal_t; - /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); + bool postBuild() override; + void draw() override; /** * Updates location and parcel icons on login complete diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 9f8b3f2b19..62be2f3d45 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -62,7 +62,7 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() { } -BOOL LLPanelVoiceDeviceSettings::postBuild() +bool LLPanelVoiceDeviceSettings::postBuild() { LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); // set mic volume tuning slider based on last mic volume setting @@ -84,11 +84,11 @@ BOOL LLPanelVoiceDeviceSettings::postBuild() mCtrlInputDevices->setMouseDownCallback(boost::bind(&LLPanelVoiceDeviceSettings::onInputDevicesClicked, this)); - return TRUE; + return true; } // virtual -void LLPanelVoiceDeviceSettings::onVisibilityChange ( BOOL new_visibility ) +void LLPanelVoiceDeviceSettings::onVisibilityChange ( bool new_visibility ) { if (new_visibility) { diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index 355bc02b05..490d20b2ab 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -37,14 +37,14 @@ public: ~LLPanelVoiceDeviceSettings(); /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void apply(); void cancel(); void refresh(); void initialize(); void cleanup(); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); void setUseTuningMode(bool use) { mUseTuningMode = use; }; diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index a3f0e25ef0..996f4757e2 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -61,7 +61,7 @@ LLPanelVoiceEffect::~LLPanelVoiceEffect() } // virtual -BOOL LLPanelVoiceEffect::postBuild() +bool LLPanelVoiceEffect::postBuild() { mVoiceEffectCombo = getChild<LLComboBox>("voice_effect"); @@ -78,7 +78,7 @@ BOOL LLPanelVoiceEffect::postBuild() update(true); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h index bba525e1df..b22e446daa 100644 --- a/indra/newview/llpanelvoiceeffect.h +++ b/indra/newview/llpanelvoiceeffect.h @@ -43,14 +43,14 @@ public: LLPanelVoiceEffect(); virtual ~LLPanelVoiceEffect(); - virtual BOOL postBuild(); + bool postBuild() override; private: void onCommitVoiceEffect(); void update(bool list_updated); /// Called by voice effect provider when voice effect list is changed. - virtual void onVoiceEffectChanged(bool effect_list_updated); + void onVoiceEffectChanged(bool effect_list_updated) override; // Fixed entries in the Voice Morph list typedef enum e_voice_effect_combo_items diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 595609b4de..e881d059d5 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -90,7 +90,7 @@ const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f; const F32 DEFAULT_DENSITY = 1000.f; // "Features" Tab -BOOL LLPanelVolume::postBuild() +bool LLPanelVolume::postBuild() { // Flexible Objects Parameters { @@ -213,7 +213,7 @@ BOOL LLPanelVolume::postBuild() // Start with everyone disabled clearCtrls(); - return TRUE; + return true; } LLPanelVolume::LLPanelVolume() diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 01b7ebb75c..0b6168d819 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -52,7 +52,7 @@ public: virtual void draw(); virtual void clearCtrls(); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 6f11e76a72..4a3117da1b 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -55,7 +55,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() buildFromFile( "panel_volume_pulldown.xml"); } -BOOL LLPanelVolumePulldown::postBuild() +bool LLPanelVolumePulldown::postBuild() { return LLPanelPulldown::postBuild(); } @@ -63,7 +63,7 @@ BOOL LLPanelVolumePulldown::postBuild() void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data) { // close the global volume minicontrol, we're bringing up the big one - setVisible(FALSE); + setVisible(false); // bring up the prefs floater LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*> @@ -87,7 +87,7 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) LLControlVariable* control = findControl(control_name); if (control) - control->set(LLSD(FALSE)); + control->set(LLSD(false)); } void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h index e907bb0c78..88e50ce0ef 100644 --- a/indra/newview/llpanelvolumepulldown.h +++ b/indra/newview/llpanelvolumepulldown.h @@ -36,7 +36,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown { public: LLPanelVolumePulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; private: void setControlFalse(const LLSD& user_data); diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 5242c4fef9..e8afd1edbf 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -236,7 +236,7 @@ LLPanelWearing::~LLPanelWearing() } } -BOOL LLPanelWearing::postBuild() +bool LLPanelWearing::postBuild() { mAccordionCtrl = getChild<LLAccordionCtrl>("wearables_accordion"); mWearablesTab = getChild<LLAccordionCtrlTab>("tab_wearables"); @@ -255,7 +255,7 @@ BOOL LLPanelWearing::postBuild() menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; + return true; } //virtual diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h index 18e543eec6..a45568cf87 100644 --- a/indra/newview/llpanelwearing.h +++ b/indra/newview/llpanelwearing.h @@ -55,7 +55,7 @@ public: LLPanelWearing(); virtual ~LLPanelWearing(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 0ca068331b..f7a65f6f91 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -67,17 +67,17 @@ LLPreview::LLPreview(const LLSD& key) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action - setAutoFocus(FALSE); + setAutoFocus(false); gInventory.addObserver(this); refreshFromItem(); } -BOOL LLPreview::postBuild() +bool LLPreview::postBuild() { refreshFromItem(); - return TRUE; + return true; } LLPreview::~LLPreview() diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 8d1d731452..5d5057a845 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -68,7 +68,7 @@ public: LLPreview(const LLSD& key ); virtual ~LLPreview(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual void setObjectID(const LLUUID& object_id); void setItem( LLInventoryItem* item ); @@ -88,7 +88,6 @@ public: static void onBtnCopyToInv(void* userdata); - void addKeepDiscardButtons(); static void onKeepBtn(void* data); static void onDiscardBtn(void* data); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); @@ -98,8 +97,6 @@ public: virtual void loadAsset() { mAssetStatus = PREVIEW_ASSET_LOADED; } virtual EAssetStatus getAssetStatus() { return mAssetStatus;} - static LLPreview* getFirstPreviewForSource(const LLUUID& source_id); - // Why is this at the LLPreview level? JC void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id); @@ -115,8 +112,6 @@ public: protected: virtual void onCommit(); - void addDescriptionUI(); - static void onText(LLUICtrl*, void* userdata); static void onRadio(LLUICtrl*, void* userdata); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 7f01438425..4b3b3a0041 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -50,7 +50,7 @@ LLPreviewAnim::LLPreviewAnim(const LLSD& key) } // virtual -BOOL LLPreviewAnim::postBuild() +bool LLPreviewAnim::postBuild() { childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h index 9f4ad4fa69..ec1bdd8828 100644 --- a/indra/newview/llpreviewanim.h +++ b/indra/newview/llpreviewanim.h @@ -38,7 +38,7 @@ class LLPreviewAnim : public LLPreview public: LLPreviewAnim(const LLSD& key); - BOOL postBuild() override; + bool postBuild() override; void onClose(bool app_quitting) override; void draw() override; void refreshFromItem() override; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2e40455a46..867b3ab362 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -137,12 +137,12 @@ void LLPreviewGesture::draw() } // virtual -BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask) +bool LLPreviewGesture::handleKeyHere(KEY key, MASK mask) { if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) { saveIfNeeded(); - return TRUE; + return true; } return LLPreview::handleKeyHere(key, mask); @@ -150,13 +150,13 @@ BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask) // virtual -BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = TRUE; + bool handled = true; switch(cargo_type) { case DAD_ANIMATION: @@ -225,12 +225,12 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // virtual -BOOL LLPreviewGesture::canClose() +bool LLPreviewGesture::canClose() { if(!mDirty || mForceClose) { - return TRUE; + return true; } else { @@ -241,7 +241,7 @@ BOOL LLPreviewGesture::canClose() LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); } - return FALSE; + return false; } } @@ -336,7 +336,7 @@ LLPreviewGesture::~LLPreviewGesture() } -BOOL LLPreviewGesture::postBuild() +bool LLPreviewGesture::postBuild() { setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChanged, this, _2)); @@ -353,20 +353,20 @@ BOOL LLPreviewGesture::postBuild() edit = getChild<LLLineEditor>("trigger_editor"); edit->setKeystrokeCallback(onKeystrokeCommit, this); edit->setCommitCallback(onCommitSetDirty, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mTriggerEditor = edit; text = getChild<LLTextBox>("replace_text"); - text->setEnabled(FALSE); + text->setEnabled(false); mReplaceText = text; edit = getChild<LLLineEditor>("replace_editor"); - edit->setEnabled(FALSE); + edit->setEnabled(false); edit->setKeystrokeCallback(onKeystrokeCommit, this); edit->setCommitCallback(onCommitSetDirty, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mReplaceEditor = edit; combo = getChild<LLComboBox>( "modifier_combo"); @@ -384,22 +384,22 @@ BOOL LLPreviewGesture::postBuild() btn = getChild<LLButton>( "add_btn"); btn->setClickedCallback(onClickAdd, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mAddBtn = btn; btn = getChild<LLButton>( "up_btn"); btn->setClickedCallback(onClickUp, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mUpBtn = btn; btn = getChild<LLButton>( "down_btn"); btn->setClickedCallback(onClickDown, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mDownBtn = btn; btn = getChild<LLButton>( "delete_btn"); btn->setClickedCallback(onClickDelete, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mDeleteBtn = btn; list = getChild<LLScrollListCtrl>("step_list"); @@ -410,47 +410,47 @@ BOOL LLPreviewGesture::postBuild() mOptionsText = getChild<LLTextBox>("options_text"); combo = getChild<LLComboBox>( "animation_list"); - combo->setVisible(FALSE); + combo->setVisible(false); combo->setCommitCallback(onCommitAnimation, this); mAnimationCombo = combo; LLRadioGroup* group; group = getChild<LLRadioGroup>("animation_trigger_type"); - group->setVisible(FALSE); + group->setVisible(false); group->setCommitCallback(onCommitAnimationTrigger, this); mAnimationRadio = group; combo = getChild<LLComboBox>( "sound_list"); - combo->setVisible(FALSE); + combo->setVisible(false); combo->setCommitCallback(onCommitSound, this); mSoundCombo = combo; edit = getChild<LLLineEditor>("chat_editor"); - edit->setVisible(FALSE); + edit->setVisible(false); edit->setCommitCallback(onCommitChat, this); //edit->setKeystrokeCallback(onKeystrokeCommit, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mChatEditor = edit; check = getChild<LLCheckBoxCtrl>( "wait_anim_check"); - check->setVisible(FALSE); + check->setVisible(false); check->setCommitCallback(onCommitWait, this); mWaitAnimCheck = check; check = getChild<LLCheckBoxCtrl>( "wait_time_check"); - check->setVisible(FALSE); + check->setVisible(false); check->setCommitCallback(onCommitWait, this); mWaitTimeCheck = check; edit = getChild<LLLineEditor>("wait_time_editor"); - edit->setEnabled(FALSE); - edit->setVisible(FALSE); + edit->setEnabled(false); + edit->setVisible(false); edit->setPrevalidate(LLTextValidate::validateFloat); // edit->setKeystrokeCallback(onKeystrokeCommit, this); - edit->setCommitOnFocusLost(TRUE); + edit->setCommitOnFocusLost(true); edit->setCommitCallback(onCommitWaitTime, this); - edit->setIgnoreTab(TRUE); + edit->setIgnoreTab(true); mWaitTimeEditor = edit; // Buttons at the bottom diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index f5c47d71b8..a9a0ecc452 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -52,18 +52,18 @@ public: // LLView /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); // LLPanel - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // LLFloater - /*virtual*/ BOOL canClose(); + /*virtual*/ bool canClose(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onUpdateSucceeded(); /*virtual*/ void refresh(); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 1a613afbb8..9fda92114a 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -82,7 +82,7 @@ LLPreviewNotecard::~LLPreviewNotecard() delete mLiveFile; } -BOOL LLPreviewNotecard::postBuild() +bool LLPreviewNotecard::postBuild() { mEditor = getChild<LLViewerTextEditor>("Notecard Editor"); mEditor->setNotecardInfo(mItemUUID, mObjectID, getKey()); @@ -116,7 +116,7 @@ bool LLPreviewNotecard::saveItem() return saveIfNeeded(item); } -void LLPreviewNotecard::setEnabled( BOOL enabled ) +void LLPreviewNotecard::setEnabled(bool enabled) { LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); @@ -139,25 +139,25 @@ void LLPreviewNotecard::draw() } // virtual -BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) +bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) { if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) { saveIfNeeded(); - return TRUE; + return true; } return LLPreview::handleKeyHere(key, mask); } // virtual -BOOL LLPreviewNotecard::canClose() +bool LLPreviewNotecard::canClose() { LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); if(mForceClose || editor->isPristine()) { - return TRUE; + return true; } else { @@ -167,7 +167,7 @@ BOOL LLPreviewNotecard::canClose() // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); } - return FALSE; + return false; } } diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 321f44a1ea..4d9e6fcd2c 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -53,14 +53,14 @@ public: // llview void draw() override; - BOOL handleKeyHere(KEY key, MASK mask) override; - void setEnabled( BOOL enabled ) override; + bool handleKeyHere(KEY key, MASK mask) override; + void setEnabled(bool enabled) override; // llfloater - BOOL canClose() override; + bool canClose() override; // llpanel - BOOL postBuild() override; + bool postBuild() override; // reach into the text editor, and grab the drag item const LLInventoryItem* getDragItem(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b0b9e00d1b..11892933d8 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -153,7 +153,7 @@ public: LLFloaterScriptSearch(LLScriptEdCore* editor_core); ~LLFloaterScriptSearch(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static void show(LLScriptEdCore* editor_core); static void onBtnSearch(void* userdata); void handleBtnSearch(); @@ -168,7 +168,7 @@ public: static LLFloaterScriptSearch* getInstance() { return sInstance; } virtual bool hasAccelerators() const; - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); private: @@ -207,19 +207,19 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) } } -BOOL LLFloaterScriptSearch::postBuild() +bool LLFloaterScriptSearch::postBuild() { mReplaceBox = getChild<LLLineEditor>("replace_text"); mSearchBox = getChild<LLLineEditor>("search_text"); mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this)); - mSearchBox->setCommitOnFocusLost(FALSE); + mSearchBox->setCommitOnFocusLost(false); childSetAction("search_btn", onBtnSearch,this); childSetAction("replace_btn", onBtnReplace,this); childSetAction("replace_all_btn", onBtnReplaceAll,this); setDefaultBtn("search_btn"); - return TRUE; + return true; } //static @@ -296,21 +296,21 @@ bool LLFloaterScriptSearch::hasAccelerators() const { return mEditorCore->hasAccelerators(); } - return FALSE; + return false; } -BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask) +bool LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask) { if (mEditorCore) { - BOOL handled = mEditorCore->handleKeyHere(key, mask); + bool handled = mEditorCore->handleKeyHere(key, mask); if (!handled) { LLFloater::handleKeyHere(key, mask); } } - return FALSE; + return false; } void LLFloaterScriptSearch::onSearchBoxCommit() @@ -438,7 +438,7 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata ) self->updateExperiencePanel(); } -BOOL LLScriptEdCore::postBuild() +bool LLScriptEdCore::postBuild() { mErrorList = getChild<LLScrollListCtrl>("lsl errors"); @@ -460,7 +460,7 @@ BOOL LLScriptEdCore::postBuild() LLSyntaxIdLSL::getInstance()->initialize(); processKeywords(); - return TRUE; + return true; } void LLScriptEdCore::processKeywords() @@ -1173,7 +1173,7 @@ void LLScriptEdCore::deleteBridges() } // virtual -BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) +bool LLScriptEdCore::handleKeyHere(KEY key, MASK mask) { bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS); @@ -1185,7 +1185,7 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) mSaveCallback(mUserdata, FALSE); } - return TRUE; + return true; } if(('F' == key) && just_control) @@ -1195,10 +1195,10 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) mSearchReplaceCallback(mUserdata); } - return TRUE; + return true; } - return FALSE; + return false; } void LLScriptEdCore::onBtnLoadFromFile( void* data ) @@ -1520,7 +1520,7 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) } // virtual -BOOL LLPreviewLSL::postBuild() +bool LLPreviewLSL::postBuild() { const LLInventoryItem* item = getItem(); @@ -1630,7 +1630,7 @@ void LLPreviewLSL::loadAsset() } -BOOL LLPreviewLSL::canClose() +bool LLPreviewLSL::canClose() { return mScriptEd->canClose(); } @@ -1861,20 +1861,20 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this); } -BOOL LLLiveLSLEditor::postBuild() +bool LLLiveLSLEditor::postBuild() { childSetCommitCallback("running", LLLiveLSLEditor::onRunningCheckboxClicked, this); - getChildView("running")->setEnabled(FALSE); + getChildView("running")->setEnabled(false); childSetAction("Reset",&LLLiveLSLEditor::onReset,this); - getChildView("Reset")->setEnabled(TRUE); + getChildView("Reset")->setEnabled(true); mMonoCheckbox = getChild<LLCheckBoxCtrl>("mono"); childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this); - getChildView("mono")->setEnabled(FALSE); + getChildView("mono")->setEnabled(true); mScriptEd->mEditor->makePristine(); - mScriptEd->mEditor->setFocus(TRUE); + mScriptEd->mEditor->setFocus(true); mExperiences = getChild<LLComboBox>("Experiences..."); @@ -2317,7 +2317,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) } } -BOOL LLLiveLSLEditor::canClose() +bool LLLiveLSLEditor::canClose() { return (mScriptEd->canClose()); } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index b01c7fd4ad..11a02400cd 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -95,13 +95,11 @@ protected: public: ~LLScriptEdCore(); - void initializeKeywords(); void initMenu(); void processKeywords(); - void processLoaded(); virtual void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); BOOL canClose(); void setEnableEditing(bool enable); bool canLoadOrSaveToFile( void* userdata ); @@ -153,7 +151,7 @@ private: void selectFirstError(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void enableSave(BOOL b) {mEnableSave = b;} @@ -223,11 +221,11 @@ public: virtual void callbackLSLCompileSucceeded(); virtual void callbackLSLCompileFailed(const LLSD& compile_errors); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); protected: virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void closeIfNeeded(); virtual void loadAsset(); @@ -269,7 +267,7 @@ public: bool is_script_running); virtual void callbackLSLCompileFailed(const LLSD& compile_errors); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void setIsNew() { mIsNew = TRUE; } @@ -282,15 +280,13 @@ public: void updateExperiencePanel(); void requestExperiences(); void experienceChanged(); - void addAssociatedExperience(const LLSD& experience); private: - virtual BOOL canClose(); + virtual bool canClose(); void closeIfNeeded(); virtual void draw(); virtual void loadAsset(); - void loadAsset(BOOL is_new); /*virtual*/ void saveIfNeeded(bool sync = true); BOOL monoChecked() const; @@ -307,8 +303,6 @@ private: void loadScriptText(const LLUUID &uuid, LLAssetType::EType type); - static void onErrorList(LLUICtrl*, void* user_data); - static void* createScriptEdPanel(void* userdata); static void onMonoCheckboxClicked(LLUICtrl*, void* userdata); diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp index 105c5e8cbe..2fbbfdc40d 100644 --- a/indra/newview/llpreviewsound.cpp +++ b/indra/newview/llpreviewsound.cpp @@ -48,7 +48,7 @@ LLPreviewSound::LLPreviewSound(const LLSD& key) } // virtual -BOOL LLPreviewSound::postBuild() +bool LLPreviewSound::postBuild() { const LLInventoryItem* item = getItem(); if (item) diff --git a/indra/newview/llpreviewsound.h b/indra/newview/llpreviewsound.h index 0453bfd936..4c0aebd5e3 100644 --- a/indra/newview/llpreviewsound.h +++ b/indra/newview/llpreviewsound.h @@ -38,7 +38,7 @@ public: static void auditionSound( void* userdata ); protected: - /* virtual */ BOOL postBuild(); + bool postBuild() override; }; #endif // LL_LLPREVIEWSOUND_H diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 975e2bb910..4bea98aa95 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -126,7 +126,7 @@ void LLPreviewTexture::populateRatioList() } // virtual -BOOL LLPreviewTexture::postBuild() +bool LLPreviewTexture::postBuild() { if (mCopyToInv) { @@ -283,7 +283,7 @@ void LLPreviewTexture::draw() // virtual -BOOL LLPreviewTexture::canSaveAs() const +bool LLPreviewTexture::canSaveAs() const { return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); } @@ -357,7 +357,7 @@ void LLPreviewTexture::saveMultipleToFile(const std::string& file_name) } // virtual -void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPreviewTexture::reshape(S32 width, S32 height, bool called_from_parent) { LLPreview::reshape(width, height, called_from_parent); diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 16db51332e..f493956677 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -43,13 +43,13 @@ public: virtual void draw(); - virtual BOOL canSaveAs() const; + virtual bool canSaveAs() const; virtual void saveAs(); virtual void loadAsset(); virtual EAssetStatus getAssetStatus(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); virtual void onFocusReceived(); static void onFileLoadedForSave( @@ -73,7 +73,7 @@ public: protected: void init(); void populateRatioList(); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); bool setAspectRatio(const F32 width, const F32 height); static void onAspectRatioCommit(LLUICtrl*,void* userdata); void adjustAspectRatio(); diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 6799e20de0..40925cd7da 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -77,7 +77,7 @@ LLProgressView::LLProgressView() mFadeFromLoginTimer.stop(); } -BOOL LLProgressView::postBuild() +bool LLProgressView::postBuild() { mProgressBar = getChild<LLProgressBar>("login_progress_bar"); @@ -96,12 +96,12 @@ BOOL LLProgressView::postBuild() getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this); // hidden initially, until we need it - setVisible(FALSE); + setVisible(false); LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLProgressView::onAlertModal, this, _1)); sInstance = this; - return TRUE; + return true; } @@ -125,14 +125,14 @@ bool LLProgressView::handleHover(S32 x, S32 y, MASK mask) } -BOOL LLProgressView::handleKeyHere(KEY key, MASK mask) +bool LLProgressView::handleKeyHere(KEY key, MASK mask) { // Suck up all keystokes except CTRL-Q. if( ('Q' == key) && (MASK_CONTROL == mask) ) { LLAppViewer::instance()->userQuit(); } - return TRUE; + return true; } void LLProgressView::revealIntroPanel() @@ -173,7 +173,7 @@ void LLProgressView::setStartupComplete() } } -void LLProgressView::setVisible(BOOL visible) +void LLProgressView::setVisible(bool visible) { if (!visible && mFadeFromLoginTimer.getStarted()) { @@ -182,14 +182,14 @@ void LLProgressView::setVisible(BOOL visible) // hiding progress view if (getVisible() && !visible) { - LLPanel::setVisible(FALSE); + LLPanel::setVisible(false); } // showing progress view else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted())) { setFocus(TRUE); mFadeToWorldTimer.stop(); - LLPanel::setVisible(TRUE); + LLPanel::setVisible(true); } } diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index ace13b0401..fcd340c5e9 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -48,15 +48,15 @@ public: LLProgressView(); virtual ~LLProgressView(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); void drawStartTexture(F32 alpha); void drawLogos(F32 alpha); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ void setVisible(bool visible); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2655075ad1..ca03aa0bd2 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -717,7 +717,7 @@ void LLSceneMonitorView::onTeleportFinished() } } -void LLSceneMonitorView::onVisibilityChange(BOOL visible) +void LLSceneMonitorView::onVisibilityChange(bool visible) { LLSceneMonitor::getInstance()->setDebugViewerVisible(visible); } diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index f2e1ef69b9..b9dc46e494 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -114,7 +114,7 @@ public: ~LLSceneMonitorView(); virtual void draw(); - virtual void onVisibilityChange(BOOL visible); + virtual void onVisibilityChange(bool visible); protected: virtual void onClose(bool app_quitting=false); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 17f2970f99..7e07483e6f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -99,7 +99,7 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p) setVisible(FALSE); } -BOOL LLScreenChannelBase::postBuild() +bool LLScreenChannelBase::postBuild() { if (mFloaterSnapRegion == NULL) { @@ -111,10 +111,10 @@ BOOL LLScreenChannelBase::postBuild() mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); } - return TRUE; + return true; } -void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLScreenChannelBase::reshape(S32 width, S32 height, bool called_from_parent) { if (mChannelAlignment == CA_CENTRE) { diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index e5f4807ab7..ae9591ca8f 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -70,9 +70,9 @@ public: LLScreenChannelBase(const Params&); - BOOL postBuild(); + bool postBuild(); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, bool called_from_parent = true); // Channel's outfit-functions // update channel's size and position in the World View diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 6a27ff3047..9d7e8623e5 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -205,7 +205,7 @@ void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */) hideToastsIfNeeded(); } -void LLScriptFloater::setVisible(BOOL visible) +void LLScriptFloater::setVisible(bool visible) { LLDockableFloater::setVisible(visible); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 3695b8a3e1..6279211fc6 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -185,7 +185,7 @@ public: /** * Hide all notification toasts when we show dockable floater */ - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); bool getSavePosition() { return mSaveFloaterPosition; } diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index bfa453a0ae..bec7349991 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -99,7 +99,7 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param LLScrollingPanelParam::~LLScrollingPanelParam() { } -void LLScrollingPanelParam::updatePanel(BOOL allow_modify) +void LLScrollingPanelParam::updatePanel(bool allow_modify) { if (!mWearable) { @@ -114,7 +114,7 @@ void LLScrollingPanelParam::updatePanel(BOOL allow_modify) getChildView("more")->setEnabled(mAllowModify); } -void LLScrollingPanelParam::setVisible( BOOL visible ) +void LLScrollingPanelParam::setVisible( bool visible ) { if( getVisible() != visible ) { diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index c7a47d5c7a..59780e16fe 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -44,9 +44,9 @@ public: LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE ); virtual ~LLScrollingPanelParam(); - virtual void draw(); - virtual void setVisible( BOOL visible ); - virtual void updatePanel(BOOL allow_modify); + void draw() override; + void setVisible(bool visible) override; + void updatePanel(bool allow_modify) override; static void onSliderMouseDown(LLUICtrl* ctrl, void* userdata); static void onSliderMouseUp(LLUICtrl* ctrl, void* userdata); diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp index fe7a362723..56e6672504 100644 --- a/indra/newview/llscrollingpanelparambase.cpp +++ b/indra/newview/llscrollingpanelparambase.cpp @@ -66,7 +66,7 @@ LLScrollingPanelParamBase::~LLScrollingPanelParamBase() { } -void LLScrollingPanelParamBase::updatePanel(BOOL allow_modify) +void LLScrollingPanelParamBase::updatePanel(bool allow_modify) { LLViewerVisualParam* param = mParam; diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h index 9538826251..5a441985d3 100644 --- a/indra/newview/llscrollingpanelparambase.h +++ b/indra/newview/llscrollingpanelparambase.h @@ -45,7 +45,7 @@ public: LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = FALSE ); virtual ~LLScrollingPanelParamBase(); - virtual void updatePanel(BOOL allow_modify); + void updatePanel(bool allow_modify) override; static void onSliderMoved(LLUICtrl* ctrl, void* userdata); diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index 2824c70582..16542b993f 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -186,7 +186,7 @@ void LLSearchComboBox::clearHistory() setTextEntry(LLStringUtil::null); } -BOOL LLSearchComboBox::handleKeyHere(KEY key,MASK mask ) +bool LLSearchComboBox::handleKeyHere(KEY key,MASK mask ) { if(mTextEntry->hasFocus() && MASK_NONE == mask && KEY_DOWN == key) { diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h index 68f3979532..d7920b5352 100644 --- a/indra/newview/llsearchcombobox.h +++ b/indra/newview/llsearchcombobox.h @@ -57,7 +57,7 @@ public: */ void clearHistory(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); ~LLSearchComboBox(); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7ef05b42e0..873a724329 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -7394,7 +7394,7 @@ LLBBox LLSelectMgr::getBBoxOfSelection() const //----------------------------------------------------------------------------- // canUndo() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canUndo() const +bool LLSelectMgr::canUndo() const { // Can edit or can move return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstUndoEnabledObject() != NULL; // HACK: casting away constness - MG; @@ -7413,7 +7413,7 @@ void LLSelectMgr::undo() //----------------------------------------------------------------------------- // canRedo() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canRedo() const +bool LLSelectMgr::canRedo() const { return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstEditableObject() != NULL; // HACK: casting away constness - MG } @@ -7431,7 +7431,7 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- // canDoDelete() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDoDelete() const +bool LLSelectMgr::canDoDelete() const { bool can_delete = false; // This function is "logically const" - it does not change state in @@ -7462,7 +7462,7 @@ void LLSelectMgr::doDelete() //----------------------------------------------------------------------------- // canDeselect() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDeselect() const +bool LLSelectMgr::canDeselect() const { return !mSelectedObjects->isEmpty(); } @@ -7477,7 +7477,7 @@ void LLSelectMgr::deselect() //----------------------------------------------------------------------------- // canDuplicate() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDuplicate() const +bool LLSelectMgr::canDuplicate() const { return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index f89209b437..693eabd5f5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -463,20 +463,20 @@ public: static void cleanupGlobals(); // LLEditMenuHandler interface - virtual BOOL canUndo() const; + virtual bool canUndo() const; virtual void undo(); - virtual BOOL canRedo() const; + virtual bool canRedo() const; virtual void redo(); - virtual BOOL canDoDelete() const; + virtual bool canDoDelete() const; virtual void doDelete(); virtual void deselect(); - virtual BOOL canDeselect() const; + virtual bool canDeselect() const; virtual void duplicate(); - virtual BOOL canDuplicate() const; + virtual bool canDuplicate() const; void clearSelections(); void update(); diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 293073c9a1..61bf39fa61 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -88,19 +88,19 @@ LLSetKeyBindDialog::~LLSetKeyBindDialog() } //virtual -BOOL LLSetKeyBindDialog::postBuild() +bool LLSetKeyBindDialog::postBuild() { childSetAction("SetEmpty", onBlank, this); childSetAction("Default", onDefault, this); childSetAction("Cancel", onCancel, this); - getChild<LLUICtrl>("Cancel")->setFocus(TRUE); + getChild<LLUICtrl>("Cancel")->setFocus(true); pCheckBox = getChild<LLCheckBoxCtrl>("apply_all"); pDescription = getChild<LLTextBase>("description"); - gFocusMgr.setKeystrokesOnly(TRUE); + gFocusMgr.setKeystrokesOnly(true); - return TRUE; + return true; } //virtual diff --git a/indra/newview/llsetkeybinddialog.h b/indra/newview/llsetkeybinddialog.h index 026f4b0c0a..1e2c585d64 100644 --- a/indra/newview/llsetkeybinddialog.h +++ b/indra/newview/llsetkeybinddialog.h @@ -59,7 +59,7 @@ public: LLSetKeyBindDialog(const LLSD& key); ~LLSetKeyBindDialog(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& data); /*virtual*/ void onClose(bool app_quiting); /*virtual*/ void draw(); diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index 42b5c0b0e5..ebe3bc4007 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -88,10 +88,10 @@ LLFloaterSettingsPicker::~LLFloaterSettingsPicker() } //------------------------------------------------------------------------- -BOOL LLFloaterSettingsPicker::postBuild() +bool LLFloaterSettingsPicker::postBuild() { if (!LLFloater::postBuild()) - return FALSE; + return false; std::string prefix = getString(STR_TITLE_PREFIX); std::string label = getString(STR_TITLE_SETTINGS); @@ -137,7 +137,7 @@ BOOL LLFloaterSettingsPicker::postBuild() // update permission filter once UI is fully initialized mSavedFolderState.setApply(FALSE); - return TRUE; + return true; } void LLFloaterSettingsPicker::onClose(bool app_quitting) @@ -400,7 +400,7 @@ bool LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask) return result; } -BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) +bool LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) { if ((key == KEY_RETURN) && (mask == MASK_NONE)) { @@ -416,7 +416,7 @@ BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) (*mCommitSignal)(this, res); } closeFloater(); - return TRUE; + return true; } } diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h index f70da700e2..291af6a304 100644 --- a/indra/newview/llsettingspicker.h +++ b/indra/newview/llsettingspicker.h @@ -60,7 +60,7 @@ public: void setActive(bool active); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onClose(bool app_quitting) override; virtual void draw() override; @@ -108,7 +108,7 @@ private: void onButtonCancel(); void onButtonSelect(); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void onFocusLost() override; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index aed9dba7ef..a1c12edf53 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -92,7 +92,7 @@ LLSidepanelAppearance::~LLSidepanelAppearance() } // virtual -BOOL LLSidepanelAppearance::postBuild() +bool LLSidepanelAppearance::postBuild() { mOpenOutfitBtn = getChild<LLButton>("openoutfit_btn"); mOpenOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onOpenOutfitButtonClicked, this)); @@ -142,7 +142,7 @@ BOOL LLSidepanelAppearance::postBuild() setWearablesLoading(gAgentWearables.isCOFChangeInProgress()); - return TRUE; + return true; } // virtual @@ -335,7 +335,7 @@ void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* toggleWearableEditPanel(TRUE, wearable, disable_camera_switch); } -void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name) +void LLSidepanelAppearance::toggleMyOutfitsPanel(bool visible, const std::string& tab_name) { if (!mPanelOutfitsInventory || (mPanelOutfitsInventory->getVisible() == visible && tab_name.empty())) @@ -361,7 +361,7 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string } } -void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch) +void LLSidepanelAppearance::toggleOutfitEditPanel(bool visible, bool disable_camera_switch) { if (!mOutfitEdit || mOutfitEdit->getVisible() == visible) { @@ -386,7 +386,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam } } -void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearable *wearable, BOOL disable_camera_switch) +void LLSidepanelAppearance::toggleWearableEditPanel(bool visible, LLViewerWearable *wearable, bool disable_camera_switch) { if (!mEditWearable) { diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index bb9709a2b8..83c36933ea 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -46,7 +46,7 @@ public: LLSidepanelAppearance(); virtual ~LLSidepanelAppearance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void refreshCurrentOutfitName(const std::string& name = ""); @@ -73,9 +73,9 @@ private: void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); - void toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name); - void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE); - void toggleWearableEditPanel(BOOL visible, LLViewerWearable* wearable = NULL, BOOL disable_camera_switch = FALSE); + void toggleMyOutfitsPanel(bool visible, const std::string& tab_name); + void toggleOutfitEditPanel(bool visible, bool disable_camera_switch = false); + void toggleWearableEditPanel(bool visible, LLViewerWearable* wearable = nullptr, bool disable_camera_switch = false); LLFilterEditor* mFilterEditor; LLPanelOutfitsInventory* mPanelOutfitsInventory; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index e970f70e92..6485a42af5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -153,7 +153,7 @@ void handleInventoryDisplayInboxChanged() } } -BOOL LLSidepanelInventory::postBuild() +bool LLSidepanelInventory::postBuild() { // UI elements from inventory panel { @@ -223,7 +223,7 @@ BOOL LLSidepanelInventory::postBuild() initInventoryViews(); } - return TRUE; + return true; } void LLSidepanelInventory::updateInbox() diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 08989bb6af..a982965ec5 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -53,7 +53,7 @@ public: void observeInboxCreation(); void observeInboxModifications(const LLUUID& inboxID); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 3b73b6b7dd..a54ee36dda 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -60,7 +60,7 @@ LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel() } // virtual -BOOL LLSidepanelInventorySubpanel::postBuild() +bool LLSidepanelInventorySubpanel::postBuild() { mCancelBtn = findChild<LLButton>("cancel_btn"); @@ -68,10 +68,10 @@ BOOL LLSidepanelInventorySubpanel::postBuild() { mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this)); } - return TRUE; + return true; } -void LLSidepanelInventorySubpanel::setVisible(BOOL visible) +void LLSidepanelInventorySubpanel::setVisible(bool visible) { if (visible) { diff --git a/indra/newview/llsidepanelinventorysubpanel.h b/indra/newview/llsidepanelinventorysubpanel.h index 0d18943cbf..f6c18c727e 100644 --- a/indra/newview/llsidepanelinventorysubpanel.h +++ b/indra/newview/llsidepanelinventorysubpanel.h @@ -43,8 +43,8 @@ public: LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams()); virtual ~LLSidepanelInventorySubpanel(); - /*virtual*/ void setVisible(BOOL visible); - virtual BOOL postBuild(); + /*virtual*/ void setVisible(bool visible); + virtual bool postBuild(); virtual void draw(); virtual void reset(); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 7feacd530d..dc441f1c05 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -152,7 +152,7 @@ LLSidepanelItemInfo::~LLSidepanelItemInfo() } // virtual -BOOL LLSidepanelItemInfo::postBuild() +bool LLSidepanelItemInfo::postBuild() { mChangeThumbnailBtn = getChild<LLUICtrl>("change_thumbnail_btn"); mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon"); @@ -182,7 +182,7 @@ BOOL LLSidepanelItemInfo::postBuild() // "Price" label for edit getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1)); refresh(); - return TRUE; + return true; } void LLSidepanelItemInfo::setObjectID(const LLUUID& object_id) diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index b916f44520..f82a75b09a 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -53,7 +53,7 @@ public: LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams()); virtual ~LLSidepanelItemInfo(); - /*virtual*/ BOOL postBuild() override; + /*virtual*/ bool postBuild() override; /*virtual*/ void reset(); void setObjectID(const LLUUID& object_id); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index fe61b7a02a..a96ac3578b 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -97,7 +97,7 @@ LLSidepanelTaskInfo::~LLSidepanelTaskInfo() } // virtual -BOOL LLSidepanelTaskInfo::postBuild() +bool LLSidepanelTaskInfo::postBuild() { mOpenBtn = getChild<LLButton>("open_btn"); mOpenBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onOpenButtonClicked, this)); @@ -160,10 +160,10 @@ BOOL LLSidepanelTaskInfo::postBuild() mDAN = getChild<LLUICtrl>("N:"); mDAF = getChild<LLUICtrl>("F:"); - return TRUE; + return true; } -/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange ( BOOL visible ) +/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange(bool visible) { if (visible) { diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 2baafc67e7..8509edd8f1 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -49,8 +49,8 @@ public: LLSidepanelTaskInfo(); virtual ~LLSidepanelTaskInfo(); - BOOL postBuild() override; - void onVisibilityChange ( BOOL new_visibility ) override; + bool postBuild() override; + void onVisibilityChange (bool new_visibility) override; void setObjectSelection(LLObjectSelectionHandle selection); diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp index e340333c2c..f475766d3c 100644 --- a/indra/newview/llsidetraypanelcontainer.cpp +++ b/indra/newview/llsidetraypanelcontainer.cpp @@ -81,7 +81,7 @@ void LLSideTrayPanelContainer::openPreviousPanel() } } -BOOL LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask) +bool LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask) { // No key press handling code for Panel Container - this disables // Tab Container's Alt + Left/Right Button tab switching. diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h index 93a85ed374..e32e651b65 100644 --- a/indra/newview/llsidetraypanelcontainer.h +++ b/indra/newview/llsidetraypanelcontainer.h @@ -70,7 +70,7 @@ public: * Overrides LLTabContainer::handleKeyHere to disable panel switch on * Alt + Left/Right button press. */ - BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask); /** * Name of parameter that stores panel name to open. diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 863cd13678..828572526b 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -56,16 +56,16 @@ #include "llworld.h" #include <boost/filesystem.hpp> -const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; +constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; -F32 SHINE_TIME = 0.5f; -F32 SHINE_WIDTH = 0.6f; -F32 SHINE_OPACITY = 0.3f; -F32 FALL_TIME = 0.6f; -S32 BORDER_WIDTH = 6; -S32 TOP_PANEL_HEIGHT = 30; +constexpr F32 SHINE_TIME = 0.5f; +constexpr F32 SHINE_WIDTH = 0.6f; +constexpr F32 SHINE_OPACITY = 0.3f; +constexpr F32 FALL_TIME = 0.6f; +constexpr S32 BORDER_WIDTH = 6; +constexpr S32 TOP_PANEL_HEIGHT = 30; -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList; LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL; @@ -428,7 +428,7 @@ void LLSnapshotLivePreview::draw() } /*virtual*/ -void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLSnapshotLivePreview::reshape(S32 width, S32 height, bool called_from_parent) { LLRect old_rect = getRect(); LLView::reshape(width, height, called_from_parent); diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 6e38a957b4..b667b6ebc4 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -59,7 +59,7 @@ public: void setContainer(LLView* container) { mViewContainer = container; } /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent); void setSize(S32 w, S32 h); void setWidth(S32 w) { mWidth[mCurImageIndex] = w; } diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index 1fc4308d10..d6fe6d43a1 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -67,7 +67,7 @@ void LLSplitButton::onFocusLost() LLUICtrl::onFocusLost(); } -void LLSplitButton::setFocus(BOOL b) +void LLSplitButton::setFocus(bool b) { LLUICtrl::setFocus(b); @@ -75,12 +75,12 @@ void LLSplitButton::setFocus(BOOL b) { if (mItemsPanel && mItemsPanel->getVisible()) { - mItemsPanel->setFocus(TRUE); + mItemsPanel->setFocus(true); } } } -void LLSplitButton::setEnabled(BOOL enabled) +void LLSplitButton::setEnabled(bool enabled) { LLView::setEnabled(enabled); mArrowBtn->setEnabled(enabled); diff --git a/indra/newview/llsplitbutton.h b/indra/newview/llsplitbutton.h index 15d7ddaf52..a4a6a179c1 100644 --- a/indra/newview/llsplitbutton.h +++ b/indra/newview/llsplitbutton.h @@ -71,8 +71,8 @@ public: //Overridden virtual void onFocusLost(); - virtual void setFocus(BOOL b); - virtual void setEnabled(BOOL enabled); + virtual void setFocus(bool b); + virtual void setEnabled(bool enabled); //Callbacks void onArrowBtnDown(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 050a5228ca..b899db8557 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -159,7 +159,7 @@ bool LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLStatusBar::postBuild() +bool LLStatusBar::postBuild() { gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); @@ -235,22 +235,22 @@ BOOL LLStatusBar::postBuild() mPanelPresetsCameraPulldown = new LLPanelPresetsCameraPulldown(); addChild(mPanelPresetsCameraPulldown); mPanelPresetsCameraPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelPresetsCameraPulldown->setVisible(FALSE); + mPanelPresetsCameraPulldown->setVisible(false); mPanelPresetsPulldown = new LLPanelPresetsPulldown(); addChild(mPanelPresetsPulldown); mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelPresetsPulldown->setVisible(FALSE); + mPanelPresetsPulldown->setVisible(false); mPanelVolumePulldown = new LLPanelVolumePulldown(); addChild(mPanelVolumePulldown); mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelVolumePulldown->setVisible(FALSE); + mPanelVolumePulldown->setVisible(false); mPanelNearByMedia = new LLPanelNearByMedia(); addChild(mPanelNearByMedia); mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelNearByMedia->setVisible(FALSE); + mPanelNearByMedia->setVisible(false); updateBalancePanelPosition(); @@ -258,7 +258,7 @@ BOOL LLStatusBar::postBuild() mFilterEdit = getChild<LLSearchEditor>( "search_menu_edit" ); mSearchPanel = getChild<LLPanel>( "menu_search_panel" ); - BOOL search_panel_visible = gSavedSettings.getBOOL("MenuSearch"); + bool search_panel_visible = gSavedSettings.getBOOL("MenuSearch"); mSearchPanel->setVisible(search_panel_visible); mFilterEdit->setKeystrokeCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this)); mFilterEdit->setCommitCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this)); @@ -270,7 +270,7 @@ BOOL LLStatusBar::postBuild() updateMenuSearchPosition(); } - return TRUE; + return true; } // Per-frame updates of visibility diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 2e8ac76c16..1beba357ef 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -65,7 +65,7 @@ public: /*virtual*/ void draw(); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // MANIPULATORS void setBalance(S32 balance); @@ -104,7 +104,6 @@ private: void onMouseEnterPresets(); void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); - void onClickScreen(S32 x, S32 y); static void onClickMediaToggle(void* data); static void onClickBalance(void* data); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 0bfc034330..6e8a8e4849 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -50,7 +50,7 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N } //--------------------------------------------------------------------------------- -BOOL LLSysWellWindow::postBuild() +bool LLSysWellWindow::postBuild() { mMessageList = getChild<LLFlatListView>("notification_list"); @@ -61,7 +61,7 @@ BOOL LLSysWellWindow::postBuild() } //--------------------------------------------------------------------------------- -void LLSysWellWindow::setMinimized(BOOL minimize) +void LLSysWellWindow::setMinimized(bool minimize) { LLTransientDockableFloater::setMinimized(minimize); } @@ -137,7 +137,7 @@ void LLSysWellWindow::initChannel() } //--------------------------------------------------------------------------------- -void LLSysWellWindow::setVisible(BOOL visible) +void LLSysWellWindow::setVisible(bool visible) { if (visible) { @@ -150,7 +150,7 @@ void LLSysWellWindow::setVisible(BOOL visible) } // do not show empty window - if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + if (NULL == mMessageList || isWindowEmpty()) visible = false; LLTransientDockableFloater::setVisible(visible); @@ -323,9 +323,9 @@ LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/) return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key); } -BOOL LLIMWellWindow::postBuild() +bool LLIMWellWindow::postBuild() { - BOOL rv = LLSysWellWindow::postBuild(); + bool rv = LLSysWellWindow::postBuild(); setTitle(getString("title_im_well_window")); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index d0c4a9acfd..12c1de7626 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -48,7 +48,7 @@ public: LLSysWellWindow(const LLSD& key); virtual ~LLSysWellWindow(); - BOOL postBuild(); + bool postBuild(); // other interface functions // check is window empty @@ -59,11 +59,11 @@ public: LLPanel * findItemByID(const LLUUID& id); // Operating with outfit - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); void adjustWindowPosition(); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void setMinimized(bool minimize); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -71,8 +71,8 @@ public: void setSysWellChiclet(LLSysWellChiclet* chiclet); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static constexpr S32 MAX_WINDOW_HEIGHT = 200; + static constexpr S32 MIN_WINDOW_WIDTH = 318; protected: // init Window's channel @@ -111,7 +111,7 @@ public: static LLIMWellWindow* findInstance(const LLSD& key = LLSD()); static void initClass() { getInstance(); } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void addObjectRow(const LLUUID& notification_id, bool new_message = false); void removeObjectRow(const LLUUID& notification_id); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 70a1eb60cf..e220ba26f5 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -411,14 +411,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; @@ -442,9 +442,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; @@ -473,13 +473,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(); @@ -494,23 +494,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); } } @@ -537,7 +537,7 @@ void LLFloaterTexturePicker::onClose(bool app_quitting) } // virtual -BOOL LLFloaterTexturePicker::postBuild() +bool LLFloaterTexturePicker::postBuild() { LLFloater::postBuild(); @@ -635,7 +635,7 @@ BOOL LLFloaterTexturePicker::postBuild() getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this); setBakeTextureEnabled(TRUE); - return TRUE; + return true; } // virtual @@ -1721,7 +1721,7 @@ void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask) setDnDFilterPermMask(mask); } -void LLTextureCtrl::setVisible( BOOL visible ) +void LLTextureCtrl::setVisible( bool visible ) { if( !visible ) { @@ -1730,7 +1730,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 ) @@ -2072,12 +2072,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 @@ -2125,7 +2125,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; diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index ab0d10552e..88837e5376 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -137,16 +137,16 @@ public: // LLView interface virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); virtual void draw(); - virtual void setVisible( BOOL visible ); - virtual void setEnabled( BOOL enabled ); + virtual void setVisible( bool visible ); + virtual void setEnabled( bool enabled ); void setValid(BOOL valid); @@ -306,15 +306,15 @@ public: virtual ~LLFloaterTexturePicker(); // LLView overrides - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); // LLFloater overrides - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_settings); diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 2b10f43cfb..821f3d04a2 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -972,7 +972,7 @@ void LLTextureView::draw() } -BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) +bool LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) { llassert(imagep); @@ -992,7 +992,7 @@ BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) addChild(barp); mTextureBars.push_back(barp); - return TRUE; + return true; } bool LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask) @@ -1025,9 +1025,9 @@ bool LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask) return false; } -BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLTextureView::handleKey(KEY key, MASK mask, bool called_from_parent) { - return FALSE; + return false; } diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index 5428dbd141..dff10d4fbe 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -45,18 +45,17 @@ protected: public: ~LLTextureView(); - /*virtual*/ void draw(); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + void draw() override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleKey(KEY key, MASK mask, bool called_from_parent) override; static void addDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); } static void removeDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); } static void clearDebugImages() { sDebugImages.clear(); } private: - BOOL addBar(LLViewerFetchedTexture *image, BOOL hilight = FALSE); - void removeAllBars(); + bool addBar(LLViewerFetchedTexture *image, S32 hilight = 0); private: BOOL mFreezeView; diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index a75bfcdcdf..3347463c57 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -176,7 +176,7 @@ void LLThumbnailCtrl::draw() LLUICtrl::draw(); } -void LLThumbnailCtrl::setVisible(BOOL visible) +void LLThumbnailCtrl::setVisible(bool visible) { if (!visible && mInited) { diff --git a/indra/newview/llthumbnailctrl.h b/indra/newview/llthumbnailctrl.h index ceb70ff7be..330dc1d9b9 100644 --- a/indra/newview/llthumbnailctrl.h +++ b/indra/newview/llthumbnailctrl.h @@ -64,7 +64,7 @@ public: virtual ~LLThumbnailCtrl(); virtual void draw() override; - void setVisible(BOOL visible) override; + void setVisible(bool visible) override; virtual void setValue(const LLSD& value ) override; void setInitImmediately(bool val) { mInitImmediately = val; } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index bd39f5e057..269d30746f 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -151,7 +151,7 @@ LLToast::LLToast(const LLToast::Params& p) } } -void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLToast::reshape(S32 width, S32 height, bool called_from_parent) { // We shouldn't use reshape from LLModalDialog since it changes toasts position. // Toasts position should be controlled only by toast screen channel, see LLScreenChannelBase. @@ -160,14 +160,14 @@ void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) } //-------------------------------------------------------------------------- -BOOL LLToast::postBuild() +bool LLToast::postBuild() { if(!mCanFade) { mTimer->stop(); } - return TRUE; + return true; } //-------------------------------------------------------------------------- @@ -218,7 +218,7 @@ void LLToast::hide() } /*virtual*/ -void LLToast::setFocus(BOOL b) +void LLToast::setFocus(bool b) { if (b && !hasFocus() @@ -226,9 +226,9 @@ void LLToast::setFocus(BOOL b) && mWrapperPanel && !mWrapperPanel->getChildList()->empty()) { - LLModalDialog::setFocus(TRUE); + LLModalDialog::setFocus(true); // mostly for buttons - mPanel->setFocus(TRUE); + mPanel->setFocus(true); } else { @@ -391,7 +391,7 @@ void LLToast::draw() } //-------------------------------------------------------------------------- -void LLToast::setVisible(BOOL show) +void LLToast::setVisible(bool show) { if(mIsHidden) { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 7164fa471b..11b6ef44bf 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -113,9 +113,9 @@ public: LLToast(const LLToast::Params& p); virtual ~LLToast(); - BOOL postBuild(); + bool postBuild(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Toast handlers virtual bool handleMouseDown(S32 x, S32 y, MASK mask); @@ -147,13 +147,13 @@ public: // virtual void draw(); // - virtual void setVisible(BOOL show); + virtual void setVisible(bool show); /*virtual*/ void setBackgroundOpaque(BOOL b); // virtual void hide(); - /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void setFocus(bool b); /*virtual*/ void onFocusLost(); diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 8bf078477a..11a8a517e0 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -395,7 +395,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal LLTransientFloaterMgr::GLOBAL, this); } -void LLToastAlertPanel::setVisible( BOOL visible ) +void LLToastAlertPanel::setVisible( bool visible ) { // only make the "ding" sound if it's newly visible if( visible && !LLToastPanel::getVisible() ) @@ -448,7 +448,7 @@ BOOL LLToastAlertPanel::hasTitleBar() const return false; } -BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) +bool LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) { if( KEY_RETURN == key && mask == MASK_NONE ) { @@ -458,31 +458,31 @@ BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) // If we have a default button, click it when return is pressed defaultBtn->onCommit(); } - return TRUE; + return true; } else if (KEY_RIGHT == key) { - LLToastPanel::focusNextItem(FALSE); - return TRUE; + LLToastPanel::focusNextItem(false); + return true; } else if (KEY_LEFT == key) { - LLToastPanel::focusPrevItem(FALSE); - return TRUE; + LLToastPanel::focusPrevItem(false); + return true; } else if (KEY_TAB == key && mask == MASK_NONE) { - LLToastPanel::focusNextItem(FALSE); - return TRUE; + LLToastPanel::focusNextItem(false); + return true; } else if (KEY_TAB == key && mask == MASK_SHIFT) { - LLToastPanel::focusPrevItem(FALSE); - return TRUE; + LLToastPanel::focusPrevItem(false); + return true; } else { - return TRUE; + return true; } } diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index bd34e40642..200db7208f 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -56,10 +56,10 @@ public: // User's responsibility to call show() after creating these. LLToastAlertPanel( LLNotificationPtr notep, bool is_modal ); - virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual bool handleKeyHere(KEY key, MASK mask ); virtual void draw(); - virtual void setVisible( BOOL visible ); + virtual void setVisible( bool visible ); void setCaution(BOOL val = TRUE) { mCaution = val; } // If mUnique==TRUE only one copy of this message should exist diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index bf3f4c1e88..2ea26265cd 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -474,7 +474,7 @@ LLIMToastNotifyPanel::~LLIMToastNotifyPanel() { } -void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLIMToastNotifyPanel::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { LLToastPanel::reshape(width, height, called_from_parent); snapToMessageHeight(); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index a5a637c6fa..a3bd327681 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -154,7 +154,7 @@ public: ~LLIMToastNotifyPanel(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); protected: LLTextBase* mParentText; diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index 7a3a1d8fd7..be5bb24b36 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -40,7 +40,7 @@ LLToastPanel(notification) buildFromFile("panel_script_question_toast.xml"); } -BOOL LLToastScriptQuestion::postBuild() +bool LLToastScriptQuestion::postBuild() { createButtons(); @@ -52,11 +52,11 @@ BOOL LLToastScriptQuestion::postBuild() snapToMessageHeight(); - return TRUE; + return true; } // virtual -void LLToastScriptQuestion::setFocus(BOOL b) +void LLToastScriptQuestion::setFocus(bool b) { LLToastPanel::setFocus(b); // toast can fade out and disappear with focus ON, so reset to default anyway diff --git a/indra/newview/lltoastscriptquestion.h b/indra/newview/lltoastscriptquestion.h index a756f88415..34abc14df9 100644 --- a/indra/newview/lltoastscriptquestion.h +++ b/indra/newview/lltoastscriptquestion.h @@ -36,10 +36,10 @@ class LLToastScriptQuestion : public LLToastPanel public: LLToastScriptQuestion(const LLNotificationPtr& notification); - virtual BOOL postBuild(); + bool postBuild() override; virtual ~LLToastScriptQuestion(){}; - /*virtual*/ void setFocus(BOOL b); + void setFocus(bool b) override; private: void snapToMessageHeight(); diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index f6628293ee..e2290b3a04 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -95,7 +95,7 @@ LLToolBarView::~LLToolBarView() saveToolbars(); } -BOOL LLToolBarView::postBuild() +bool LLToolBarView::postBuild() { mToolbars[LLToolBarEnums::TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left"); mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->getCenterLayoutPanel()->setLocationId(LLToolBarEnums::TOOLBAR_LEFT); @@ -117,7 +117,7 @@ BOOL LLToolBarView::postBuild() mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1)); } - return TRUE; + return true; } S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index a230c2fdee..8669268752 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -67,8 +67,8 @@ public: // Derived methods virtual ~LLToolBarView(); - virtual BOOL postBuild(); - virtual void draw(); + bool postBuild() override; + void draw() override; // Toolbar view interface with the rest of the world // Checks if the commandId is being used somewhere in one of the toolbars, returns LLToolBarEnums::EToolBarLocation diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h index dbcb03f598..c006153657 100644 --- a/indra/newview/lltoolbrush.h +++ b/indra/newview/lltoolbrush.h @@ -69,7 +69,7 @@ public: void modifyLandInSelectionGlobal(); virtual void undo(); - virtual BOOL canUndo() const { return TRUE; } + virtual bool canUndo() const { return true; } protected: void brush( void ); diff --git a/indra/newview/lltrackpicker.cpp b/indra/newview/lltrackpicker.cpp index fe6256a8a9..4cdf9516e8 100644 --- a/indra/newview/lltrackpicker.cpp +++ b/indra/newview/lltrackpicker.cpp @@ -57,11 +57,11 @@ LLFloaterTrackPicker::~LLFloaterTrackPicker() { } -BOOL LLFloaterTrackPicker::postBuild() +bool LLFloaterTrackPicker::postBuild() { childSetAction(BTN_CANCEL, [this](LLUICtrl*, const LLSD& param){ onButtonCancel(); }); childSetAction(BTN_SELECT, [this](LLUICtrl*, const LLSD& param){ onButtonSelect(); }); - return TRUE; + return true; } void LLFloaterTrackPicker::onClose(bool app_quitting) diff --git a/indra/newview/lltrackpicker.h b/indra/newview/lltrackpicker.h index dab3b72915..49cc1a5c64 100644 --- a/indra/newview/lltrackpicker.h +++ b/indra/newview/lltrackpicker.h @@ -39,7 +39,7 @@ public: LLFloaterTrackPicker(LLView * owner, const LLSD ¶ms = LLSD()); virtual ~LLFloaterTrackPicker() override; - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onClose(bool app_quitting) override; void showPicker(const LLSD &args); diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp index c108f1dfdc..21c4769a5d 100644 --- a/indra/newview/lltransientdockablefloater.cpp +++ b/indra/newview/lltransientdockablefloater.cpp @@ -52,7 +52,7 @@ LLTransientDockableFloater::~LLTransientDockableFloater() } } -void LLTransientDockableFloater::setVisible(BOOL visible) +void LLTransientDockableFloater::setVisible(bool visible) { LLView* dock = getDockWidget(); if(visible && isDocked()) diff --git a/indra/newview/lltransientdockablefloater.h b/indra/newview/lltransientdockablefloater.h index 5fb79597f4..4d3bf9fa22 100644 --- a/indra/newview/lltransientdockablefloater.h +++ b/indra/newview/lltransientdockablefloater.h @@ -45,8 +45,8 @@ public: const LLSD& key, const Params& params = getDefaultParams()); virtual ~LLTransientDockableFloater(); - /*virtual*/ void setVisible(BOOL visible); - /* virtual */void setDocked(bool docked, bool pop_on_undock = true); + void setVisible(bool visible) override; + void setDocked(bool docked, bool pop_on_undock = true) override; virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } }; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index de519a03c2..67dcaaed6e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3498,13 +3498,13 @@ LLViewerMediaImpl::cut() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canCut() const { if (mMediaSource) return mMediaSource->canCut(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3518,13 +3518,13 @@ LLViewerMediaImpl::copy() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canCopy() const { if (mMediaSource) return mMediaSource->canCopy(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3538,13 +3538,13 @@ LLViewerMediaImpl::paste() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canPaste() const { if (mMediaSource) return mMediaSource->canPaste(); else - return FALSE; + return false; } void LLViewerMediaImpl::setUpdated(BOOL updated) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 56216253d9..d737725ad0 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -342,13 +342,13 @@ public: // LLEditMenuHandler overrides /*virtual*/ void cut(); - /*virtual*/ BOOL canCut() const; + /*virtual*/ bool canCut() const; /*virtual*/ void copy(); - /*virtual*/ BOOL canCopy() const; + /*virtual*/ bool canCopy() const; /*virtual*/ void paste(); - /*virtual*/ BOOL canPaste() const; + /*virtual*/ bool canPaste() const; void addObject(LLVOVolume* obj) ; void removeObject(LLVOVolume* obj) ; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index f9425a9269..dfd5c1283f 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -321,7 +321,7 @@ void LLViewerMediaFocus::onFocusLost() LLFocusableElement::onFocusLost(); } -BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLViewerMediaFocus::handleKey(KEY key, MASK mask, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if(media_impl) @@ -346,7 +346,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) return true; } -BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if (media_impl) @@ -358,7 +358,7 @@ BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent -BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if(media_impl) diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index effd08a559..661c9a46be 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -55,9 +55,9 @@ public: void clearHover(); /*virtual*/ bool getFocus(); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); + /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent); + /*virtual*/ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); + /*virtual*/ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); BOOL handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f0d5ab43d2..9c1656b7ed 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6153,7 +6153,7 @@ void show_debug_menus() void toggle_debug_menus(void*) { - BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); + bool visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); show_debug_menus(); } @@ -8489,18 +8489,18 @@ LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p : LLMenuHolderGL(p) {} -BOOL LLViewerMenuHolderGL::hideMenus() +bool LLViewerMenuHolderGL::hideMenus() { - BOOL handled = FALSE; + bool handled = false; if (LLMenuHolderGL::hideMenus()) { - handled = TRUE; + handled = true; } // drop pie menu selection - mParcelSelection = NULL; - mObjectSelection = NULL; + mParcelSelection = nullptr; + mObjectSelection = nullptr; if (gMenuBarView) { diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index b1ab7a2688..63044bd057 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -160,7 +160,7 @@ public: LLViewerMenuHolderGL(const Params& p); - virtual BOOL hideMenus(); + virtual bool hideMenus(); void setParcelSelection(LLSafeHandle<LLParcelSelection> selection); void setObjectSelection(LLSafeHandle<LLObjectSelection> selection); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 97c5037053..f46544e1ef 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -622,7 +622,7 @@ public: mItem = item; } - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { LLViewerTextEditor* viewer_editor = (LLViewerTextEditor*)editor; // Take this opportunity to remove any unused embedded items from this editor @@ -634,7 +634,7 @@ public: *delta = insert(editor, getPosition(), ws ); return (*delta != 0); } - return FALSE; + return false; } virtual S32 undo( LLTextBase* editor ) @@ -650,7 +650,7 @@ public: insert(editor, getPosition(), ws ); return getPosition() + 1; } - virtual BOOL hasExtCharValue( llwchar value ) const + virtual bool hasExtCharValue( llwchar value ) const { return (value == mExtCharValue); } @@ -707,7 +707,7 @@ void LLViewerTextEditor::makePristine() LLTextEditor::makePristine(); } -void LLViewerTextEditor::onVisibilityChange( BOOL new_visibility ) +void LLViewerTextEditor::onVisibilityChange( bool new_visibility ) { LLUICtrl::onVisibilityChange(new_visibility); } @@ -856,19 +856,19 @@ bool LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) // virtual -BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, +bool LLViewerTextEditor::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; LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); if (LLToolDragAndDrop::SOURCE_NOTECARD == source) { // We currently do not handle dragging items from one notecard to another // since items in a notecard must be in Inventory to be verified. See DEV-2891. - return FALSE; + return false; } if (getEnabled() && acceptsTextInput()) @@ -951,7 +951,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, *accept = ACCEPT_NO; } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << LL_ENDL; return handled; @@ -1355,13 +1355,13 @@ bool LLViewerTextEditor::hasEmbeddedInventory() //////////////////////////////////////////////////////////////////////////// -BOOL LLViewerTextEditor::importBuffer( const char* buffer, S32 length ) +bool LLViewerTextEditor::importBuffer( const char* buffer, S32 length ) { LLMemoryStream str((U8*)buffer, length); return importStream(str); } -BOOL LLViewerTextEditor::exportBuffer( std::string& buffer ) +bool LLViewerTextEditor::exportBuffer( std::string& buffer ) { LLNotecard nc(LLNotecard::MAX_SIZE); @@ -1378,6 +1378,6 @@ BOOL LLViewerTextEditor::exportBuffer( std::string& buffer ) buffer = out_stream.str(); - return TRUE; + return true; } diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index 51680028db..7bc9a91652 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -47,7 +47,7 @@ public: virtual void makePristine(); - /*virtual*/ void onVisibilityChange( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange( bool new_visibility ); // mousehandler overrides virtual bool handleMouseDown(S32 x, S32 y, MASK mask); @@ -55,14 +55,14 @@ public: virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask ); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); const class LLInventoryItem* getDragItem() const { return mDragItem; } - virtual BOOL importBuffer(const char* buffer, S32 length); + virtual bool importBuffer(const char* buffer, S32 length); virtual bool importStream(std::istream& str); - virtual BOOL exportBuffer(std::string& buffer); + virtual bool exportBuffer(std::string& buffer); virtual void onValueChange(S32 start, S32 end); void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id, const LLUUID& preview_id) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index d93c7128b5..e06b3d1324 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -100,7 +100,7 @@ LLPanelWearableOutfitItem::Params::Params() { } -BOOL LLPanelWearableOutfitItem::postBuild() +bool LLPanelWearableOutfitItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -115,7 +115,7 @@ BOOL LLPanelWearableOutfitItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); } - return TRUE; + return true; } bool LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -293,7 +293,7 @@ LLPanelClothingListItem::~LLPanelClothingListItem() { } -BOOL LLPanelClothingListItem::postBuild() +bool LLPanelClothingListItem::postBuild() { LLPanelDeletableWearableListItem::postBuild(); @@ -305,7 +305,7 @@ BOOL LLPanelClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////// @@ -370,7 +370,7 @@ LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() { } -BOOL LLPanelBodyPartsListItem::postBuild() +bool LLPanelBodyPartsListItem::postBuild() { LLPanelInventoryListItemBase::postBuild(); @@ -380,7 +380,7 @@ BOOL LLPanelBodyPartsListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); @@ -413,7 +413,7 @@ LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInven setSeparatorVisible(true); } -BOOL LLPanelDeletableWearableListItem::postBuild() +bool LLPanelDeletableWearableListItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -426,7 +426,7 @@ BOOL LLPanelDeletableWearableListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } @@ -486,7 +486,7 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp return list_item; } -BOOL LLPanelDummyClothingListItem::postBuild() +bool LLPanelDummyClothingListItem::postBuild() { addWidgetToRightSide("btn_add_panel"); @@ -499,7 +499,7 @@ BOOL LLPanelDummyClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 3e240107e5..e3fa732658 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -83,7 +83,7 @@ public: Params(); }; - BOOL postBuild(); + bool postBuild(); bool handleDoubleClick(S32 x, S32 y, MASK mask); static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item, @@ -124,7 +124,7 @@ public: virtual ~LLPanelDeletableWearableListItem() {}; - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -177,7 +177,7 @@ public: virtual ~LLPanelClothingListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -212,7 +212,7 @@ public: virtual ~LLPanelBodyPartsListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -241,7 +241,7 @@ public: }; static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); LLWearableType::EType getWearableType() const; protected: diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 433e882d8f..2a44c7e4aa 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -60,21 +60,21 @@ #include "llglheaders.h" // # Constants -static const F32 MAP_DEFAULT_SCALE = 128.f; -static const F32 MAP_ITERP_TIME_CONSTANT = 0.75f; -static const F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; -static const F32 MAP_ZOOM_MAX_INTERP = 0.5f; -static const F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; +static constexpr F32 MAP_DEFAULT_SCALE = 128.f; +static constexpr F32 MAP_ITERP_TIME_CONSTANT = 0.75f; +static constexpr F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; +static constexpr F32 MAP_ZOOM_MAX_INTERP = 0.5f; +static constexpr F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; // Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py // Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...) // OCEAN_COLOR = "#1D475F" -const F32 OCEAN_RED = (F32)(0x1D)/255.f; -const F32 OCEAN_GREEN = (F32)(0x47)/255.f; -const F32 OCEAN_BLUE = (F32)(0x5F)/255.f; +constexpr F32 OCEAN_RED = (F32)(0x1D)/255.f; +constexpr F32 OCEAN_GREEN = (F32)(0x47)/255.f; +constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f; -const F32 GODLY_TELEPORT_HEIGHT = 200.f; -const F32 BIG_DOT_RADIUS = 5.f; +constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f; +constexpr F32 BIG_DOT_RADIUS = 5.f; BOOL LLWorldMapView::sHandledLastClick = FALSE; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; @@ -194,7 +194,7 @@ LLWorldMapView::LLWorldMapView() : clearLastClick(); } -BOOL LLWorldMapView::postBuild() +bool LLWorldMapView::postBuild() { mTextBoxNorth = getChild<LLTextBox> ("floater_map_north"); mTextBoxEast = getChild<LLTextBox> ("floater_map_east"); @@ -617,7 +617,7 @@ void LLWorldMapView::draw() //virtual -void LLWorldMapView::setVisible(BOOL visible) +void LLWorldMapView::setVisible(bool visible) { LLPanel::setVisible(visible); if (!visible) @@ -1461,7 +1461,7 @@ void LLWorldMapView::updateDirections() } -void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLWorldMapView::reshape( S32 width, S32 height, bool called_from_parent ) { LLView::reshape( width, height, called_from_parent ); } diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index c06256f57c..3d982097fc 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -53,10 +53,10 @@ public: LLWorldMapView(); virtual ~LLWorldMapView(); - virtual BOOL postBuild(); + virtual bool postBuild(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE ); - virtual void setVisible(BOOL visible); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true ); + virtual void setVisible(bool visible); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index e9e9caa9bd..6d3e226011 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL; LLPointer<LLSecAPIHandler> gSecAPIHandler; //static -LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) +LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus) { gTOSType = name; gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]); |