Replace BOOL with bool in llwindow and dependent classes

master
Ansariel 2024-02-18 12:52:19 +01:00 committed by Andrey Lihatskiy
parent e83eff4468
commit c285f59ce2
276 changed files with 2640 additions and 2640 deletions

View File

@ -199,7 +199,7 @@ void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
}
//---------------------------------------------------------------------------------
BOOL LLAccordionCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLAccordionCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
return LLPanel::handleRightMouseDown(x, y, mask);
}
@ -552,13 +552,13 @@ void LLAccordionCtrl::arrange()
//---------------------------------------------------------------------------------
BOOL LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (LLPanel::handleScrollWheel(x, y, clicks))
return TRUE;
return true;
if (mScrollbar->getVisible() && mScrollbar->handleScrollWheel(0, 0, clicks))
return TRUE;
return FALSE;
return true;
return false;
}
BOOL LLAccordionCtrl::handleKeyHere(KEY key, MASK mask)

View File

@ -90,8 +90,8 @@ public:
virtual BOOL postBuild();
virtual BOOL handleRightMouseDown ( S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel ( S32 x, S32 y, S32 clicks );
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,
EDragAndDropType cargo_type,

View File

@ -482,7 +482,7 @@ void LLAccordionCtrlTab::onUpdateScrollToChild(const LLUICtrl *cntrl)
LLUICtrl::onUpdateScrollToChild(cntrl);
}
BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mCollapsible && mHeaderVisible && mCanOpenClose)
{
@ -493,13 +493,13 @@ BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask)
// Reset stored state
mWasStateStored = false;
return TRUE;
return true;
}
}
return LLUICtrl::handleMouseDown(x,y,mask);
}
BOOL LLAccordionCtrlTab::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLAccordionCtrlTab::handleMouseUp(S32 x, S32 y, MASK mask)
{
return LLUICtrl::handleMouseUp(x,y,mask);
}
@ -820,7 +820,7 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
if ((key == KEY_RETURN) && mask == MASK_NONE)
{
changeOpenClose(getDisplayChildren());
return TRUE;
return true;
}
if ((key == KEY_ADD || key == KEY_RIGHT) && mask == MASK_NONE)
@ -828,7 +828,7 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
if (!getDisplayChildren())
{
changeOpenClose(getDisplayChildren());
return TRUE;
return true;
}
}
@ -837,7 +837,7 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
if (getDisplayChildren())
{
changeOpenClose(getDisplayChildren());
return TRUE;
return true;
}
}
@ -853,7 +853,7 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
getAccordionView()->notify(LLSD().with("action", "select_first"));
}
return TRUE;
return true;
}
if (key == KEY_UP && mask == MASK_NONE)
@ -862,7 +862,7 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
// we're processing notifyParent so let call parent directly
getParent()->notifyParent(LLSD().with("action", "select_prev"));
return TRUE;
return true;
}
return LLUICtrl::handleKey(key, mask, called_from_parent);
@ -1097,7 +1097,7 @@ void LLAccordionCtrlTab::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top,
panel->setRect(panel_rect);
}
BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
bool LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
{
//header may be not the first child but we need to process it first
if (y >= (getRect().getHeight() - HEADER_HEIGHT - HEADER_HEIGHT / 2))
@ -1105,22 +1105,22 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
//inside tab header
//fix for EXT-6619
mHeader->handleToolTip(x, y, mask);
return TRUE;
return true;
}
return LLUICtrl::handleToolTip(x, y, mask);
}
BOOL LLAccordionCtrlTab::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLAccordionCtrlTab::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (LLUICtrl::handleScrollWheel(x, y, clicks))
{
return TRUE;
return true;
}
if (mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel(0, 0, clicks))
{
return TRUE;
return true;
}
return FALSE;
return false;
}

View File

@ -162,13 +162,13 @@ public:
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 handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(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 handleToolTip(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
virtual bool handleToolTip(S32 x, S32 y, MASK mask);
virtual bool handleScrollWheel( S32 x, S32 y, S32 clicks );
virtual bool addChild(LLView* child, S32 tab_group = 0 );

View File

@ -393,9 +393,9 @@ BOOL LLButton::postBuild()
return LLUICtrl::postBuild();
}
BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
bool LLButton::handleUnicodeCharHere(llwchar uni_char)
{
BOOL handled = FALSE;
bool handled = false;
if(' ' == uni_char
&& !gKeyboard->getKeyRepeated(' '))
{
@ -406,9 +406,9 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
LLUICtrl::onCommit();
handled = TRUE;
handled = true;
}
return handled;
return handled;
}
BOOL LLButton::handleKeyHere(KEY key, MASK mask )
@ -429,7 +429,7 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask )
}
BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (!childrenHandleMouseDown(x, y, mask))
{
@ -438,7 +438,7 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
if (hasTabStop() && !getIsChrome())
{
setFocus(TRUE);
setFocus(true);
}
if (!mFunctionName.empty())
@ -469,11 +469,11 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
make_ui_sound("UISndClick");
}
}
return TRUE;
return true;
}
BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@ -518,10 +518,10 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
childrenHandleMouseUp(x, y, mask);
}
return TRUE;
return true;
}
BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (mHandleRightMouse && !childrenHandleRightMouseDown(x, y, mask))
{
@ -530,7 +530,7 @@ BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
if (hasTabStop() && !getIsChrome())
{
setFocus(TRUE);
setFocus(true);
}
// if (pointInView(x, y))
@ -543,10 +543,10 @@ BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
// if they are not mouse opaque.
}
return TRUE;
return true;
}
BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
bool LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
if (mHandleRightMouse)
{
@ -572,7 +572,7 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
// but this might change the mouse handling of existing buttons in a bad way.
// if they are not mouse opaque.
}
return TRUE;
return true;
}
void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
@ -587,11 +587,11 @@ void LLButton::setHighlight(bool b)
mNeedsHighlight = b;
}
BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
bool LLButton::handleHover(S32 x, S32 y, MASK mask)
{
if (isInEnabledChain()
&& (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this))
mNeedsHighlight = TRUE;
mNeedsHighlight = true;
if (!childrenHandleHover(x, y, mask))
{
@ -610,7 +610,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL;
}
return TRUE;
return true;
}
void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height)
@ -1308,7 +1308,7 @@ void LLButton::resetMouseDownTimer()
mMouseDownTimer.reset();
}
BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLButton::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// just treat a double click as a second click
return handleMouseDown(x, y, mask);

View File

@ -155,14 +155,14 @@ 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 handleUnicodeCharHere(llwchar uni_char);
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);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(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 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);
virtual bool handleDoubleClick(S32 x, S32 y, MASK mask);
virtual void draw();
/*virtual*/ BOOL postBuild();

View File

@ -782,13 +782,13 @@ void LLComboBox::onItemSelected(const LLSD& data)
onCommit();
}
BOOL LLComboBox::handleToolTip(S32 x, S32 y, MASK mask)
bool LLComboBox::handleToolTip(S32 x, S32 y, MASK mask)
{
std::string tool_tip;
if(LLUICtrl::handleToolTip(x, y, mask))
{
return TRUE;
return true;
}
tool_tip = getToolTip();
@ -803,7 +803,7 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, MASK mask)
.message(tool_tip)
.sticky_rect(calcScreenRect()));
}
return TRUE;
return true;
}
BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
@ -852,9 +852,9 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
return result;
}
BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char)
bool LLComboBox::handleUnicodeCharHere(llwchar uni_char)
{
BOOL result = FALSE;
bool result = false;
if (gFocusMgr.childHasKeyboardFocus(this))
{
// space bar just shows the list

View File

@ -111,9 +111,9 @@ public:
// LLView interface
virtual void onFocusLost();
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
virtual bool handleToolTip(S32 x, S32 y, MASK mask);
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleUnicodeCharHere(llwchar uni_char);
virtual bool handleUnicodeCharHere(llwchar uni_char);
// LLUICtrl interface
virtual void clear(); // select nothing

View File

@ -74,14 +74,14 @@ bool LLContainerView::addChild(LLView* child, S32 tab_group)
return res;
}
BOOL LLContainerView::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLContainerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return handleMouseDown(x, y, mask);
}
BOOL LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if (mDisplayChildren)
{
handled = (LLView::childrenHandleMouseDown(x, y, mask) != NULL);
@ -92,15 +92,15 @@ BOOL LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
setDisplayChildren(!mDisplayChildren);
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
handled = TRUE;
handled = true;
}
}
return handled;
}
BOOL LLContainerView::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLContainerView::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if (mDisplayChildren)
{
handled = (LLView::childrenHandleMouseUp(x, y, mask) != NULL);

View File

@ -68,9 +68,9 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
/*virtual*/ BOOL handleDoubleClick(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*/ bool handleDoubleClick(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();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);

View File

@ -271,7 +271,7 @@ void LLDragHandleLeft::reshape(S32 width, S32 height, BOOL called_from_parent)
// UI event handling
//-------------------------------------------------------------
BOOL LLDragHandle::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLDragHandle::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Route future Mouse messages here preemptively. (Release on mouse up.)
// No handler needed for focus lost since this clas has no state that depends on it.
@ -282,11 +282,11 @@ BOOL LLDragHandle::handleMouseDown(S32 x, S32 y, MASK mask)
mLastMouseScreenY = mDragLastScreenY;
// Note: don't pass on to children
return TRUE;
return true;
}
BOOL LLDragHandle::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLDragHandle::handleMouseUp(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
@ -295,13 +295,13 @@ BOOL LLDragHandle::handleMouseUp(S32 x, S32 y, MASK mask)
}
// Note: don't pass on to children
return TRUE;
return true;
}
BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
bool LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@ -324,11 +324,11 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
delta_y >= SLOP)
{
parent->setDocked(false, false);
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}
@ -367,13 +367,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<LL_ENDL;
handled = TRUE;
handled = true;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
handled = TRUE;
handled = true;
}
// Note: don't pass on to children

View File

@ -72,9 +72,9 @@ public:
virtual void setTitle( const std::string& title ) = 0;
virtual std::string getTitle() const = 0;
virtual BOOL handleHover(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 bool handleHover(S32 x, S32 y, MASK mask);
virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
protected:
LLDragHandle(const Params&);

View File

@ -1561,17 +1561,17 @@ BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index
return FALSE;
}
BOOL LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLPanel::handleScrollWheel(x,y,clicks);
return TRUE;//always
return true;//always
}
// virtual
BOOL LLFloater::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLFloater::handleMouseUp(S32 x, S32 y, MASK mask)
{
LL_DEBUGS() << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
BOOL handled = LLPanel::handleMouseUp(x,y,mask); // Not implemented in LLPanel so this actually calls LLView
bool handled = LLPanel::handleMouseUp(x,y,mask); // Not implemented in LLPanel so this actually calls LLView
if (handled) {
LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-55,-55,getPathname());
}
@ -1579,7 +1579,7 @@ BOOL LLFloater::handleMouseUp(S32 x, S32 y, MASK mask)
}
// virtual
BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
{
if( mMinimized )
{
@ -1587,19 +1587,19 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
// Note: this block and the offerClickToButton helper method can be removed
// because the parent container will handle it for us but we'll keep it here
// for safety until after reworking the panel code to manage hidden children.
if(offerClickToButton(x, y, mask, BUTTON_CLOSE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_RESTORE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_CLOSE)) return true;
if(offerClickToButton(x, y, mask, BUTTON_RESTORE)) return true;
if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return true;
if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return true;
setFrontmost(TRUE, FALSE);
setFrontmost(true, false);
// Otherwise pass to drag handle for movement
return mDragHandle->handleMouseDown(x, y, mask);
}
else
{
bringToFront( x, y );
BOOL handled = LLPanel::handleMouseDown( x, y, mask );
bool handled = LLPanel::handleMouseDown( x, y, mask );
if (handled) {
LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-55,-55,getPathname());
}
@ -1608,14 +1608,14 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
}
// virtual
BOOL LLFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
BOOL was_minimized = mMinimized;
bool was_minimized = mMinimized;
bringToFront( x, y );
return was_minimized || LLPanel::handleRightMouseDown( x, y, mask );
}
BOOL LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
bringToFront( x, y );
return LLPanel::handleMiddleMouseDown( x, y, mask );
@ -1623,10 +1623,10 @@ BOOL LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
// virtual
BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
{
BOOL was_minimized = mMinimized;
setMinimized(FALSE);
bool was_minimized = mMinimized;
setMinimized(false);
return was_minimized || LLPanel::handleDoubleClick(x, y, mask);
}

View File

@ -293,13 +293,13 @@ public:
S32 getMinHeight() const{ return mMinHeight; }
S32 getHeaderHeight() const { return mHeaderHeight; }
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
virtual BOOL handleMiddleMouseDown(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 bool handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual bool handleDoubleClick(S32 x, S32 y, MASK mask);
virtual bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 mask);
virtual bool handleScrollWheel(S32 x, S32 y, S32 mask);
virtual void draw();
virtual void drawShadow(LLPanel* panel);

View File

@ -1310,20 +1310,20 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
}
BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)
bool LLFolderView::handleUnicodeCharHere(llwchar uni_char)
{
if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL
{
return FALSE;
return false;
}
if (uni_char > 0x7f)
{
LL_WARNS() << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << LL_ENDL;
return FALSE;
return false;
}
BOOL handled = FALSE;
bool handled = false;
if (mParentPanel.get()->hasFocus())
{
// SL-51858: Key presses are not being passed to the Popup menu.
@ -1344,21 +1344,21 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)
{
mSearchString += uni_char;
}
search(getCurSelectedItem(), mSearchString, FALSE);
search(getCurSelectedItem(), mSearchString, false);
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
{
mKeyboardSelection = FALSE;
mKeyboardSelection = false;
mSearchString.clear();
mParentPanel.get()->setFocus(TRUE);
mParentPanel.get()->setFocus(true);
LLEditMenuHandler::gEditMenuHandler = this;
@ -1432,19 +1432,19 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
return found;
}
BOOL LLFolderView::handleDoubleClick( S32 x, S32 y, MASK mask )
bool LLFolderView::handleDoubleClick( S32 x, S32 y, MASK mask )
{
// skip LLFolderViewFolder::handleDoubleClick()
return LLView::handleDoubleClick( x, y, mask );
}
BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
// all user operations move keyboard focus to inventory
// this way, we know when to stop auto-updating a search
mParentPanel.get()->setFocus(TRUE);
mParentPanel.get()->setFocus(true);
BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL;
bool handled = childrenHandleRightMouseDown(x, y, mask) != NULL;
S32 count = mSelectedItems.size();
LLMenuGL* menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
@ -1516,9 +1516,9 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
if (menu && menu->getVisible())
{
menu->setVisible(FALSE);
menu->setVisible(false);
}
setSelection(NULL, FALSE, TRUE);
setSelection(NULL, false, true);
}
return handled;
}
@ -1554,7 +1554,7 @@ BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const
return FALSE;
}
BOOL LLFolderView::handleHover( S32 x, S32 y, MASK mask )
bool LLFolderView::handleHover( S32 x, S32 y, MASK mask )
{
return LLView::handleHover( x, y, mask );
}

View File

@ -202,11 +202,11 @@ public:
// LLView functionality
///*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 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,
EDragAndDropType cargo_type,
void* cargo_data,

View File

@ -550,21 +550,21 @@ const std::string& LLFolderViewItem::getName( void ) const
}
// LLView functionality
BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
if(!mIsSelected)
{
getRoot()->setSelection(this, FALSE);
getRoot()->setSelection(this, false);
}
make_ui_sound("UISndClick");
return TRUE;
return true;
}
BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
{
if (LLView::childrenHandleMouseDown(x, y, mask))
{
return TRUE;
return true;
}
// No handler needed for focus lost since this class has no
@ -583,7 +583,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
}
else
{
getRoot()->setSelection(this, FALSE);
getRoot()->setSelection(this, false);
}
make_ui_sound("UISndClick");
}
@ -591,15 +591,15 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
{
// If selected, we reserve the decision of deselecting/reselecting to the mouse up moment.
// This is necessary so we maintain selection consistent when starting a drag.
mSelectPending = TRUE;
mSelectPending = true;
}
mDragStartX = x;
mDragStartY = y;
return TRUE;
return true;
}
BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
bool LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
{
static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::getInstance()->mSettingGroups["config"],"DragAndDropDistanceThreshold", 3);
@ -616,7 +616,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
{
// RN: when starting drag and drop, clear out last auto-open
root->autoOpenTest(NULL);
root->setShowSelectionContext(TRUE);
root->setShowSelectionContext(true);
// Release keyboard focus, so that if stuff is dropped into the
// world, pressing the delete key won't blow away the inventory
@ -631,31 +631,31 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
}
root->clearHoveredItem();
return TRUE;
return true;
}
else
{
LLFolderView* pRoot = getRoot();
pRoot->setHoveredItem(this);
pRoot->setShowSelectionContext(FALSE);
pRoot->setShowSelectionContext(false);
getWindow()->setCursor(UI_CURSOR_ARROW);
// let parent handle this then...
return FALSE;
return false;
}
}
BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
bool LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
{
openItem();
return TRUE;
return true;
}
BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
bool LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
{
if (LLView::childrenHandleMouseUp(x, y, mask))
{
return TRUE;
return true;
}
// if mouse hasn't moved since mouse down...
@ -672,21 +672,21 @@ BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
}
else
{
getRoot()->setSelection(this, FALSE);
getRoot()->setSelection(this, false);
}
}
mSelectPending = FALSE;
mSelectPending = false;
if( hasMouseCapture() )
{
if (getRoot())
{
getRoot()->setShowSelectionContext(FALSE);
getRoot()->setShowSelectionContext(false);
}
gFocusMgr.setMouseCapture( NULL );
}
return TRUE;
return true;
}
void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask)
@ -2019,9 +2019,9 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask,
}
BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
BOOL handled = FALSE;
bool handled = false;
if( isOpen() )
{
@ -2035,11 +2035,11 @@ BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
}
BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
bool LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
{
mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight));
BOOL handled = LLView::handleHover(x, y, mask);
bool handled = LLView::handleHover(x, y, mask);
if (!handled)
{
@ -2050,9 +2050,9 @@ BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
bool LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
{
BOOL handled = FALSE;
bool handled = false;
if( isOpen() )
{
handled = childrenHandleMouseDown(x,y,mask) != NULL;
@ -2063,7 +2063,7 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
&& !mSingleFolderMode)
{
toggleOpen();
handled = TRUE;
handled = true;
}
else
{
@ -2075,9 +2075,9 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
return handled;
}
BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
bool LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
{
BOOL handled = FALSE;
bool handled = false;
if(mSingleFolderMode)
{
static LLUICachedControl<bool> double_click_new_window("SingleModeDoubleClickOpenWindow", false);
@ -2094,7 +2094,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
getViewModelItem()->navigateToFolder(false);
});
}
return TRUE;
return true;
}
if( isOpen() )
@ -2109,12 +2109,12 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
if (double_click_action == 1)
{
getViewModelItem()->navigateToFolder(true);
return TRUE;
return true;
}
if (double_click_action == 2)
{
getViewModelItem()->navigateToFolder(false, true);
return TRUE;
return true;
}
}
if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad)
@ -2125,10 +2125,10 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
}
else
{
getRoot()->setSelection(this, FALSE);
getRoot()->setSelection(this, false);
toggleOpen();
}
handled = TRUE;
handled = true;
}
return handled;
}

View File

@ -284,11 +284,11 @@ public:
bool isSingleFolderMode() { return mSingleFolderMode; }
// LLView functionality
virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
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 handleDoubleClick( S32 x, S32 y, MASK mask );
virtual bool handleRightMouseDown( S32 x, S32 y, MASK mask );
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 handleDoubleClick( S32 x, S32 y, MASK mask );
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
@ -447,10 +447,10 @@ public:
virtual void openItem( void );
// LLView functionality
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
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 handleHover(S32 x, S32 y, MASK mask);
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,
EDragAndDropType cargo_type,

View File

@ -86,12 +86,12 @@ void LLIconCtrl::draw()
LLUICtrl::draw();
}
BOOL LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
bool LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
{
if (mInteractable && getEnabled())
{
getWindow()->setCursor(UI_CURSOR_HAND);
return TRUE;
return true;
}
return LLUICtrl::handleHover(x, y, mask);
}

View File

@ -71,7 +71,7 @@ public:
virtual void draw();
// llview overrides
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual bool handleHover(S32 x, S32 y, MASK mask);
// lluictrl overrides
void onVisibilityChange(BOOL new_visibility);

View File

@ -660,9 +660,9 @@ void LLLineEditor::onSpellCheckSettingsChange()
mSpellCheckStart = mSpellCheckEnd = -1;
}
BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
{
setFocus( TRUE );
setFocus( true );
mTripleClickTimer.setTimerExpirySec(TRIPLE_CLICK_INTERVAL);
if (mSelectionEnd == 0 && mSelectionStart == mText.length())
@ -674,7 +674,7 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
{
const LLWString& wtext = mText.getWString();
BOOL doSelectAll = TRUE;
bool doSelectAll = true;
// Select the word we're on
if( LLWStringUtil::isPartOfWord( wtext[mCursorPos] ) )
@ -709,7 +709,7 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
// 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;
// delay cursor flashing
mKeystrokeTimer.reset();
@ -717,15 +717,15 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
// take selection to 'primary' clipboard
updatePrimary();
return TRUE;
return true;
}
BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Check first whether the "clear search" button wants to deal with this.
if(childrenHandleMouseDown(x, y, mask) != NULL)
{
return TRUE;
return true;
}
if (!mSelectAllonFocusReceived
@ -737,7 +737,7 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
if (mask & MASK_SHIFT)
{
// assume we're starting a drag select
mIsSelecting = TRUE;
mIsSelecting = true;
// Handle selection extension
S32 old_cursor_pos = getCursor();
@ -793,14 +793,14 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
// 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;
}
}
gFocusMgr.setMouseCapture( this );
}
setFocus(TRUE);
setFocus(true);
// delay cursor flashing
mKeystrokeTimer.reset();
@ -808,40 +808,40 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
if (mMouseDownSignal)
(*mMouseDownSignal)(this,x,y,mask);
return TRUE;
return true;
}
BOOL LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
// LL_INFOS() << "MiddleMouseDown" << LL_ENDL;
setFocus( TRUE );
setFocus( true );
if( canPastePrimary() )
{
setCursorAtLocalPos(x);
pastePrimary();
}
return TRUE;
return true;
}
BOOL LLLineEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
setFocus(TRUE);
setFocus(true);
if (!LLUICtrl::handleRightMouseDown(x, y, mask) && getShowContextMenu())
{
showContextMenu(x, y);
}
return TRUE;
return true;
}
BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// Check first whether the "clear search" button wants to deal with this.
if(!hasMouseCapture())
{
if(childrenHandleHover(x, y, mask) != NULL)
{
return TRUE;
return true;
}
}
@ -884,34 +884,34 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_IBEAM);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;
handled = TRUE;
handled = true;
}
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_IBEAM);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
handled = true;
}
// Check first whether the "clear search" button wants to deal with this.
if(!handled && childrenHandleMouseUp(x, y, mask) != NULL)
{
return TRUE;
return true;
}
if( mIsSelecting )
@ -919,7 +919,7 @@ BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( x );
mSelectionEnd = getCursor();
handled = TRUE;
handled = true;
}
if( handled )
@ -1597,18 +1597,18 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
}
BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
{
if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL
{
return FALSE;
return false;
}
BOOL handled = FALSE;
bool handled = false;
if ( (gFocusMgr.getKeyboardFocus() == this) && getVisible() && !mReadOnly)
{
handled = TRUE;
handled = true;
LLLineEditorRollback rollback( this );
@ -2489,7 +2489,7 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string,
mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY);
}
BOOL LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const
bool LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const
{
if (control)
{
@ -2511,13 +2511,13 @@ BOOL LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
if (preedit_right_column < mScrollHPos)
{
// This should not occure...
return FALSE;
return false;
}
const S32 query = (query_offset >= 0 ? preedit_left_column + query_offset : getCursor());
if (query < mScrollHPos || query < preedit_left_column || query > preedit_right_column)
{
return FALSE;
return false;
}
if (coord)
@ -2544,7 +2544,7 @@ BOOL LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
LLUI::getInstance()->screenRectToGL(preedit_rect_screen, bounds);
}
return TRUE;
return true;
}
void LLLineEditor::getPreeditRange(S32 *position, S32 *length) const

