summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-20 23:46:23 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 03:00:25 +0200
commita5261a5fa8fad810ecb5c260d92c3e771822bf58 (patch)
treed9e9cda2137f01538f7ac98ce5e8dfa10980eaac /indra/llui/llscrollcontainer.cpp
parent8c16ec2b53153a10f40181e0e8108d24331451d4 (diff)
Convert BOOL to bool in llui
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp72
1 files changed, 36 insertions, 36 deletions
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,