summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp602
1 files changed, 301 insertions, 301 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 8fcb558aae..279f5628e1 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -100,7 +100,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;
@@ -150,10 +150,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),
@@ -165,7 +165,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;
@@ -218,49 +218,49 @@ 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)
+bool LLMenuItemGL::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
//virtual
-BOOL LLMenuItemGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLMenuItemGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
return LLUICtrl::handleRightMouseDown(x,y,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);
}
//virtual
-BOOL LLMenuItemGL::handleRightMouseUp(S32 x, S32 y, MASK mask)
+bool LLMenuItemGL::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
// If this event came from a right-click context menu spawn,
// process as a left-click to allow menu items to be hit
if (LLMenuHolderGL::sContextMenuSpawnPos.mX != S32_MAX
|| LLMenuHolderGL::sContextMenuSpawnPos.mY != S32_MAX)
{
- BOOL handled = handleMouseUp(x, y, mask);
+ bool handled = handleMouseUp(x, y, mask);
return handled;
}
return LLUICtrl::handleRightMouseUp(x,y,mask);
@@ -268,7 +268,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;
@@ -293,7 +293,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *list
// LL_WARNS() << warning << LL_ENDL;
// LLAlertDialog::modalAlert(warning);
- return FALSE;
+ return false;
}
}
if (!accelerator)
@@ -308,7 +308,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
@@ -332,13 +332,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;
}
@@ -402,7 +402,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)
{
@@ -418,7 +418,7 @@ void LLMenuItemGL::onCommit( void )
}
-BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask )
+bool LLMenuItemGL::handleKeyHere( KEY key, MASK mask )
{
if (getHighlight() &&
getMenu()->isOpen())
@@ -426,52 +426,52 @@ 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)
+bool LLMenuItemGL::handleMouseUp( S32 x, S32 y, MASK mask)
{
// switch to mouse navigation mode
- LLMenuGL::setKeyboardMode(FALSE);
+ LLMenuGL::setKeyboardMode(false);
onCommit();
make_ui_sound("UISndClickRelease");
return LLView::handleMouseUp(x, y, mask);
}
-BOOL LLMenuItemGL::handleMouseDown( S32 x, S32 y, MASK mask)
+bool LLMenuItemGL::handleMouseDown( S32 x, S32 y, MASK mask)
{
// switch to mouse navigation mode
- LLMenuGL::setKeyboardMode(FALSE);
+ LLMenuGL::setKeyboardMode(false);
- setHighlight(TRUE);
+ setHighlight(true);
return LLView::handleMouseDown(x, y, mask);
}
-BOOL LLMenuItemGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
+bool LLMenuItemGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
// If the menu is scrollable let it handle the wheel event.
return !getMenu()->isScrollable();
@@ -521,19 +521,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 );
}
}
@@ -552,13 +552,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())
{
@@ -609,49 +609,49 @@ void LLMenuItemSeparatorGL::buildDrawLabel( void )
}
}
-BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLMenuGL* parent_menu = getMenu();
if (y > getRect().getHeight() / 2)
{
// the menu items are in the child list in bottom up order
LLView* prev_menu_item = parent_menu->findNextSibling(this);
- return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
+ return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : false;
}
else
{
LLView* next_menu_item = parent_menu->findPrevSibling(this);
- return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE;
+ return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseDown(x, 0, mask) : false;
}
}
-BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLMenuGL* parent_menu = getMenu();
if (y > getRect().getHeight() / 2)
{
LLView* prev_menu_item = parent_menu->findNextSibling(this);
- return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
+ return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : false;
}
else
{
LLView* next_menu_item = parent_menu->findPrevSibling(this);
- return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE;
+ return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseUp(x, 0, mask) : false;
}
}
-BOOL LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
+bool LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
{
LLMenuGL* parent_menu = getMenu();
if (y > getRect().getHeight() / 2)
{
- parent_menu->highlightPrevItem(this, FALSE);
- return FALSE;
+ parent_menu->highlightPrevItem(this, false);
+ return false;
}
else
{
- parent_menu->highlightNextItem(this, FALSE);
- return FALSE;
+ parent_menu->highlightNextItem(this, false);
+ return false;
}
}
@@ -667,7 +667,7 @@ class LLMenuItemVerticalSeparatorGL
public:
LLMenuItemVerticalSeparatorGL( void );
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) { return false; }
};
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void )
@@ -739,12 +739,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();
@@ -864,12 +864,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)) )
{
@@ -877,10 +877,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
@@ -972,7 +972,7 @@ LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p)
if (branch)
{
mBranchHandle = branch->getHandle();
- branch->setVisible(FALSE);
+ branch->setVisible(false);
branch->setParentMenuItem(this);
}
}
@@ -988,7 +988,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)
@@ -1005,7 +1005,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)
@@ -1023,14 +1023,14 @@ LLView* LLMenuItemBranchGL::findChildView(const std::string& name, BOOL recurse)
}
// virtual
-BOOL LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask)
+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");
- return TRUE;
+ return true;
}
bool LLMenuItemBranchGL::hasAccelerator(const KEY &key, const MASK &mask) const
@@ -1038,18 +1038,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;
@@ -1062,7 +1062,7 @@ BOOL LLMenuItemBranchGL::addToAcceleratorList(std::list<LLMenuKeyboardBinding*>
}
}
- return FALSE;
+ return false;
}
@@ -1090,9 +1090,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);
@@ -1106,12 +1106,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)
@@ -1123,7 +1123,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;
@@ -1132,17 +1132,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 )
@@ -1159,13 +1159,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 );
}
}
}
@@ -1175,7 +1175,7 @@ void LLMenuItemBranchGL::draw()
LLMenuItemGL::draw();
if (getBranch() && getBranch()->getVisible() && !getBranch()->getTornOff())
{
- setHighlight(TRUE);
+ setHighlight(true);
}
}
@@ -1188,16 +1188,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 && 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)
@@ -1212,15 +1212,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())
@@ -1228,7 +1228,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;
@@ -1237,12 +1237,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;
}
}
}
@@ -1250,13 +1250,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();
}
@@ -1327,7 +1327,7 @@ void LLMenuItemBranchGL::openMenu()
}
branch->translate( delta_x, delta_y );
- branch->setVisible( TRUE );
+ branch->setVisible( true );
branch->getParent()->sendChildToFront(branch);
dirtyRect();
@@ -1362,20 +1362,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 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) :
@@ -1407,7 +1407,7 @@ void LLMenuItemBranchDownGL::openMenu( void )
LLMenuGL* branch = getBranch();
if( branch->getVisible() && !branch->getTornOff() )
{
- branch->setVisible( FALSE );
+ branch->setVisible( false );
}
else
{
@@ -1448,15 +1448,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;
@@ -1475,18 +1475,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
@@ -1494,10 +1494,10 @@ BOOL LLMenuItemBranchDownGL::isActive() const
return isOpen();
}
-BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask )
{
// switch to mouse control mode
- LLMenuGL::setKeyboardMode(FALSE);
+ LLMenuGL::setKeyboardMode(false);
if (getVisible() && isOpen())
{
@@ -1509,19 +1509,19 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask )
}
make_ui_sound("UISndClick");
- return TRUE;
+ return true;
}
-BOOL LLMenuItemBranchDownGL::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLMenuItemBranchDownGL::handleMouseUp( S32 x, S32 y, MASK mask )
{
- return TRUE;
+ return true;
}
-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
@@ -1534,11 +1534,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);
@@ -1546,16 +1546,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
@@ -1564,12 +1564,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
@@ -1578,35 +1578,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 )
@@ -1614,7 +1614,7 @@ void LLMenuItemBranchDownGL::draw( void )
//FIXME: try removing this
if (getBranch()->getVisible() && !getBranch()->getTornOff())
{
- setHighlight(TRUE);
+ setHighlight(true);
}
if( getHighlight() )
@@ -1686,8 +1686,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:
@@ -1737,14 +1737,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);
@@ -1766,7 +1766,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 ),
@@ -1775,7 +1775,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
mLastMouseY(0),
mMouseVelX(0),
mMouseVelY(0),
- mTornOff(FALSE),
+ mTornOff(false),
mTearOffItem(NULL),
mSpilloverBranch(NULL),
mFirstVisibleItem(NULL),
@@ -1784,8 +1784,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),
mFont(p.font)
@@ -1826,7 +1826,7 @@ LLMenuGL::~LLMenuGL( void )
mJumpKeys.clear();
}
-void LLMenuGL::setCanTearOff(BOOL tear_off)
+void LLMenuGL::setCanTearOff(bool tear_off)
{
if (tear_off && mTearOffItem == NULL)
{
@@ -1916,7 +1916,7 @@ void LLMenuGL::removeChild( LLView* ctrl)
return LLUICtrl::removeChild(ctrl);
}
-BOOL LLMenuGL::postBuild()
+bool LLMenuGL::postBuild()
{
createJumpKeys();
return LLUICtrl::postBuild();
@@ -1924,10 +1924,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)
{
@@ -1953,7 +1953,7 @@ BOOL LLMenuGL::jumpKeysActive()
return active;
}
-BOOL LLMenuGL::isOpen()
+bool LLMenuGL::isOpen()
{
if (getTornOff())
{
@@ -1962,7 +1962,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());
@@ -1970,7 +1970,7 @@ BOOL LLMenuGL::isOpen()
{
return parent->hasFocus();
}
- return FALSE;
+ return false;
}
else
{
@@ -2080,7 +2080,7 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction)
LL_WARNS() << "Unknown scrolling direction: " << direction << LL_ENDL;
}
- mNeedsArrange = TRUE;
+ mNeedsArrange = true;
arrangeAndClear();
return true;
@@ -2337,11 +2337,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());
@@ -2353,11 +2353,11 @@ void LLMenuGL::arrange( void )
{
if (NULL != mArrowUpItem)
{
- mArrowUpItem->setVisible(FALSE);
+ mArrowUpItem->setVisible(false);
}
if (NULL != mArrowDownItem)
{
- mArrowDownItem->setVisible(FALSE);
+ mArrowDownItem->setVisible(false);
}
}
@@ -2420,7 +2420,7 @@ void LLMenuGL::arrangeAndClear( void )
if (mNeedsArrange)
{
arrange();
- mNeedsArrange = FALSE;
+ mNeedsArrange = false;
}
}
@@ -2482,7 +2482,7 @@ void LLMenuGL::cleanupSpilloverBranch()
void LLMenuGL::createJumpKeys()
{
if (!mCreateJumpKeys) return;
- mCreateJumpKeys = FALSE;
+ mCreateJumpKeys = false;
mJumpKeys.clear();
@@ -2547,7 +2547,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;
@@ -2565,7 +2565,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;
}
}
@@ -2648,7 +2648,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);
@@ -2656,31 +2656,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);
@@ -2688,14 +2688,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();
@@ -2717,7 +2717,7 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
}
// add a context menu branch
-BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu)
+bool LLMenuGL::appendContextSubMenu(LLMenuGL *menu)
{
if (menu == this)
{
@@ -2740,7 +2740,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;
@@ -2751,8 +2751,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)
@@ -2766,7 +2766,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)
@@ -2801,12 +2801,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;
}
@@ -2859,7 +2859,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
@@ -2869,7 +2869,7 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
if (parent)
{
- parent->setFocus(TRUE);
+ parent->setFocus(true);
}
}
@@ -2938,9 +2938,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);
}
@@ -2964,7 +2964,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;
@@ -2975,7 +2975,7 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
if (parent)
{
- parent->setFocus(TRUE);
+ parent->setFocus(true);
}
}
@@ -3030,7 +3030,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);
}
@@ -3101,12 +3101,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
@@ -3116,26 +3116,26 @@ 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 )
+bool LLMenuGL::handleUnicodeCharHere( llwchar uni_char )
{
if (jumpKeysActive())
{
return handleJumpKey((KEY)uni_char);
}
- return FALSE;
+ return false;
}
-BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
+bool LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
{
// leave submenu in place if slope of mouse < MAX_MOUSE_SLOPE_SUB_MENU
- 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;
LLVector2 mouse_dir((F32)mouse_delta_x, (F32)mouse_delta_y);
@@ -3166,7 +3166,7 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
// moving mouse always highlights new item
if (mouse_delta_x != 0 || mouse_delta_y != 0)
{
- ((LLMenuItemGL*)viewp)->setHighlight(FALSE);
+ ((LLMenuItemGL*)viewp)->setHighlight(false);
}
}
}
@@ -3188,8 +3188,8 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
// moving mouse always highlights new item
if (mouse_delta_x != 0 || mouse_delta_y != 0)
{
- ((LLMenuItemGL*)viewp)->setHighlight(TRUE);
- LLMenuGL::setKeyboardMode(FALSE);
+ ((LLMenuItemGL*)viewp)->setHighlight(true);
+ LLMenuGL::setKeyboardMode(false);
}
mHasSelection = true;
}
@@ -3202,10 +3202,10 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
// drop-down menu is shown. Otherwise any other view won't be able to handle mouse events
// until the user chooses one of the drop-down menu items.
- return TRUE;
+ return true;
}
-BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
+bool LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
if (!mScrollable)
return blockMouseEvent(x, y);
@@ -3221,7 +3221,7 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
scrollItems(SD_UP);
}
- return TRUE;
+ return true;
}
@@ -3230,7 +3230,7 @@ void LLMenuGL::draw( void )
if (mNeedsArrange)
{
arrange();
- mNeedsArrange = FALSE;
+ mNeedsArrange = false;
}
if (mDropShadowed && !mTornOff)
{
@@ -3254,7 +3254,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())
{
@@ -3277,7 +3277,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)
@@ -3298,23 +3298,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 );
}
@@ -3331,12 +3331,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)
@@ -3347,7 +3347,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S3
if(!item_enabled)
{
- menu->setVisible( FALSE );
+ menu->setVisible( false );
return;
}
}
@@ -3412,7 +3412,7 @@ static LLDefaultChildRegistry::Register<LLMenuBarGL> r2("menu_bar");
LLMenuBarGL::LLMenuBarGL( const Params& p )
: LLMenuGL(p),
- mAltKeyTrigger(FALSE)
+ mAltKeyTrigger(false)
{}
// Default destructor
@@ -3422,19 +3422,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
@@ -3445,16 +3445,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())
@@ -3466,22 +3466,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();
}
@@ -3491,7 +3491,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);
@@ -3499,15 +3499,15 @@ 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)
+bool LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask)
{
// clicks on menu bar closes existing menus from other contexts but leave
// own menu open so that we get toggle behavior
@@ -3519,7 +3519,7 @@ BOOL LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask)
return LLMenuGL::handleMouseDown(x, y, mask);
}
-BOOL LLMenuBarGL::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLMenuBarGL::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return LLMenuGL::handleMouseDown(x, y, mask);
}
@@ -3563,14 +3563,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
@@ -3619,14 +3619,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 )
{
@@ -3634,7 +3634,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,12 +3657,12 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu )
return success;
}
-BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
+bool LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
{
- BOOL handled = FALSE;
+ 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);
@@ -3695,14 +3695,14 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
viewp->pointInView(local_x, local_y) &&
viewp->handleHover(local_x, local_y, mask))
{
- ((LLMenuItemGL*)viewp)->setHighlight(TRUE);
- handled = TRUE;
+ ((LLMenuItemGL*)viewp)->setHighlight(true);
+ handled = true;
if (active_menu && active_menu != viewp)
{
((LLMenuItemGL*)viewp)->onCommit();
- LLMenuGL::setKeyboardMode(FALSE);
+ LLMenuGL::setKeyboardMode(false);
}
- LLMenuGL::setKeyboardMode(FALSE);
+ LLMenuGL::setKeyboardMode(false);
}
}
@@ -3716,7 +3716,7 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
S32 local_y = y - viewp->getRect().mBottom;
if (!viewp->pointInView(local_x, local_y) && ((LLMenuItemGL*)viewp)->getHighlight())
{
- ((LLMenuItemGL*)viewp)->setHighlight(FALSE);
+ ((LLMenuItemGL*)viewp)->setHighlight(false);
}
}
}
@@ -3724,7 +3724,7 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
getWindow()->setCursor(UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
///============================================================================
@@ -3736,7 +3736,7 @@ LLMenuHolderGL::LLMenuHolderGL(const LLMenuHolderGL::Params& p)
: LLPanel(p)
{
sItemActivationTimer.stop();
- mCanHide = TRUE;
+ mCanHide = true;
}
void LLMenuHolderGL::draw()
@@ -3764,9 +3764,9 @@ void LLMenuHolderGL::draw()
}
}
-BOOL LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
+ bool handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
if (!handled)
{
LLMenuGL* visible_menu = (LLMenuGL*)getVisibleMenu();
@@ -3791,9 +3791,9 @@ BOOL LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask )
return handled;
}
-BOOL LLMenuHolderGL::handleRightMouseDown( S32 x, S32 y, MASK mask )
+bool LLMenuHolderGL::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL handled = LLView::childrenHandleRightMouseDown(x, y, mask) != NULL;
+ bool handled = LLView::childrenHandleRightMouseDown(x, y, mask) != NULL;
if (!handled)
{
// clicked off of menu, hide them all
@@ -3804,7 +3804,7 @@ BOOL LLMenuHolderGL::handleRightMouseDown( S32 x, S32 y, MASK mask )
// This occurs when you mouse-down to spawn a context menu, hold the button
// down, move off the menu, then mouse-up. We want this to close the menu.
-BOOL LLMenuHolderGL::handleRightMouseUp( S32 x, S32 y, MASK mask )
+bool LLMenuHolderGL::handleRightMouseUp( S32 x, S32 y, MASK mask )
{
const S32 SLOP = 2;
S32 spawn_dx = (x - sContextMenuSpawnPos.mX);
@@ -3816,10 +3816,10 @@ BOOL LLMenuHolderGL::handleRightMouseUp( S32 x, S32 y, MASK mask )
// so interpret the mouse-up as a single-click to show and leave on
// screen
sContextMenuSpawnPos.set(S32_MAX, S32_MAX);
- return TRUE;
+ return true;
}
- BOOL handled = LLView::childrenHandleRightMouseUp(x, y, mask) != NULL;
+ bool handled = LLView::childrenHandleRightMouseUp(x, y, mask) != NULL;
if (!handled)
{
// clicked off of menu, hide them all
@@ -3828,9 +3828,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)
@@ -3838,7 +3838,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
@@ -3847,7 +3847,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))
{
@@ -3864,7 +3864,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())
{
@@ -3887,14 +3887,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
@@ -3903,7 +3903,7 @@ BOOL LLMenuHolderGL::hideMenus()
LLView* viewp = *child_it;
if (dynamic_cast<LLMenuGL*>(viewp) != NULL && viewp->getVisible())
{
- viewp->setVisible(FALSE);
+ viewp->setVisible(false);
}
}
}
@@ -3932,9 +3932,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();
@@ -3949,12 +3949,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;
@@ -4002,7 +4002,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
@@ -4020,29 +4020,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)
@@ -4060,7 +4060,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;
@@ -4097,10 +4097,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;
}
@@ -4134,19 +4134,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();
@@ -4179,7 +4179,7 @@ void LLContextMenuBranch::onCommit( void )
showSubMenu();
}
-void LLContextMenuBranch::setHighlight( BOOL highlight )
+void LLContextMenuBranch::setHighlight( bool highlight )
{
if (highlight == getHighlight()) return;
LLMenuItemGL::setHighlight(highlight);
@@ -4209,13 +4209,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();
@@ -4284,53 +4284,53 @@ 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;
}
-BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
+bool LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
{
LLMenuGL::handleHover(x,y,mask);
- BOOL handled = FALSE;
+ bool handled = false;
LLMenuItemGL *item = getHighlightedItem();
if (item && item->getEnabled())
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- handled = TRUE;
+ handled = true;
if (item != mHoverItem)
{
if (mHoverItem)
{
- mHoverItem->setHighlight( FALSE );
+ mHoverItem->setHighlight( false );
}
mHoverItem = item;
- mHoverItem->setHighlight( TRUE );
+ mHoverItem->setHighlight( true );
}
- mHoveredAnyItem = TRUE;
+ mHoveredAnyItem = true;
}
else
{
// clear out our selection
if (mHoverItem)
{
- mHoverItem->setHighlight(FALSE);
+ mHoverItem->setHighlight(false);
mHoverItem = NULL;
}
}
@@ -4338,7 +4338,7 @@ BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
if( !handled && pointInView( x, y ) )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- handled = TRUE;
+ handled = true;
}
return handled;
@@ -4347,9 +4347,9 @@ BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
// handleMouseDown and handleMouseUp are handled by LLMenuGL
-BOOL LLContextMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLContextMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
// The click was somewhere within our rectangle
LLMenuItemGL *item = getHighlightedItem();
@@ -4357,13 +4357,13 @@ BOOL LLContextMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
S32 local_x = x - getRect().mLeft;
S32 local_y = y - getRect().mBottom;
- BOOL clicked_in_menu = pointInView(local_x, local_y) ;
+ bool clicked_in_menu = pointInView(local_x, local_y) ;
// grab mouse if right clicking anywhere within pie (even deadzone in middle), to detect drag outside of pie
if (clicked_in_menu)
{
// capture mouse cursor as if on initial menu show
- handled = TRUE;
+ handled = true;
}
if (item)
@@ -4372,14 +4372,14 @@ BOOL LLContextMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
// to make sure it's within the item's rectangle
if (item->handleMouseDown( 0, 0, mask ))
{
- handled = TRUE;
+ handled = true;
}
}
return handled;
}
-BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
+bool LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
{
S32 local_x = x - getRect().mLeft;
S32 local_y = y - getRect().mBottom;
@@ -4387,12 +4387,12 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
if (!mHoveredAnyItem && !pointInView(local_x, local_y))
{
sMenuContainer->hideMenus();
- return TRUE;
+ return true;
}
- BOOL result = handleMouseUp( x, y, mask );
- mHoveredAnyItem = FALSE;
+ bool result = handleMouseUp( x, y, mask );
+ mHoveredAnyItem = false;
return result;
}