summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llaccordionctrl.cpp42
-rw-r--r--indra/llui/llaccordionctrl.h10
-rw-r--r--indra/llui/llaccordionctrltab.cpp46
-rw-r--r--indra/llui/llaccordionctrltab.h8
-rw-r--r--indra/llui/llbadge.cpp4
-rw-r--r--indra/llui/llbadge.h2
-rw-r--r--indra/llui/llbutton.cpp56
-rw-r--r--indra/llui/llbutton.h30
-rw-r--r--indra/llui/llchat.h4
-rw-r--r--indra/llui/llchatentry.cpp8
-rw-r--r--indra/llui/llchatentry.h2
-rw-r--r--indra/llui/llcheckboxctrl.cpp34
-rw-r--r--indra/llui/llcheckboxctrl.h26
-rw-r--r--indra/llui/llcombobox.cpp140
-rw-r--r--indra/llui/llcombobox.h64
-rw-r--r--indra/llui/llconsole.cpp2
-rw-r--r--indra/llui/llconsole.h2
-rw-r--r--indra/llui/llcontainerview.cpp16
-rw-r--r--indra/llui/llcontainerview.h20
-rw-r--r--indra/llui/llctrlselectioninterface.cpp8
-rw-r--r--indra/llui/llctrlselectioninterface.h24
-rw-r--r--indra/llui/lldockablefloater.cpp24
-rw-r--r--indra/llui/lldockablefloater.h8
-rw-r--r--indra/llui/lldraghandle.cpp12
-rw-r--r--indra/llui/lldraghandle.h12
-rw-r--r--indra/llui/lleditmenuhandler.h16
-rw-r--r--indra/llui/llfiltereditor.cpp2
-rw-r--r--indra/llui/llflatlistview.cpp24
-rw-r--r--indra/llui/llflatlistview.h10
-rw-r--r--indra/llui/llfloater.cpp226
-rw-r--r--indra/llui/llfloater.h118
-rw-r--r--indra/llui/llfloaterreg.cpp24
-rw-r--r--indra/llui/llfloaterreg.h4
-rw-r--r--indra/llui/llflyoutbutton.cpp4
-rw-r--r--indra/llui/llflyoutbutton.h4
-rw-r--r--indra/llui/llfocusmgr.cpp48
-rw-r--r--indra/llui/llfocusmgr.h32
-rw-r--r--indra/llui/llfolderview.cpp276
-rw-r--r--indra/llui/llfolderview.h64
-rw-r--r--indra/llui/llfolderviewitem.cpp252
-rw-r--r--indra/llui/llfolderviewitem.h100
-rw-r--r--indra/llui/llfolderviewmodel.h24
-rw-r--r--indra/llui/lliconctrl.cpp2
-rw-r--r--indra/llui/lliconctrl.h2
-rw-r--r--indra/llui/llkeywords.cpp4
-rw-r--r--indra/llui/lllayoutstack.cpp32
-rw-r--r--indra/llui/lllayoutstack.h10
-rw-r--r--indra/llui/lllineeditor.cpp178
-rw-r--r--indra/llui/lllineeditor.h98
-rw-r--r--indra/llui/lllocalcliprect.cpp4
-rw-r--r--indra/llui/lllocalcliprect.h6
-rw-r--r--indra/llui/llmenubutton.cpp14
-rw-r--r--indra/llui/llmenubutton.h2
-rw-r--r--indra/llui/llmenugl.cpp454
-rw-r--r--indra/llui/llmenugl.h192
-rw-r--r--indra/llui/llmodaldialog.cpp40
-rw-r--r--indra/llui/llmodaldialog.h14
-rw-r--r--indra/llui/llmultifloater.cpp66
-rw-r--r--indra/llui/llmultifloater.h26
-rw-r--r--indra/llui/llmultislider.cpp28
-rw-r--r--indra/llui/llmultislider.h14
-rw-r--r--indra/llui/llmultisliderctrl.cpp26
-rw-r--r--indra/llui/llmultisliderctrl.h16
-rw-r--r--indra/llui/llnotifications.cpp4
-rw-r--r--indra/llui/llnotifications.h4
-rw-r--r--indra/llui/llpanel.cpp76
-rw-r--r--indra/llui/llpanel.h46
-rw-r--r--indra/llui/llradiogroup.cpp74
-rw-r--r--indra/llui/llradiogroup.h26
-rw-r--r--indra/llui/llresizebar.h4
-rw-r--r--indra/llui/llresizehandle.cpp6
-rw-r--r--indra/llui/llresizehandle.h2
-rw-r--r--indra/llui/llresmgr.cpp6
-rw-r--r--indra/llui/llscrollbar.cpp62
-rw-r--r--indra/llui/llscrollbar.h12
-rw-r--r--indra/llui/llscrollcontainer.cpp72
-rw-r--r--indra/llui/llscrollcontainer.h18
-rw-r--r--indra/llui/llscrollingpanellist.cpp4
-rw-r--r--indra/llui/llscrollingpanellist.h4
-rw-r--r--indra/llui/llscrolllistcell.cpp20
-rw-r--r--indra/llui/llscrolllistcell.h22
-rw-r--r--indra/llui/llscrolllistcolumn.cpp14
-rw-r--r--indra/llui/llscrolllistcolumn.h10
-rw-r--r--indra/llui/llscrolllistctrl.cpp226
-rw-r--r--indra/llui/llscrolllistctrl.h112
-rw-r--r--indra/llui/llscrolllistitem.cpp8
-rw-r--r--indra/llui/llscrolllistitem.h18
-rw-r--r--indra/llui/llsearcheditor.cpp8
-rw-r--r--indra/llui/llsearcheditor.h8
-rw-r--r--indra/llui/llslider.cpp10
-rw-r--r--indra/llui/llslider.h8
-rw-r--r--indra/llui/llsliderctrl.cpp26
-rw-r--r--indra/llui/llsliderctrl.h18
-rw-r--r--indra/llui/llspinctrl.cpp42
-rw-r--r--indra/llui/llspinctrl.h18
-rw-r--r--indra/llui/llstatgraph.cpp6
-rw-r--r--indra/llui/llstatgraph.h2
-rw-r--r--indra/llui/llstyle.cpp6
-rw-r--r--indra/llui/llstyle.h10
-rw-r--r--indra/llui/lltabcontainer.cpp164
-rw-r--r--indra/llui/lltabcontainer.h40
-rw-r--r--indra/llui/lltextbase.cpp48
-rw-r--r--indra/llui/lltextbase.h36
-rw-r--r--indra/llui/lltextbox.cpp10
-rw-r--r--indra/llui/lltextbox.h8
-rw-r--r--indra/llui/lltexteditor.cpp268
-rw-r--r--indra/llui/lltexteditor.h76
-rw-r--r--indra/llui/lltextparser.cpp8
-rw-r--r--indra/llui/lltextvalidate.cpp62
-rw-r--r--indra/llui/lltextvalidate.h2
-rw-r--r--indra/llui/lltimectrl.cpp12
-rw-r--r--indra/llui/lltimectrl.h4
-rw-r--r--indra/llui/lltoggleablemenu.cpp4
-rw-r--r--indra/llui/lltoggleablemenu.h2
-rw-r--r--indra/llui/lltoolbar.cpp38
-rw-r--r--indra/llui/lltoolbar.h14
-rw-r--r--indra/llui/lltooltip.cpp6
-rw-r--r--indra/llui/lltooltip.h2
-rw-r--r--indra/llui/lltransutil.cpp2
-rw-r--r--indra/llui/llui.cpp2
-rw-r--r--indra/llui/lluictrl.cpp66
-rw-r--r--indra/llui/lluictrl.h52
-rw-r--r--indra/llui/lluictrlfactory.cpp2
-rw-r--r--indra/llui/llundo.cpp18
-rw-r--r--indra/llui/llundo.h10
-rw-r--r--indra/llui/llurlentry.cpp8
-rw-r--r--indra/llui/llurlentry.h2
-rw-r--r--indra/llui/llview.cpp178
-rw-r--r--indra/llui/llview.h154
-rw-r--r--indra/llui/llviewborder.cpp10
-rw-r--r--indra/llui/llviewborder.h8
-rw-r--r--indra/llui/llviewereventrecorder.cpp2
-rw-r--r--indra/llui/llviewereventrecorder.h2
-rw-r--r--indra/llui/llviewquery.cpp10
-rw-r--r--indra/llui/llviewquery.h4
-rw-r--r--indra/llui/llvirtualtrackball.cpp18
-rw-r--r--indra/llui/llvirtualtrackball.h4
-rw-r--r--indra/llui/llxuiparser.cpp4
-rw-r--r--indra/llui/llxyvector.cpp6
-rw-r--r--indra/llui/llxyvector.h6
140 files changed, 2722 insertions, 2722 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;
};