Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts: # indra/llui/llfloater.cpp # indra/llui/llfloater.h # indra/llui/llfolderview.h # indra/llui/llfolderviewitem.cpp # indra/llui/llmenugl.cpp # indra/llui/llscrolllistctrl.cpp # indra/llui/llstatbar.cpp # indra/llui/lltabcontainer.h # indra/llwindow/lldxhardware.cpp # indra/llwindow/lldxhardware.h # indra/llwindow/llkeyboard.cpp # indra/llwindow/llkeyboard.h # indra/llwindow/llkeyboardheadless.cpp # indra/llwindow/llkeyboardheadless.h # indra/llwindow/llwindow.h # indra/llwindow/llwindowmacosx.cpp # indra/llwindow/llwindowmacosx.h # indra/llwindow/llwindowsdl.cpp # indra/llwindow/llwindowsdl.h # indra/llwindow/llwindowwin32.cpp # indra/llwindow/llwindowwin32.h # indra/newview/llavatarlist.cpp # indra/newview/llavatarlistitem.h # indra/newview/llchatitemscontainerctrl.cpp # indra/newview/llchiclet.cpp # indra/newview/llfasttimerview.cpp # indra/newview/llfavoritesbar.cpp # indra/newview/llfloaterbvhpreview.cpp # indra/newview/llfloatermap.cpp # indra/newview/llnavigationbar.cpp # indra/newview/llnavigationbar.h # indra/newview/llnetmap.cpp # indra/newview/lltexturectrl.cpp # indra/newview/lltoolcomp.cpp # indra/newview/lltoolcomp.h # indra/newview/lltoolface.cpp # indra/newview/lltoolfocus.h # indra/newview/lltoolpie.cppmaster
commit
210f59a923
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -563,13 +563,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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -450,9 +450,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(' '))
|
||||
{
|
||||
|
|
@ -463,9 +463,9 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
|
|||
|
||||
LLUICtrl::onCommit();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
return handled;
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLButton::handleKeyHere(KEY key, MASK mask )
|
||||
|
|
@ -486,7 +486,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))
|
||||
{
|
||||
|
|
@ -495,7 +495,7 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
if (hasTabStop() && !getIsChrome())
|
||||
{
|
||||
setFocus(TRUE);
|
||||
setFocus(true);
|
||||
}
|
||||
|
||||
if (!mFunctionName.empty())
|
||||
|
|
@ -526,11 +526,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() )
|
||||
|
|
@ -575,10 +575,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))
|
||||
{
|
||||
|
|
@ -587,7 +587,7 @@ BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
if (hasTabStop() && !getIsChrome())
|
||||
{
|
||||
setFocus(TRUE);
|
||||
setFocus(true);
|
||||
}
|
||||
|
||||
// if (pointInView(x, y))
|
||||
|
|
@ -600,10 +600,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)
|
||||
{
|
||||
|
|
@ -629,7 +629,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)
|
||||
|
|
@ -644,11 +644,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))
|
||||
{
|
||||
|
|
@ -667,7 +667,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)
|
||||
|
|
@ -1383,7 +1383,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);
|
||||
|
|
|
|||
|
|
@ -159,14 +159,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();
|
||||
|
||||
|
|
|
|||
|
|
@ -807,13 +807,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();
|
||||
|
|
@ -828,7 +828,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)
|
||||
|
|
@ -877,9 +877,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
|
||||
|
|
|
|||
|
|
@ -112,9 +112,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
|
||||
|
|
|
|||
|
|
@ -78,14 +78,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);
|
||||
|
|
@ -96,15 +96,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);
|
||||
|
|
|
|||
|
|
@ -76,9 +76,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);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,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.
|
||||
|
|
@ -291,11 +291,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() )
|
||||
{
|
||||
|
|
@ -304,13 +304,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() )
|
||||
|
|
@ -333,11 +333,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -376,13 +376,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
|
||||
|
|
|
|||
|
|
@ -74,9 +74,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&);
|
||||
|
|
|
|||
|
|
@ -1648,17 +1648,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());
|
||||
}
|
||||
|
|
@ -1666,7 +1666,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 )
|
||||
{
|
||||
|
|
@ -1674,21 +1674,21 @@ 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;
|
||||
// <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
if(offerClickToButton(x, y, mask, BUTTON_SNOOZE)) 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());
|
||||
}
|
||||
|
|
@ -1697,14 +1697,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 );
|
||||
|
|
@ -1712,10 +1712,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,13 +304,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);
|
||||
|
|
|
|||
|
|
@ -1389,20 +1389,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.
|
||||
|
|
@ -1423,21 +1423,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;
|
||||
|
||||
|
|
@ -1445,7 +1445,7 @@ BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-14223: Using mouse scroll while renaming an item moves line editor out of inventory floater
|
||||
BOOL LLFolderView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
bool LLFolderView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
if (mRenameItem)
|
||||
{
|
||||
|
|
@ -1528,19 +1528,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());
|
||||
|
|
@ -1612,9 +1612,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;
|
||||
}
|
||||
|
|
@ -1650,7 +1650,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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,12 +206,12 @@ 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 handleScrollWheel(S32 x, S32 y, S32 clicks); // <FS:Ansariel> FIRE-14223: Using mouse scroll while renaming an item moves line editor out of inventory floater
|
||||
/*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 handleScrollWheel(S32 x, S32 y, S32 clicks); // <FS:Ansariel> FIRE-14223: Using mouse scroll while renaming an item moves line editor out of inventory floater
|
||||
/*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,
|
||||
|
|
|
|||
|
|
@ -587,21 +587,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
|
||||
|
|
@ -620,7 +620,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
}
|
||||
else
|
||||
{
|
||||
getRoot()->setSelection(this, FALSE);
|
||||
getRoot()->setSelection(this, false);
|
||||
}
|
||||
make_ui_sound("UISndClick");
|
||||
}
|
||||
|
|
@ -628,7 +628,7 @@ 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;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: Inventory-DragDrop | Checked: 2014-02-04 (Catznip-3.6)
|
||||
|
|
@ -638,10 +638,10 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
// [/SL:KB]
|
||||
// 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);
|
||||
|
||||
|
|
@ -682,7 +682,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
|
||||
|
|
@ -698,31 +698,31 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
|
|||
// [/SL:KB]
|
||||
|
||||
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...
|
||||
|
|
@ -739,21 +739,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)
|
||||
|
|
@ -1150,27 +1150,27 @@ bool LLFolderViewItem::isInSelection() const
|
|||
}
|
||||
|
||||
// <FS:ND> Don't bother with unneeded tooltips in inventory
|
||||
BOOL LLFolderViewItem::handleToolTip(S32 x, S32 y, MASK mask)
|
||||
bool LLFolderViewItem::handleToolTip(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if( childrenHandleToolTip( x, y, mask ) )
|
||||
return TRUE;
|
||||
if (childrenHandleToolTip(x, y, mask))
|
||||
return false;
|
||||
|
||||
int nStart = mArrowSize + mTextPad + mIconWidth + mIconPad + mIndentation;
|
||||
int nWidth = getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + nStart;
|
||||
S32 nStart = mArrowSize + mTextPad + mIconWidth + mIconPad + mIndentation;
|
||||
S32 nWidth = getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + nStart;
|
||||
|
||||
if( getRoot()->getParentPanel()->getRect().getWidth() < nWidth ) // Label is truncated, display tooltip
|
||||
if (getRoot()->getParentPanel()->getRect().getWidth() < nWidth) // Label is truncated, display tooltip
|
||||
{
|
||||
setToolTip( mLabel );
|
||||
return LLView::handleToolTip( x, y, mask );
|
||||
setToolTip(mLabel);
|
||||
return LLView::handleToolTip(x, y, mask);
|
||||
}
|
||||
else
|
||||
setToolTip( LLStringExplicit("") );
|
||||
setToolTip(LLStringExplicit(""));
|
||||
|
||||
// In case of root we always want to return TRUE, otherwise tooltip handling gets propagated one level up and we end with a tooltip like 'All Items'.
|
||||
if( this == getRoot() )
|
||||
return TRUE;
|
||||
if (this == getRoot())
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
|
|
@ -2134,9 +2134,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() )
|
||||
{
|
||||
|
|
@ -2150,11 +2150,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)
|
||||
{
|
||||
|
|
@ -2165,9 +2165,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;
|
||||
|
|
@ -2178,7 +2178,7 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
&& !mSingleFolderMode)
|
||||
{
|
||||
toggleOpen();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2190,9 +2190,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);
|
||||
|
|
@ -2209,7 +2209,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
|
|||
getViewModelItem()->navigateToFolder(false);
|
||||
});
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( isOpen() )
|
||||
|
|
@ -2224,12 +2224,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)
|
||||
|
|
@ -2240,10 +2240,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,11 +294,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);
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ public:
|
|||
std::string& tooltip_msg);
|
||||
|
||||
// <ND/> Don't bother with unneeded tooltips in inventor
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
|
||||
|
||||
|
||||
|
||||
|
|
@ -462,10 +462,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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -662,9 +662,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())
|
||||
|
|
@ -676,7 +676,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] ) )
|
||||
|
|
@ -711,7 +711,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();
|
||||
|
|
@ -720,15 +720,15 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
// <FS:AW> Linux primary "clipboard" tainted by auto-selection
|
||||
//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
|
||||
|
|
@ -740,7 +740,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();
|
||||
|
|
@ -796,14 +796,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();
|
||||
|
|
@ -811,40 +811,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -887,34 +887,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 )
|
||||
|
|
@ -922,7 +922,7 @@ BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
setCursorAtLocalPos( x );
|
||||
mSelectionEnd = getCursor();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if( handled )
|
||||
|
|
@ -1674,18 +1674,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 );
|
||||
|
||||
|
|
@ -2590,7 +2590,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)
|
||||
{
|
||||
|
|
@ -2612,13 +2612,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)
|
||||
|
|
@ -2645,7 +2645,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
|
||||
|
|
|
|||
|
|
@ -125,14 +125,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
|
||||
|
|
@ -336,7 +336,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(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -240,14 +240,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)
|
||||
{
|
||||
// <FS:ND> Holding CTRL & ALT while right clicking a menu entry will copy the menu
|
||||
// text and shortcut (accelerator) to the clipboard. The menu items action will not be called.
|
||||
|
|
@ -275,14 +275,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);
|
||||
|
|
@ -474,26 +474,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();
|
||||
|
|
@ -626,49 +626,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -684,7 +684,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 )
|
||||
|
|
@ -1040,14 +1040,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
|
||||
|
|
@ -1384,8 +1384,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);
|
||||
|
||||
|
|
@ -1511,10 +1511,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())
|
||||
{
|
||||
|
|
@ -1526,12 +1526,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3147,19 +3147,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);
|
||||
|
|
@ -3190,7 +3190,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3212,8 +3212,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;
|
||||
}
|
||||
|
|
@ -3226,10 +3226,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);
|
||||
|
|
@ -3245,7 +3245,7 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
|
|||
scrollItems(SD_UP);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3538,7 +3538,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
|
||||
|
|
@ -3550,7 +3550,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);
|
||||
}
|
||||
|
|
@ -3687,9 +3687,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;
|
||||
|
|
@ -3725,14 +3725,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3746,7 +3746,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3754,7 +3754,7 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
|
|||
|
||||
getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
///============================================================================
|
||||
|
|
@ -3794,9 +3794,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();
|
||||
|
|
@ -3821,9 +3821,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
|
||||
|
|
@ -3834,7 +3834,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);
|
||||
|
|
@ -3846,10 +3846,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
|
||||
|
|
@ -4352,18 +4352,18 @@ 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)
|
||||
{
|
||||
|
|
@ -4371,10 +4371,10 @@ BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
// <FS:ND>FIRE-9257; Check if mHoverItem really is still valid before touching it
|
||||
|
||||
// mHoverItem->setHighlight( FALSE );
|
||||
// mHoverItem->setHighlight( false );
|
||||
|
||||
if( !mHoverItemHandle.isDead() )
|
||||
mHoverItem->setHighlight( FALSE );
|
||||
mHoverItem->setHighlight( false );
|
||||
else
|
||||
LL_WARNS() << "Hoveritem is already dead" << LL_ENDL;
|
||||
|
||||
|
|
@ -4387,9 +4387,9 @@ BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
|
|||
mHoverItemHandle = item->getHandle();
|
||||
// </FS:ND>
|
||||
|
||||
mHoverItem->setHighlight( TRUE );
|
||||
mHoverItem->setHighlight( true );
|
||||
}
|
||||
mHoveredAnyItem = TRUE;
|
||||
mHoveredAnyItem = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4398,10 +4398,10 @@ BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
// <FS:ND>FIRE-9257; Check if mHoverItem really is still valid before touching it
|
||||
|
||||
// mHoverItem->setHighlight(FALSE);
|
||||
// mHoverItem->setHighlight(false);
|
||||
|
||||
if( !mHoverItemHandle.isDead() )
|
||||
mHoverItem->setHighlight(FALSE);
|
||||
mHoverItem->setHighlight(false);
|
||||
else
|
||||
LL_WARNS() << "Hoveritem is already dead" << LL_ENDL;
|
||||
|
||||
|
|
@ -4416,7 +4416,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;
|
||||
|
|
@ -4425,9 +4425,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();
|
||||
|
|
@ -4435,13 +4435,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)
|
||||
|
|
@ -4450,14 +4450,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;
|
||||
|
|
@ -4465,12 +4465,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,9 +91,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);
|
||||
|
|
@ -164,9 +164,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);
|
||||
|
|
@ -242,9 +242,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();
|
||||
|
||||
|
|
@ -443,9 +443,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);
|
||||
|
|
@ -648,7 +648,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);
|
||||
|
|
@ -726,9 +726,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);
|
||||
|
||||
|
|
@ -797,8 +797,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();
|
||||
|
|
@ -807,7 +807,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();
|
||||
|
|
@ -846,11 +846,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(); }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -110,9 +110,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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1942,7 +1942,7 @@ 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)
|
||||
{
|
||||
// <FS> FIRE-10172: Let the LLTextbox handle the mouse scroll if it's visible
|
||||
if (mCommentTextView && mCommentTextView->getVisible())
|
||||
|
|
@ -1951,27 +1951,27 @@ BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
}
|
||||
// </FS>
|
||||
|
||||
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;
|
||||
|
|
@ -1989,20 +1989,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
|
||||
// <FS:Zi> Why would we restrict tool tips to text fields only?
|
||||
// Having them on non-text fields seems really useful
|
||||
|
|
@ -2023,7 +2023,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
|
||||
|
|
@ -2148,14 +2148,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;
|
||||
|
|
@ -2166,7 +2166,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())
|
||||
{
|
||||
|
|
@ -2192,7 +2192,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)
|
||||
|
|
@ -2290,7 +2290,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)
|
||||
|
|
@ -2363,10 +2363,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)
|
||||
{
|
||||
|
|
@ -2382,7 +2382,7 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -2546,9 +2546,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())
|
||||
{
|
||||
|
|
@ -2922,11 +2922,11 @@ void LLScrollListCtrl::setLastSelectedItem(const LLUUID& id)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
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
|
||||
|
|
@ -2939,7 +2939,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;
|
||||
|
|
@ -3010,7 +3010,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -360,16 +360,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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -511,7 +511,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 )
|
||||
{
|
||||
|
|
@ -526,7 +526,7 @@ BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
onUpBtn(getValue());
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,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);
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ LLStatBar::~LLStatBar()
|
|||
}
|
||||
// </FS:Ansariel> Save display state
|
||||
|
||||
BOOL LLStatBar::handleHover(S32 x, S32 y, MASK mask)
|
||||
bool LLStatBar::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
switch(mStatType)
|
||||
{
|
||||
|
|
@ -285,38 +285,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>
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public:
|
|||
~LLStatBar();
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -582,11 +582,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)
|
||||
{
|
||||
|
|
@ -667,10 +667,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)
|
||||
{
|
||||
|
|
@ -713,10 +713,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;
|
||||
|
|
@ -760,11 +760,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);
|
||||
|
|
@ -777,11 +777,11 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
|
|||
}
|
||||
|
||||
// [SL:KB] - Patch: Control-TabContainer | Checked: 2014-04-06 (Catznip-3.6)
|
||||
BOOL LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
bool LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
// NOTE-Catznip: should match the code in LLTabContainer::handleMouseDown()
|
||||
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
S32 tab_count = getTabCount();
|
||||
if ( (tab_count > 0) && (!getTabsHidden()) )
|
||||
|
|
@ -796,7 +796,7 @@ BOOL LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
if (tab_rect.pointInRect(x, y))
|
||||
{
|
||||
mScrollPos = llclamp(mScrollPos + clicks, 0, mMaxScrollPos);
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -807,15 +807,15 @@ BOOL LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
// [/SL:KB]
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -153,13 +153,13 @@ 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 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 );
|
||||
// [SL:KB] - Patch: Control-TabContainer | Checked: 2014-04-06 (Catznip-3.6)
|
||||
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
/*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
// [/SL:KB]
|
||||
/*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 handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType type, void* cargo_data,
|
||||
|
|
|
|||
|
|
@ -1228,14 +1228,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);
|
||||
|
|
@ -1263,26 +1263,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))
|
||||
|
|
@ -1295,57 +1295,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();
|
||||
|
|
@ -1358,40 +1358,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);
|
||||
|
|
@ -3586,17 +3586,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;
|
||||
|
|
@ -3604,7 +3604,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
|
||||
|
|
@ -3722,7 +3722,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())
|
||||
{
|
||||
|
|
@ -3730,13 +3730,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())
|
||||
{
|
||||
|
|
@ -3744,13 +3744,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())
|
||||
{
|
||||
|
|
@ -3758,14 +3758,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())
|
||||
{
|
||||
|
|
@ -3781,14 +3781,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)?
|
||||
|
|
@ -3796,16 +3796,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)
|
||||
|
|
@ -3982,7 +3982,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);
|
||||
|
|
@ -4157,15 +4157,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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -366,16 +366,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);
|
||||
|
|
|
|||
|
|
@ -54,9 +54,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)
|
||||
{
|
||||
|
|
@ -65,7 +65,7 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
if (!handled && mClickedCallback)
|
||||
{
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (handled)
|
||||
|
|
@ -81,9 +81,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)
|
||||
{
|
||||
|
|
@ -102,21 +102,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -719,15 +719,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
|
||||
|
|
@ -740,7 +740,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
|
||||
|
|
@ -768,7 +768,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
// Delay cursor flashing
|
||||
|
|
@ -781,11 +781,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);
|
||||
}
|
||||
// [SL:KB] - Patch: UI-Notecards | Checked: 2010-09-12 (Catznip-2.1.2d) | Added: Catznip-2.1.2d
|
||||
setCursorAtLocalPos(x, y, FALSE);
|
||||
|
|
@ -796,7 +796,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;
|
||||
|
|
@ -814,16 +814,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))
|
||||
|
|
@ -835,13 +835,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() )
|
||||
{
|
||||
|
|
@ -858,7 +858,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 )
|
||||
|
|
@ -876,16 +876,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()))
|
||||
|
|
@ -914,7 +914,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
// take selection to 'primary' clipboard
|
||||
updatePrimary();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
// Delay cursor flashing
|
||||
|
|
@ -924,16 +924,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);
|
||||
|
|
@ -971,7 +971,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();
|
||||
|
|
@ -980,7 +980,7 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
// <FS:AW> Linux primary "clipboard" tainted by auto-selection
|
||||
//updatePrimary();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
return handled;
|
||||
|
|
@ -2010,14 +2010,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 )
|
||||
|
|
@ -2033,7 +2033,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
|
|||
// Keys that add characters temporarily hide the cursor
|
||||
getWindow()->hideCursorUntilMouseMove();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if( handled )
|
||||
|
|
@ -2961,7 +2961,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)
|
||||
{
|
||||
|
|
@ -2984,13 +2984,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;
|
||||
|
|
@ -3051,7 +3051,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
|
||||
|
|
@ -3097,7 +3097,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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,15 +93,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();
|
||||
|
||||
|
|
@ -274,7 +274,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(); }
|
||||
//
|
||||
|
|
@ -291,7 +291,7 @@ protected:
|
|||
LLWString mPreeditWString;
|
||||
LLWString mPreeditOverwrittenWString;
|
||||
std::vector<S32> mPreeditPositions;
|
||||
std::vector<BOOL> mPreeditStandouts;
|
||||
std::vector<bool> mPreeditStandouts;
|
||||
|
||||
protected:
|
||||
LLUIColor mDefaultColor;
|
||||
|
|
|
|||
|
|
@ -469,11 +469,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)
|
||||
{
|
||||
|
|
@ -1330,16 +1330,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);
|
||||
|
|
@ -1351,7 +1351,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
mStartDragItemCallback(x, y, this);
|
||||
mIsDragged = true;
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -268,7 +268,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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -350,12 +350,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)
|
||||
{
|
||||
|
|
@ -370,12 +370,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());
|
||||
}
|
||||
|
|
@ -390,9 +390,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);
|
||||
|
|
@ -401,9 +401,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);
|
||||
|
|
@ -411,9 +411,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);
|
||||
|
|
|
|||
|
|
@ -163,11 +163,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;
|
||||
|
|
|
|||
|
|
@ -733,7 +733,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;
|
||||
}
|
||||
|
|
@ -947,9 +947,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;
|
||||
|
||||
// TS: Don't bother with a tooltip unless the app itself has focus.
|
||||
if (!gFocusMgr.getAppHasFocus())
|
||||
|
|
@ -972,14 +972,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;
|
||||
|
|
@ -1100,9 +1100,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1118,56 +1118,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,21 +425,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;
|
||||
|
||||
|
|
@ -518,7 +518,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();
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -683,11 +683,11 @@ LLDXDevice *LLDXHardware::findDevice(const std::string &vendor, const std::strin
|
|||
|
||||
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
|
||||
//BOOL LLDXHardware::getInfo(BOOL vram_only)
|
||||
BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
||||
bool LLDXHardware::getInfo(bool vram_only, bool disable_wmi)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLTimer hw_timer;
|
||||
BOOL ok = FALSE;
|
||||
bool ok = false;
|
||||
HRESULT hr;
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
|
@ -821,7 +821,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
|||
|
||||
if (vram_only)
|
||||
{
|
||||
ok = TRUE;
|
||||
ok = true;
|
||||
goto LCleanup;
|
||||
}
|
||||
|
||||
|
|
@ -881,7 +881,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
|||
|
||||
tokenizer::iterator iter = tokens.begin();
|
||||
S32 count = 0;
|
||||
BOOL valid = TRUE;
|
||||
bool valid = true;
|
||||
for (;(iter != tokens.end()) && (count < 3);++iter)
|
||||
{
|
||||
switch (count)
|
||||
|
|
@ -889,7 +889,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
|||
case 0:
|
||||
if (strcmp(iter->c_str(), "PCI"))
|
||||
{
|
||||
valid = FALSE;
|
||||
valid = false;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
|
@ -960,7 +960,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
|||
}
|
||||
|
||||
// dumpDevices();
|
||||
ok = TRUE;
|
||||
ok = true;
|
||||
|
||||
LCleanup:
|
||||
if (!ok)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -87,8 +87,8 @@ public:
|
|||
// Returns TRUE on success.
|
||||
// vram_only TRUE does a "light" probe.
|
||||
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
|
||||
//BOOL getInfo(BOOL vram_only);
|
||||
BOOL getInfo(BOOL vram_only, bool disable_wmi);
|
||||
//bool getInfo(bool vram_only);
|
||||
bool getInfo(bool vram_only, bool disable_wmi);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// WMI can return multiple GPU drivers
|
||||
|
|
|
|||
|
|
@ -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,30 +174,30 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// <FS:ND/> SDL2 compat
|
||||
//BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
|
||||
BOOL LLKeyboard::translateKey(const NATIVE_KEY_TYPE os_key, KEY *out_key)
|
||||
//bool LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
|
||||
bool LLKeyboard::translateKey(const NATIVE_KEY_TYPE os_key, KEY *out_key)
|
||||
{
|
||||
// Only translate keys in the map, ignore all other keys for now
|
||||
auto iter = mTranslateKeyMap.find(os_key);
|
||||
|
|
@ -205,12 +205,12 @@ BOOL LLKeyboard::translateKey(const NATIVE_KEY_TYPE 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,47 +231,47 @@ LLKeyboard::NATIVE_KEY_TYPE LLKeyboard::inverseTranslateKey(const KEY translated
|
|||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -307,14 +307,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)
|
||||
{
|
||||
|
|
@ -327,7 +327,7 @@ BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key)
|
|||
('{' <= ch && ch <= '~')) // {|}~
|
||||
{
|
||||
*key = ch;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -336,10 +336,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -487,52 +487,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,23 +72,23 @@ 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]; }
|
||||
|
||||
// <FS:ND> SDL2 compat
|
||||
//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 translateKey(const NATIVE_KEY_TYPE os_key, KEY *translated_key);
|
||||
bool translateKey(const NATIVE_KEY_TYPE os_key, KEY *translated_key);
|
||||
NATIVE_KEY_TYPE inverseTranslateKey(const KEY translated_key);
|
||||
// </FS:ND>
|
||||
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
|
||||
|
||||
// <FS:ND> SDL2 compat
|
||||
//virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0;
|
||||
//virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0;
|
||||
virtual BOOL handleKeyUp(const NATIVE_KEY_TYPE key, MASK mask) = 0;
|
||||
virtual BOOL handleKeyDown(const NATIVE_KEY_TYPE key, MASK mask) = 0;
|
||||
//virtual bool handleKeyUp(const U16 key, MASK mask) = 0;
|
||||
//virtual bool handleKeyDown(const U16 key, MASK mask) = 0;
|
||||
virtual bool handleKeyUp(const NATIVE_KEY_TYPE key, MASK mask) = 0;
|
||||
virtual bool handleKeyDown(const NATIVE_KEY_TYPE key, MASK mask) = 0;
|
||||
// </FS:ND>
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
|
|
@ -102,14 +102,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+"...
|
||||
|
|
@ -137,10 +137,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()
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ LLKeyboardHeadless::LLKeyboardHeadless()
|
|||
void LLKeyboardHeadless::resetMaskKeys()
|
||||
{ }
|
||||
|
||||
MASK LLKeyboardHeadless::currentMask(BOOL for_mouse_event)
|
||||
MASK LLKeyboardHeadless::currentMask(bool for_mouse_event)
|
||||
{ return MASK_NONE; }
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
|
|
@ -61,8 +61,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]++;
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@ public:
|
|||
/*virtual*/ ~LLKeyboardHeadless() {};
|
||||
|
||||
#ifndef LL_SDL2
|
||||
/*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask) { return FALSE; }
|
||||
/*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask) { return FALSE; }
|
||||
/*virtual*/ bool handleKeyUp(const U16 key, MASK mask) { return false; }
|
||||
/*virtual*/ bool handleKeyDown(const U16 key, MASK mask) { return false; }
|
||||
#else
|
||||
/*virtual*/ BOOL handleKeyUp(const U32 key, MASK mask) { return FALSE; }
|
||||
/*virtual*/ BOOL handleKeyDown(const U32 key, MASK mask) { return FALSE; }
|
||||
/*virtual*/ bool handleKeyUp(const U32 key, MASK mask) { return false; }
|
||||
/*virtual*/ bool handleKeyDown(const U32 key, MASK mask) { return false; }
|
||||
#endif
|
||||
/*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);
|
||||
|
|
|
|||
|
|
@ -176,22 +176,22 @@ void LLKeyboardMacOSX::resetMaskKeys()
|
|||
|
||||
if(mask & MAC_SHIFT_KEY)
|
||||
{
|
||||
mKeyLevel[KEY_SHIFT] = TRUE;
|
||||
mKeyLevel[KEY_SHIFT] = true;
|
||||
}
|
||||
|
||||
if(mask & (MAC_CTRL_KEY | MAC_CMD_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;
|
||||
|
|
@ -230,11 +230,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);
|
||||
|
||||
|
|
@ -247,11 +247,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);
|
||||
|
||||
|
|
@ -263,7 +263,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();
|
||||
|
|
@ -299,8 +299,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]++;
|
||||
|
|
@ -308,7 +308,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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -161,17 +161,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -225,12 +225,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);
|
||||
|
||||
|
|
@ -245,12 +245,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);
|
||||
|
||||
|
|
@ -264,7 +264,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();
|
||||
|
|
@ -299,8 +299,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]++;
|
||||
|
|
@ -309,7 +309,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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,16 +40,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
|
||||
|
|
|
|||
|
|
@ -157,22 +157,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 )
|
||||
// {
|
||||
|
|
@ -196,17 +196,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();
|
||||
|
||||
|
|
@ -219,11 +219,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();
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ BOOL LLKeyboardWin32::handleKeyUp(const U16 key, MASK mask)
|
|||
}
|
||||
|
||||
|
||||
MASK LLKeyboardWin32::currentMask(BOOL)
|
||||
MASK LLKeyboardWin32::currentMask(bool)
|
||||
{
|
||||
MASK mask = MASK_NONE;
|
||||
|
||||
|
|
@ -268,8 +268,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]++;
|
||||
|
|
@ -277,7 +277,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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
// Globals
|
||||
//
|
||||
LLSplashScreen *gSplashScreenp = NULL;
|
||||
BOOL gDebugClicks = FALSE;
|
||||
BOOL gDebugWindowProc = FALSE;
|
||||
bool gDebugClicks = false;
|
||||
bool gDebugWindowProc = false;
|
||||
|
||||
// <FS:Zi> Allow file: links to open folders, chat history etc. on Linux systems
|
||||
//const S32 gURLProtocolWhitelistCount = 5;
|
||||
|
|
@ -72,10 +72,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();
|
||||
}
|
||||
|
||||
|
|
@ -106,9 +106,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),
|
||||
|
|
@ -118,13 +118,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)
|
||||
|
|
@ -136,15 +136,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
|
||||
|
|
@ -187,9 +187,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()
|
||||
|
|
@ -198,7 +198,7 @@ void *LLWindow::getMediaWindow()
|
|||
return getPlatformWindow();
|
||||
}
|
||||
|
||||
BOOL LLWindow::setSize(LLCoordScreen size)
|
||||
bool LLWindow::setSize(LLCoordScreen size)
|
||||
{
|
||||
if (!getMaximized())
|
||||
{
|
||||
|
|
@ -208,7 +208,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
|
||||
|
|
@ -250,19 +250,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
|
||||
|
|
@ -411,11 +411,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,
|
||||
|
|
@ -454,7 +454,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;
|
||||
|
|
@ -464,13 +464,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();
|
||||
|
|
@ -479,10 +479,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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
@ -205,21 +205,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;
|
||||
|
|
@ -228,11 +228,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;
|
||||
|
|
@ -283,7 +283,7 @@ protected:
|
|||
virtual void updateImpl(const std::string& string) = 0;
|
||||
virtual void hideImpl() = 0;
|
||||
|
||||
static BOOL sVisible;
|
||||
static bool sVisible;
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -309,24 +309,24 @@ 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,
|
||||
bool useLegacyCursors = false); // <FS:LO> Legacy cursor setting from main program
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
typedef std::vector<std::pair<int, bool> > segment_t;
|
||||
|
||||
typedef std::vector<int> segment_lengths;
|
||||
typedef std::vector<int> segment_standouts;
|
||||
typedef std::vector<bool> segment_standouts;
|
||||
|
||||
struct attributedStringInfo {
|
||||
segment_lengths seg_lengths;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -63,11 +63,11 @@ namespace
|
|||
// LLWindowMacOSX
|
||||
//
|
||||
|
||||
BOOL LLWindowMacOSX::sUseMultGL = TRUE;
|
||||
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)))
|
||||
{
|
||||
|
|
@ -89,15 +89,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.
|
||||
|
|
@ -117,9 +117,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,
|
||||
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
|
||||
|
|
@ -145,21 +145,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);
|
||||
|
|
@ -200,7 +200,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
|
|||
initCursors(mUseLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
setCursor( UI_CURSOR_ARROW );
|
||||
|
||||
allowLanguageTextInput(NULL, FALSE);
|
||||
allowLanguageTextInput(NULL, false);
|
||||
}
|
||||
|
||||
mCallbacks = callbacks;
|
||||
|
|
@ -289,7 +289,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)
|
||||
|
|
@ -302,7 +302,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)
|
||||
|
|
@ -315,7 +315,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)
|
||||
|
|
@ -328,7 +328,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));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +342,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)
|
||||
|
|
@ -362,7 +362,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);
|
||||
}
|
||||
|
||||
|
|
@ -375,7 +375,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)
|
||||
|
|
@ -617,7 +617,7 @@ void LLWindowMacOSX::updateMouseDeltas(float* deltas)
|
|||
{
|
||||
mCursorLastEventDeltaX = 0;
|
||||
mCursorLastEventDeltaY = 0;
|
||||
mCursorIgnoreNextDelta = FALSE;
|
||||
mCursorIgnoreNextDelta = false;
|
||||
}
|
||||
} else {
|
||||
mCursorLastEventDeltaX = 0;
|
||||
|
|
@ -631,7 +631,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;
|
||||
|
||||
|
|
@ -691,7 +691,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -724,15 +724,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()
|
||||
|
|
@ -802,13 +802,13 @@ void LLWindowMacOSX::show()
|
|||
|
||||
void LLWindowMacOSX::hide()
|
||||
{
|
||||
setMouseClipping(FALSE);
|
||||
setMouseClipping(false);
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLWindowMacOSX::minimize()
|
||||
{
|
||||
setMouseClipping(FALSE);
|
||||
setMouseClipping(false);
|
||||
showCursor();
|
||||
}
|
||||
|
||||
|
|
@ -830,48 +830,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)
|
||||
{
|
||||
|
|
@ -880,7 +880,7 @@ BOOL LLWindowMacOSX::maximize()
|
|||
return mMaximized;
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::getFullscreen()
|
||||
bool LLWindowMacOSX::getFullscreen()
|
||||
{
|
||||
return mFullscreen;
|
||||
}
|
||||
|
|
@ -890,7 +890,7 @@ void LLWindowMacOSX::gatherInput()
|
|||
updateCursor();
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
|
||||
bool LLWindowMacOSX::getPosition(LLCoordScreen *position)
|
||||
{
|
||||
S32 err = -1;
|
||||
|
||||
|
|
@ -917,7 +917,7 @@ BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
|
|||
return (err == noErr);
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::getSize(LLCoordScreen *size)
|
||||
bool LLWindowMacOSX::getSize(LLCoordScreen *size)
|
||||
{
|
||||
S32 err = -1;
|
||||
|
||||
|
|
@ -943,7 +943,7 @@ BOOL LLWindowMacOSX::getSize(LLCoordScreen *size)
|
|||
return (err == noErr);
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::getSize(LLCoordWindow *size)
|
||||
bool LLWindowMacOSX::getSize(LLCoordWindow *size)
|
||||
{
|
||||
S32 err = -1;
|
||||
|
||||
|
|
@ -971,7 +971,7 @@ BOOL LLWindowMacOSX::getSize(LLCoordWindow *size)
|
|||
return (err == noErr);
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
|
||||
bool LLWindowMacOSX::setPosition(const LLCoordScreen position)
|
||||
{
|
||||
if(mWindow)
|
||||
{
|
||||
|
|
@ -979,32 +979,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()
|
||||
|
|
@ -1059,16 +1059,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;
|
||||
|
|
@ -1116,7 +1116,7 @@ BOOL LLWindowMacOSX::setGamma(const F32 gamma)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLWindowMacOSX::isCursorHidden()
|
||||
bool LLWindowMacOSX::isCursorHidden()
|
||||
{
|
||||
return mCursorHidden;
|
||||
}
|
||||
|
|
@ -1124,31 +1124,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;
|
||||
|
|
@ -1161,7 +1161,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.
|
||||
|
|
@ -1178,13 +1178,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);
|
||||
|
||||
|
|
@ -1207,7 +1207,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)
|
||||
|
|
@ -1222,7 +1222,7 @@ void LLWindowMacOSX::adjustCursorDecouple(bool warpingMouse)
|
|||
// LL_INFOS() << "adjustCursorDecouple: decoupling cursor" << LL_ENDL;
|
||||
CGAssociateMouseAndMouseCursorPosition(false);
|
||||
mCursorDecoupled = true;
|
||||
mCursorIgnoreNextDelta = TRUE;
|
||||
mCursorIgnoreNextDelta = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1302,12 +1302,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);
|
||||
|
|
@ -1323,9 +1323,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());
|
||||
|
|
@ -1335,7 +1335,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;
|
||||
|
|
@ -1368,13 +1368,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)
|
||||
|
|
@ -1393,21 +1393,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)
|
||||
{
|
||||
|
|
@ -1421,12 +1421,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)
|
||||
{
|
||||
|
|
@ -1440,19 +1440,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;
|
||||
|
||||
|
|
@ -1739,8 +1739,8 @@ void LLWindowMacOSX::hideCursor()
|
|||
if(!mCursorHidden)
|
||||
{
|
||||
// LL_INFOS() << "hideCursor: hiding" << LL_ENDL;
|
||||
mCursorHidden = TRUE;
|
||||
mHideCursorPermanent = TRUE;
|
||||
mCursorHidden = true;
|
||||
mHideCursorPermanent = true;
|
||||
hideNSCursor();
|
||||
}
|
||||
else
|
||||
|
|
@ -1756,8 +1756,8 @@ void LLWindowMacOSX::showCursor()
|
|||
if(mCursorHidden || !isCGCursorVisible())
|
||||
{
|
||||
// LL_INFOS() << "showCursor: showing" << LL_ENDL;
|
||||
mCursorHidden = FALSE;
|
||||
mHideCursorPermanent = FALSE;
|
||||
mCursorHidden = false;
|
||||
mHideCursorPermanent = false;
|
||||
showNSCursor();
|
||||
}
|
||||
else
|
||||
|
|
@ -1781,7 +1781,7 @@ void LLWindowMacOSX::hideCursorUntilMouseMove()
|
|||
if (!mHideCursorPermanent)
|
||||
{
|
||||
hideCursor();
|
||||
mHideCursorPermanent = FALSE;
|
||||
mHideCursorPermanent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1913,9 +1913,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;
|
||||
|
||||
|
|
@ -1972,12 +1972,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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -151,8 +151,8 @@ 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,
|
||||
bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
|
|
@ -160,20 +160,20 @@ protected:
|
|||
|
||||
//void initCursors();
|
||||
void initCursors(BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
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); }
|
||||
|
|
@ -187,7 +187,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);
|
||||
|
|
@ -215,31 +215,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ extern "C" {
|
|||
# include <stdio.h>
|
||||
#endif // LL_LINUX
|
||||
|
||||
extern BOOL gDebugWindowProc;
|
||||
extern bool gDebugWindowProc;
|
||||
|
||||
const S32 MAX_NUM_RESOLUTIONS = 200;
|
||||
|
||||
|
|
@ -108,10 +108,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)
|
||||
{
|
||||
|
|
@ -119,12 +119,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 ( !defined(GLIB_MAJOR_VERSION) && !defined(GLIB_MINOR_VERSION) ) || ( GLIB_MAJOR_VERSION < 2 ) || ( GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 )
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
|
|
@ -158,12 +158,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;
|
||||
|
|
@ -436,11 +436,11 @@ Display* LLWindowSDL::getSDLDisplay()
|
|||
LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, S32 x, S32 y, S32 width,
|
||||
S32 height, U32 flags,
|
||||
BOOL fullscreen, BOOL clearBg,
|
||||
BOOL enable_vsync, BOOL use_gl,
|
||||
bool fullscreen, bool clearBg,
|
||||
bool enable_vsync, bool use_gl,
|
||||
// <FS:LO> Legacy cursor setting from main program
|
||||
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
|
||||
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples,)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
: LLWindow(callbacks, fullscreen, flags),
|
||||
Lock_Display(NULL),
|
||||
//Unlock_Display(NULL), mGamma(1.0f)
|
||||
|
|
@ -454,7 +454,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;
|
||||
|
|
@ -498,7 +498,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
|||
gWindowImplementation = this;
|
||||
|
||||
#if LL_X11
|
||||
mFlashing = FALSE;
|
||||
mFlashing = false;
|
||||
initialiseX11Clipboard();
|
||||
#endif // LL_X11
|
||||
|
||||
|
|
@ -667,7 +667,7 @@ void LLWindowSDL::setTitle(const std::string &title)
|
|||
SDL_WM_SetCaption(title.c_str(), title.c_str());
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync)
|
||||
bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool enable_vsync)
|
||||
{
|
||||
//bool glneedsinit = false;
|
||||
|
||||
|
|
@ -703,7 +703,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)
|
||||
|
|
@ -830,7 +830,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;
|
||||
|
|
@ -846,7 +846,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;
|
||||
|
|
@ -876,7 +876,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))
|
||||
{
|
||||
|
|
@ -939,7 +939,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...
|
||||
|
|
@ -955,7 +955,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
|
||||
|
||||
|
|
@ -996,15 +996,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 enable_vsync, const LLCoordScreen * const posp)
|
||||
bool LLWindowSDL::switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_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();
|
||||
|
|
@ -1095,45 +1095,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)
|
||||
{
|
||||
|
|
@ -1143,50 +1143,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)
|
||||
{
|
||||
|
|
@ -1194,10 +1194,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)
|
||||
{
|
||||
|
|
@ -1209,13 +1209,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)
|
||||
{
|
||||
|
|
@ -1227,10 +1227,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1257,14 +1257,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;
|
||||
|
|
@ -1273,7 +1273,7 @@ BOOL LLWindowSDL::setGamma(const F32 gamma)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::isCursorHidden()
|
||||
bool LLWindowSDL::isCursorHidden()
|
||||
{
|
||||
return mCursorHidden;
|
||||
}
|
||||
|
|
@ -1281,7 +1281,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);
|
||||
}
|
||||
|
|
@ -1305,14 +1305,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;
|
||||
|
|
@ -1325,7 +1325,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;
|
||||
|
|
@ -1407,7 +1407,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)
|
||||
{
|
||||
|
|
@ -1466,7 +1466,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)
|
||||
{
|
||||
|
|
@ -1507,27 +1507,27 @@ 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())
|
||||
{
|
||||
|
|
@ -1538,13 +1538,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())
|
||||
{
|
||||
|
|
@ -1552,25 +1552,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())
|
||||
{
|
||||
|
|
@ -1581,13 +1581,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())
|
||||
{
|
||||
|
|
@ -1595,40 +1595,40 @@ 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 mSDL_Display && XGetSelectionOwner(mSDL_Display, XA_CLIPBOARD) != None;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
|
||||
bool LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
|
||||
{
|
||||
return getSelectionText(XA_CLIPBOARD, dst);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s)
|
||||
bool LLWindowSDL::copyTextToClipboard(const LLWString &s)
|
||||
{
|
||||
return setSelectionText(XA_CLIPBOARD, s);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::isPrimaryTextAvailable()
|
||||
bool LLWindowSDL::isPrimaryTextAvailable()
|
||||
{
|
||||
LLWString text;
|
||||
return getSelectionText(XA_PRIMARY, text) && !text.empty();
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
|
||||
bool LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
|
||||
{
|
||||
return getSelectionText(XA_PRIMARY, dst);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s)
|
||||
bool LLWindowSDL::copyTextToPrimary(const LLWString &s)
|
||||
{
|
||||
return setSelectionText(XA_PRIMARY, s);
|
||||
}
|
||||
|
|
@ -1678,58 +1678,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;
|
||||
|
||||
|
|
@ -1746,7 +1746,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.
|
||||
|
|
@ -1828,7 +1828,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
|
||||
|
|
@ -1988,7 +1988,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());
|
||||
|
||||
|
|
@ -2033,7 +2033,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;
|
||||
}
|
||||
|
|
@ -2046,15 +2046,15 @@ 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);
|
||||
|
||||
// <FS:Zi> FIRE-11512 - Fix accelerator keys sometimes typing things into text entry fields, like alt+h, ctrl+shift+1 ...
|
||||
// if (event.key.keysym.unicode)
|
||||
if ((gKeyboard->currentMask(false) & (MASK_ALT | MASK_CONTROL)) == 0 && event.key.keysym.unicode)
|
||||
{
|
||||
handleUnicodeUTF16(event.key.keysym.unicode,
|
||||
gKeyboard->currentMask(FALSE));
|
||||
gKeyboard->currentMask(false));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -2064,8 +2064,8 @@ void LLWindowSDL::gatherInput()
|
|||
mKeyModifiers = event.key.keysym.mod;
|
||||
mSDLSym = event.key.keysym.sym; // <FS:ND/> Store the SDL Keysym too.
|
||||
|
||||
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;
|
||||
|
|
@ -2076,7 +2076,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...
|
||||
{
|
||||
|
|
@ -2139,7 +2139,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);
|
||||
|
|
@ -2210,11 +2210,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;
|
||||
|
|
@ -2240,8 +2240,8 @@ void LLWindowSDL::gatherInput()
|
|||
// expired.
|
||||
if (mFlashing && mFlashTimer.hasExpired())
|
||||
{
|
||||
x11_set_urgent(FALSE);
|
||||
mFlashing = FALSE;
|
||||
x11_set_urgent(false);
|
||||
mFlashing = false;
|
||||
}
|
||||
#endif // LL_X11
|
||||
}
|
||||
|
|
@ -2292,10 +2292,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));
|
||||
|
|
@ -2470,8 +2470,8 @@ void LLWindowSDL::hideCursor()
|
|||
if(!mCursorHidden)
|
||||
{
|
||||
// LL_INFOS() << "hideCursor: hiding" << LL_ENDL;
|
||||
mCursorHidden = TRUE;
|
||||
mHideCursorPermanent = TRUE;
|
||||
mCursorHidden = true;
|
||||
mHideCursorPermanent = true;
|
||||
SDL_ShowCursor(0);
|
||||
}
|
||||
else
|
||||
|
|
@ -2485,8 +2485,8 @@ void LLWindowSDL::showCursor()
|
|||
if(mCursorHidden)
|
||||
{
|
||||
// LL_INFOS() << "showCursor: showing" << LL_ENDL;
|
||||
mCursorHidden = FALSE;
|
||||
mHideCursorPermanent = FALSE;
|
||||
mCursorHidden = false;
|
||||
mHideCursorPermanent = false;
|
||||
SDL_ShowCursor(1);
|
||||
}
|
||||
else
|
||||
|
|
@ -2508,7 +2508,7 @@ void LLWindowSDL::hideCursorUntilMouseMove()
|
|||
if (!mHideCursorPermanent)
|
||||
{
|
||||
hideCursor();
|
||||
mHideCursorPermanent = FALSE;
|
||||
mHideCursorPermanent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2657,9 +2657,9 @@ static void color_changed_callback(GtkWidget *widget,
|
|||
gtk_color_selection_get_current_color(colorsel, colorp);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
|
@ -2693,8 +2693,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,
|
||||
|
|
@ -2706,7 +2706,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);
|
||||
|
|
@ -2720,7 +2720,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2735,9 +2735,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
|
||||
|
||||
|
|
|
|||
|
|
@ -56,47 +56,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 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 enable_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();
|
||||
|
|
@ -106,12 +106,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();
|
||||
|
|
@ -124,7 +124,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();
|
||||
|
|
@ -162,12 +162,12 @@ public:
|
|||
protected:
|
||||
LLWindowSDL(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, 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);
|
||||
BOOL ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
|
||||
//boolOL ignore_pixel_depth, U32 fsaa_samples);
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
~LLWindowSDL();
|
||||
|
||||
/*virtual*/ BOOL isValid();
|
||||
/*virtual*/ bool isValid();
|
||||
/*virtual*/ LLSD getNativeKeyData();
|
||||
|
||||
//void initCursors();
|
||||
|
|
@ -176,12 +176,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:
|
||||
//
|
||||
|
|
@ -189,12 +189,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 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 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
|
||||
|
|
@ -204,7 +204,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;
|
||||
|
|
@ -220,8 +220,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
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
# include <stdio.h>
|
||||
#endif // LL_LINUX
|
||||
|
||||
extern BOOL gDebugWindowProc;
|
||||
extern bool gDebugWindowProc;
|
||||
|
||||
const S32 MAX_NUM_RESOLUTIONS = 200;
|
||||
|
||||
|
|
@ -381,11 +381,11 @@ Display* LLWindowSDL::getSDLDisplay()
|
|||
LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, S32 x, S32 y, S32 width,
|
||||
S32 height, U32 flags,
|
||||
BOOL fullscreen, BOOL clearBg,
|
||||
BOOL enable_vsync, BOOL use_gl,
|
||||
bool fullscreen, bool clearBg,
|
||||
bool enable_vsync, bool use_gl,
|
||||
// <FS:LO> Legacy cursor setting from main program
|
||||
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
|
||||
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples,)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
: LLWindow(callbacks, fullscreen, flags),
|
||||
Lock_Display(NULL),
|
||||
//Unlock_Display(NULL), mGamma(1.0f)
|
||||
|
|
@ -400,7 +400,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
|||
// Ignore use_gl for now, only used for drones on PC
|
||||
mWindow = NULL;
|
||||
mContext = {};
|
||||
mNeedsResize = FALSE;
|
||||
mNeedsResize = false;
|
||||
mOverrideAspectRatio = 0.f;
|
||||
mGrabbyKeyFlags = 0;
|
||||
mReallyCapturedCount = 0;
|
||||
|
|
@ -442,7 +442,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
|||
gWindowImplementation = this;
|
||||
|
||||
#if LL_X11
|
||||
mFlashing = FALSE;
|
||||
mFlashing = false;
|
||||
initialiseX11Clipboard();
|
||||
#endif // LL_X11
|
||||
|
||||
|
|
@ -663,7 +663,7 @@ void LLWindowSDL::tryFindFullscreenSize( int &width, int &height )
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync)
|
||||
bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool enable_vsync)
|
||||
{
|
||||
//bool glneedsinit = false;
|
||||
|
||||
|
|
@ -760,7 +760,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
{
|
||||
LL_WARNS() << "Cannot create GL context " << SDL_GetError() << LL_ENDL;
|
||||
setupFailure("GL Context creation error creation error", "Error", OSMB_OK);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// FIRE-32559: This *should* work, but for some reason aftrer login vsync always acts as if it's disabled, so
|
||||
|
|
@ -775,7 +775,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
{
|
||||
if (mSurface)
|
||||
{
|
||||
mFullscreen = TRUE;
|
||||
mFullscreen = true;
|
||||
mFullscreenWidth = mSurface->w;
|
||||
mFullscreenHeight = mSurface->h;
|
||||
mFullscreenBits = mSurface->format->BitsPerPixel;
|
||||
|
|
@ -791,7 +791,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;
|
||||
|
|
@ -799,7 +799,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
|
||||
std::string error = llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
|
||||
OSMessageBox(error, "Error", OSMB_OK);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -808,7 +808,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -876,7 +876,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 LL_X11
|
||||
|
|
@ -919,15 +919,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
glDisable(GL_MULTISAMPLE_ARB);
|
||||
|
||||
// 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 enable_vsync, const LLCoordScreen * const posp)
|
||||
bool LLWindowSDL::switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_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();
|
||||
|
|
@ -1019,45 +1019,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)
|
||||
{
|
||||
|
|
@ -1067,18 +1067,18 @@ 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)
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
|
@ -1088,34 +1088,34 @@ BOOL LLWindowSDL::getPosition(LLCoordScreen *position)
|
|||
position->mX = x;
|
||||
position->mY = y;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::getSize(LLCoordScreen *size)
|
||||
bool LLWindowSDL::getSize(LLCoordScreen *size)
|
||||
{
|
||||
if (mSurface)
|
||||
{
|
||||
size->mX = mSurface->w;
|
||||
size->mY = mSurface->h;
|
||||
return (TRUE);
|
||||
return (true);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::getSize(LLCoordWindow *size)
|
||||
bool LLWindowSDL::getSize(LLCoordWindow *size)
|
||||
{
|
||||
if (mSurface)
|
||||
{
|
||||
size->mX = mSurface->w;
|
||||
size->mY = mSurface->h;
|
||||
return (TRUE);
|
||||
return (true);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
|
||||
bool LLWindowSDL::setPosition(const LLCoordScreen position)
|
||||
{
|
||||
if(mWindow)
|
||||
{
|
||||
|
|
@ -1123,7 +1123,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
|
|||
//MacMoveWindow(mWindow, position.mX, position.mY, false);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
template< typename T > bool setSizeImpl( const T& newSize, SDL_Window *pWin )
|
||||
|
|
@ -1149,12 +1149,12 @@ template< typename T > bool setSizeImpl( const T& newSize, SDL_Window *pWin )
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
|
||||
bool LLWindowSDL::setSizeImpl(const LLCoordScreen size)
|
||||
{
|
||||
return ::setSizeImpl( size, mWindow );
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size)
|
||||
bool LLWindowSDL::setSizeImpl(const LLCoordWindow size)
|
||||
{
|
||||
return ::setSizeImpl( size, mWindow );
|
||||
}
|
||||
|
|
@ -1183,14 +1183,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;
|
||||
|
|
@ -1199,7 +1199,7 @@ BOOL LLWindowSDL::setGamma(const F32 gamma)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::isCursorHidden()
|
||||
bool LLWindowSDL::isCursorHidden()
|
||||
{
|
||||
return mCursorHidden;
|
||||
}
|
||||
|
|
@ -1207,7 +1207,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);
|
||||
}
|
||||
|
|
@ -1231,14 +1231,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;
|
||||
|
|
@ -1251,7 +1251,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;
|
||||
|
|
@ -1321,7 +1321,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)
|
||||
{
|
||||
|
|
@ -1374,7 +1374,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)
|
||||
{
|
||||
|
|
@ -1415,39 +1415,39 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::isClipboardTextAvailable()
|
||||
bool LLWindowSDL::isClipboardTextAvailable()
|
||||
{
|
||||
return mSDL_Display && XGetSelectionOwner(mSDL_Display, XA_CLIPBOARD) != None;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
|
||||
bool LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
|
||||
{
|
||||
return getSelectionText(XA_CLIPBOARD, dst);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s)
|
||||
bool LLWindowSDL::copyTextToClipboard(const LLWString &s)
|
||||
{
|
||||
return setSelectionText(XA_CLIPBOARD, s);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::isPrimaryTextAvailable()
|
||||
bool LLWindowSDL::isPrimaryTextAvailable()
|
||||
{
|
||||
LLWString text;
|
||||
return getSelectionText(XA_PRIMARY, text) && !text.empty();
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
|
||||
bool LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
|
||||
{
|
||||
return getSelectionText(XA_PRIMARY, dst);
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s)
|
||||
bool LLWindowSDL::copyTextToPrimary(const LLWString &s)
|
||||
{
|
||||
return setSelectionText(XA_PRIMARY, s);
|
||||
}
|
||||
|
|
@ -1492,58 +1492,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 = mSurface->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 = mSurface->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;
|
||||
|
||||
|
|
@ -1560,7 +1560,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.
|
||||
|
|
@ -1632,7 +1632,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
|
|||
return capture == newGrab;
|
||||
}
|
||||
|
||||
U32 LLWindowSDL::SDLCheckGrabbyKeys(U32 keysym, BOOL gain)
|
||||
U32 LLWindowSDL::SDLCheckGrabbyKeys(U32 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
|
||||
|
|
@ -1780,7 +1780,7 @@ void LLWindowSDL::processMiscNativeEvents()
|
|||
pump_timer.setTimerExpirySec(1.0f / 15.0f);
|
||||
do
|
||||
{
|
||||
g_main_context_iteration(g_main_context_default(), FALSE);
|
||||
g_main_context_iteration(g_main_context_default(), false);
|
||||
} while( g_main_context_pending(g_main_context_default()) && !pump_timer.hasExpired());
|
||||
#endif
|
||||
|
||||
|
|
@ -1845,7 +1845,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;
|
||||
}
|
||||
|
|
@ -1853,7 +1853,7 @@ void LLWindowSDL::gatherInput()
|
|||
case SDL_TEXTINPUT:
|
||||
{
|
||||
auto string = utf8str_to_utf16str( event.text.text );
|
||||
mKeyModifiers = gKeyboard->currentMask( FALSE );
|
||||
mKeyModifiers = gKeyboard->currentMask( false );
|
||||
if (altGrMask)
|
||||
{
|
||||
mKeyModifiers &= ~MASK_ALT;
|
||||
|
|
@ -1911,8 +1911,8 @@ void LLWindowSDL::gatherInput()
|
|||
}
|
||||
|
||||
// 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);
|
||||
|
||||
break;
|
||||
|
||||
|
|
@ -1927,8 +1927,8 @@ void LLWindowSDL::gatherInput()
|
|||
mKeyVirtualKey = SDLK_RETURN;
|
||||
}
|
||||
|
||||
if (SDLCheckGrabbyKeys(mKeyVirtualKey, FALSE) == 0)
|
||||
SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243
|
||||
if (SDLCheckGrabbyKeys(mKeyVirtualKey, false) == 0)
|
||||
SDLReallyCaptureInput(false); // part of the fix for SL-13243
|
||||
|
||||
gKeyboard->handleKeyUp(mKeyVirtualKey,mKeyModifiers);
|
||||
break;
|
||||
|
|
@ -1939,7 +1939,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...
|
||||
{
|
||||
|
|
@ -2002,7 +2002,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);
|
||||
|
|
@ -2086,8 +2086,8 @@ void LLWindowSDL::gatherInput()
|
|||
// expired.
|
||||
if (mFlashing && mFlashTimer.hasExpired())
|
||||
{
|
||||
x11_set_urgent(FALSE);
|
||||
mFlashing = FALSE;
|
||||
x11_set_urgent(false);
|
||||
mFlashing = false;
|
||||
}
|
||||
#endif // LL_X11
|
||||
}
|
||||
|
|
@ -2138,10 +2138,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));
|
||||
|
|
@ -2316,8 +2316,8 @@ void LLWindowSDL::hideCursor()
|
|||
if(!mCursorHidden)
|
||||
{
|
||||
// LL_INFOS() << "hideCursor: hiding" << LL_ENDL;
|
||||
mCursorHidden = TRUE;
|
||||
mHideCursorPermanent = TRUE;
|
||||
mCursorHidden = true;
|
||||
mHideCursorPermanent = true;
|
||||
SDL_ShowCursor(0);
|
||||
}
|
||||
else
|
||||
|
|
@ -2331,8 +2331,8 @@ void LLWindowSDL::showCursor()
|
|||
if(mCursorHidden)
|
||||
{
|
||||
// LL_INFOS() << "showCursor: showing" << LL_ENDL;
|
||||
mCursorHidden = FALSE;
|
||||
mHideCursorPermanent = FALSE;
|
||||
mCursorHidden = false;
|
||||
mHideCursorPermanent = false;
|
||||
SDL_ShowCursor(1);
|
||||
}
|
||||
else
|
||||
|
|
@ -2354,7 +2354,7 @@ void LLWindowSDL::hideCursorUntilMouseMove()
|
|||
if (!mHideCursorPermanent)
|
||||
{
|
||||
hideCursor();
|
||||
mHideCursorPermanent = FALSE;
|
||||
mHideCursorPermanent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2415,9 +2415,9 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ
|
|||
return OSBTN_CANCEL;
|
||||
}
|
||||
|
||||
BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
|
||||
bool LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
|
||||
{
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2556,7 +2556,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
|
|||
|
||||
void LLWindowSDL::openFile(const std::string& file_name)
|
||||
{
|
||||
spawnWebBrowser("file://"+file_name,TRUE);
|
||||
spawnWebBrowser("file://"+file_name,true);
|
||||
}
|
||||
|
||||
void *LLWindowSDL::getPlatformWindow()
|
||||
|
|
@ -2827,7 +2827,7 @@ void LLWindowSDL::setLanguageTextInput(const LLCoordGL& position)
|
|||
}
|
||||
|
||||
// IME - International input compositing, i.e. for Japanese / Chinese text input
|
||||
void LLWindowSDL::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
|
||||
void LLWindowSDL::allowLanguageTextInput(LLPreeditor *preeditor, bool b)
|
||||
{
|
||||
if (!mIMEEnabled)
|
||||
{
|
||||
|
|
@ -2837,7 +2837,7 @@ void LLWindowSDL::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
|
|||
if (preeditor != mPreeditor && !b)
|
||||
{
|
||||
// This condition may occur with a call to
|
||||
// setEnabled(BOOL) from LLTextEditor or LLLineEditor
|
||||
// setEnabled(bool) from 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
|
||||
|
|
|
|||
|
|
@ -52,53 +52,53 @@ 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);
|
||||
// <FS:Zi> Make shared context work on Linux for multithreaded OpenGL
|
||||
void* createSharedContext() override;
|
||||
void makeContextCurrent(void* context) override;
|
||||
void destroySharedContext(void* context) override;
|
||||
/*virtual*/ void toggleVSync(bool enable_vsync);
|
||||
// </FS:Zi>
|
||||
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
|
||||
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
|
||||
/*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();
|
||||
|
|
@ -108,12 +108,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();
|
||||
|
|
@ -126,12 +126,12 @@ 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();
|
||||
|
||||
/*virtual*/ void allowLanguageTextInput(LLPreeditor* preeditor, BOOL b);
|
||||
/*virtual*/ void allowLanguageTextInput(LLPreeditor* preeditor, bool b);
|
||||
/*virtual*/ void setLanguageTextInput(const LLCoordGL& pos);
|
||||
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
|
@ -165,12 +165,12 @@ public:
|
|||
protected:
|
||||
LLWindowSDL(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, 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);
|
||||
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples);
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
~LLWindowSDL();
|
||||
|
||||
/*virtual*/ BOOL isValid();
|
||||
/*virtual*/ bool isValid();
|
||||
/*virtual*/ LLSD getNativeKeyData();
|
||||
|
||||
//void initCursors();
|
||||
|
|
@ -179,12 +179,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:
|
||||
//
|
||||
|
|
@ -192,12 +192,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 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 fixWindowSize(void);
|
||||
U32 SDLCheckGrabbyKeys(U32 keysym, BOOL gain);
|
||||
BOOL SDLReallyCaptureInput(BOOL capture);
|
||||
U32 SDLCheckGrabbyKeys(U32 keysym, bool gain);
|
||||
bool SDLReallyCaptureInput(bool capture);
|
||||
|
||||
//
|
||||
// Platform specific variables
|
||||
|
|
@ -214,7 +214,7 @@ protected:
|
|||
|
||||
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;
|
||||
|
|
@ -229,8 +229,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
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue