summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llscrollbar.cpp')
-rw-r--r--indra/llui/llscrollbar.cpp62
1 files changed, 31 insertions, 31 deletions
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)