summaryrefslogtreecommitdiff
path: root/indra/newview/llcolorswatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcolorswatch.cpp')
-rw-r--r--indra/newview/llcolorswatch.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index 43e3d0c642..97d2345778 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -59,7 +59,7 @@ LLColorSwatchCtrl::Params::Params()
LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p)
: LLUICtrl(p),
- mValid( TRUE ),
+ mValid( true ),
mColor(p.color()),
mCanApplyImmediately(p.can_apply_immediately),
mAlphaGradientImage(p.alpha_background_image),
@@ -108,22 +108,22 @@ LLColorSwatchCtrl::~LLColorSwatchCtrl ()
}
}
-BOOL LLColorSwatchCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return handleMouseDown(x, y, mask);
}
-BOOL LLColorSwatchCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
+ return true;
}
-BOOL LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if( ' ' == uni_char )
{
- showPicker(TRUE);
+ showPicker(true);
}
return LLUICtrl::handleUnicodeCharHere(uni_char);
}
@@ -139,7 +139,7 @@ void LLColorSwatchCtrl::setOriginal(const LLColor4& color)
}
}
-void LLColorSwatchCtrl::set(const LLColor4& color, BOOL update_picker, BOOL from_event)
+void LLColorSwatchCtrl::set(const LLColor4& color, bool update_picker, bool from_event)
{
mColor = color;
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
@@ -158,17 +158,17 @@ void LLColorSwatchCtrl::setLabel(const std::string& label)
mCaption->setText(label);
}
-BOOL LLColorSwatchCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Route future Mouse messages here preemptively. (Release on mouse up.)
// No handler is needed for capture lost since this object has no state that depends on it.
gFocusMgr.setMouseCapture( this );
- return TRUE;
+ return true;
}
-BOOL LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@@ -184,13 +184,13 @@ BOOL LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
// Focus the widget now in order to return the focus
// after the color picker is closed.
- setFocus(TRUE);
+ setFocus(true);
- showPicker(FALSE);
+ showPicker(false);
}
}
- return TRUE;
+ return true;
}
// assumes GL state is set for 2D
@@ -202,7 +202,7 @@ void LLColorSwatchCtrl::draw()
mBorder->setKeyboardFocusHighlight(hasFocus());
// Draw border
LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mLabelHeight );
- gl_rect_2d( border, mBorderColor.get(), FALSE );
+ gl_rect_2d( border, mBorderColor.get(), false );
LLRect interior = border;
interior.stretch( -1 );
@@ -217,7 +217,7 @@ void LLColorSwatchCtrl::draw()
}
// Draw the color swatch
- gl_rect_2d(interior, mColor % alpha, TRUE);
+ gl_rect_2d(interior, mColor % alpha, true);
if (!mColor.isOpaque())
{
@@ -244,7 +244,7 @@ void LLColorSwatchCtrl::draw()
else
{
// Draw grey and an X
- gl_rect_2d(interior, LLColor4::grey % alpha, TRUE);
+ gl_rect_2d(interior, LLColor4::grey % alpha, true);
gl_draw_x(interior, LLColor4::black % alpha);
}
@@ -253,7 +253,7 @@ void LLColorSwatchCtrl::draw()
LLUICtrl::draw();
}
-void LLColorSwatchCtrl::setEnabled( BOOL enabled )
+void LLColorSwatchCtrl::setEnabled( bool enabled )
{
mCaption->setEnabled( enabled );
LLView::setEnabled( enabled );
@@ -272,7 +272,7 @@ void LLColorSwatchCtrl::setEnabled( BOOL enabled )
void LLColorSwatchCtrl::setValue(const LLSD& value)
{
- set(LLColor4(value), TRUE, TRUE);
+ set(LLColor4(value), true, true);
}
//////////////////////////////////////////////////////////////////////////////
@@ -316,7 +316,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
{
// both select and cancel close LLFloaterColorPicker
// but COLOR_CHANGE does not
- subject->setFocus(TRUE);
+ subject->setFocus(true);
}
}
}
@@ -337,7 +337,7 @@ void LLColorSwatchCtrl::closeFloaterColorPicker()
mPickerHandle.markDead();
}
-void LLColorSwatchCtrl::setValid(BOOL valid )
+void LLColorSwatchCtrl::setValid(bool valid )
{
mValid = valid;
@@ -348,7 +348,7 @@ void LLColorSwatchCtrl::setValid(BOOL valid )
}
}
-void LLColorSwatchCtrl::showPicker(BOOL take_focus)
+void LLColorSwatchCtrl::showPicker(bool take_focus)
{
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
if (!pickerp)
@@ -370,7 +370,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus)
if (take_focus)
{
- pickerp->setFocus(TRUE);
+ pickerp->setFocus(true);
}
}