View File

@ -122,14 +122,14 @@ public:
virtual ~LLLineEditor();
// mousehandler overrides
/*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);
/*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 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);
/*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 handleUnicodeCharHere(llwchar uni_char);
/*virtual*/ bool handleUnicodeCharHere(llwchar uni_char);
/*virtual*/ void onMouseCaptureLost();
// LLEditMenuHandler overrides
@ -319,7 +319,7 @@ public:
const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position);
virtual void markAsPreedit(S32 position, S32 length);
virtual void getPreeditRange(S32 *position, S32 *length) const;
virtual BOOL getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const;
virtual bool getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const;
virtual S32 getPreeditFontSize() const;
virtual LLWString getPreeditString() const { return getWText(); }

View File

@ -142,13 +142,13 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
return FALSE;
}
BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLButton::handleMouseDown(x, y, mask);
toggleMenu();
return TRUE;
return true;
}
void LLMenuButton::toggleMenu()

View File

@ -65,7 +65,7 @@ public:
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
void hideMenu();

View File

@ -229,14 +229,14 @@ BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask)
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);
}
@ -254,14 +254,14 @@ void LLMenuItemGL::onMouseLeave(S32 x, S32 y, MASK 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);
@ -453,26 +453,26 @@ BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask )
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();
@ -605,49 +605,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;
}
}
@ -663,7 +663,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 )
@ -1019,14 +1019,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);
onCommit();
make_ui_sound("UISndClickRelease");
return TRUE;
return true;
}
bool LLMenuItemBranchGL::hasAccelerator(const KEY &key, const MASK &mask) const
@ -1363,8 +1363,8 @@ public:
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);
@ -1490,10 +1490,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())
{
@ -1505,12 +1505,12 @@ 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;
}
@ -3118,19 +3118,19 @@ BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask)
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);
@ -3161,7 +3161,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);
}
}
}
@ -3183,8 +3183,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;
}
@ -3197,10 +3197,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);
@ -3216,7 +3216,7 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
scrollItems(SD_UP);
}
return TRUE;
return true;
}
@ -3503,7 +3503,7 @@ BOOL LLMenuBarGL::handleJumpKey(KEY key)
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
@ -3515,7 +3515,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);
}
@ -3652,9 +3652,9 @@ 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;
@ -3690,14 +3690,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);
((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);
}
}
@ -3711,7 +3711,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);
}
}
}
@ -3719,7 +3719,7 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
getWindow()->setCursor(UI_CURSOR_ARROW);
return TRUE;
return true;
}
///============================================================================
@ -3759,9 +3759,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();
@ -3786,9 +3786,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
@ -3799,7 +3799,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);
@ -3811,10 +3811,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
@ -4296,36 +4296,36 @@ void LLContextMenu::hide()
}
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;
}
}
@ -4333,7 +4333,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;
@ -4342,9 +4342,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();
@ -4352,13 +4352,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)
@ -4367,14 +4367,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;
@ -4382,12 +4382,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;
mHoveredAnyItem = false;
return result;
}

View File

@ -90,9 +90,9 @@ protected:
public:
// LLView overrides
/*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);
/*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);
// LLUICtrl overrides
/*virtual*/ void setValue(const LLSD& value);
@ -163,9 +163,9 @@ public:
// LLView Functionality
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 );
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 );
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
@ -241,9 +241,9 @@ public:
LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p = LLMenuItemSeparatorGL::Params());
/*virtual*/ void draw( void );
/*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);
/*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);
virtual void buildDrawLabel();
@ -442,9 +442,9 @@ public:
void parseChildXML(LLXMLNodePtr child, LLView* parent);
// LLView Functionality
/*virtual*/ BOOL handleUnicodeCharHere( llwchar uni_char );
/*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
/*virtual*/ BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
/*virtual*/ bool handleUnicodeCharHere( llwchar uni_char );
/*virtual*/ bool handleHover( S32 x, S32 y, MASK mask );
/*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);
@ -643,7 +643,7 @@ protected:
public:
virtual ~LLMenuItemBranchGL();
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
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);
@ -721,9 +721,9 @@ public:
virtual void show (S32 x, S32 y, LLView* spawning_view = NULL);
virtual void hide ();
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 );
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 );
virtual bool addChild (LLView* view, S32 tab_group = 0);
@ -788,8 +788,8 @@ public:
/*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*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
/*virtual*/ void draw();
/*virtual*/ BOOL jumpKeysActive();
@ -798,7 +798,7 @@ public:
virtual BOOL addSeparator();
// LLView Functionality
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
virtual bool handleHover( S32 x, S32 y, MASK mask );
// Returns x position of rightmost child, usually Help menu
S32 getRightmostMenuEdge();
@ -837,11 +837,11 @@ public:
// LLView functionality
virtual void draw();
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
virtual bool handleMouseDown( S32 x, S32 y, MASK mask );
virtual bool handleRightMouseDown( S32 x, S32 y, MASK mask );
// Close context menus on right mouse up not handled by menus.
/*virtual*/ BOOL handleRightMouseUp( S32 x, S32 y, MASK mask );
/*virtual*/ bool handleRightMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
virtual const LLRect getMenuRect() const { return getLocalRect(); }

View File

@ -169,7 +169,7 @@ void LLModalDialog::setVisible( BOOL visible )
LLFloater::setVisible( visible );
}
BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
if (popup_menu != NULL)
@ -197,10 +197,10 @@ BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
}
return TRUE;
return true;
}
BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
bool LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
{
if( childrenHandleHover(x, y, mask) == NULL )
{
@ -223,36 +223,36 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
}
}
return TRUE;
return true;
}
BOOL LLModalDialog::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLModalDialog::handleMouseUp(S32 x, S32 y, MASK mask)
{
childrenHandleMouseUp(x, y, mask);
return TRUE;
return true;
}
BOOL LLModalDialog::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLModalDialog::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
childrenHandleScrollWheel(x, y, clicks);
return TRUE;
return true;
}
BOOL LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (!LLFloater::handleDoubleClick(x, y, mask))
{
// Click outside the panel
make_ui_sound("UISndInvalidOp");
}
return TRUE;
return true;
}
BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLMenuGL::sMenuContainer->hideMenus();
childrenHandleRightMouseDown(x, y, mask);
return TRUE;
return true;
}

View File

@ -49,12 +49,12 @@ public:
/*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);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*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 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);
/*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*/ void setVisible(BOOL visible);

View File

@ -498,7 +498,7 @@ void LLMultiSlider::clear()
LLF32UICtrl::clear();
}
BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
bool LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
{
if( gFocusMgr.getMouseCapture() == this )
{
@ -531,12 +531,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
}
return TRUE;
return true;
}
BOOL LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( gFocusMgr.getMouseCapture() == this )
{
@ -545,23 +545,23 @@ BOOL LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
if (mMouseUpSignal)
(*mMouseUpSignal)( this, LLSD() );
handled = TRUE;
handled = true;
make_ui_sound("UISndClickRelease");
}
else
{
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
{
// only do sticky-focus on non-chrome widgets
if (!getIsChrome())
{
setFocus(TRUE);
setFocus(true);
}
if (mMouseDownSignal)
(*mMouseDownSignal)( this, LLSD() );
@ -611,7 +611,7 @@ BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
}
make_ui_sound("UISndClick");
return TRUE;
return true;
}
BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask)

View File

@ -110,9 +110,9 @@ public:
void deleteCurSlider() { deleteSlider(mCurSlider); }
/*virtual*/ void clear() override;
/*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 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*/ void onMouseLeave(S32 x, S32 y, MASK mask) override;
/*virtual*/ void draw() override;

View File

@ -54,7 +54,7 @@ public:
/*virtual*/ void setValue(const LLSD& value);
/*virtual*/ BOOL postBuild();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
LLSD getPayload() { return mPayload; }
@ -470,12 +470,12 @@ BOOL LLRadioCtrl::postBuild()
return TRUE;
}
BOOL LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Grab focus preemptively, before button takes mousecapture
if (hasTabStop() && getEnabled())
{
focusFirstItem(FALSE, FALSE);
focusFirstItem(false, false);
}
else
{

View File

@ -89,9 +89,9 @@ LLResizeBar::LLResizeBar(const LLResizeBar::Params& p)
}
}
BOOL LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (!canResize()) return FALSE;
if (!canResize()) return false;
// Route future Mouse messages here preemptively. (Release on mouse up.)
// No handler needed for focus lost since this clas has no state that depends on it.
@ -101,31 +101,31 @@ BOOL LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask)
mLastMouseScreenX = mDragLastScreenX;
mLastMouseScreenY = mDragLastScreenY;
return TRUE;
return true;
}
BOOL LLResizeBar::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLResizeBar::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
// Release the mouse
gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
handled = true;
}
else
{
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
bool LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@ -289,11 +289,11 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
}
}
handled = TRUE;
handled = true;
}
else
{
handled = TRUE;
handled = true;
}
if( handled && canResize() )
@ -320,7 +320,7 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
return handled;
} // end LLResizeBar::handleHover
BOOL LLResizeBar::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLResizeBar::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLRect orig_rect = mResizingView->getRect();
LLRect scaled_rect = orig_rect;
@ -350,7 +350,7 @@ BOOL LLResizeBar::handleDoubleClick(S32 x, S32 y, MASK mask)
mResizingView->setShape(scaled_rect, true);
}
return TRUE;
return true;
}
void LLResizeBar::setImagePanel(LLPanel * panelp)

View File

@ -53,10 +53,10 @@ protected:
public:
virtual BOOL handleHover(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 BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
virtual bool handleHover(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 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; }

View File

@ -76,12 +76,12 @@ LLResizeHandle::~LLResizeHandle()
}
BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( pointInHandle(x, y) )
{
handled = TRUE;
handled = true;
// Route future Mouse messages here preemptively. (Release on mouse up.)
// No handler needed for focus lost since this clas has no state that depends on it.
gFocusMgr.setMouseCapture( this );
@ -95,28 +95,28 @@ BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask)
}
BOOL LLResizeHandle::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLResizeHandle::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
// Release the mouse
gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
handled = true;
}
else if( pointInHandle(x, y) )
{
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
bool LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@ -327,13 +327,13 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
}
}
handled = TRUE;
handled = true;
}
else // don't have mouse capture
{
if( pointInHandle( x, y ) )
{
handled = TRUE;
handled = true;
}
}

View File

@ -51,9 +51,9 @@ protected:
friend class LLUICtrlFactory;
public:
virtual void draw();
virtual BOOL handleHover(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 bool handleHover(S32 x, S32 y, MASK mask);
virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; }

View File

@ -238,10 +238,10 @@ void LLScrollbar::updateThumbRect()
}
}
BOOL LLScrollbar::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLScrollbar::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Check children first
BOOL handled_by_child = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
bool handled_by_child = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
if( !handled_by_child )
{
if( mThumbRect.pointInRect(x,y) )
@ -279,16 +279,16 @@ BOOL LLScrollbar::handleMouseDown(S32 x, S32 y, MASK mask)
}
}
return TRUE;
return true;
}
BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
bool LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
{
// Note: we don't bother sending the event to the children (the arrow buttons)
// because they'll capture the mouse whenever they need hover events.
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
S32 height = getRect().getHeight();
@ -382,7 +382,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;
handled = TRUE;
handled = true;
}
else
{
@ -394,26 +394,26 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
handled = TRUE;
handled = true;
}
mDocChanged = FALSE;
mDocChanged = false;
return handled;
} // end handleHover
BOOL LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
BOOL handled = changeLine( clicks * mStepSize, TRUE );
bool handled = changeLine( clicks * mStepSize, true );
return handled;
}
BOOL LLScrollbar::handleScrollHWheel(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);
handled = changeLine(clicks * mStepSize, true);
}
return handled;
}
@ -440,13 +440,13 @@ BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return FALSE;
}
BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
handled = true;
}
else
{
@ -457,7 +457,7 @@ BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
BOOL LLScrollbar::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLScrollbar::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// just treat a double click as a second click
return handleMouseDown(x, y, mask);

View File

@ -83,12 +83,12 @@ public:
// Overrides from LLView
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 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,
EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg);

View File

@ -227,21 +227,21 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
BOOL LLScrollContainer::handleUnicodeCharHere(llwchar uni_char)
bool LLScrollContainer::handleUnicodeCharHere(llwchar uni_char)
{
if (mScrolledView && mScrolledView->handleUnicodeCharHere(uni_char))
{
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
bool LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
// Give event to my child views - they may have scroll bars
// (Bad UI design, but technically possible.)
if (LLUICtrl::handleScrollWheel(x,y,clicks))
return TRUE;
return true;
// When the vertical scrollbar is visible, scroll wheel
// only affects vertical scrolling. It's confusing to have
@ -257,7 +257,7 @@ BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
updateScroll();
}
// Always eat the event
return TRUE;
return true;
}
LLScrollbar* horizontal = mScrollbar[HORIZONTAL];
@ -268,16 +268,16 @@ BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
&& horizontal->handleScrollWheel( 0, 0, clicks ) )
{
updateScroll();
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks)
bool LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
if (LLUICtrl::handleScrollHWheel(x,y,clicks))
{
return TRUE;
return true;
}
LLScrollbar* horizontal = mScrollbar[HORIZONTAL];
@ -286,10 +286,10 @@ BOOL LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks)
&& horizontal->handleScrollHWheel( 0, 0, clicks ) )
{
updateScroll();
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,

View File

@ -107,9 +107,9 @@ public:
// LLView functionality
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 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,
EDragAndDropType cargo_type,
void* cargo_data,

View File

@ -93,7 +93,7 @@ void LLScrollColumnHeader::draw()
LLButton::draw();
}
BOOL LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (canResize() && mResizeBar->getRect().pointInRect(x, y))
{
@ -107,7 +107,7 @@ BOOL LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
{
onClick(LLSD());
}
return TRUE;
return true;
}
void LLScrollColumnHeader::onClick(const LLSD& data)

View File

@ -50,7 +50,7 @@ public:
~LLScrollColumnHeader();
/*virtual*/ void draw();
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
/*virtual*/ LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding);
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);

View File

@ -1743,29 +1743,29 @@ void LLScrollListCtrl::setEnabled(BOOL enabled)
mScrollbar->setTabStop(!enabled && mScrollbar->getPageSize() < mScrollbar->getDocSize());
}
BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
BOOL handled = FALSE;
bool handled = false;
// Pretend the mouse is over the scrollbar
handled = mScrollbar->handleScrollWheel( 0, 0, clicks );
if (mMouseWheelOpaque)
{
return TRUE;
return true;
}
return handled;
}
BOOL LLScrollListCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
bool LLScrollListCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
BOOL handled = FALSE;
bool handled = false;
// Pretend the mouse is over the scrollbar
handled = mScrollbar->handleScrollHWheel( 0, 0, clicks );
if (mMouseWheelOpaque)
{
return TRUE;
return true;
}
return handled;
@ -1783,20 +1783,20 @@ LLRect LLScrollListCtrl::getCellRect(S32 row_index, S32 column_index)
return cell_rect;
}
BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
bool LLScrollListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
S32 column_index = getColumnIndexFromOffset(x);
LLScrollListColumn* columnp = getColumn(column_index);
if (columnp == NULL) return FALSE;
if (columnp == NULL) return false;
BOOL handled = FALSE;
bool handled = false;
// show tooltip for full name of hovered item if it has been truncated
LLScrollListItem* hit_item = hitItem(x, y);
if (hit_item)
{
LLScrollListCell* hit_cell = hit_item->getColumn(column_index);
if (!hit_cell) return FALSE;
if (!hit_cell) return false;
if (hit_cell
&& hit_cell->isText()
&& hit_cell->needsToolTip())
@ -1815,7 +1815,7 @@ BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
.delay_time(0.2f)
.sticky_rect(sticky_rect));
}
handled = TRUE;
handled = true;
}
// otherwise, look for a tooltip associated with this column
@ -1934,14 +1934,14 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
}
BOOL LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = childrenHandleMouseDown(x, y, mask) != NULL;
bool handled = childrenHandleMouseDown(x, y, mask) != NULL;
if( !handled )
{
// set keyboard focus first, in case click action wants to move focus elsewhere
setFocus(TRUE);
setFocus(true);
// clear selection changed flag because user is starting a selection operation
mSelectionChanged = false;
@ -1952,7 +1952,7 @@ BOOL LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@ -1978,7 +1978,7 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
}
// virtual
BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLScrollListItem *item = hitItem(x, y);
if (item)
@ -2035,7 +2035,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
return LLUICtrl::handleRightMouseDown(x, y, mask);
}
return FALSE;
return false;
}
void LLScrollListCtrl::showProfile(std::string id, bool is_group)
@ -2108,10 +2108,10 @@ void LLScrollListCtrl::copySLURLToClipboard(std::string id, bool is_group)
LLUrlAction::copyURLToClipboard(slurl);
}
BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{
//BOOL handled = FALSE;
BOOL handled = handleClick(x, y, mask);
bool handled = handleClick(x, y, mask);
if (!handled)
{
@ -2127,7 +2127,7 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
}
}
return TRUE;
return true;
}
BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
@ -2279,9 +2279,9 @@ S32 LLScrollListCtrl::getRowOffsetFromIndex(S32 index)
}
BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
bool LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if (hasMouseCapture())
{
@ -2521,11 +2521,11 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
return handled;
}
BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
bool LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL
{
return FALSE;
return false;
}
// perform incremental search based on keyboard input
@ -2538,7 +2538,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
// type ahead search is case insensitive
uni_char = LLStringOps::toLower((llwchar)uni_char);
if (selectItemByPrefix(wstring_to_utf8str(mSearchString + (llwchar)uni_char), FALSE))
if (selectItemByPrefix(wstring_to_utf8str(mSearchString + (llwchar)uni_char), false))
{
// update search string only on successful match
mNeedsScroll = true;
@ -2609,7 +2609,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
}
}
return TRUE;
return true;
}

View File

@ -337,16 +337,16 @@ public:
// Overridden from LLView
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*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 handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
/*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 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*/ 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 onFocusReceived();

View File

@ -157,7 +157,7 @@ void LLSlider::setValueAndCommit(F32 value)
}
BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
bool LLSlider::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
@ -193,12 +193,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
}
return TRUE;
return true;
}
BOOL LLSlider::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLSlider::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if( hasMouseCapture() )
{
@ -207,23 +207,23 @@ BOOL LLSlider::handleMouseUp(S32 x, S32 y, MASK mask)
if (mMouseUpSignal)
(*mMouseUpSignal)( this, getValueF32() );
handled = TRUE;
handled = true;
make_ui_sound("UISndClickRelease");
}
else
{
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
{
// only do sticky-focus on non-chrome widgets
if (!getIsChrome())
{
setFocus(TRUE);
setFocus(true);
}
if (mMouseDownSignal)
(*mMouseDownSignal)( this, getValueF32() );
@ -253,7 +253,7 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
}
make_ui_sound("UISndClick");
return TRUE;
return true;
}
BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
@ -277,13 +277,13 @@ BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
return handled;
}
BOOL LLSlider::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLSlider::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if ( mOrientation == VERTICAL )
{
F32 new_val = getValueF32() - clicks * getIncrement();
setValueAndCommit(new_val);
return TRUE;
return true;
}
return LLF32UICtrl::handleScrollWheel(x,y,clicks);
}

View File

@ -72,11 +72,11 @@ public:
boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb );
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 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 handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
private:

View File

@ -457,7 +457,7 @@ void LLSpinCtrl::reportInvalidData()
make_ui_sound("UISndBadKeystroke");
}
BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if( clicks > 0 )
{
@ -472,7 +472,7 @@ BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
onUpBtn(getValue());
}
return TRUE;
return true;
}
BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)

View File

@ -88,7 +88,7 @@ public:
void forceEditorCommit(); // for commit on external button
virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks);
virtual bool handleScrollWheel(S32 x,S32 y,S32 clicks);
virtual BOOL handleKeyHere(KEY key, MASK mask);
void onEditorCommit(const LLSD& data);

View File

@ -209,7 +209,7 @@ LLStatBar::LLStatBar(const Params& p)
setStat(p.stat);
}
BOOL LLStatBar::handleHover(S32 x, S32 y, MASK mask)
bool LLStatBar::handleHover(S32 x, S32 y, MASK mask)
{
switch(mStatType)
{
@ -228,38 +228,38 @@ BOOL LLStatBar::handleHover(S32 x, S32 y, MASK mask)
default:
break;
}
return TRUE;
return true;
}
BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleMouseDown(x, y, mask);
bool handled = LLView::handleMouseDown(x, y, mask);
if (!handled)
{
if (mDisplayBar)
{
if (mDisplayHistory || mOrientation == HORIZONTAL)
{
mDisplayBar = FALSE;
mDisplayHistory = FALSE;
mDisplayBar = false;
mDisplayHistory = false;
}
else
{
mDisplayHistory = TRUE;
mDisplayHistory = true;
}
}
else
{
mDisplayBar = TRUE;
mDisplayBar = true;
if (mOrientation == HORIZONTAL)
{
mDisplayHistory = TRUE;
mDisplayHistory = true;
}
}
LLView* parent = getParent();
parent->reshape(parent->getRect().getWidth(), parent->getRect().getHeight(), FALSE);
parent->reshape(parent->getRect().getWidth(), parent->getRect().getHeight(), false);
}
return TRUE;
return true;
}
template<typename T>

View File

@ -61,8 +61,8 @@ public:
LLStatBar(const Params&);
virtual void draw();
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual bool handleHover(S32 x, S32 y, MASK mask);
void setStat(const std::string& stat_name);

View File

@ -541,11 +541,11 @@ void LLTabContainer::draw()
// virtual
BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
bool LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
{
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
BOOL handled = FALSE;
BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
bool handled = false;
bool has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
if (has_scroll_arrows)
{
@ -617,10 +617,10 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
}
// virtual
BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
bool LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
{
BOOL handled = FALSE;
BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
bool handled = false;
bool has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
if (has_scroll_arrows)
{
@ -663,10 +663,10 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
}
// virtual
BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
bool LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
{
BOOL handled = FALSE;
BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
bool handled = false;
bool has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
S32 local_x = x - getRect().mLeft;
S32 local_y = y - getRect().mBottom;
@ -710,11 +710,11 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
{
if (cur_panel)
{
if (!cur_panel->focusFirstItem(FALSE))
if (!cur_panel->focusFirstItem(false))
{
// if nothing in the panel gets focus, make sure the new tab does
// otherwise the last tab might keep focus
getTab(getCurrentPanelIndex())->mButton->setFocus(TRUE);
getTab(getCurrentPanelIndex())->mButton->setFocus(true);
}
}
gFocusMgr.setMouseCapture(NULL);
@ -727,15 +727,15 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
}
// virtual
BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask)
bool LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask)
{
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
BOOL handled = LLPanel::handleToolTip( x, y, mask);
bool handled = LLPanel::handleToolTip( x, y, mask);
if (!handled && getTabCount() > 0 && !getTabsHidden())
{
LLTabTuple* firsttuple = getTab(0);
BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0);
bool has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0);
LLRect clip;
if (mIsVertical)
{

View File

@ -139,10 +139,10 @@ public:
/*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 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,
EDragAndDropType type, void* cargo_data,

View File

@ -1079,14 +1079,14 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert)
needsReflow(reflow_start_index);
}
BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
{
// handle triple click
if (!mTripleClickTimer.hasExpired())
{
if (mSkipTripleClick)
{
return TRUE;
return true;
}
S32 real_line = getLineNumFromDocIndex(mCursorPos, false);
@ -1114,26 +1114,26 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
if (line_start == -1)
{
return TRUE;
return true;
}
mSelectionEnd = line_start;
mSelectionStart = line_end;
setCursorPos(line_start);
return TRUE;
return true;
}
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleMouseDown(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleMouseDown(x, y, mask);
}
BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (hasMouseCapture() && cur_segment && cur_segment->handleMouseUp(x, y, mask))
@ -1146,57 +1146,57 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask)
// *TODO: send URL here?
(*mURLClickSignal)(this, LLSD() );
}
return TRUE;
return true;
}
return LLUICtrl::handleMouseUp(x, y, mask);
}
BOOL LLTextBase::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLTextBase::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleMiddleMouseDown(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleMiddleMouseDown(x, y, mask);
}
BOOL LLTextBase::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
bool LLTextBase::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleMiddleMouseUp(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleMiddleMouseUp(x, y, mask);
}
BOOL LLTextBase::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLTextBase::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleRightMouseDown(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleRightMouseDown(x, y, mask);
}
BOOL LLTextBase::handleRightMouseUp(S32 x, S32 y, MASK mask)
bool LLTextBase::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleRightMouseUp(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleRightMouseUp(x, y, mask);
}
BOOL LLTextBase::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLTextBase::handleDoubleClick(S32 x, S32 y, MASK mask)
{
//Don't start triple click timer if user have clicked on scrollbar
mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect();
@ -1209,40 +1209,40 @@ BOOL LLTextBase::handleDoubleClick(S32 x, S32 y, MASK mask)
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleDoubleClick(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleDoubleClick(x, y, mask);
}
BOOL LLTextBase::handleHover(S32 x, S32 y, MASK mask)
bool LLTextBase::handleHover(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleHover(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleHover(x, y, mask);
}
BOOL LLTextBase::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLTextBase::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleScrollWheel(x, y, clicks))
{
return TRUE;
return true;
}
return LLUICtrl::handleScrollWheel(x, y, clicks);
}
BOOL LLTextBase::handleToolTip(S32 x, S32 y, MASK mask)
bool LLTextBase::handleToolTip(S32 x, S32 y, MASK mask)
{
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
if (cur_segment && cur_segment->handleToolTip(x, y, mask))
{
return TRUE;
return true;
}
return LLUICtrl::handleToolTip(x, y, mask);
@ -3228,17 +3228,17 @@ void LLTextSegment::setToken( LLKeywordToken* token ) {}
LLKeywordToken* LLTextSegment::getToken() const { return NULL; }
void LLTextSegment::setToolTip( const std::string &msg ) {}
void LLTextSegment::dump() const {}
BOOL LLTextSegment::handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleMiddleMouseUp(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleRightMouseUp(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleHover(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; }
BOOL LLTextSegment::handleScrollHWheel(S32 x, S32 y, S32 clicks) { return FALSE; }
BOOL LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; }
bool LLTextSegment::handleMouseDown(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleMiddleMouseUp(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleRightMouseUp(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleDoubleClick(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleHover(S32 x, S32 y, MASK mask) { return false; }
bool LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return false; }
bool LLTextSegment::handleScrollHWheel(S32 x, S32 y, S32 clicks) { return false; }
bool LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return false; }
const std::string& LLTextSegment::getName() const
{
return LLStringUtil::null;
@ -3246,7 +3246,7 @@ const std::string& LLTextSegment::getName() const
void LLTextSegment::onMouseCaptureLost() {}
void LLTextSegment::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {}
void LLTextSegment::localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {}
BOOL LLTextSegment::hasMouseCapture() { return FALSE; }
bool LLTextSegment::hasMouseCapture() { return false; }
//
// LLNormalTextSegment
@ -3364,7 +3364,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
return right_x;
}
BOOL LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask)
bool LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask)
{
if (getStyle() && getStyle()->isLink())
{
@ -3372,13 +3372,13 @@ BOOL LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask)
if(mEditor.getSegmentAtLocalPos(x, y, false) == this)
{
LLUI::getInstance()->getWindow()->setCursor(UI_CURSOR_HAND);
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL LLNormalTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLNormalTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (getStyle() && getStyle()->isLink())
{
@ -3386,13 +3386,13 @@ BOOL LLNormalTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask)
if(mEditor.getSegmentAtLocalPos(x, y, false) == this)
{
mEditor.createUrlContextMenu(x, y, getStyle()->getLinkHREF());
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL LLNormalTextSegment::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLNormalTextSegment::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (getStyle() && getStyle()->isLink())
{
@ -3400,14 +3400,14 @@ BOOL LLNormalTextSegment::handleMouseDown(S32 x, S32 y, MASK mask)
if(mEditor.getSegmentAtLocalPos(x, y, false) == this)
{
// eat mouse down event on hyperlinks, so we get the mouse up
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (getStyle() && getStyle()->isLink())
{
@ -3423,14 +3423,14 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLUrlAction::openURLExternal(url);
}
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL LLNormalTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
bool LLNormalTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
{
std::string msg;
// do we have a tooltip for a loaded keyword (for script editor)?
@ -3438,16 +3438,16 @@ BOOL LLNormalTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
{
const LLWString& wmsg = mToken->getToolTip();
LLToolTipMgr::instance().show(wstring_to_utf8str(wmsg));
return TRUE;
return true;
}
// or do we have an explicitly set tooltip (e.g., for Urls)
if (!mTooltip.empty())
{
LLToolTipMgr::instance().show(mTooltip);
return TRUE;
return true;
}
return FALSE;
return false;
}
void LLNormalTextSegment::setToolTip(const std::string& tooltip)
@ -3611,7 +3611,7 @@ F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start
}
/*virtual*/
BOOL LLOnHoverChangeableTextSegment::handleHover(S32 x, S32 y, MASK mask)
bool LLOnHoverChangeableTextSegment::handleHover(S32 x, S32 y, MASK mask)
{
mStyle = mEditor.getSkipLinkUnderline() ? mNormalStyle : mHoveredStyle;
return LLNormalTextSegment::handleHover(x, y, mask);
@ -3786,15 +3786,15 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
return 0;
}
BOOL LLImageTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
bool LLImageTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
{
if (!mTooltip.empty())
{
LLToolTipMgr::instance().show(mTooltip);
return TRUE;
return true;
}
return FALSE;
return false;
}
void LLImageTextSegment::setToolTip(const std::string& tooltip)

View File

@ -94,22 +94,22 @@ public:
virtual void dump() const;
// LLMouseHandler interface
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseUp(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 handleToolTip(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*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseUp(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 handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ const std::string& getName() const;
/*virtual*/ void onMouseCaptureLost();
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
/*virtual*/ BOOL hasMouseCapture();
/*virtual*/ bool hasMouseCapture();
S32 getStart() const { return mStart; }
void setStart(S32 start) { mStart = start; }
@ -142,11 +142,11 @@ public:
/*virtual*/ void setToolTip(const std::string& tooltip);
/*virtual*/ void dump() const;
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(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*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseDown(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*/ bool handleToolTip(S32 x, S32 y, MASK mask);
protected:
F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect);
@ -184,7 +184,7 @@ class LLOnHoverChangeableTextSegment : public LLNormalTextSegment
public:
LLOnHoverChangeableTextSegment( LLStyleConstSP style, LLStyleConstSP normal_style, S32 start, S32 end, LLTextBase& editor );
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
protected:
// Style used for text when mouse pointer is over segment
LLStyleConstSP mHoveredStyle;
@ -255,7 +255,7 @@ public:
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 char_offset, S32 max_chars, S32 line_ind) const;
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ void setToolTip(const std::string& tooltip);
private:
@ -339,16 +339,16 @@ public:
};
// LLMouseHandler interface
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseUp(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 handleToolTip(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*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseUp(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 handleToolTip(S32 x, S32 y, MASK mask);
// LLView interface
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);

View File

@ -52,9 +52,9 @@ LLTextBox::LLTextBox(const LLTextBox::Params& p)
LLTextBox::~LLTextBox()
{}
BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLTextBase::handleMouseDown(x, y, mask);
bool handled = LLTextBase::handleMouseDown(x, y, mask);
if (getSoundFlags() & MOUSE_DOWN)
{
@ -63,7 +63,7 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
if (!handled && mClickedCallback)
{
handled = TRUE;
handled = true;
}
if (handled)
@ -75,9 +75,9 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = LLTextBase::handleMouseUp(x, y, mask);
bool handled = LLTextBase::handleMouseUp(x, y, mask);
if (getSoundFlags() & MOUSE_UP)
{
@ -96,21 +96,21 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
if (mClickedCallback && !handled)
{
mClickedCallback();
handled = TRUE;
handled = true;
}
}
return handled;
}
BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
bool LLTextBox::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = LLTextBase::handleHover(x, y, mask);
bool handled = LLTextBase::handleHover(x, y, mask);
if (!handled && mClickedCallback && mShowCursorHand)
{
// Clickable text boxes change the cursor to a hand
LLUI::getInstance()->getWindow()->setCursor(UI_CURSOR_HAND);
return TRUE;
return true;
}
return handled;
}

View File

@ -48,9 +48,9 @@ protected:
public:
virtual ~LLTextBox();
/*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);
/*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);
/*virtual*/ void setEnabled(BOOL enabled);

View File

@ -668,15 +668,15 @@ void LLTextEditor::selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_p
endSelection();
}
BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// set focus first, in case click callbacks want to change it
// RN: do we really need to have a tab stop?
if (hasTabStop())
{
setFocus( TRUE );
setFocus( true );
}
// Let scrollbar have first dibs
@ -689,7 +689,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
deselect();
}
BOOL start_select = TRUE;
bool start_select = true;
if( start_select )
{
// If we're not scrolling (handled by child), then we're selecting
@ -717,7 +717,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
}
handled = TRUE;
handled = true;
}
// Delay cursor flashing
@ -730,11 +730,11 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (hasTabStop())
{
setFocus(TRUE);
setFocus(true);
}
bool show_menu = false;
@ -742,7 +742,7 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
// Prefer editor menu if it has selection. See EXT-6806.
if (hasSelection())
{
S32 click_pos = getDocIndexFromLocalCoord(x, y, FALSE);
S32 click_pos = getDocIndexFromLocalCoord(x, y, false);
if (click_pos > mSelectionStart && click_pos < mSelectionEnd)
{
show_menu = true;
@ -760,16 +760,16 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
showContextMenu(x, y);
}
return TRUE;
return true;
}
BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
if (hasTabStop())
{
setFocus(TRUE);
setFocus(true);
}
if (!LLTextBase::handleMouseDown(x, y, mask))
@ -781,13 +781,13 @@ BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
pastePrimary();
}
}
return TRUE;
return true;
}
BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
if(hasMouseCapture() )
{
@ -804,7 +804,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
}
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;
getWindow()->setCursor(UI_CURSOR_IBEAM);
handled = TRUE;
handled = true;
}
if( !handled )
@ -822,16 +822,16 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_IBEAM);
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// if I'm not currently selecting text
if (!(mIsSelecting && hasMouseCapture()))
@ -857,7 +857,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
// take selection to 'primary' clipboard
updatePrimary();
handled = TRUE;
handled = true;
}
// Delay cursor flashing
@ -867,16 +867,16 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
handled = true;
}
return handled;
}
BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// let scrollbar and text segments have first dibs
handled = LLTextBase::handleDoubleClick(x, y, mask);
@ -914,7 +914,7 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
// 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;
// delay cursor flashing
resetCursorBlink();
@ -922,7 +922,7 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
// take selection to 'primary' clipboard
updatePrimary();
handled = TRUE;
handled = true;
}
return handled;
@ -1825,14 +1825,14 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask )
}
BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
{
if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL
{
return FALSE;
return false;
}
BOOL handled = FALSE;
bool handled = false;
// Handle most keys only if the text editor is writeable.
if( !mReadOnly )
@ -1848,7 +1848,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
// Keys that add characters temporarily hide the cursor
getWindow()->hideCursorUntilMouseMove();
handled = TRUE;
handled = true;
}
if( handled )
@ -2755,7 +2755,7 @@ void LLTextEditor::updatePreedit(const LLWString &preedit_string,
onKeyStroke();
}
BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const
bool LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const
{
if (control)
{
@ -2778,13 +2778,13 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
const S32 query = (query_offset >= 0 ? preedit_left_position + query_offset : mCursorPos);
if (query < preedit_left_position || query > preedit_right_position)
{
return FALSE;
return false;
}
const S32 first_visible_line = getFirstVisibleLine();
if (query < getLineStart(first_visible_line))
{
return FALSE;
return false;
}
S32 current_line = first_visible_line;
@ -2845,7 +2845,7 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
LLUI::getInstance()->screenRectToGL(preedit_rect_screen, bounds);
}
return TRUE;
return true;
}
void LLTextEditor::getSelectionRange(S32 *position, S32 *length) const
@ -2891,7 +2891,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length)
mPreeditPositions[0] = position;
mPreeditPositions[1] = position + length;
mPreeditStandouts.resize(1);
mPreeditStandouts[0] = FALSE;
mPreeditStandouts[0] = false;
}
else
{

View File

@ -92,15 +92,15 @@ public:
static S32 spacesPerTab();
// mousehandler overrides
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(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 handleDoubleClick(S32 x, S32 y, MASK mask );
virtual BOOL handleMiddleMouseDown(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 bool handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual bool handleHover(S32 x, S32 y, MASK mask);
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 handleUnicodeCharHere(llwchar uni_char);
virtual bool handleUnicodeCharHere(llwchar uni_char);
virtual void onMouseCaptureLost();
@ -259,7 +259,7 @@ protected:
virtual void markAsPreedit(S32 position, S32 length);
virtual void getPreeditRange(S32 *position, S32 *length) const;
virtual void getSelectionRange(S32 *position, S32 *length) const;
virtual BOOL getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const;
virtual bool getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const;
virtual S32 getPreeditFontSize() const;
virtual LLWString getPreeditString() const { return getWText(); }
//
@ -276,7 +276,7 @@ protected:
LLWString mPreeditWString;
LLWString mPreeditOverwrittenWString;
std::vector<S32> mPreeditPositions;
std::vector<BOOL> mPreeditStandouts;
std::vector<bool> mPreeditStandouts;
protected:
LLUIColor mDefaultColor;

View File

@ -406,11 +406,11 @@ bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash, bool forc
return (command_button != NULL);
}
BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLRect button_panel_rect;
mButtonPanel->localRectToOtherView(mButtonPanel->getLocalRect(), &button_panel_rect, this);
BOOL handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y);
bool handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y);
if (handle_it_here)
{
@ -1122,16 +1122,16 @@ LLToolBarButton::~LLToolBarButton()
delete mIsStartingSignal;
}
BOOL LLToolBarButton::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLToolBarButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
mMouseDownX = x;
mMouseDownY = y;
return LLButton::handleMouseDown(x, y, mask);
}
BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
bool LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3);
@ -1143,7 +1143,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
{
mStartDragItemCallback(x, y, this);
mIsDragged = true;
handled = TRUE;
handled = true;
}
else
{

View File

@ -62,8 +62,8 @@ public:
LLToolBarButton(const Params& p);
~LLToolBarButton();
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
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);
@ -215,7 +215,7 @@ public:
// virtuals
void draw();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
bool handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,

View File

@ -71,7 +71,7 @@ void LLToolTipView::draw()
LLView::draw();
}
BOOL LLToolTipView::handleHover(S32 x, S32 y, MASK mask)
bool LLToolTipView::handleHover(S32 x, S32 y, MASK mask)
{
static S32 last_x = x;
static S32 last_y = y;
@ -89,7 +89,7 @@ BOOL LLToolTipView::handleHover(S32 x, S32 y, MASK mask)
return LLView::handleHover(x, y, mask);
}
BOOL LLToolTipView::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLToolTipView::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLToolTipMgr::instance().blockToolTips();
@ -98,29 +98,29 @@ BOOL LLToolTipView::handleMouseDown(S32 x, S32 y, MASK mask)
// If we are handling the mouse event menu holder
// won't get a chance to close menus so do this here
LLMenuGL::sMenuContainer->hideMenus();
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLToolTipView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLToolTipView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
LLToolTipMgr::instance().blockToolTips();
return LLView::handleMiddleMouseDown(x, y, mask);
}
BOOL LLToolTipView::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLToolTipView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLToolTipMgr::instance().blockToolTips();
return LLView::handleRightMouseDown(x, y, mask);
}
BOOL LLToolTipView::handleScrollWheel( S32 x, S32 y, S32 clicks )
bool LLToolTipView::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
LLToolTipMgr::instance().blockToolTips();
return FALSE;
return false;
}
void LLToolTipView::drawStickyRect()
@ -341,7 +341,7 @@ void LLToolTip::setVisible(BOOL visible)
}
}
BOOL LLToolTip::handleHover(S32 x, S32 y, MASK mask)
bool LLToolTip::handleHover(S32 x, S32 y, MASK mask)
{
//mInfoButton->setFlashing(true);
if(mInfoButton)
@ -352,7 +352,7 @@ BOOL LLToolTip::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_HAND);
}
return TRUE;
return true;
}
void LLToolTip::onMouseLeave(S32 x, S32 y, MASK mask)

View File

@ -44,11 +44,11 @@ public:
Params();
};
LLToolTipView(const LLToolTipView::Params&);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseDown(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 handleScrollWheel( S32 x, S32 y, S32 clicks );
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMouseDown(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 handleScrollWheel( S32 x, S32 y, S32 clicks );
void drawStickyRect();
@ -97,7 +97,7 @@ public:
Params();
};
/*virtual*/ void draw();
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
/*virtual*/ void setVisible(BOOL visible);

View File

@ -342,12 +342,12 @@ void LLUICtrl::onMouseLeave(S32 x, S32 y, MASK mask)
}
//virtual
BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
LL_DEBUGS() << "LLUICtrl::handleMouseDown calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
BOOL handled = LLView::handleMouseDown(x,y,mask);
bool handled = LLView::handleMouseDown(x,y,mask);
if (mMouseDownSignal)
{
@ -362,12 +362,12 @@ BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
}
//virtual
BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
LL_DEBUGS() << "LLUICtrl::handleMouseUp calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
BOOL handled = LLView::handleMouseUp(x,y,mask);
bool handled = LLView::handleMouseUp(x,y,mask);
if (handled) {
LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-56,-56,getPathname());
}
@ -382,9 +382,9 @@ BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask)
}
//virtual
BOOL LLUICtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLUICtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleRightMouseDown(x,y,mask);
bool handled = LLView::handleRightMouseDown(x,y,mask);
if (mRightMouseDownSignal)
{
(*mRightMouseDownSignal)(this,x,y,mask);
@ -393,9 +393,9 @@ BOOL LLUICtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
//virtual
BOOL LLUICtrl::handleRightMouseUp(S32 x, S32 y, MASK mask)
bool LLUICtrl::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleRightMouseUp(x,y,mask);
bool handled = LLView::handleRightMouseUp(x,y,mask);
if(mRightMouseUpSignal)
{
(*mRightMouseUpSignal)(this,x,y,mask);
@ -403,9 +403,9 @@ BOOL LLUICtrl::handleRightMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
BOOL LLUICtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLUICtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleDoubleClick(x, y, mask);
bool handled = LLView::handleDoubleClick(x, y, mask);
if (mDoubleClickSignal)
{
(*mDoubleClickSignal)(this, x, y, mask);

View File

@ -155,11 +155,11 @@ public:
/*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 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;
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) override;
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask) 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;
/*virtual*/ bool handleRightMouseUp(S32 x, S32 y, MASK mask) override;
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
// From LLFocusableElement
/*virtual*/ void setFocus( BOOL b ) override;

View File

@ -683,7 +683,7 @@ void LLView::setSnappedTo(const LLView* snap_view)
{
}
BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
bool LLView::handleHover(S32 x, S32 y, MASK mask)
{
return childrenHandleHover( x, y, mask ) != NULL;
}
@ -897,9 +897,9 @@ F32 LLView::getTooltipTimeout()
: tooltip_delay);
}
BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
bool LLView::handleToolTip(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
bool handled = false;
// parents provide tooltips first, which are optionally
// overridden by children, in case child is mouse_opaque
@ -916,14 +916,14 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
.sticky_rect(calcScreenRect())
.delay_time(getTooltipTimeout()));
}
handled = TRUE;
handled = true;
}
// child tooltips will override our own
LLView* child_handler = childrenHandleToolTip(x, y, mask);
if (child_handler)
{
handled = TRUE;
handled = true;
}
return handled;
@ -1044,9 +1044,9 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
}
BOOL LLView::handleUnicodeCharHere(llwchar uni_char )
bool LLView::handleUnicodeCharHere(llwchar uni_char )
{
return FALSE;
return false;
}
@ -1062,56 +1062,56 @@ void LLView::onMouseCaptureLost()
{
}
BOOL LLView::hasMouseCapture()
bool LLView::hasMouseCapture()
{
return gFocusMgr.getMouseCapture() == this;
}
BOOL LLView::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLView::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLView* r = childrenHandleMouseUp( x, y, mask );
return (r!=NULL);
}
BOOL LLView::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLView::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLView* r= childrenHandleMouseDown(x, y, mask );
return (r!=NULL);
}
BOOL LLView::handleDoubleClick(S32 x, S32 y, MASK mask)
bool LLView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return childrenHandleDoubleClick( x, y, mask ) != NULL;
}
BOOL LLView::handleScrollWheel(S32 x, S32 y, S32 clicks)
bool LLView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
return childrenHandleScrollWheel( x, y, clicks ) != NULL;
}
BOOL LLView::handleScrollHWheel(S32 x, S32 y, S32 clicks)
bool LLView::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
return childrenHandleScrollHWheel( x, y, clicks ) != NULL;
}
BOOL LLView::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
return childrenHandleRightMouseDown( x, y, mask ) != NULL;
}
BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask)
bool LLView::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
return childrenHandleRightMouseUp( x, y, mask ) != NULL;
}
BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
bool LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
return childrenHandleMiddleMouseDown( x, y, mask ) != NULL;
}
BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
bool LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
return childrenHandleMiddleMouseUp( x, y, mask ) != NULL;
}

View File

@ -421,21 +421,21 @@ public:
// LLMouseHandler functions
// Default behavior is to pass events to children
/*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 handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleDoubleClick(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 handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleToolTip(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 handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMiddleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleDoubleClick(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 handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleRightMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ const std::string& getName() const;
/*virtual*/ void onMouseCaptureLost();
/*virtual*/ BOOL hasMouseCapture();
/*virtual*/ bool hasMouseCapture();
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
@ -514,7 +514,7 @@ public:
//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 bool handleUnicodeCharHere(llwchar uni_char);
virtual void handleReshape(const LLRect& rect, bool by_user);
virtual void dirtyRect();

View File

@ -384,7 +384,7 @@ void LLVirtualTrackball::getAzimuthAndElevationDeg(const LLQuaternion &quat, F32
elevation *= RAD_TO_DEG;
}
BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
bool LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@ -413,7 +413,7 @@ BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
{ // set on click mode
if (!pointInTouchCircle(x, y))
{
return TRUE; // don't drag outside the circle
return true; // don't drag outside the circle
}
F32 radius = mTouchArea->getRect().getWidth() / 2;
@ -453,10 +453,10 @@ BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
mPrevY = y;
onCommit();
}
return TRUE;
return true;
}
BOOL LLVirtualTrackball::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLVirtualTrackball::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@ -468,7 +468,7 @@ BOOL LLVirtualTrackball::handleMouseUp(S32 x, S32 y, MASK mask)
return LLView::handleMouseUp(x, y, mask);
}
BOOL LLVirtualTrackball::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLVirtualTrackball::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (pointInTouchCircle(x, y))
{
@ -481,7 +481,7 @@ BOOL LLVirtualTrackball::handleMouseDown(S32 x, S32 y, MASK mask)
return LLView::handleMouseDown(x, y, mask);
}
BOOL LLVirtualTrackball::handleRightMouseDown(S32 x, S32 y, MASK mask)
bool LLVirtualTrackball::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (pointInTouchCircle(x, y))
{

View File

@ -81,10 +81,10 @@ public:
virtual ~LLVirtualTrackball();
/*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 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 void draw();

View File

@ -275,7 +275,7 @@ void LLXYVector::update()
mYEntry->setValue(mValueY);
}
BOOL LLXYVector::handleHover(S32 x, S32 y, MASK mask)
bool LLXYVector::handleHover(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@ -298,10 +298,10 @@ BOOL LLXYVector::handleHover(S32 x, S32 y, MASK mask)
}
}
return TRUE;
return true;
}
BOOL LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask)
bool LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@ -311,7 +311,7 @@ BOOL LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask)
if (mTouchArea->getRect().pointInRect(x, y))
{
return TRUE;
return true;
}
else
{
@ -319,7 +319,7 @@ BOOL LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask)
}
}
BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask)
bool LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mTouchArea->getRect().pointInRect(x, y))
@ -327,7 +327,7 @@ BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask)
gFocusMgr.setMouseCapture(this);
make_ui_sound("UISndClick");
return TRUE;
return true;
}
else
{

View File

@ -68,9 +68,9 @@ public:
virtual ~LLXYVector();
/*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 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 void draw();

View File

@ -124,7 +124,7 @@ class LLDragDropWin32Target:
ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( cursor_coord_window.convert(), mask,
LLWindowCallbacks::DNDA_START_TRACKING, mDropUrl );
@ -179,7 +179,7 @@ class LLDragDropWin32Target:
ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( cursor_coord_window.convert(), mask,
LLWindowCallbacks::DNDA_TRACK, mDropUrl );
@ -219,7 +219,7 @@ class LLDragDropWin32Target:
if (NULL != window_imp)
{
LLCoordGL gl_coord( 0, 0 );
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DNDA_STOP_TRACKING, mDropUrl );
};
return S_OK;
@ -249,7 +249,7 @@ class LLDragDropWin32Target:
LL_INFOS() << LL_ENDL;
// no keyboard modifier option yet but we could one day
MASK mask = gKeyboard->currentMask( TRUE );
MASK mask = gKeyboard->currentMask( true );
// actually do the drop
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
@ -312,7 +312,7 @@ LLDragDropWin32::~LLDragDropWin32()
bool LLDragDropWin32::init( HWND hWnd )
{
if ( NOERROR != OleInitialize( NULL ) )
return FALSE;
return false;
mDropTarget = new LLDragDropWin32Target( hWnd );
if ( mDropTarget )

View File

@ -486,7 +486,7 @@ std::string get_string(IDxDiagContainer *containerp, WCHAR *wszPropName)
LLVersion::LLVersion()
{
mValid = FALSE;
mValid = false;
S32 i;
for (i = 0; i < 4; i++)
{
@ -494,7 +494,7 @@ LLVersion::LLVersion()
}
}
BOOL LLVersion::set(const std::string &version_string)
bool LLVersion::set(const std::string &version_string)
{
S32 i;
for (i = 0; i < 4; i++)
@ -521,11 +521,11 @@ BOOL LLVersion::set(const std::string &version_string)
{
mFields[i] = 0;
}
mValid = FALSE;
mValid = false;
}
else
{
mValid = TRUE;
mValid = true;
}
return mValid;
}
@ -681,10 +681,10 @@ LLDXDevice *LLDXHardware::findDevice(const std::string &vendor, const std::strin
}
*/
BOOL LLDXHardware::getInfo(BOOL vram_only)
bool LLDXHardware::getInfo(bool vram_only)
{
LLTimer hw_timer;
BOOL ok = FALSE;
bool ok = false;
HRESULT hr;
CoInitialize(NULL);
@ -811,7 +811,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
if (vram_only)
{
ok = TRUE;
ok = true;
goto LCleanup;
}
@ -871,7 +871,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
tokenizer::iterator iter = tokens.begin();
S32 count = 0;
BOOL valid = TRUE;
bool valid = true;
for (;(iter != tokens.end()) && (count < 3);++iter)
{
switch (count)
@ -879,7 +879,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
case 0:
if (strcmp(iter->c_str(), "PCI"))
{
valid = FALSE;
valid = false;
}
break;
case 1:
@ -950,7 +950,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
}
// dumpDevices();
ok = TRUE;
ok = true;
LCleanup:
if (!ok)

View File

@ -37,12 +37,12 @@ class LLVersion
{
public:
LLVersion();
BOOL set(const std::string &version_string);
bool set(const std::string &version_string);
S32 getField(const S32 field_num);
protected:
std::string mVersionString;
S32 mFields[4];
BOOL mValid;
bool mValid;
};
class LLDXDriverFile
@ -84,9 +84,9 @@ public:
void setWriteDebugFunc(void (*func)(const char*));
void cleanup();
// Returns TRUE on success.
// vram_only TRUE does a "light" probe.
BOOL getInfo(BOOL vram_only);
// Returns true on success.
// vram_only true does a "light" probe.
bool getInfo(bool vram_only);
// WMI can return multiple GPU drivers
// specify which one to output

View File

@ -55,10 +55,10 @@ LLKeyboard::LLKeyboard() : mCallbacks(NULL)
for (i = 0; i < KEY_COUNT; i++)
{
mKeyLevelFrameCount[i] = 0;
mKeyLevel[i] = FALSE;
mKeyUp[i] = FALSE;
mKeyDown[i] = FALSE;
mKeyRepeated[i] = FALSE;
mKeyLevel[i] = false;
mKeyUp[i] = false;
mKeyDown[i] = false;
mKeyRepeated[i] = false;
}
mInsertMode = LL_KIM_INSERT;
@ -150,14 +150,14 @@ void LLKeyboard::addKeyName(KEY key, const std::string& name)
void LLKeyboard::resetKeyDownAndHandle()
{
MASK mask = currentMask(FALSE);
MASK mask = currentMask(false);
for (S32 i = 0; i < KEY_COUNT; i++)
{
if (mKeyLevel[i])
{
mKeyDown[i] = FALSE;
mKeyLevel[i] = FALSE;
mKeyUp[i] = TRUE;
mKeyDown[i] = false;
mKeyLevel[i] = false;
mKeyUp[i] = true;
mCurTranslatedKey = (KEY)i;
mCallbacks->handleTranslatedKeyUp(i, mask);
}
@ -174,28 +174,28 @@ void LLKeyboard::resetKeys()
{
if( mKeyLevel[i] )
{
mKeyLevel[i] = FALSE;
mKeyLevel[i] = false;
}
}
for (i = 0; i < KEY_COUNT; i++)
{
mKeyUp[i] = FALSE;
mKeyUp[i] = false;
}
for (i = 0; i < KEY_COUNT; i++)
{
mKeyDown[i] = FALSE;
mKeyDown[i] = false;
}
for (i = 0; i < KEY_COUNT; i++)
{
mKeyRepeated[i] = FALSE;
mKeyRepeated[i] = false;
}
}
BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
bool LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
{
std::map<U16, KEY>::iterator iter;
@ -205,12 +205,12 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
{
//LL_WARNS() << "Unknown virtual key " << os_key << LL_ENDL;
*out_key = 0;
return FALSE;
return false;
}
else
{
*out_key = iter->second;
return TRUE;
return true;
}
}
@ -230,47 +230,47 @@ U16 LLKeyboard::inverseTranslateKey(const KEY translated_key)
}
BOOL LLKeyboard::handleTranslatedKeyDown(KEY translated_key, U32 translated_mask)
bool LLKeyboard::handleTranslatedKeyDown(KEY translated_key, U32 translated_mask)
{
BOOL handled = FALSE;
BOOL repeated = FALSE;
bool handled = false;
bool repeated = false;
// is this the first time the key went down?
// if so, generate "character" message
if( !mKeyLevel[translated_key] )
{
mKeyLevel[translated_key] = TRUE;
mKeyLevel[translated_key] = true;
mKeyLevelTimer[translated_key].reset();
mKeyLevelFrameCount[translated_key] = 0;
mKeyRepeated[translated_key] = FALSE;
mKeyRepeated[translated_key] = false;
}
else
{
// Level is already down, assume it's repeated.
repeated = TRUE;
mKeyRepeated[translated_key] = TRUE;
repeated = true;
mKeyRepeated[translated_key] = true;
}
mKeyDown[translated_key] = TRUE;
mKeyDown[translated_key] = true;
mCurTranslatedKey = (KEY)translated_key;
handled = mCallbacks->handleTranslatedKeyDown(translated_key, translated_mask, repeated);
return handled;
}
BOOL LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask)
bool LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask)
{
BOOL handled = FALSE;
bool handled = false;
if( mKeyLevel[translated_key] )
{
mKeyLevel[translated_key] = FALSE;
mKeyLevel[translated_key] = false;
// Only generate key up events if the key is thought to
// be down. This allows you to call resetKeys() in the
// middle of a frame and ignore subsequent KEY_UP
// messages in the same frame. This was causing the
// sequence W<return> in chat to move agents forward. JC
mKeyUp[translated_key] = TRUE;
mKeyUp[translated_key] = true;
handled = mCallbacks->handleTranslatedKeyUp(translated_key, translated_mask);
}
@ -306,14 +306,14 @@ S32 LLKeyboard::getKeyElapsedFrameCount(KEY key)
}
// static
BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key)
bool LLKeyboard::keyFromString(const std::string& str, KEY *key)
{
std::string instring(str);
size_t length = instring.size();
if (length < 1)
{
return FALSE;
return false;
}
if (length == 1)
{
@ -326,7 +326,7 @@ BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key)
('{' <= ch && ch <= '~')) // {|}~
{
*key = ch;
return TRUE;
return true;
}
}
@ -335,10 +335,10 @@ BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key)
if (res != 0)
{
*key = res;
return TRUE;
return true;
}
LL_WARNS() << "keyFromString failed: " << str << LL_ENDL;
return FALSE;
return false;
}
@ -486,52 +486,52 @@ std::string LLKeyboard::stringFromAccelerator(MASK accel_mask, EMouseClickType c
}
//static
BOOL LLKeyboard::maskFromString(const std::string& str, MASK *mask)
bool LLKeyboard::maskFromString(const std::string& str, MASK *mask)
{
std::string instring(str);
if (instring == "NONE")
{
*mask = MASK_NONE;
return TRUE;
return true;
}
else if (instring == "SHIFT")
{
*mask = MASK_SHIFT;
return TRUE;
return true;
}
else if (instring == "CTL")
{
*mask = MASK_CONTROL;
return TRUE;
return true;
}
else if (instring == "ALT")
{
*mask = MASK_ALT;
return TRUE;
return true;
}
else if (instring == "CTL_SHIFT")
{
*mask = MASK_CONTROL | MASK_SHIFT;
return TRUE;
return true;
}
else if (instring == "ALT_SHIFT")
{
*mask = MASK_ALT | MASK_SHIFT;
return TRUE;
return true;
}
else if (instring == "CTL_ALT")
{
*mask = MASK_CONTROL | MASK_ALT;
return TRUE;
return true;
}
else if (instring == "CTL_ALT_SHIFT")
{
*mask = MASK_CONTROL | MASK_ALT | MASK_SHIFT;
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}

View File

@ -64,17 +64,17 @@ public:
F32 getCurKeyElapsedTime() { return getKeyDown(mCurScanKey) ? getKeyElapsedTime( mCurScanKey ) : 0.f; }
F32 getCurKeyElapsedFrameCount() { return getKeyDown(mCurScanKey) ? (F32)getKeyElapsedFrameCount( mCurScanKey ) : 0.f; }
BOOL getKeyDown(const KEY key) { return mKeyLevel[key]; }
BOOL getKeyRepeated(const KEY key) { return mKeyRepeated[key]; }
bool getKeyDown(const KEY key) { return mKeyLevel[key]; }
bool getKeyRepeated(const KEY key) { return mKeyRepeated[key]; }
BOOL translateKey(const U16 os_key, KEY *translated_key);
bool translateKey(const U16 os_key, KEY *translated_key);
U16 inverseTranslateKey(const KEY translated_key);
BOOL handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
BOOL handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
bool handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
bool handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0;
virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0;
virtual bool handleKeyUp(const U16 key, MASK mask) = 0;
virtual bool handleKeyDown(const U16 key, MASK mask) = 0;
#ifdef LL_DARWIN
// We only actually use this for macOS.
@ -87,14 +87,14 @@ public:
virtual void scanKeyboard() = 0; // scans keyboard, calls functions as necessary
// Mac must differentiate between Command = Control for keyboard events
// and Command != Control for mouse events.
virtual MASK currentMask(BOOL for_mouse_event) = 0;
virtual MASK currentMask(bool for_mouse_event) = 0;
virtual KEY currentKey() { return mCurTranslatedKey; }
EKeyboardInsertMode getInsertMode() { return mInsertMode; }
void toggleInsertMode();
static BOOL maskFromString(const std::string& str, MASK *mask); // False on failure
static BOOL keyFromString(const std::string& str, KEY *key); // False on failure
static bool maskFromString(const std::string& str, MASK *mask); // False on failure
static bool keyFromString(const std::string& str, KEY *key); // False on failure
static std::string stringFromKey(KEY key, bool translate = true);
static std::string stringFromMouse(EMouseClickType click, bool translate = true);
static std::string stringFromAccelerator( MASK accel_mask ); // separated for convinience, returns with "+": "Shift+" or "Shift+Alt+"...
@ -117,10 +117,10 @@ protected:
LLTimer mKeyLevelTimer[KEY_COUNT]; // Time since level was set
S32 mKeyLevelFrameCount[KEY_COUNT]; // Frames since level was set
BOOL mKeyLevel[KEY_COUNT]; // Levels
BOOL mKeyRepeated[KEY_COUNT]; // Key was repeated
BOOL mKeyUp[KEY_COUNT]; // Up edge
BOOL mKeyDown[KEY_COUNT]; // Down edge
bool mKeyLevel[KEY_COUNT]; // Levels
bool mKeyRepeated[KEY_COUNT]; // Key was repeated
bool mKeyUp[KEY_COUNT]; // Up edge
bool mKeyDown[KEY_COUNT]; // Down edge
KEY mCurTranslatedKey;
KEY mCurScanKey; // Used during the scanKeyboard()

View File

@ -35,14 +35,14 @@ void LLKeyboardHeadless::resetMaskKeys()
{ }
BOOL LLKeyboardHeadless::handleKeyDown(const U16 key, const U32 mask)
{ return FALSE; }
bool LLKeyboardHeadless::handleKeyDown(const U16 key, const U32 mask)
{ return false; }
BOOL LLKeyboardHeadless::handleKeyUp(const U16 key, const U32 mask)
{ return FALSE; }
bool LLKeyboardHeadless::handleKeyUp(const U16 key, const U32 mask)
{ return false; }
MASK LLKeyboardHeadless::currentMask(BOOL for_mouse_event)
MASK LLKeyboardHeadless::currentMask(bool for_mouse_event)
{ return MASK_NONE; }
#ifdef LL_DARWIN
@ -69,8 +69,8 @@ void LLKeyboardHeadless::scanKeyboard()
// Reset edges for next frame
for (S32 key = 0; key < KEY_COUNT; key++)
{
mKeyUp[key] = FALSE;
mKeyDown[key] = FALSE;
mKeyUp[key] = false;
mKeyDown[key] = false;
if (mKeyLevel[key])
{
mKeyLevelFrameCount[key]++;

View File

@ -35,10 +35,10 @@ public:
LLKeyboardHeadless();
/*virtual*/ ~LLKeyboardHeadless() {};
/*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask);
/*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask);
/*virtual*/ bool handleKeyUp(const U16 key, MASK mask);
/*virtual*/ bool handleKeyDown(const U16 key, MASK mask);
/*virtual*/ void resetMaskKeys();
/*virtual*/ MASK currentMask(BOOL for_mouse_event);
/*virtual*/ MASK currentMask(bool for_mouse_event);
/*virtual*/ void scanKeyboard();
#ifdef LL_DARWIN
/*virtual*/ void handleModifier(MASK mask);

View File

@ -172,22 +172,22 @@ void LLKeyboardMacOSX::resetMaskKeys()
if(mask & MAC_SHIFT_KEY)
{
mKeyLevel[KEY_SHIFT] = TRUE;
mKeyLevel[KEY_SHIFT] = true;
}
if(mask & MAC_CTRL_KEY)
{
mKeyLevel[KEY_CONTROL] = TRUE;
mKeyLevel[KEY_CONTROL] = true;
}
if(mask & MAC_ALT_KEY)
{
mKeyLevel[KEY_ALT] = TRUE;
mKeyLevel[KEY_ALT] = true;
}
}
/*
static BOOL translateKeyMac(const U16 key, const U32 mask, KEY &outKey, U32 &outMask)
static bool translateKeyMac(const U16 key, const U32 mask, KEY &outKey, U32 &outMask)
{
// Translate the virtual keycode into the keycodes the keyboard system expects.
U16 virtualKey = (mask >> 24) & 0x0000007F;
@ -226,11 +226,11 @@ MASK LLKeyboardMacOSX::updateModifiers(const U32 mask)
return out_mask;
}
BOOL LLKeyboardMacOSX::handleKeyDown(const U16 key, const U32 mask)
bool LLKeyboardMacOSX::handleKeyDown(const U16 key, const U32 mask)
{
KEY translated_key = 0;
U32 translated_mask = 0;
BOOL handled = FALSE;
bool handled = false;
translated_mask = updateModifiers(mask);
@ -243,11 +243,11 @@ BOOL LLKeyboardMacOSX::handleKeyDown(const U16 key, const U32 mask)
}
BOOL LLKeyboardMacOSX::handleKeyUp(const U16 key, const U32 mask)
bool LLKeyboardMacOSX::handleKeyUp(const U16 key, const U32 mask)
{
KEY translated_key = 0;
U32 translated_mask = 0;
BOOL handled = FALSE;
bool handled = false;
translated_mask = updateModifiers(mask);
@ -259,7 +259,7 @@ BOOL LLKeyboardMacOSX::handleKeyUp(const U16 key, const U32 mask)
return handled;
}
MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event)
MASK LLKeyboardMacOSX::currentMask(bool for_mouse_event)
{
MASK result = MASK_NONE;
U32 mask = getModifiers();
@ -295,8 +295,8 @@ void LLKeyboardMacOSX::scanKeyboard()
// Reset edges for next frame
for (key = 0; key < KEY_COUNT; key++)
{
mKeyUp[key] = FALSE;
mKeyDown[key] = FALSE;
mKeyUp[key] = false;
mKeyDown[key] = false;
if (mKeyLevel[key])
{
mKeyLevelFrameCount[key]++;
@ -304,7 +304,7 @@ void LLKeyboardMacOSX::scanKeyboard()
}
}
BOOL LLKeyboardMacOSX::translateNumpadKey( const U16 os_key, KEY *translated_key )
bool LLKeyboardMacOSX::translateNumpadKey( const U16 os_key, KEY *translated_key )
{
return translateKey(os_key, translated_key);
}

View File

@ -44,17 +44,17 @@ public:
LLKeyboardMacOSX();
/*virtual*/ ~LLKeyboardMacOSX() {};
/*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask);
/*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask);
/*virtual*/ bool handleKeyUp(const U16 key, MASK mask);
/*virtual*/ bool handleKeyDown(const U16 key, MASK mask);
/*virtual*/ void resetMaskKeys();
/*virtual*/ MASK currentMask(BOOL for_mouse_event);
/*virtual*/ MASK currentMask(bool for_mouse_event);
/*virtual*/ void scanKeyboard();
/*virtual*/ void handleModifier(MASK mask);
protected:
MASK updateModifiers(const U32 mask);
void setModifierKeyLevel( KEY key, BOOL new_state );
BOOL translateNumpadKey( const U16 os_key, KEY *translated_key );
void setModifierKeyLevel( KEY key, bool new_state );
bool translateNumpadKey( const U16 os_key, KEY *translated_key );
U16 inverseTranslateNumpadKey(const KEY translated_key);
private:
std::map<U16, KEY> mTranslateNumpadMap; // special map for translating OS keys to numpad keys

View File

@ -162,17 +162,17 @@ void LLKeyboardSDL::resetMaskKeys()
if(mask & KMOD_SHIFT)
{
mKeyLevel[KEY_SHIFT] = TRUE;
mKeyLevel[KEY_SHIFT] = true;
}
if(mask & KMOD_CTRL)
{
mKeyLevel[KEY_CONTROL] = TRUE;
mKeyLevel[KEY_CONTROL] = true;
}
if(mask & KMOD_ALT)
{
mKeyLevel[KEY_ALT] = TRUE;
mKeyLevel[KEY_ALT] = true;
}
}
@ -226,12 +226,12 @@ static U16 adjustNativekeyFromUnhandledMask(const U16 key, const U32 mask)
}
BOOL LLKeyboardSDL::handleKeyDown(const U16 key, const U32 mask)
bool LLKeyboardSDL::handleKeyDown(const U16 key, const U32 mask)
{
U16 adjusted_nativekey;
KEY translated_key = 0;
U32 translated_mask = MASK_NONE;
BOOL handled = FALSE;
bool handled = false;
adjusted_nativekey = adjustNativekeyFromUnhandledMask(key, mask);
@ -246,12 +246,12 @@ BOOL LLKeyboardSDL::handleKeyDown(const U16 key, const U32 mask)
}
BOOL LLKeyboardSDL::handleKeyUp(const U16 key, const U32 mask)
bool LLKeyboardSDL::handleKeyUp(const U16 key, const U32 mask)
{
U16 adjusted_nativekey;
KEY translated_key = 0;
U32 translated_mask = MASK_NONE;
BOOL handled = FALSE;
bool handled = false;
adjusted_nativekey = adjustNativekeyFromUnhandledMask(key, mask);
@ -265,7 +265,7 @@ BOOL LLKeyboardSDL::handleKeyUp(const U16 key, const U32 mask)
return handled;
}
MASK LLKeyboardSDL::currentMask(BOOL for_mouse_event)
MASK LLKeyboardSDL::currentMask(bool for_mouse_event)
{
MASK result = MASK_NONE;
SDLMod mask = SDL_GetModState();
@ -300,8 +300,8 @@ void LLKeyboardSDL::scanKeyboard()
// Reset edges for next frame
for (S32 key = 0; key < KEY_COUNT; key++)
{
mKeyUp[key] = FALSE;
mKeyDown[key] = FALSE;
mKeyUp[key] = false;
mKeyDown[key] = false;
if (mKeyLevel[key])
{
mKeyLevelFrameCount[key]++;
@ -310,7 +310,7 @@ void LLKeyboardSDL::scanKeyboard()
}
BOOL LLKeyboardSDL::translateNumpadKey( const U16 os_key, KEY *translated_key)
bool LLKeyboardSDL::translateNumpadKey( const U16 os_key, KEY *translated_key)
{
return translateKey(os_key, translated_key);
}

View File

@ -36,16 +36,16 @@ public:
LLKeyboardSDL();
/*virtual*/ ~LLKeyboardSDL() {};
/*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask);
/*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask);
/*virtual*/ bool handleKeyUp(const U16 key, MASK mask);
/*virtual*/ bool handleKeyDown(const U16 key, MASK mask);
/*virtual*/ void resetMaskKeys();
/*virtual*/ MASK currentMask(BOOL for_mouse_event);
/*virtual*/ MASK currentMask(bool for_mouse_event);
/*virtual*/ void scanKeyboard();
protected:
MASK updateModifiers(const U32 mask);
void setModifierKeyLevel( KEY key, BOOL new_state );
BOOL translateNumpadKey( const U16 os_key, KEY *translated_key );
void setModifierKeyLevel( KEY key, bool new_state );
bool translateNumpadKey( const U16 os_key, KEY *translated_key );
U16 inverseTranslateNumpadKey(const KEY translated_key);
private:
std::map<U16, KEY> mTranslateNumpadMap; // special map for translating OS keys to numpad keys

View File

@ -152,22 +152,22 @@ void LLKeyboardWin32::resetMaskKeys()
// bit to indicate that the key is down.
if (GetAsyncKeyState(VK_SHIFT) & 0x8000)
{
mKeyLevel[KEY_SHIFT] = TRUE;
mKeyLevel[KEY_SHIFT] = true;
}
if (GetAsyncKeyState(VK_CONTROL) & 0x8000)
{
mKeyLevel[KEY_CONTROL] = TRUE;
mKeyLevel[KEY_CONTROL] = true;
}
if (GetAsyncKeyState(VK_MENU) & 0x8000)
{
mKeyLevel[KEY_ALT] = TRUE;
mKeyLevel[KEY_ALT] = true;
}
}
//void LLKeyboardWin32::setModifierKeyLevel( KEY key, BOOL new_state )
//void LLKeyboardWin32::setModifierKeyLevel( KEY key, bool new_state )
//{
// if( mKeyLevel[key] != new_state )
// {
@ -191,17 +191,17 @@ MASK LLKeyboardWin32::updateModifiers()
// (keydown encoded in high order bit of short)
mKeyLevel[KEY_CAPSLOCK] = (GetKeyState(VK_CAPITAL) & 0x0001) != 0; // Low order bit carries the toggle state.
// Get mask for keyboard events
MASK mask = currentMask(FALSE);
MASK mask = currentMask(false);
return mask;
}
// mask is ignored, except for extended flag -- we poll the modifier keys for the other flags
BOOL LLKeyboardWin32::handleKeyDown(const U16 key, MASK mask)
bool LLKeyboardWin32::handleKeyDown(const U16 key, MASK mask)
{
KEY translated_key;
U32 translated_mask;
BOOL handled = FALSE;
bool handled = false;
translated_mask = updateModifiers();
@ -214,11 +214,11 @@ BOOL LLKeyboardWin32::handleKeyDown(const U16 key, MASK mask)
}
// mask is ignored, except for extended flag -- we poll the modifier keys for the other flags
BOOL LLKeyboardWin32::handleKeyUp(const U16 key, MASK mask)
bool LLKeyboardWin32::handleKeyUp(const U16 key, MASK mask)
{
KEY translated_key;
U32 translated_mask;
BOOL handled = FALSE;
bool handled = false;
translated_mask = updateModifiers();
@ -231,7 +231,7 @@ BOOL LLKeyboardWin32::handleKeyUp(const U16 key, MASK mask)
}
MASK LLKeyboardWin32::currentMask(BOOL)
MASK LLKeyboardWin32::currentMask(bool)
{
MASK mask = MASK_NONE;
@ -263,8 +263,8 @@ void LLKeyboardWin32::scanKeyboard()
// Reset edges for next frame
for (key = 0; key < KEY_COUNT; key++)
{
mKeyUp[key] = FALSE;
mKeyDown[key] = FALSE;
mKeyUp[key] = false;
mKeyDown[key] = false;
if (mKeyLevel[key])
{
mKeyLevelFrameCount[key]++;
@ -272,7 +272,7 @@ void LLKeyboardWin32::scanKeyboard()
}
}
BOOL LLKeyboardWin32::translateExtendedKey(const U16 os_key, const MASK mask, KEY *translated_key)
bool LLKeyboardWin32::translateExtendedKey(const U16 os_key, const MASK mask, KEY *translated_key)
{
return translateKey(os_key, translated_key);
}

View File

@ -39,17 +39,17 @@ public:
LLKeyboardWin32();
/*virtual*/ ~LLKeyboardWin32() {};
/*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask);
/*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask);
/*virtual*/ bool handleKeyUp(const U16 key, MASK mask);
/*virtual*/ bool handleKeyDown(const U16 key, MASK mask);
/*virtual*/ void resetMaskKeys();
/*virtual*/ MASK currentMask(BOOL for_mouse_event);
/*virtual*/ MASK currentMask(bool for_mouse_event);
/*virtual*/ void scanKeyboard();
BOOL translateExtendedKey(const U16 os_key, const MASK mask, KEY *translated_key);
bool translateExtendedKey(const U16 os_key, const MASK mask, KEY *translated_key);
U16 inverseTranslateExtendedKey(const KEY translated_key);
protected:
MASK updateModifiers();
//void setModifierKeyLevel( KEY key, BOOL new_state );
//void setModifierKeyLevel( KEY key, bool new_state );
private:
std::map<U16, KEY> mTranslateNumpadMap;
std::map<KEY, U16> mInvTranslateNumpadMap;

View File

@ -27,9 +27,9 @@
#include "llmousehandler.h"
//virtual
BOOL LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down)
bool LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down)
{
BOOL handled = FALSE;
bool handled = false;
if (down)
{
switch (clicktype)

View File

@ -47,19 +47,19 @@ public:
SHOW_ALWAYS,
} EShowToolTip;
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
virtual bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down);
virtual bool handleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual bool handleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual bool handleMiddleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual bool handleMiddleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
virtual BOOL handleScrollHWheel(S32 x, S32 y, S32 clicks) = 0;
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) = 0;
virtual bool handleHover(S32 x, S32 y, MASK mask) = 0;
virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks) = 0;
virtual bool handleToolTip(S32 x, S32 y, MASK mask) = 0;
virtual const std::string& getName() const = 0;
virtual void onMouseCaptureLost() = 0;
@ -67,7 +67,7 @@ public:
virtual void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const = 0;
virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const = 0;
virtual BOOL hasMouseCapture() = 0;
virtual bool hasMouseCapture() = 0;
};
#endif

View File

@ -34,7 +34,7 @@ class LLPreeditor
public:
typedef std::vector<S32> segment_lengths_t;
typedef std::vector<BOOL> standouts_t;
typedef std::vector<bool> standouts_t;
// We don't delete against LLPreeditor, but compilers complain without this...
@ -79,7 +79,7 @@ public:
// Locations are relative to the app window and measured in GL coordinate space (before scaling.)
// query_position is IN argument, and other three are OUT.
virtual BOOL getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const = 0;
virtual bool getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const = 0;
// Get the size (height) of the current font used in this preeditor.
@ -93,9 +93,9 @@ public:
// Handle a UTF-32 char on this preeditor, i.e., add the character
// to the contents.
// This is a back door of the method of same name of LLWindowCallback.
// called_from_parent should be set to FALSE if calling through LLPreeditor.
// called_from_parent should be set to false if calling through LLPreeditor.
virtual BOOL handleUnicodeCharHere(llwchar uni_char) = 0;
virtual bool handleUnicodeCharHere(llwchar uni_char) = 0;
};
#endif

View File

@ -46,8 +46,8 @@
// Globals
//
LLSplashScreen *gSplashScreenp = NULL;
BOOL gDebugClicks = FALSE;
BOOL gDebugWindowProc = FALSE;
bool gDebugClicks = false;
bool gDebugWindowProc = false;
const S32 gURLProtocolWhitelistCount = 5;
const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:", "mailto:" };
@ -63,10 +63,10 @@ const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:",
S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
{
// Properly hide the splash screen when displaying the message box
BOOL was_visible = FALSE;
bool was_visible = false;
if (LLSplashScreen::isVisible())
{
was_visible = TRUE;
was_visible = true;
LLSplashScreen::hide();
}
@ -97,9 +97,9 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
// LLWindow
//
LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
LLWindow::LLWindow(LLWindowCallbacks* callbacks, bool fullscreen, U32 flags)
: mCallbacks(callbacks),
mPostQuit(TRUE),
mPostQuit(true),
mFullscreen(fullscreen),
mFullscreenWidth(0),
mFullscreenHeight(0),
@ -109,13 +109,13 @@ LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
mNumSupportedResolutions(0),
mCurrentCursor(UI_CURSOR_ARROW),
mNextCursor(UI_CURSOR_ARROW),
mCursorHidden(FALSE),
mCursorHidden(false),
mBusyCount(0),
mIsMouseClipping(FALSE),
mIsMouseClipping(false),
mMinWindowWidth(0),
mMinWindowHeight(0),
mSwapMethod(SWAP_METHOD_UNDEFINED),
mHideCursorPermanent(FALSE),
mHideCursorPermanent(false),
mFlags(flags),
mHighSurrogate(0),
mRefreshRate(0)
@ -127,15 +127,15 @@ LLWindow::~LLWindow()
}
//virtual
BOOL LLWindow::isValid()
bool LLWindow::isValid()
{
return TRUE;
return true;
}
//virtual
BOOL LLWindow::canDelete()
bool LLWindow::canDelete()
{
return TRUE;
return true;
}
//virtual
@ -178,9 +178,9 @@ ECursorType LLWindow::getCursor() const
}
//virtual
BOOL LLWindow::dialogColorPicker(F32 *r, F32 *g, F32 *b)
bool LLWindow::dialogColorPicker(F32 *r, F32 *g, F32 *b)
{
return FALSE;
return false;
}
void *LLWindow::getMediaWindow()
@ -189,7 +189,7 @@ void *LLWindow::getMediaWindow()
return getPlatformWindow();
}
BOOL LLWindow::setSize(LLCoordScreen size)
bool LLWindow::setSize(LLCoordScreen size)
{
if (!getMaximized())
{
@ -199,7 +199,7 @@ BOOL LLWindow::setSize(LLCoordScreen size)
return setSizeImpl(size);
}
BOOL LLWindow::setSize(LLCoordWindow size)
bool LLWindow::setSize(LLCoordWindow size)
{
//HACK: we are inconsistently using minimum window dimensions
// in this case, we are constraining the inner "client" rect and other times
@ -241,19 +241,19 @@ void LLWindow::processMiscNativeEvents()
}
//virtual
BOOL LLWindow::isPrimaryTextAvailable()
bool LLWindow::isPrimaryTextAvailable()
{
return FALSE; // no
return false; // no
}
//virtual
BOOL LLWindow::pasteTextFromPrimary(LLWString &dst)
bool LLWindow::pasteTextFromPrimary(LLWString &dst)
{
return FALSE; // fail
return false; // fail
}
// virtual
BOOL LLWindow::copyTextToPrimary(const LLWString &src)
bool LLWindow::copyTextToPrimary(const LLWString &src)
{
return FALSE; // fail
return false; // fail
}
// static
@ -402,11 +402,11 @@ static std::set<LLWindow*> sWindowList;
LLWindow* LLWindowManager::createWindow(
LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags,
BOOL fullscreen,
BOOL clearBg,
BOOL enable_vsync,
BOOL use_gl,
BOOL ignore_pixel_depth,
bool fullscreen,
bool clearBg,
bool enable_vsync,
bool use_gl,
bool ignore_pixel_depth,
U32 fsaa_samples,
U32 max_cores,
U32 max_vram,
@ -441,7 +441,7 @@ LLWindow* LLWindowManager::createWindow(
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth);
}
if (FALSE == new_window->isValid())
if (false == new_window->isValid())
{
delete new_window;
LL_WARNS() << "LLWindowManager::create() : Error creating window." << LL_ENDL;
@ -451,13 +451,13 @@ LLWindow* LLWindowManager::createWindow(
return new_window;
}
BOOL LLWindowManager::destroyWindow(LLWindow* window)
bool LLWindowManager::destroyWindow(LLWindow* window)
{
if (sWindowList.find(window) == sWindowList.end())
{
LL_ERRS() << "LLWindowManager::destroyWindow() : Window pointer not valid, this window doesn't exist!"
<< LL_ENDL;
return FALSE;
return false;
}
window->close();
@ -466,10 +466,10 @@ BOOL LLWindowManager::destroyWindow(LLWindow* window)
delete window;
return TRUE;
return true;
}
BOOL LLWindowManager::isWindowValid(LLWindow *window)
bool LLWindowManager::isWindowValid(LLWindow *window)
{
return sWindowList.find(window) != sWindowList.end();
}

View File

@ -63,21 +63,21 @@ public:
virtual void show() = 0;
virtual void hide() = 0;
virtual void close() = 0;
virtual BOOL getVisible() = 0;
virtual BOOL getMinimized() = 0;
virtual BOOL getMaximized() = 0;
virtual BOOL maximize() = 0;
virtual bool getVisible() = 0;
virtual bool getMinimized() = 0;
virtual bool getMaximized() = 0;
virtual bool maximize() = 0;
virtual void minimize() = 0;
virtual void restore() = 0;
BOOL getFullscreen() { return mFullscreen; };
virtual BOOL getPosition(LLCoordScreen *position) = 0;
virtual BOOL getSize(LLCoordScreen *size) = 0;
virtual BOOL getSize(LLCoordWindow *size) = 0;
virtual BOOL setPosition(LLCoordScreen position) = 0;
BOOL setSize(LLCoordScreen size);
BOOL setSize(LLCoordWindow size);
bool getFullscreen() { return mFullscreen; };
virtual bool getPosition(LLCoordScreen *position) = 0;
virtual bool getSize(LLCoordScreen *size) = 0;
virtual bool getSize(LLCoordWindow *size) = 0;
virtual bool setPosition(LLCoordScreen position) = 0;
bool setSize(LLCoordScreen size);
bool setSize(LLCoordWindow size);
virtual void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
virtual BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL) = 0;
virtual bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL) = 0;
//create a new GL context that shares a namespace with this Window's main GL context and make it current on the current thread
// returns a pointer to be handed back to destroySharedConext/makeContextCurrent
@ -90,14 +90,14 @@ public:
virtual void toggleVSync(bool enable_vsync) = 0;
virtual BOOL setCursorPosition(LLCoordWindow position) = 0;
virtual BOOL getCursorPosition(LLCoordWindow *position) = 0;
virtual bool setCursorPosition(LLCoordWindow position) = 0;
virtual bool getCursorPosition(LLCoordWindow *position) = 0;
#if LL_WINDOWS
virtual BOOL getCursorDelta(LLCoordCommon* delta) = 0;
virtual bool getCursorDelta(LLCoordCommon* delta) = 0;
#endif
virtual void showCursor() = 0;
virtual void hideCursor() = 0;
virtual BOOL isCursorHidden() = 0;
virtual bool isCursorHidden() = 0;
virtual void showCursorFromMouseMove() = 0;
virtual void hideCursorUntilMouseMove() = 0;
@ -124,22 +124,22 @@ public:
virtual void captureMouse() = 0;
virtual void releaseMouse() = 0;
virtual void setMouseClipping( BOOL b ) = 0;
virtual void setMouseClipping( bool b ) = 0;
virtual BOOL isClipboardTextAvailable() = 0;
virtual BOOL pasteTextFromClipboard(LLWString &dst) = 0;
virtual BOOL copyTextToClipboard(const LLWString &src) = 0;
virtual bool isClipboardTextAvailable() = 0;
virtual bool pasteTextFromClipboard(LLWString &dst) = 0;
virtual bool copyTextToClipboard(const LLWString &src) = 0;
virtual BOOL isPrimaryTextAvailable();
virtual BOOL pasteTextFromPrimary(LLWString &dst);
virtual BOOL copyTextToPrimary(const LLWString &src);
virtual bool isPrimaryTextAvailable();
virtual bool pasteTextFromPrimary(LLWString &dst);
virtual bool copyTextToPrimary(const LLWString &src);
virtual void flashIcon(F32 seconds) = 0;
virtual F32 getGamma() = 0;
virtual BOOL setGamma(const F32 gamma) = 0; // Set the gamma
virtual bool setGamma(const F32 gamma) = 0; // Set the gamma
virtual void setFSAASamples(const U32 fsaa_samples) = 0; //set number of FSAA samples
virtual U32 getFSAASamples() = 0;
virtual BOOL restoreGamma() = 0; // Restore original gamma table (before updating gamma)
virtual bool restoreGamma() = 0; // Restore original gamma table (before updating gamma)
virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
virtual void processMiscNativeEvents();
virtual void gatherInput() = 0;
@ -151,12 +151,12 @@ public:
// handy coordinate space conversion routines
// NB: screen to window and vice verse won't work on width/height coordinate pairs,
// as the conversion must take into account left AND right border widths, etc.
virtual BOOL convertCoords( LLCoordScreen from, LLCoordWindow *to) = 0;
virtual BOOL convertCoords( LLCoordWindow from, LLCoordScreen *to) = 0;
virtual BOOL convertCoords( LLCoordWindow from, LLCoordGL *to) = 0;
virtual BOOL convertCoords( LLCoordGL from, LLCoordWindow *to) = 0;
virtual BOOL convertCoords( LLCoordScreen from, LLCoordGL *to) = 0;
virtual BOOL convertCoords( LLCoordGL from, LLCoordScreen *to) = 0;
virtual bool convertCoords( LLCoordScreen from, LLCoordWindow *to) = 0;
virtual bool convertCoords( LLCoordWindow from, LLCoordScreen *to) = 0;
virtual bool convertCoords( LLCoordWindow from, LLCoordGL *to) = 0;
virtual bool convertCoords( LLCoordGL from, LLCoordWindow *to) = 0;
virtual bool convertCoords( LLCoordScreen from, LLCoordGL *to) = 0;
virtual bool convertCoords( LLCoordGL from, LLCoordScreen *to) = 0;
// query supported resolutions
virtual LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) = 0;
@ -172,8 +172,8 @@ public:
virtual void afterDialog() {}; // undo whatever was done in beforeDialog()
// opens system default color picker, modally
// Returns TRUE if valid color selected
virtual BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b);
// Returns true if valid color selected
virtual bool dialogColorPicker(F32 *r, F32 *g, F32 *b);
// return a platform-specific window reference (HWND on Windows, WindowRef on the Mac, Gtk window on Linux)
virtual void *getPlatformWindow() = 0;
@ -182,7 +182,7 @@ public:
virtual void *getMediaWindow();
// control platform's Language Text Input mechanisms.
virtual void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) {}
virtual void allowLanguageTextInput(LLPreeditor *preeditor, bool b) {}
virtual void setLanguageTextInput( const LLCoordGL & pos ) {};
virtual void updateLanguageTextInputArea() {}
virtual void interruptLanguageTextInput() {}
@ -204,21 +204,21 @@ public:
virtual S32 getRefreshRate() { return mRefreshRate; }
protected:
LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags);
LLWindow(LLWindowCallbacks* callbacks, bool fullscreen, U32 flags);
virtual ~LLWindow();
// Defaults to true
virtual BOOL isValid();
virtual bool isValid();
// Defaults to true
virtual BOOL canDelete();
virtual bool canDelete();
virtual BOOL setSizeImpl(LLCoordScreen size) = 0;
virtual BOOL setSizeImpl(LLCoordWindow size) = 0;
virtual bool setSizeImpl(LLCoordScreen size) = 0;
virtual bool setSizeImpl(LLCoordWindow size) = 0;
protected:
LLWindowCallbacks* mCallbacks;
BOOL mPostQuit; // should this window post a quit message when destroyed?
BOOL mFullscreen;
bool mPostQuit; // should this window post a quit message when destroyed?
bool mFullscreen;
S32 mFullscreenWidth;
S32 mFullscreenHeight;
S32 mFullscreenBits;
@ -227,11 +227,11 @@ protected:
S32 mNumSupportedResolutions;
ECursorType mCurrentCursor;
ECursorType mNextCursor;
BOOL mCursorHidden;
bool mCursorHidden;
S32 mBusyCount; // how deep is the "cursor busy" stack?
BOOL mIsMouseClipping; // Is this window currently clipping the mouse
bool mIsMouseClipping; // Is this window currently clipping the mouse
ESwapMethod mSwapMethod;
BOOL mHideCursorPermanent;
bool mHideCursorPermanent;
U32 mFlags;
U16 mHighSurrogate;
S32 mMinWindowWidth;
@ -276,7 +276,7 @@ protected:
virtual void updateImpl(const std::string& string) = 0;
virtual void hideImpl() = 0;
static BOOL sVisible;
static bool sVisible;
};
@ -302,23 +302,23 @@ public:
LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags = 0,
BOOL fullscreen = FALSE,
BOOL clearBg = FALSE,
BOOL enable_vsync = FALSE,
BOOL use_gl = TRUE,
BOOL ignore_pixel_depth = FALSE,
bool fullscreen = false,
bool clearBg = false,
bool enable_vsync = false,
bool use_gl = true,
bool ignore_pixel_depth = false,
U32 fsaa_samples = 0,
U32 max_cores = 0,
U32 max_vram = 0,
F32 max_gl_version = 4.6f);
static BOOL destroyWindow(LLWindow* window);
static BOOL isWindowValid(LLWindow *window);
static bool destroyWindow(LLWindow* window);
static bool isWindowValid(LLWindow *window);
};
//
// helper funcs
//
extern BOOL gDebugWindowProc;
extern bool gDebugWindowProc;
// Protocols, like "http" and "https" we support in URLs
extern const S32 gURLProtocolWhitelistCount;

View File

@ -32,35 +32,35 @@
// LLWindowCallbacks
//
BOOL LLWindowCallbacks::handleTranslatedKeyDown(const KEY key, const MASK mask, BOOL repeated)
bool LLWindowCallbacks::handleTranslatedKeyDown(const KEY key, const MASK mask, bool repeated)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleTranslatedKeyUp(const KEY key, const MASK mask)
bool LLWindowCallbacks::handleTranslatedKeyUp(const KEY key, const MASK mask)
{
return FALSE;
return false;
}
void LLWindowCallbacks::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
void LLWindowCallbacks::handleScanKey(KEY key, bool key_down, bool key_up, bool key_level)
{
}
BOOL LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask)
bool LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
void LLWindowCallbacks::handleMouseLeave(LLWindow *window)
@ -68,54 +68,54 @@ void LLWindowCallbacks::handleMouseLeave(LLWindow *window)
return;
}
BOOL LLWindowCallbacks::handleCloseRequest(LLWindow *window)
bool LLWindowCallbacks::handleCloseRequest(LLWindow *window)
{
//allow the window to close
return TRUE;
return true;
}
void LLWindowCallbacks::handleQuit(LLWindow *window)
{
}
BOOL LLWindowCallbacks::handleRightMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleRightMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleRightMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleRightMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleMiddleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleMiddleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleMiddleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleMiddleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleOtherMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
bool LLWindowCallbacks::handleOtherMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleOtherMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
bool LLWindowCallbacks::handleOtherMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask, S32 button)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleActivate(LLWindow *window, BOOL activated)
bool LLWindowCallbacks::handleActivate(LLWindow *window, bool activated)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleActivateApp(LLWindow *window, BOOL activating)
bool LLWindowCallbacks::handleActivateApp(LLWindow *window, bool activating)
{
return FALSE;
return false;
}
void LLWindowCallbacks::handleMouseMove(LLWindow *window, const LLCoordGL pos, MASK mask)
@ -151,15 +151,15 @@ void LLWindowCallbacks::handleMenuSelect(LLWindow *window, const S32 menu_item)
{
}
BOOL LLWindowCallbacks::handlePaint(LLWindow *window, const S32 x, const S32 y,
bool LLWindowCallbacks::handlePaint(LLWindow *window, const S32 x, const S32 y,
const S32 width, const S32 height)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleDoubleClick(LLWindow *window, const LLCoordGL pos, MASK mask)
bool LLWindowCallbacks::handleDoubleClick(LLWindow *window, const LLCoordGL pos, MASK mask)
{
return FALSE;
return false;
}
void LLWindowCallbacks::handleWindowBlock(LLWindow *window)
@ -179,24 +179,24 @@ LLWindowCallbacks::DragNDropResult LLWindowCallbacks::handleDragNDrop(LLWindow *
return LLWindowCallbacks::DND_NONE;
}
BOOL LLWindowCallbacks::handleTimerEvent(LLWindow *window)
bool LLWindowCallbacks::handleTimerEvent(LLWindow *window)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleDeviceChange(LLWindow *window)
bool LLWindowCallbacks::handleDeviceChange(LLWindow *window)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
bool LLWindowCallbacks::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
{
return FALSE;
return false;
}
BOOL LLWindowCallbacks::handleWindowDidChangeScreen(LLWindow *window)
bool LLWindowCallbacks::handleWindowDidChangeScreen(LLWindow *window)
{
return FALSE;
return false;
}
void LLWindowCallbacks::handlePingWatchdog(LLWindow *window, const char * msg)

View File

@ -33,26 +33,26 @@ class LLWindowCallbacks
{
public:
virtual ~LLWindowCallbacks() {}
virtual BOOL handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated);
virtual BOOL handleTranslatedKeyUp(KEY key, MASK mask);
virtual void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
virtual BOOL handleUnicodeChar(llwchar uni_char, MASK mask);
virtual bool handleTranslatedKeyDown(KEY key, MASK mask, bool repeated);
virtual bool handleTranslatedKeyUp(KEY key, MASK mask);
virtual void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level);
virtual bool handleUnicodeChar(llwchar uni_char, MASK mask);
virtual BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual void handleMouseLeave(LLWindow *window);
// return TRUE to allow window to close, which will then cause handleQuit to be called
virtual BOOL handleCloseRequest(LLWindow *window);
// return true to allow window to close, which will then cause handleQuit to be called
virtual bool handleCloseRequest(LLWindow *window);
// window is about to be destroyed, clean up your business
virtual void handleQuit(LLWindow *window);
virtual BOOL handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual BOOL handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
virtual BOOL handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
virtual BOOL handleActivate(LLWindow *window, BOOL activated);
virtual BOOL handleActivateApp(LLWindow *window, BOOL activating);
virtual bool handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
virtual bool handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
virtual bool handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
virtual bool handleActivate(LLWindow *window, bool activated);
virtual bool handleActivateApp(LLWindow *window, bool activating);
virtual void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
virtual void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask);
virtual void handleScrollWheel(LLWindow *window, S32 clicks);
@ -61,15 +61,15 @@ public:
virtual void handleFocus(LLWindow *window);
virtual void handleFocusLost(LLWindow *window);
virtual void handleMenuSelect(LLWindow *window, S32 menu_item);
virtual BOOL handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height);
virtual BOOL handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask); // double-click of left mouse button
virtual bool handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height);
virtual bool handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask); // double-click of left mouse button
virtual void handleWindowBlock(LLWindow *window); // window is taking over CPU for a while
virtual void handleWindowUnblock(LLWindow *window); // window coming back after taking over CPU for a while
virtual void handleDataCopy(LLWindow *window, S32 data_type, void *data);
virtual BOOL handleTimerEvent(LLWindow *window);
virtual BOOL handleDeviceChange(LLWindow *window);
virtual BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
virtual BOOL handleWindowDidChangeScreen(LLWindow *window);
virtual bool handleTimerEvent(LLWindow *window);
virtual bool handleDeviceChange(LLWindow *window);
virtual bool handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
virtual bool handleWindowDidChangeScreen(LLWindow *window);
enum DragNDropAction {
DNDA_START_TRACKING = 0,// Start tracking an incoming drag

View File

@ -34,8 +34,8 @@
// LLWindowHeadless
//
LLWindowHeadless::LLWindowHeadless(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
BOOL enable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
U32 flags, bool fullscreen, bool clear_background,
bool enable_vsync, bool use_gl, bool ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
// Initialize a headless keyboard.

View File

@ -35,10 +35,10 @@ public:
/*virtual*/ void show() override {}
/*virtual*/ void hide() override {}
/*virtual*/ void close() override {}
/*virtual*/ BOOL getVisible() override {return FALSE;}
/*virtual*/ BOOL getMinimized() override {return FALSE;}
/*virtual*/ BOOL getMaximized() override {return FALSE;}
/*virtual*/ BOOL maximize() override {return FALSE;}
/*virtual*/ bool getVisible() override {return false;}
/*virtual*/ bool getMinimized() override {return false;}
/*virtual*/ bool getMaximized() override {return false;}
/*virtual*/ bool maximize() override {return false;}
/*virtual*/ void minimize() override {}
/*virtual*/ void restore() override {}
// TODO: LLWindow::getFullscreen() is (intentionally?) NOT virtual.
@ -46,42 +46,42 @@ public:
// mistake to shadow the base-class method with an LLWindowHeadless
// override when called on the subclass, yet call the base-class method
// when indirecting through a polymorphic pointer or reference?
BOOL getFullscreen() {return FALSE;}
/*virtual*/ BOOL getPosition(LLCoordScreen *position) override {return FALSE;}
/*virtual*/ BOOL getSize(LLCoordScreen *size) override {return FALSE;}
/*virtual*/ BOOL getSize(LLCoordWindow *size) override {return FALSE;}
/*virtual*/ BOOL setPosition(LLCoordScreen position) override {return FALSE;}
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size) override {return FALSE;}
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size) override {return FALSE;}
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL) override {return FALSE;}
bool getFullscreen() {return false;}
/*virtual*/ bool getPosition(LLCoordScreen *position) override {return false;}
/*virtual*/ bool getSize(LLCoordScreen *size) override {return false;}
/*virtual*/ bool getSize(LLCoordWindow *size) override {return false;}
/*virtual*/ bool setPosition(LLCoordScreen position) override {return false;}
/*virtual*/ bool setSizeImpl(LLCoordScreen size) override {return false;}
/*virtual*/ bool setSizeImpl(LLCoordWindow size) override {return false;}
/*virtual*/ bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL) override {return false;}
void* createSharedContext() override { return nullptr; }
void makeContextCurrent(void*) override {}
void destroySharedContext(void*) override {}
/*virtual*/ void toggleVSync(bool enable_vsync) override { }
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) override {return FALSE;}
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) override {return FALSE;}
/*virtual*/ bool setCursorPosition(LLCoordWindow position) override {return false;}
/*virtual*/ bool getCursorPosition(LLCoordWindow *position) override {return false;}
#if LL_WINDOWS
/*virtual*/ BOOL getCursorDelta(LLCoordCommon* delta) override { return FALSE; }
/*virtual*/ bool getCursorDelta(LLCoordCommon* delta) override { return false; }
#endif
/*virtual*/ void showCursor() override {}
/*virtual*/ void hideCursor() override {}
/*virtual*/ void showCursorFromMouseMove() override {}
/*virtual*/ void hideCursorUntilMouseMove() override {}
/*virtual*/ BOOL isCursorHidden() override {return FALSE;}
/*virtual*/ bool isCursorHidden() override {return false;}
/*virtual*/ void updateCursor() override {}
//virtual ECursorType getCursor() override { return mCurrentCursor; }
/*virtual*/ void captureMouse() override {}
/*virtual*/ void releaseMouse() override {}
/*virtual*/ void setMouseClipping( BOOL b ) override {}
/*virtual*/ BOOL isClipboardTextAvailable() override {return FALSE; }
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) override {return FALSE; }
/*virtual*/ BOOL copyTextToClipboard(const LLWString &src) override {return FALSE; }
/*virtual*/ void setMouseClipping( bool b ) override {}
/*virtual*/ bool isClipboardTextAvailable() override {return false; }
/*virtual*/ bool pasteTextFromClipboard(LLWString &dst) override {return false; }
/*virtual*/ bool copyTextToClipboard(const LLWString &src) override {return false; }
/*virtual*/ void flashIcon(F32 seconds) override {}
/*virtual*/ F32 getGamma() override {return 1.0f; }
/*virtual*/ BOOL setGamma(const F32 gamma) override {return FALSE; } // Set the gamma
/*virtual*/ bool setGamma(const F32 gamma) override {return false; } // Set the gamma
/*virtual*/ void setFSAASamples(const U32 fsaa_samples) override { }
/*virtual*/ U32 getFSAASamples() override { return 0; }
/*virtual*/ BOOL restoreGamma() override {return FALSE; } // Restore original gamma table (before updating gamma)
/*virtual*/ bool restoreGamma() override {return false; } // Restore original gamma table (before updating gamma)
//virtual ESwapMethod getSwapMethod() override { return mSwapMethod; }
/*virtual*/ void gatherInput() override {}
/*virtual*/ void delayInputProcessing() override {}
@ -89,12 +89,12 @@ public:
// handy coordinate space conversion routines
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) override { return FALSE; }
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) override { return FALSE; }
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) override { return FALSE; }
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) override { return FALSE; }
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) override { return FALSE; }
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) override { return FALSE; }
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordWindow *to) override { return false; }
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordScreen *to) override { return false; }
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordGL *to) override { return false; }
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordWindow *to) override { return false; }
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordGL *to) override { return false; }
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordScreen *to) override { return false; }
/*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) override { return NULL; }
/*virtual*/ F32 getNativeAspectRatio() override { return 1.0f; }
@ -111,8 +111,8 @@ public:
const std::string& title, const std::string& name,
S32 x, S32 y,
S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
BOOL enable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
U32 flags, bool fullscreen, bool clear_background,
bool enable_vsync, bool use_gl, bool ignore_pixel_depth);
virtual ~LLWindowHeadless();
private:

View File

@ -43,8 +43,8 @@
#include <CoreServices/CoreServices.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
extern BOOL gDebugWindowProc;
BOOL gHiDPISupport = TRUE;
extern bool gDebugWindowProc;
bool gHiDPISupport = true;
const S32 BITS_PER_PIXEL = 32;
const S32 MAX_NUM_RESOLUTIONS = 32;
@ -59,11 +59,11 @@ namespace
// LLWindowMacOSX
//
BOOL LLWindowMacOSX::sUseMultGL = FALSE;
bool LLWindowMacOSX::sUseMultGL = false;
// Cross-platform bits:
BOOL check_for_card(const char* RENDERER, const char* bad_card)
bool check_for_card(const char* RENDERER, const char* bad_card)
{
if (!strnicmp(RENDERER, bad_card, strlen(bad_card)))
{
@ -84,15 +84,15 @@ BOOL check_for_card(const char* RENDERER, const char* bad_card)
S32 button = OSMessageBox(buffer.c_str(), "Unsupported video card", OSMB_YESNO);
if (OSBTN_YES == button)
{
return FALSE;
return false;
}
else
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
// Switch to determine whether we capture all displays, or just the main one.
@ -112,9 +112,9 @@ static LLWindowMacOSX *gWindowImplementation = NULL;
LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
BOOL enable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth,
bool fullscreen, bool clearBg,
bool enable_vsync, bool use_gl,
bool ignore_pixel_depth,
U32 fsaa_samples,
U32 max_vram)
: LLWindow(NULL, fullscreen, flags)
@ -138,21 +138,21 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mContext = NULL;
mPixelFormat = NULL;
mDisplay = CGMainDisplayID();
mSimulatedRightClick = FALSE;
mSimulatedRightClick = false;
mLastModifiers = 0;
mHandsOffEvents = FALSE;
mCursorDecoupled = FALSE;
mHandsOffEvents = false;
mCursorDecoupled = false;
mCursorLastEventDeltaX = 0;
mCursorLastEventDeltaY = 0;
mCursorIgnoreNextDelta = FALSE;
mNeedsResize = FALSE;
mCursorIgnoreNextDelta = false;
mNeedsResize = false;
mOverrideAspectRatio = 0.f;
mMaximized = FALSE;
mMinimized = FALSE;
mLanguageTextInputAllowed = FALSE;
mMaximized = false;
mMinimized = false;
mLanguageTextInputAllowed = false;
mPreeditor = NULL;
mFSAASamples = fsaa_samples;
mForceRebuild = FALSE;
mForceRebuild = false;
// Get the original aspect ratio of the main device.
mOriginalAspectRatio = (double)CGDisplayPixelsWide(mDisplay) / (double)CGDisplayPixelsHigh(mDisplay);
@ -192,7 +192,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
initCursors();
setCursor( UI_CURSOR_ARROW );
allowLanguageTextInput(NULL, FALSE);
allowLanguageTextInput(NULL, false);
}
mCallbacks = callbacks;
@ -281,7 +281,7 @@ void callRightMouseDown(float *pos, MASK mask)
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
outCoords.mY = ll_round(pos[1]);
gWindowImplementation->getCallbacks()->handleRightMouseDown(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleRightMouseDown(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
void callRightMouseUp(float *pos, MASK mask)
@ -294,7 +294,7 @@ void callRightMouseUp(float *pos, MASK mask)
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
outCoords.mY = ll_round(pos[1]);
gWindowImplementation->getCallbacks()->handleRightMouseUp(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleRightMouseUp(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
void callLeftMouseDown(float *pos, MASK mask)
@ -307,7 +307,7 @@ void callLeftMouseDown(float *pos, MASK mask)
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
outCoords.mY = ll_round(pos[1]);
gWindowImplementation->getCallbacks()->handleMouseDown(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleMouseDown(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
void callLeftMouseUp(float *pos, MASK mask)
@ -320,7 +320,7 @@ void callLeftMouseUp(float *pos, MASK mask)
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
outCoords.mY = ll_round(pos[1]);
gWindowImplementation->getCallbacks()->handleMouseUp(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleMouseUp(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
@ -334,7 +334,7 @@ void callDoubleClick(float *pos, MASK mask)
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
outCoords.mY = ll_round(pos[1]);
gWindowImplementation->getCallbacks()->handleDoubleClick(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleDoubleClick(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
void callResize(unsigned int width, unsigned int height)
@ -354,7 +354,7 @@ void callMouseMoved(float *pos, MASK mask)
gWindowImplementation->getMouseDeltas(deltas);
outCoords.mX += deltas[0];
outCoords.mY += deltas[1];
gWindowImplementation->getCallbacks()->handleMouseMove(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleMouseMove(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
//gWindowImplementation->getCallbacks()->handleScrollWheel(gWindowImplementation, 0);
}
@ -367,7 +367,7 @@ void callMouseDragged(float *pos, MASK mask)
gWindowImplementation->getMouseDeltas(deltas);
outCoords.mX += deltas[0];
outCoords.mY += deltas[1];
gWindowImplementation->getCallbacks()->handleMouseDragged(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
gWindowImplementation->getCallbacks()->handleMouseDragged(gWindowImplementation, outCoords, gKeyboard->currentMask(true));
}
void callScrollMoved(float deltaX, float deltaY)
@ -609,7 +609,7 @@ void LLWindowMacOSX::updateMouseDeltas(float* deltas)
{
mCursorLastEventDeltaX = 0;
mCursorLastEventDeltaY = 0;
mCursorIgnoreNextDelta = FALSE;
mCursorIgnoreNextDelta = false;
}
} else {
mCursorLastEventDeltaX = 0;
@ -623,7 +623,7 @@ void LLWindowMacOSX::getMouseDeltas(float* delta)
delta[1] = mCursorLastEventDeltaY;
}
BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync)
bool LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool enable_vsync)
{
mFullscreen = fullscreen;
@ -682,7 +682,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
if (err != kCGLNoError)
{
setupFailure("Can't activate GL rendering context", "Error", OSMB_OK);
return FALSE;
return false;
}
}
@ -715,15 +715,15 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
}
makeFirstResponder(mWindow, mGLView);
return TRUE;
return true;
}
// We only support OS X 10.7's fullscreen app mode which is literally a full screen window that fills a virtual desktop.
// This makes this method obsolete.
BOOL LLWindowMacOSX::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp)
bool LLWindowMacOSX::switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp)
{
return FALSE;
return false;
}
void LLWindowMacOSX::destroyContext()
@ -793,13 +793,13 @@ void LLWindowMacOSX::show()
void LLWindowMacOSX::hide()
{
setMouseClipping(FALSE);
setMouseClipping(false);
}
//virtual
void LLWindowMacOSX::minimize()
{
setMouseClipping(FALSE);
setMouseClipping(false);
showCursor();
}
@ -821,48 +821,48 @@ void LLWindowMacOSX::close()
// }
// Make sure cursor is visible and we haven't mangled the clipping state.
setMouseClipping(FALSE);
setMouseClipping(false);
showCursor();
destroyContext();
}
BOOL LLWindowMacOSX::isValid()
bool LLWindowMacOSX::isValid()
{
if(mFullscreen)
{
return(TRUE);
return(true);
}
return (mWindow != NULL);
}
BOOL LLWindowMacOSX::getVisible()
bool LLWindowMacOSX::getVisible()
{
BOOL result = FALSE;
bool result = false;
if(mFullscreen)
{
result = TRUE;
result = true;
}if (mWindow)
{
result = TRUE;
result = true;
}
return(result);
}
BOOL LLWindowMacOSX::getMinimized()
bool LLWindowMacOSX::getMinimized()
{
return mMinimized;
}
BOOL LLWindowMacOSX::getMaximized()
bool LLWindowMacOSX::getMaximized()
{
return mMaximized;
}
BOOL LLWindowMacOSX::maximize()
bool LLWindowMacOSX::maximize()
{
if (mWindow && !mMaximized)
{
@ -871,7 +871,7 @@ BOOL LLWindowMacOSX::maximize()
return mMaximized;
}
BOOL LLWindowMacOSX::getFullscreen()
bool LLWindowMacOSX::getFullscreen()
{
return mFullscreen;
}
@ -881,7 +881,7 @@ void LLWindowMacOSX::gatherInput()
updateCursor();
}
BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
bool LLWindowMacOSX::getPosition(LLCoordScreen *position)
{
S32 err = -1;
@ -908,7 +908,7 @@ BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
return (err == noErr);
}
BOOL LLWindowMacOSX::getSize(LLCoordScreen *size)
bool LLWindowMacOSX::getSize(LLCoordScreen *size)
{
S32 err = -1;
@ -934,7 +934,7 @@ BOOL LLWindowMacOSX::getSize(LLCoordScreen *size)
return (err == noErr);
}
BOOL LLWindowMacOSX::getSize(LLCoordWindow *size)
bool LLWindowMacOSX::getSize(LLCoordWindow *size)
{
S32 err = -1;
@ -962,7 +962,7 @@ BOOL LLWindowMacOSX::getSize(LLCoordWindow *size)
return (err == noErr);
}
BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
bool LLWindowMacOSX::setPosition(const LLCoordScreen position)
{
if(mWindow)
{
@ -970,32 +970,32 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
setWindowPos(mWindow, pos);
}
return TRUE;
return true;
}
BOOL LLWindowMacOSX::setSizeImpl(const LLCoordScreen size)
bool LLWindowMacOSX::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
LLCoordWindow to;
convertCoords(size, &to);
setWindowSize(mWindow, to.mX, to.mY);
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLWindowMacOSX::setSizeImpl(const LLCoordWindow size)
bool LLWindowMacOSX::setSizeImpl(const LLCoordWindow size)
{
if (mWindow)
{
const int titlePadding = 22;
setWindowSize(mWindow, size.mX, size.mY + titlePadding);
return TRUE;
return true;
}
return FALSE;
return false;
}
void LLWindowMacOSX::swapBuffers()
@ -1050,16 +1050,16 @@ U32 LLWindowMacOSX::getFSAASamples()
void LLWindowMacOSX::setFSAASamples(const U32 samples)
{
mFSAASamples = samples;
mForceRebuild = TRUE;
mForceRebuild = true;
}
BOOL LLWindowMacOSX::restoreGamma()
bool LLWindowMacOSX::restoreGamma()
{
CGDisplayRestoreColorSyncSettings();
return true;
}
BOOL LLWindowMacOSX::setGamma(const F32 gamma)
bool LLWindowMacOSX::setGamma(const F32 gamma)
{
CGGammaValue redMin;
CGGammaValue redMax;
@ -1107,7 +1107,7 @@ BOOL LLWindowMacOSX::setGamma(const F32 gamma)
return true;
}
BOOL LLWindowMacOSX::isCursorHidden()
bool LLWindowMacOSX::isCursorHidden()
{
return mCursorHidden;
}
@ -1115,31 +1115,31 @@ BOOL LLWindowMacOSX::isCursorHidden()
// Constrains the mouse to the window.
void LLWindowMacOSX::setMouseClipping( BOOL b )
void LLWindowMacOSX::setMouseClipping( bool b )
{
// Just stash the requested state. We'll simulate this when the cursor is hidden by decoupling.
mIsMouseClipping = b;
if(b)
{
// LL_INFOS() << "setMouseClipping(TRUE)" << LL_ENDL;
// LL_INFOS() << "setMouseClipping(true)" << LL_ENDL;
}
else
{
// LL_INFOS() << "setMouseClipping(FALSE)" << LL_ENDL;
// LL_INFOS() << "setMouseClipping(false)" << LL_ENDL;
}
adjustCursorDecouple();
}
BOOL LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
{
BOOL result = FALSE;
bool result = false;
LLCoordScreen screen_pos;
if (!convertCoords(position, &screen_pos))
{
return FALSE;
return false;
}
CGPoint newPosition;
@ -1152,7 +1152,7 @@ BOOL LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
CGSetLocalEventsSuppressionInterval(0.0);
if(CGWarpMouseCursorPosition(newPosition) == noErr)
{
result = TRUE;
result = true;
}
// Under certain circumstances, this will trigger us to decouple the cursor.
@ -1169,13 +1169,13 @@ BOOL LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
return result;
}
BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
bool LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
{
float cursor_point[2];
LLCoordScreen screen_pos;
if(mWindow == NULL)
return FALSE;
return false;
getCursorPos(mWindow, cursor_point);
@ -1198,7 +1198,7 @@ BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
position->mX = cursor_point[0] * scale;
position->mY = cursor_point[1] * scale;
return TRUE;
return true;
}
void LLWindowMacOSX::adjustCursorDecouple(bool warpingMouse)
@ -1213,7 +1213,7 @@ void LLWindowMacOSX::adjustCursorDecouple(bool warpingMouse)
// LL_INFOS() << "adjustCursorDecouple: decoupling cursor" << LL_ENDL;
CGAssociateMouseAndMouseCursorPosition(false);
mCursorDecoupled = true;
mCursorIgnoreNextDelta = TRUE;
mCursorIgnoreNextDelta = true;
}
}
}
@ -1293,12 +1293,12 @@ void LLWindowMacOSX::flashIcon(F32 seconds)
requestUserAttention();
}
BOOL LLWindowMacOSX::isClipboardTextAvailable()
bool LLWindowMacOSX::isClipboardTextAvailable()
{
return pasteBoardAvailable();
}
BOOL LLWindowMacOSX::pasteTextFromClipboard(LLWString &dst)
bool LLWindowMacOSX::pasteTextFromClipboard(LLWString &dst)
{
unsigned short* pboard_data = copyFromPBoard(); // must free returned data
llutf16string str(pboard_data);
@ -1313,9 +1313,9 @@ BOOL LLWindowMacOSX::pasteTextFromClipboard(LLWString &dst)
}
}
BOOL LLWindowMacOSX::copyTextToClipboard(const LLWString &s)
bool LLWindowMacOSX::copyTextToClipboard(const LLWString &s)
{
BOOL result = false;
bool result = false;
llutf16string utf16str = wstring_to_utf16str(s);
result = copyToPBoard(utf16str.data(), utf16str.length());
@ -1325,7 +1325,7 @@ BOOL LLWindowMacOSX::copyTextToClipboard(const LLWString &s)
// protected
BOOL LLWindowMacOSX::resetDisplayResolution()
bool LLWindowMacOSX::resetDisplayResolution()
{
// This is only called from elsewhere in this class, and it's not used by the Mac implementation.
return true;
@ -1358,13 +1358,13 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
if(bits == BITS_PER_PIXEL && width >= 800 && height >= 600)
{
BOOL resolution_exists = FALSE;
bool resolution_exists = false;
for(S32 i = 0; i < mNumSupportedResolutions; i++)
{
if (mSupportedResolutions[i].mWidth == width &&
mSupportedResolutions[i].mHeight == height)
{
resolution_exists = TRUE;
resolution_exists = true;
}
}
if (!resolution_exists)
@ -1383,21 +1383,21 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
return mSupportedResolutions;
}
BOOL LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordWindow *to)
bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordWindow *to)
{
to->mX = from.mX;
to->mY = from.mY;
return TRUE;
return true;
}
BOOL LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordGL* to)
bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordGL* to)
{
to->mX = from.mX;
to->mY = from.mY;
return TRUE;
return true;
}
BOOL LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
{
if(mWindow)
{
@ -1411,12 +1411,12 @@ BOOL LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
to->mX = mouse_point[0];
to->mY = mouse_point[1];
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
{
if(mWindow)
{
@ -1430,19 +1430,19 @@ BOOL LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
to->mX = mouse_point[0];
to->mY = mouse_point[1];
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordGL *to)
bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordGL *to)
{
LLCoordWindow window_coord;
return(convertCoords(from, &window_coord) && convertCoords(window_coord, to));
}
BOOL LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordScreen *to)
bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordScreen *to)
{
LLCoordWindow window_coord;
@ -1704,8 +1704,8 @@ void LLWindowMacOSX::hideCursor()
if(!mCursorHidden)
{
// LL_INFOS() << "hideCursor: hiding" << LL_ENDL;
mCursorHidden = TRUE;
mHideCursorPermanent = TRUE;
mCursorHidden = true;
mHideCursorPermanent = true;
hideNSCursor();
}
else
@ -1721,8 +1721,8 @@ void LLWindowMacOSX::showCursor()
if(mCursorHidden || !isCGCursorVisible())
{
// LL_INFOS() << "showCursor: showing" << LL_ENDL;
mCursorHidden = FALSE;
mHideCursorPermanent = FALSE;
mCursorHidden = false;
mHideCursorPermanent = false;
showNSCursor();
}
else
@ -1746,7 +1746,7 @@ void LLWindowMacOSX::hideCursorUntilMouseMove()
if (!mHideCursorPermanent)
{
hideCursor();
mHideCursorPermanent = FALSE;
mHideCursorPermanent = false;
}
}
@ -1867,9 +1867,9 @@ LLSD LLWindowMacOSX::getNativeKeyData()
return result;
}
BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b)
bool LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b)
{
BOOL retval = FALSE;
bool retval = false;
OSErr error = noErr;
NColorPickerInfo info;
@ -1926,12 +1926,12 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key)
return int_value; // otherwise return the long value
}
void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, bool b)
{
if (preeditor != mPreeditor && !b)
{
// This condition may occur by a call to
// setEnabled(BOOL) against LLTextEditor or LLLineEditor
// setEnabled(bool) against LLTextEditor or LLLineEditor
// when the control is not focused.
// We need to silently ignore the case so that
// the language input status of the focused control

View File

@ -47,53 +47,53 @@ public:
void show() override;
void hide() override;
void close() override;
BOOL getVisible() override;
BOOL getMinimized() override;
BOOL getMaximized() override;
BOOL maximize() override;
bool getVisible() override;
bool getMinimized() override;
bool getMaximized() override;
bool maximize() override;
void minimize() override;
void restore() override;
BOOL getFullscreen();
BOOL getPosition(LLCoordScreen *position) override;
BOOL getSize(LLCoordScreen *size) override;
BOOL getSize(LLCoordWindow *size) override;
BOOL setPosition(LLCoordScreen position) override;
BOOL setSizeImpl(LLCoordScreen size) override;
BOOL setSizeImpl(LLCoordWindow size) override;
BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL) override;
BOOL setCursorPosition(LLCoordWindow position) override;
BOOL getCursorPosition(LLCoordWindow *position) override;
bool getFullscreen();
bool getPosition(LLCoordScreen *position) override;
bool getSize(LLCoordScreen *size) override;
bool getSize(LLCoordWindow *size) override;
bool setPosition(LLCoordScreen position) override;
bool setSizeImpl(LLCoordScreen size) override;
bool setSizeImpl(LLCoordWindow size) override;
bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL) override;
bool setCursorPosition(LLCoordWindow position) override;
bool getCursorPosition(LLCoordWindow *position) override;
void showCursor() override;
void hideCursor() override;
void showCursorFromMouseMove() override;
void hideCursorUntilMouseMove() override;
BOOL isCursorHidden() override;
bool isCursorHidden() override;
void updateCursor() override;
ECursorType getCursor() const override;
void captureMouse() override;
void releaseMouse() override;
void setMouseClipping( BOOL b ) override;
BOOL isClipboardTextAvailable() override;
BOOL pasteTextFromClipboard(LLWString &dst) override;
BOOL copyTextToClipboard(const LLWString & src) override;
void setMouseClipping( bool b ) override;
bool isClipboardTextAvailable() override;
bool pasteTextFromClipboard(LLWString &dst) override;
bool copyTextToClipboard(const LLWString & src) override;
void flashIcon(F32 seconds) override;
F32 getGamma() override;
BOOL setGamma(const F32 gamma) override; // Set the gamma
bool setGamma(const F32 gamma) override; // Set the gamma
U32 getFSAASamples() override;
void setFSAASamples(const U32 fsaa_samples) override;
BOOL restoreGamma() override; // Restore original gamma table (before updating gamma)
bool restoreGamma() override; // Restore original gamma table (before updating gamma)
ESwapMethod getSwapMethod() override { return mSwapMethod; }
void gatherInput() override;
void delayInputProcessing() override {};
void swapBuffers() override;
// handy coordinate space conversion routines
BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) override;
BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) override;
BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) override;
BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) override;
BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) override;
BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) override;
bool convertCoords(LLCoordScreen from, LLCoordWindow *to) override;
bool convertCoords(LLCoordWindow from, LLCoordScreen *to) override;
bool convertCoords(LLCoordWindow from, LLCoordGL *to) override;
bool convertCoords(LLCoordGL from, LLCoordWindow *to) override;
bool convertCoords(LLCoordScreen from, LLCoordGL *to) override;
bool convertCoords(LLCoordGL from, LLCoordScreen *to) override;
LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) override;
F32 getNativeAspectRatio() override;
@ -107,12 +107,12 @@ public:
void beforeDialog() override;
void afterDialog() override;
BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b) override;
bool dialogColorPicker(F32 *r, F32 *g, F32 *b) override;
void *getPlatformWindow() override;
void bringToFront() override {};
void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) override;
void allowLanguageTextInput(LLPreeditor *preeditor, bool b) override;
void interruptLanguageTextInput() override;
void spawnWebBrowser(const std::string& escaped_url, bool async) override;
F32 getSystemUISize() override;
@ -149,27 +149,27 @@ public:
protected:
LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth,
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
bool ignore_pixel_depth,
U32 fsaa_samples,
U32 max_vram);
~LLWindowMacOSX();
void initCursors();
BOOL isValid() override;
bool isValid() override;
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
// Changes display resolution. Returns true if successful
BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
bool setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
bool setFullscreenResolution();
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
bool resetDisplayResolution();
BOOL shouldPostQuit() { return mPostQuit; }
bool shouldPostQuit() { return mPostQuit; }
//Satisfy MAINT-3135 and MAINT-3288 with a flag.
/*virtual */ void setOldResize(bool oldresize) override {setResizeMode(oldresize, mGLView); }
@ -183,7 +183,7 @@ protected:
//
// create or re-create the GL context/window. Called from the constructor and switchContext().
BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync);
bool createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool enable_vsync);
void destroyContext();
void setupFailure(const std::string& text, const std::string& caption, U32 type);
void adjustCursorDecouple(bool warpingMouse = false);
@ -211,31 +211,31 @@ protected:
LLRect mOldMouseClip; // Screen rect to which the mouse cursor was globally constrained before we changed it in clipMouse()
std::string mWindowTitle;
double mOriginalAspectRatio;
BOOL mSimulatedRightClick;
bool mSimulatedRightClick;
U32 mLastModifiers;
BOOL mHandsOffEvents; // When true, temporarially disable CarbonEvent processing.
bool mHandsOffEvents; // When true, temporarially disable CarbonEvent processing.
// Used to allow event processing when putting up dialogs in fullscreen mode.
BOOL mCursorDecoupled;
bool mCursorDecoupled;
S32 mCursorLastEventDeltaX;
S32 mCursorLastEventDeltaY;
BOOL mCursorIgnoreNextDelta;
BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize.
bool mCursorIgnoreNextDelta;
bool mNeedsResize; // Constructor figured out the window is too big, it needs a resize.
LLCoordScreen mNeedsResizeSize;
F32 mOverrideAspectRatio;
BOOL mMaximized;
BOOL mMinimized;
bool mMaximized;
bool mMinimized;
U32 mFSAASamples;
BOOL mForceRebuild;
bool mForceRebuild;
U32 mMaxVRAM;
S32 mDragOverrideCursor;
// Input method management through Text Service Manager.
BOOL mLanguageTextInputAllowed;
bool mLanguageTextInputAllowed;
LLPreeditor* mPreeditor;
public:
static BOOL sUseMultGL;
static bool sUseMultGL;
friend class LLWindowManager;

View File

@ -40,8 +40,8 @@ U16 *gMesaBuffer = NULL;
//
LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
U32 flags, bool fullscreen, bool clearBg,
bool disable_vsync, bool use_gl, bool ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
if (use_gl)

View File

@ -39,38 +39,38 @@ public:
/*virtual*/ void show() {};
/*virtual*/ void hide() {};
/*virtual*/ void close() {};
/*virtual*/ BOOL getVisible() {return FALSE;};
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
/*virtual*/ bool getVisible() {return false;};
/*virtual*/ bool getMinimized() {return false;};
/*virtual*/ bool getMaximized() {return false;};
/*virtual*/ bool maximize() {return false;};
/*virtual*/ void minimize() {};
/*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
/*virtual*/ bool getFullscreen() {return false;};
/*virtual*/ bool getPosition(LLCoordScreen *position) {return false;};
/*virtual*/ bool getSize(LLCoordScreen *size) {return false;};
/*virtual*/ bool getSize(LLCoordWindow *size) {return false;};
/*virtual*/ bool setPosition(LLCoordScreen position) {return false;};
/*virtual*/ bool setSizeImpl(LLCoordScreen size) {return false;};
/*virtual*/ bool switchContext(bool fullscreen, const LLCoordScreen &size, bool disable_vsync, const LLCoordScreen * const posp = NULL) {return false;};
/*virtual*/ bool setCursorPosition(LLCoordWindow position) {return false;};
/*virtual*/ bool getCursorPosition(LLCoordWindow *position) {return false;};
/*virtual*/ void showCursor() {};
/*virtual*/ void hideCursor() {};
/*virtual*/ void showCursorFromMouseMove() {};
/*virtual*/ void hideCursorUntilMouseMove() {};
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
/*virtual*/ bool isCursorHidden() {return false;};
/*virtual*/ void updateCursor() {};
//virtual ECursorType getCursor() { return mCurrentCursor; };
/*virtual*/ void captureMouse() {};
/*virtual*/ void releaseMouse() {};
/*virtual*/ void setMouseClipping( BOOL b ) {};
/*virtual*/ BOOL isClipboardTextAvailable() {return FALSE; };
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
/*virtual*/ BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
/*virtual*/ void setMouseClipping( bool b ) {};
/*virtual*/ bool isClipboardTextAvailable() {return false; };
/*virtual*/ bool pasteTextFromClipboard(LLWString &dst) {return false; };
/*virtual*/ bool copyTextToClipboard(const LLWString &src) {return false; };
/*virtual*/ void flashIcon(F32 seconds) {};
/*virtual*/ F32 getGamma() {return 1.0f; };
/*virtual*/ BOOL setGamma(const F32 gamma) {return FALSE; }; // Set the gamma
/*virtual*/ BOOL restoreGamma() {return FALSE; }; // Restore original gamma table (before updating gamma)
/*virtual*/ bool setGamma(const F32 gamma) {return false; }; // Set the gamma
/*virtual*/ bool restoreGamma() {return false; }; // Restore original gamma table (before updating gamma)
/*virtual*/ void setFSAASamples(const U32 fsaa_samples) { /* FSAA not supported yet on Mesa headless.*/ }
/*virtual*/ U32 getFSAASamples() { return 0; }
//virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
@ -80,12 +80,12 @@ public:
/*virtual*/ void restoreGLContext() {};
// handy coordinate space conversion routines
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordWindow *to) { return false; };
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordScreen *to) { return false; };
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordGL *to) { return false; };
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordWindow *to) { return false; };
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordGL *to) { return false; };
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordScreen *to) { return false; };
/*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
/*virtual*/ F32 getNativeAspectRatio() { return 1.0f; };
@ -97,8 +97,8 @@ public:
LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
U32 flags, bool fullscreen, bool clearBg,
bool disable_vsync, bool use_gl, bool ignore_pixel_depth);
~LLWindowMesaHeadless();
private:

View File

@ -59,7 +59,7 @@ extern "C" {
# include <sys/wait.h>
#endif // LL_LINUX
extern BOOL gDebugWindowProc;
extern bool gDebugWindowProc;
const S32 MAX_NUM_RESOLUTIONS = 200;
@ -102,10 +102,10 @@ void maybe_unlock_display(void)
// static
bool LLWindowSDL::ll_try_gtk_init(void)
{
static BOOL done_gtk_diag = FALSE;
static BOOL gtk_is_good = FALSE;
static BOOL done_setlocale = FALSE;
static BOOL tried_gtk_init = FALSE;
static bool done_gtk_diag = false;
static bool gtk_is_good = false;
static bool done_setlocale = false;
static bool tried_gtk_init = false;
if (!done_setlocale)
{
@ -113,12 +113,12 @@ bool LLWindowSDL::ll_try_gtk_init(void)
maybe_lock_display();
gtk_disable_setlocale();
maybe_unlock_display();
done_setlocale = TRUE;
done_setlocale = true;
}
if (!tried_gtk_init)
{
tried_gtk_init = TRUE;
tried_gtk_init = true;
if (!g_thread_supported ()) g_thread_init (NULL);
maybe_lock_display();
gtk_is_good = gtk_init_check(NULL, NULL);
@ -148,12 +148,12 @@ bool LLWindowSDL::ll_try_gtk_init(void)
{
LL_WARNS() << "- GTK COMPATIBILITY WARNING: " <<
gtk_warning << LL_ENDL;
gtk_is_good = FALSE;
gtk_is_good = false;
} else {
LL_INFOS() << "- GTK version is good." << LL_ENDL;
}
done_gtk_diag = TRUE;
done_gtk_diag = true;
}
return gtk_is_good;
@ -185,9 +185,9 @@ Display* LLWindowSDL::get_SDL_Display(void)
LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth, U32 fsaa_samples)
bool fullscreen, bool clearBg,
bool disable_vsync, bool use_gl,
bool ignore_pixel_depth, U32 fsaa_samples)
: LLWindow(callbacks, fullscreen, flags),
Lock_Display(NULL),
Unlock_Display(NULL), mGamma(1.0f)
@ -199,7 +199,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
// Ignore use_gl for now, only used for drones on PC
mWindow = NULL;
mNeedsResize = FALSE;
mNeedsResize = false;
mOverrideAspectRatio = 0.f;
mGrabbyKeyFlags = 0;
mReallyCapturedCount = 0;
@ -243,7 +243,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
gWindowImplementation = this;
#if LL_X11
mFlashing = FALSE;
mFlashing = false;
#endif // LL_X11
mKeyScanCode = 0;
@ -406,7 +406,7 @@ static int x11_detect_VRAM_kb()
}
#endif // LL_X11
BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync)
bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool disable_vsync)
{
//bool glneedsinit = false;
@ -442,7 +442,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
{
LL_INFOS() << "SDL_GetVideoInfo() failed! " << SDL_GetError() << LL_ENDL;
setupFailure("SDL_GetVideoInfo() failed, Window creation error", "Error", OSMB_OK);
return FALSE;
return false;
}
if (video_info->current_h > 0)
@ -560,7 +560,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
if (mWindow)
{
mFullscreen = TRUE;
mFullscreen = true;
mFullscreenWidth = mWindow->w;
mFullscreenHeight = mWindow->h;
mFullscreenBits = mWindow->format->BitsPerPixel;
@ -576,7 +576,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
{
LL_WARNS() << "createContext: fullscreen creation failure. SDL: " << SDL_GetError() << LL_ENDL;
// No fullscreen support
mFullscreen = FALSE;
mFullscreen = false;
mFullscreenWidth = -1;
mFullscreenHeight = -1;
mFullscreenBits = -1;
@ -606,7 +606,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
{
LL_WARNS() << "createContext: window creation failure. SDL: " << SDL_GetError() << LL_ENDL;
setupFailure("Window creation error", "Error", OSMB_OK);
return FALSE;
return false;
}
} else if (!mFullscreen && (mWindow != NULL))
{
@ -669,7 +669,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
"will automatically adjust the screen each time it runs.",
"Error",
OSMB_OK);
return FALSE;
return false;
}
#if 0 // *FIX: we're going to brave it for now...
@ -685,7 +685,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
"If you continue to receive this message, contact customer service.",
"Error",
OSMB_OK);
return FALSE;
return false;
}
#endif
@ -726,15 +726,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
LL_WARNS() << "Couldn't enable key-repeat: " << SDL_GetError() <<LL_ENDL;
// Don't need to get the current gamma, since there's a call that restores it to the system defaults.
return TRUE;
return true;
}
// changing fullscreen resolution, or switching between windowed and fullscreen mode.
BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp)
bool LLWindowSDL::switchContext(bool fullscreen, const LLCoordScreen &size, bool disable_vsync, const LLCoordScreen * const posp)
{
const BOOL needsRebuild = TRUE; // Just nuke the context and start over.
BOOL result = true;
const bool needsRebuild = true; // Just nuke the context and start over.
bool result = true;
LL_INFOS() << "switchContext, fullscreen=" << fullscreen << LL_ENDL;
stop_glerror();
@ -825,45 +825,45 @@ void LLWindowSDL::close()
// }
// Make sure cursor is visible and we haven't mangled the clipping state.
setMouseClipping(FALSE);
setMouseClipping(false);
showCursor();
destroyContext();
}
BOOL LLWindowSDL::isValid()
bool LLWindowSDL::isValid()
{
return (mWindow != NULL);
}
BOOL LLWindowSDL::getVisible()
bool LLWindowSDL::getVisible()
{
BOOL result = FALSE;
bool result = false;
// *FIX: This isn't really right...
// Then what is?
if (mWindow)
{
result = TRUE;
result = true;
}
return(result);
}
BOOL LLWindowSDL::getMinimized()
bool LLWindowSDL::getMinimized()
{
BOOL result = FALSE;
bool result = false;
if (mWindow && (1 == mIsMinimized))
{
result = TRUE;
result = true;
}
return(result);
}
BOOL LLWindowSDL::getMaximized()
bool LLWindowSDL::getMaximized()
{
BOOL result = FALSE;
bool result = false;
if (mWindow)
{
@ -873,50 +873,50 @@ BOOL LLWindowSDL::getMaximized()
return(result);
}
BOOL LLWindowSDL::maximize()
bool LLWindowSDL::maximize()
{
// TODO
return FALSE;
return false;
}
BOOL LLWindowSDL::getFullscreen()
bool LLWindowSDL::getFullscreen()
{
return mFullscreen;
}
BOOL LLWindowSDL::getPosition(LLCoordScreen *position)
bool LLWindowSDL::getPosition(LLCoordScreen *position)
{
// *FIX: can anything be done with this?
position->mX = 0;
position->mY = 0;
return TRUE;
return true;
}
BOOL LLWindowSDL::getSize(LLCoordScreen *size)
bool LLWindowSDL::getSize(LLCoordScreen *size)
{
if (mWindow)
{
size->mX = mWindow->w;
size->mY = mWindow->h;
return (TRUE);
return (true);
}
return (FALSE);
return (false);
}
BOOL LLWindowSDL::getSize(LLCoordWindow *size)
bool LLWindowSDL::getSize(LLCoordWindow *size)
{
if (mWindow)
{
size->mX = mWindow->w;
size->mY = mWindow->h;
return (TRUE);
return (true);
}
return (FALSE);
return (false);
}
BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
bool LLWindowSDL::setPosition(const LLCoordScreen position)
{
if(mWindow)
{
@ -924,10 +924,10 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
//MacMoveWindow(mWindow, position.mX, position.mY, false);
}
return TRUE;
return true;
}
BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
bool LLWindowSDL::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@ -939,13 +939,13 @@ BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
event.resize.h = size.mY;
SDL_PushEvent(&event); // copied into queue
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size)
bool LLWindowSDL::setSizeImpl(const LLCoordWindow size)
{
if(mWindow)
{
@ -957,10 +957,10 @@ BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size)
event.resize.h = size.mY;
SDL_PushEvent(&event); // copied into queue
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -987,14 +987,14 @@ F32 LLWindowSDL::getGamma()
return 1/mGamma;
}
BOOL LLWindowSDL::restoreGamma()
bool LLWindowSDL::restoreGamma()
{
//CGDisplayRestoreColorSyncSettings();
SDL_SetGamma(1.0f, 1.0f, 1.0f);
return true;
}
BOOL LLWindowSDL::setGamma(const F32 gamma)
bool LLWindowSDL::setGamma(const F32 gamma)
{
mGamma = gamma;
if (mGamma == 0) mGamma = 0.1f;
@ -1003,7 +1003,7 @@ BOOL LLWindowSDL::setGamma(const F32 gamma)
return true;
}
BOOL LLWindowSDL::isCursorHidden()
bool LLWindowSDL::isCursorHidden()
{
return mCursorHidden;
}
@ -1011,7 +1011,7 @@ BOOL LLWindowSDL::isCursorHidden()
// Constrains the mouse to the window.
void LLWindowSDL::setMouseClipping( BOOL b )
void LLWindowSDL::setMouseClipping( bool b )
{
//SDL_WM_GrabInput(b ? SDL_GRAB_ON : SDL_GRAB_OFF);
}
@ -1035,14 +1035,14 @@ void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immedia
#endif
}
BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
bool LLWindowSDL::setCursorPosition(const LLCoordWindow position)
{
BOOL result = TRUE;
bool result = true;
LLCoordScreen screen_pos;
if (!convertCoords(position, &screen_pos))
{
return FALSE;
return false;
}
//LL_INFOS() << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << LL_ENDL;
@ -1055,7 +1055,7 @@ BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
return result;
}
BOOL LLWindowSDL::getCursorPosition(LLCoordWindow *position)
bool LLWindowSDL::getCursorPosition(LLCoordWindow *position)
{
//Point cursor_point;
LLCoordScreen screen_pos;
@ -1137,7 +1137,7 @@ void LLWindowSDL::beforeDialog()
LL_INFOS() << "LLWindowSDL::beforeDialog()" << LL_ENDL;
if (SDLReallyCaptureInput(FALSE)) // must ungrab input so popup works!
if (SDLReallyCaptureInput(false)) // must ungrab input so popup works!
{
if (mFullscreen)
{
@ -1196,7 +1196,7 @@ void LLWindowSDL::afterDialog()
#if LL_X11
// set/reset the XWMHints flag for 'urgency' that usually makes the icon flash
void LLWindowSDL::x11_set_urgent(BOOL urgent)
void LLWindowSDL::x11_set_urgent(bool urgent)
{
if (mSDL_Display && !mFullscreen)
{
@ -1235,26 +1235,26 @@ void LLWindowSDL::flashIcon(F32 seconds)
mFlashTimer.reset();
mFlashTimer.setTimerExpirySec(remaining_time);
x11_set_urgent(TRUE);
mFlashing = TRUE;
x11_set_urgent(true);
mFlashing = true;
#endif // LL_X11
}
#if LL_GTK
BOOL LLWindowSDL::isClipboardTextAvailable()
bool LLWindowSDL::isClipboardTextAvailable()
{
if (ll_try_gtk_init())
{
GtkClipboard * const clipboard =
gtk_clipboard_get(GDK_NONE);
return gtk_clipboard_wait_is_text_available(clipboard) ?
TRUE : FALSE;
true : false;
}
return FALSE; // failure
return false; // failure
}
BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &text)
bool LLWindowSDL::pasteTextFromClipboard(LLWString &text)
{
if (ll_try_gtk_init())
{
@ -1265,13 +1265,13 @@ BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &text)
{
text = LLWString(utf8str_to_wstring(data));
g_free(data);
return TRUE;
return true;
}
}
return FALSE; // failure
return false; // failure
}
BOOL LLWindowSDL::copyTextToClipboard(const LLWString &text)
bool LLWindowSDL::copyTextToClipboard(const LLWString &text)
{
if (ll_try_gtk_init())
{
@ -1279,25 +1279,25 @@ BOOL LLWindowSDL::copyTextToClipboard(const LLWString &text)
GtkClipboard * const clipboard =
gtk_clipboard_get(GDK_NONE);
gtk_clipboard_set_text(clipboard, utf8.c_str(), utf8.length());
return TRUE;
return true;
}
return FALSE; // failure
return false; // failure
}
BOOL LLWindowSDL::isPrimaryTextAvailable()
bool LLWindowSDL::isPrimaryTextAvailable()
{
if (ll_try_gtk_init())
{
GtkClipboard * const clipboard =
gtk_clipboard_get(GDK_SELECTION_PRIMARY);
return gtk_clipboard_wait_is_text_available(clipboard) ?
TRUE : FALSE;
true : false;
}
return FALSE; // failure
return false; // failure
}
BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &text)
bool LLWindowSDL::pasteTextFromPrimary(LLWString &text)
{
if (ll_try_gtk_init())
{
@ -1308,13 +1308,13 @@ BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &text)
{
text = LLWString(utf8str_to_wstring(data));
g_free(data);
return TRUE;
return true;
}
}
return FALSE; // failure
return false; // failure
}
BOOL LLWindowSDL::copyTextToPrimary(const LLWString &text)
bool LLWindowSDL::copyTextToPrimary(const LLWString &text)
{
if (ll_try_gtk_init())
{
@ -1322,41 +1322,41 @@ BOOL LLWindowSDL::copyTextToPrimary(const LLWString &text)
GtkClipboard * const clipboard =
gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gtk_clipboard_set_text(clipboard, utf8.c_str(), utf8.length());
return TRUE;
return true;
}
return FALSE; // failure
return false; // failure
}
#else
BOOL LLWindowSDL::isClipboardTextAvailable()
bool LLWindowSDL::isClipboardTextAvailable()
{
return FALSE; // unsupported
return false; // unsupported
}
BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
bool LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
{
return FALSE; // unsupported
return false; // unsupported
}
BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s)
bool LLWindowSDL::copyTextToClipboard(const LLWString &s)
{
return FALSE; // unsupported
return false; // unsupported
}
BOOL LLWindowSDL::isPrimaryTextAvailable()
bool LLWindowSDL::isPrimaryTextAvailable()
{
return FALSE; // unsupported
return false; // unsupported
}
BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
bool LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
{
return FALSE; // unsupported
return false; // unsupported
}
BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s)
bool LLWindowSDL::copyTextToPrimary(const LLWString &s)
{
return FALSE; // unsupported
return false; // unsupported
}
#endif // LL_GTK
@ -1404,58 +1404,58 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso
return mSupportedResolutions;
}
BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to)
bool LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to)
{
if (!to)
return FALSE;
return false;
to->mX = from.mX;
to->mY = mWindow->h - from.mY - 1;
return TRUE;
return true;
}
BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to)
bool LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to)
{
if (!to)
return FALSE;
return false;
to->mX = from.mX;
to->mY = mWindow->h - from.mY - 1;
return TRUE;
return true;
}
BOOL LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordWindow* to)
bool LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordWindow* to)
{
if (!to)
return FALSE;
return false;
// In the fullscreen case, window and screen coordinates are the same.
to->mX = from.mX;
to->mY = from.mY;
return (TRUE);
return (true);
}
BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordScreen *to)
bool LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordScreen *to)
{
if (!to)
return FALSE;
return false;
// In the fullscreen case, window and screen coordinates are the same.
to->mX = from.mX;
to->mY = from.mY;
return (TRUE);
return (true);
}
BOOL LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordGL *to)
bool LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordGL *to)
{
LLCoordWindow window_coord;
return(convertCoords(from, &window_coord) && convertCoords(window_coord, to));
}
BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordScreen *to)
bool LLWindowSDL::convertCoords(LLCoordGL from, LLCoordScreen *to)
{
LLCoordWindow window_coord;
@ -1472,7 +1472,7 @@ void LLWindowSDL::setupFailure(const std::string& text, const std::string& capti
OSMessageBox(text, caption, type);
}
BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
bool LLWindowSDL::SDLReallyCaptureInput(bool capture)
{
// note: this used to be safe to call nestedly, but in the
// end that's not really a wise usage pattern, so don't.
@ -1554,7 +1554,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
(!capture && SDL_GRAB_OFF==newmode);
}
U32 LLWindowSDL::SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain)
U32 LLWindowSDL::SDLCheckGrabbyKeys(SDLKey keysym, bool gain)
{
/* part of the fix for SL-13243: Some popular window managers like
to totally eat alt-drag for the purposes of moving windows. We
@ -1714,7 +1714,7 @@ void LLWindowSDL::processMiscNativeEvents()
pump_timer.setTimerExpirySec(1.0f / 15.0f);
do {
// Always do at least one non-blocking pump
gtk_main_iteration_do(FALSE);
gtk_main_iteration_do(false);
} while (gtk_events_pending() &&
!pump_timer.hasExpired());
@ -1748,7 +1748,7 @@ void LLWindowSDL::gatherInput()
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
mCallbacks->handleMouseMove(this, openGlCoord, mask);
break;
}
@ -1760,13 +1760,13 @@ void LLWindowSDL::gatherInput()
gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod);
// part of the fix for SL-13243
if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0)
SDLReallyCaptureInput(TRUE);
if (SDLCheckGrabbyKeys(event.key.keysym.sym, true) != 0)
SDLReallyCaptureInput(true);
if (event.key.keysym.unicode)
{
handleUnicodeUTF16(event.key.keysym.unicode,
gKeyboard->currentMask(FALSE));
gKeyboard->currentMask(false));
}
break;
@ -1775,8 +1775,8 @@ void LLWindowSDL::gatherInput()
mKeyVirtualKey = event.key.keysym.unicode;
mKeyModifiers = event.key.keysym.mod;
if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0)
SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243
if (SDLCheckGrabbyKeys(event.key.keysym.sym, false) == 0)
SDLReallyCaptureInput(false); // part of the fix for SL-13243
gKeyboard->handleKeyUp(event.key.keysym.sym, event.key.keysym.mod);
break;
@ -1787,7 +1787,7 @@ void LLWindowSDL::gatherInput()
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
if (event.button.button == SDL_BUTTON_LEFT) // SDL doesn't manage double clicking...
{
@ -1850,7 +1850,7 @@ void LLWindowSDL::gatherInput()
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
MASK mask = gKeyboard->currentMask(true);
if (event.button.button == SDL_BUTTON_LEFT) // left
mCallbacks->handleMouseUp(this, openGlCoord, mask);
@ -1921,11 +1921,11 @@ void LLWindowSDL::gatherInput()
mIsMinimized = (!event.active.gain);
mCallbacks->handleActivate(this, !mIsMinimized);
LL_INFOS() << "SDL deiconification state switched to " << BOOL(event.active.gain) << LL_ENDL;
LL_INFOS() << "SDL deiconification state switched to " << bool(event.active.gain) << LL_ENDL;
}
else
{
LL_INFOS() << "Ignored bogus redundant SDL deiconification state switch to " << BOOL(event.active.gain) << LL_ENDL;
LL_INFOS() << "Ignored bogus redundant SDL deiconification state switch to " << bool(event.active.gain) << LL_ENDL;
}
}
break;
@ -1951,8 +1951,8 @@ void LLWindowSDL::gatherInput()
// expired.
if (mFlashing && mFlashTimer.hasExpired())
{
x11_set_urgent(FALSE);
mFlashing = FALSE;
x11_set_urgent(false);
mFlashing = false;
}
#endif // LL_X11
}
@ -2003,10 +2003,10 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty
U8 srcred = pixelp[0];
U8 srcgreen = pixelp[1];
U8 srcblue = pixelp[2];
BOOL mask_bit = (srcred != 200)
bool mask_bit = (srcred != 200)
|| (srcgreen != 200)
|| (srcblue != 200);
BOOL data_bit = mask_bit && (srcgreen <= 80);//not 0x80
bool data_bit = mask_bit && (srcgreen <= 80);//not 0x80
unsigned char bit_offset = (cursurface->w/8) * i
+ j/8;
cursor_data[bit_offset] |= (data_bit) << (7 - (j&7));
@ -2165,8 +2165,8 @@ void LLWindowSDL::hideCursor()
if(!mCursorHidden)
{
// LL_INFOS() << "hideCursor: hiding" << LL_ENDL;
mCursorHidden = TRUE;
mHideCursorPermanent = TRUE;
mCursorHidden = true;
mHideCursorPermanent = true;
SDL_ShowCursor(0);
}
else
@ -2180,8 +2180,8 @@ void LLWindowSDL::showCursor()
if(mCursorHidden)
{
// LL_INFOS() << "showCursor: showing" << LL_ENDL;
mCursorHidden = FALSE;
mHideCursorPermanent = FALSE;
mCursorHidden = false;
mHideCursorPermanent = false;
SDL_ShowCursor(1);
}
else
@ -2203,7 +2203,7 @@ void LLWindowSDL::hideCursorUntilMouseMove()
if (!mHideCursorPermanent)
{
hideCursor();
mHideCursorPermanent = FALSE;
mHideCursorPermanent = false;
}
}
@ -2385,9 +2385,9 @@ LLSD LLWindowSDL::getNativeKeyData()
}
BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
bool LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
{
BOOL rtn = FALSE;
bool rtn = false;
beforeDialog();
@ -2421,8 +2421,8 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
gtk_color_selection_set_previous_color (colorsel, &color);
gtk_color_selection_set_current_color (colorsel, &color);
gtk_color_selection_set_has_palette (colorsel, TRUE);
gtk_color_selection_set_has_opacity_control(colorsel, FALSE);
gtk_color_selection_set_has_palette (colorsel, true);
gtk_color_selection_set_has_opacity_control(colorsel, false);
gint response = GTK_RESPONSE_NONE;
g_signal_connect (win,
@ -2434,7 +2434,7 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
G_CALLBACK (color_changed_callback),
&color);
gtk_window_set_modal(GTK_WINDOW(win), TRUE);
gtk_window_set_modal(GTK_WINDOW(win), true);
gtk_widget_show_all(win);
// hide the help button - we don't service it.
gtk_widget_hide(GTK_COLOR_SELECTION_DIALOG(win)->help_button);
@ -2448,7 +2448,7 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
*r = color.red / 65535.0f;
*g = color.green / 65535.0f;
*b = color.blue / 65535.0f;
rtn = TRUE;
rtn = true;
}
}
@ -2463,9 +2463,9 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ
return 0;
}
BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
bool LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
{
return (FALSE);
return (false);
}
#endif // LL_GTK

View File

@ -52,47 +52,47 @@ public:
/*virtual*/ void show();
/*virtual*/ void hide();
/*virtual*/ void close();
/*virtual*/ BOOL getVisible();
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
/*virtual*/ bool getVisible();
/*virtual*/ bool getMinimized();
/*virtual*/ bool getMaximized();
/*virtual*/ bool maximize();
/*virtual*/ void minimize();
/*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
/*virtual*/ bool getFullscreen();
/*virtual*/ bool getPosition(LLCoordScreen *position);
/*virtual*/ bool getSize(LLCoordScreen *size);
/*virtual*/ bool getSize(LLCoordWindow *size);
/*virtual*/ bool setPosition(LLCoordScreen position);
/*virtual*/ bool setSizeImpl(LLCoordScreen size);
/*virtual*/ bool setSizeImpl(LLCoordWindow size);
/*virtual*/ bool switchContext(bool fullscreen, const LLCoordScreen &size, bool disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ bool setCursorPosition(LLCoordWindow position);
/*virtual*/ bool getCursorPosition(LLCoordWindow *position);
/*virtual*/ void showCursor();
/*virtual*/ void hideCursor();
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
/*virtual*/ bool isCursorHidden();
/*virtual*/ void updateCursor();
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
/*virtual*/ void setMouseClipping( bool b );
/*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
/*virtual*/ BOOL copyTextToClipboard(const LLWString & src);
/*virtual*/ bool isClipboardTextAvailable();
/*virtual*/ bool pasteTextFromClipboard(LLWString &dst);
/*virtual*/ bool copyTextToClipboard(const LLWString & src);
/*virtual*/ BOOL isPrimaryTextAvailable();
/*virtual*/ BOOL pasteTextFromPrimary(LLWString &dst);
/*virtual*/ BOOL copyTextToPrimary(const LLWString & src);
/*virtual*/ bool isPrimaryTextAvailable();
/*virtual*/ bool pasteTextFromPrimary(LLWString &dst);
/*virtual*/ bool copyTextToPrimary(const LLWString & src);
/*virtual*/ void flashIcon(F32 seconds);
/*virtual*/ F32 getGamma();
/*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma
/*virtual*/ bool setGamma(const F32 gamma); // Set the gamma
/*virtual*/ U32 getFSAASamples();
/*virtual*/ void setFSAASamples(const U32 samples);
/*virtual*/ BOOL restoreGamma(); // Restore original gamma table (before updating gamma)
/*virtual*/ bool restoreGamma(); // Restore original gamma table (before updating gamma)
/*virtual*/ ESwapMethod getSwapMethod() { return mSwapMethod; }
/*virtual*/ void processMiscNativeEvents();
/*virtual*/ void gatherInput();
@ -102,12 +102,12 @@ public:
/*virtual*/ void delayInputProcessing() { };
// handy coordinate space conversion routines
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to);
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to);
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to);
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to);
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to);
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordWindow *to);
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordScreen *to);
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordGL *to);
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordWindow *to);
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordGL *to);
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordScreen *to);
/*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions);
/*virtual*/ F32 getNativeAspectRatio();
@ -117,7 +117,7 @@ public:
/*virtual*/ void beforeDialog();
/*virtual*/ void afterDialog();
/*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b);
/*virtual*/ bool dialogColorPicker(F32 *r, F32 *g, F32 *b);
/*virtual*/ void *getPlatformWindow();
/*virtual*/ void bringToFront();
@ -148,11 +148,11 @@ public:
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth, U32 fsaa_samples);
bool fullscreen, bool clearBg, bool disable_vsync, bool use_gl,
bool ignore_pixel_depth, U32 fsaa_samples);
~LLWindowSDL();
/*virtual*/ BOOL isValid();
/*virtual*/ bool isValid();
/*virtual*/ LLSD getNativeKeyData();
void initCursors();
@ -160,12 +160,12 @@ protected:
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
// Changes display resolution. Returns true if successful
BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
bool setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
bool setFullscreenResolution();
BOOL shouldPostQuit() { return mPostQuit; }
bool shouldPostQuit() { return mPostQuit; }
protected:
//
@ -173,12 +173,12 @@ protected:
//
// create or re-create the GL context/window. Called from the constructor and switchContext().
BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync);
bool createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool disable_vsync);
void destroyContext();
void setupFailure(const std::string& text, const std::string& caption, U32 type);
void fixWindowSize(void);
U32 SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain);
BOOL SDLReallyCaptureInput(BOOL capture);
U32 SDLCheckGrabbyKeys(SDLKey keysym, bool gain);
bool SDLReallyCaptureInput(bool capture);
//
// Platform specific variables
@ -188,7 +188,7 @@ protected:
SDL_Surface * mWindow;
std::string mWindowTitle;
double mOriginalAspectRatio;
BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize.
bool mNeedsResize; // Constructor figured out the window is too big, it needs a resize.
LLCoordScreen mNeedsResizeSize;
F32 mOverrideAspectRatio;
F32 mGamma;
@ -204,8 +204,8 @@ protected:
private:
#if LL_X11
void x11_set_urgent(BOOL urgent);
BOOL mFlashing;
void x11_set_urgent(bool urgent);
bool mFlashing;
LLTimer mFlashTimer;
#endif //LL_X11

File diff suppressed because it is too large Load Diff

View File

@ -48,47 +48,47 @@ public:
/*virtual*/ void show();
/*virtual*/ void hide();
/*virtual*/ void close();
/*virtual*/ BOOL getVisible();
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
/*virtual*/ bool getVisible();
/*virtual*/ bool getMinimized();
/*virtual*/ bool getMaximized();
/*virtual*/ bool maximize();
/*virtual*/ void minimize();
/*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ bool getFullscreen();
/*virtual*/ bool getPosition(LLCoordScreen *position);
/*virtual*/ bool getSize(LLCoordScreen *size);
/*virtual*/ bool getSize(LLCoordWindow *size);
/*virtual*/ bool setPosition(LLCoordScreen position);
/*virtual*/ bool setSizeImpl(LLCoordScreen size);
/*virtual*/ bool setSizeImpl(LLCoordWindow size);
/*virtual*/ bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ void setTitle(const std::string title);
void* createSharedContext() override;
void makeContextCurrent(void* context) override;
void destroySharedContext(void* context) override;
/*virtual*/ void toggleVSync(bool enable_vsync);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
/*virtual*/ BOOL getCursorDelta(LLCoordCommon* delta);
/*virtual*/ bool setCursorPosition(LLCoordWindow position);
/*virtual*/ bool getCursorPosition(LLCoordWindow *position);
/*virtual*/ bool getCursorDelta(LLCoordCommon* delta);
/*virtual*/ void showCursor();
/*virtual*/ void hideCursor();
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
/*virtual*/ bool isCursorHidden();
/*virtual*/ void updateCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
/*virtual*/ BOOL copyTextToClipboard(const LLWString &src);
/*virtual*/ void setMouseClipping( bool b );
/*virtual*/ bool isClipboardTextAvailable();
/*virtual*/ bool pasteTextFromClipboard(LLWString &dst);
/*virtual*/ bool copyTextToClipboard(const LLWString &src);
/*virtual*/ void flashIcon(F32 seconds);
/*virtual*/ F32 getGamma();
/*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma
/*virtual*/ bool setGamma(const F32 gamma); // Set the gamma
/*virtual*/ void setFSAASamples(const U32 fsaa_samples);
/*virtual*/ U32 getFSAASamples();
/*virtual*/ BOOL restoreGamma(); // Restore original gamma table (before updating gamma)
/*virtual*/ bool restoreGamma(); // Restore original gamma table (before updating gamma)
/*virtual*/ ESwapMethod getSwapMethod() { return mSwapMethod; }
/*virtual*/ void gatherInput();
/*virtual*/ void delayInputProcessing();
@ -96,12 +96,12 @@ public:
/*virtual*/ void restoreGLContext() {};
// handy coordinate space conversion routines
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to);
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to);
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to);
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to);
/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to);
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordWindow *to);
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordScreen *to);
/*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordGL *to);
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordWindow *to);
/*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordGL *to);
/*virtual*/ bool convertCoords(LLCoordGL from, LLCoordScreen *to);
/*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions);
/*virtual*/ F32 getNativeAspectRatio();
@ -111,13 +111,13 @@ public:
U32 getAvailableVRAMMegabytes() override;
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) override;
/*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b );
/*virtual*/ bool dialogColorPicker(F32 *r, F32 *g, F32 *b );
/*virtual*/ void *getPlatformWindow();
/*virtual*/ void bringToFront();
/*virtual*/ void focusClient();
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, bool b);
/*virtual*/ void setLanguageTextInput( const LLCoordGL & pos );
/*virtual*/ void updateLanguageTextInputArea();
/*virtual*/ void interruptLanguageTextInput();
@ -139,27 +139,27 @@ public:
protected:
LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version);
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version);
~LLWindowWin32();
void initCursors();
void initInputDevices();
HCURSOR loadColorCursor(LPCTSTR name);
BOOL isValid();
bool isValid();
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
virtual LLSD getNativeKeyData();
// Changes display resolution. Returns true if successful
BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
bool setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh);
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
bool setFullscreenResolution();
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
bool resetDisplayResolution();
BOOL shouldPostQuit() { return mPostQuit; }
bool shouldPostQuit() { return mPostQuit; }
void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form);
void fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, CANDIDATEFORM *form);
@ -168,18 +168,18 @@ protected:
U32 fillReconvertString(const LLWString &text, S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string);
void handleStartCompositionMessage();
void handleCompositionMessage(U32 indexes);
BOOL handleImeRequests(WPARAM request, LPARAM param, LRESULT *result);
bool handleImeRequests(WPARAM request, LPARAM param, LRESULT *result);
protected:
//
// Platform specific methods
//
BOOL getClientRectInScreenSpace(RECT* rectp);
bool getClientRectInScreenSpace(RECT* rectp);
void updateJoystick( );
static LRESULT CALLBACK mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param);
static BOOL CALLBACK enumChildWindows(HWND h_wnd, LPARAM l_param);
static bool CALLBACK enumChildWindows(HWND h_wnd, LPARAM l_param);
//
@ -207,7 +207,7 @@ protected:
MASK mMouseMask;
static BOOL sIsClassRegistered; // has the window class been registered?
static bool sIsClassRegistered; // has the window class been registered?
F32 mCurrentGamma;
U32 mFSAASamples;
@ -215,16 +215,16 @@ protected:
F32 mMaxGLVersion; // maximum OpenGL version to attempt to use (clamps to 3.2 - 4.6)
WORD mPrevGammaRamp[3][256];
WORD mCurrentGammaRamp[3][256];
BOOL mCustomGammaSet;
bool mCustomGammaSet;
LPWSTR mIconResource;
BOOL mInputProcessingPaused;
bool mInputProcessingPaused;
// The following variables are for Language Text Input control.
// They are all static, since one context is shared by all LLWindowWin32
// instances.
static BOOL sLanguageTextInputAllowed;
static BOOL sWinIMEOpened;
static bool sLanguageTextInputAllowed;
static bool sWinIMEOpened;
static HKL sWinInputLocale;
static DWORD sWinIMEConversionMode;
static DWORD sWinIMESentenceMode;
@ -243,7 +243,7 @@ protected:
U32 mRawWParam;
U32 mRawLParam;
BOOL mMouseVanish;
bool mMouseVanish;
// Cached values of GetWindowRect and GetClientRect to be used by app thread
void updateWindowRect();

View File

@ -289,7 +289,7 @@ extern BOOL gPeriodicSlowFrame;
extern BOOL gDebugGL;
#if LL_DARWIN
extern BOOL gHiDPISupport;
extern bool gHiDPISupport;
#endif
////////////////////////////////////////////////////////////

Some files were not shown because too many files have changed in this diff Show More