Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts: # indra/llui/llchat.h # indra/llui/llcombobox.cpp # indra/llui/llcontainerview.h # indra/llui/llfloater.cpp # indra/llui/llfloater.h # indra/llui/llfolderview.cpp # indra/llui/lllineeditor.cpp # indra/llui/llmenugl.cpp # indra/llui/llmultifloater.cpp # indra/llui/llmultifloater.h # indra/llui/llscrolllistctrl.cpp # indra/llui/llscrolllistctrl.h # indra/llui/llspinctrl.cpp # indra/llui/llspinctrl.h # indra/llui/lltabcontainer.cpp # indra/llui/lltabcontainer.h # indra/llui/lltextbase.cpp # indra/llui/lltextbase.h # indra/llui/lltexteditor.cpp # indra/llui/lltexteditor.h # indra/llui/lluictrl.h # indra/llui/llview.cpp # indra/llui/llview.h # indra/llui/llviewereventrecorder.cpp # indra/llxml/llcontrol.cpp # indra/llxml/llcontrol.h # indra/newview/llagentlanguage.cpp # indra/newview/llappviewer.cpp # indra/newview/llavatarlistitem.cpp # indra/newview/llavatarlistitem.h # indra/newview/llchatitemscontainerctrl.cpp # indra/newview/llchicletbar.cpp # indra/newview/llfloaterbuildoptions.cpp # indra/newview/llfloaterbuildoptions.h # indra/newview/llfloaterbump.cpp # indra/newview/llfloaterbump.h # indra/newview/llfloaterconversationpreview.h # indra/newview/llfloaterdestinations.h # indra/newview/llfloaterimagepreview.cpp # indra/newview/llfloaterjoystick.cpp # indra/newview/llfloaterland.cpp # indra/newview/llfloatermodelpreview.cpp # indra/newview/llfloaterpay.cpp # indra/newview/llfloaterpreference.cpp # indra/newview/llfloaterpreference.h # indra/newview/llfloaterprofiletexture.cpp # indra/newview/llfloaterregioninfo.cpp # indra/newview/llfloaterscriptdebug.cpp # indra/newview/llfloaterscriptdebug.h # indra/newview/llfloaterscriptedprefs.cpp # indra/newview/llfloatersearch.cpp # indra/newview/llfloatersettingsdebug.cpp # indra/newview/llfloatertools.cpp # indra/newview/llinventorybridge.cpp # indra/newview/llinventorybridge.h # indra/newview/llinventoryfunctions.cpp # indra/newview/llinventorypanel.cpp # indra/newview/llmediactrl.h # indra/newview/llmoveview.cpp # indra/newview/llnavigationbar.cpp # indra/newview/llnavigationbar.h # indra/newview/llnetmap.cpp # indra/newview/llnotificationlistitem.cpp # indra/newview/llpanelface.cpp # indra/newview/llpanelgroup.cpp # indra/newview/llpanelgroupnotices.cpp # indra/newview/llpanelmaininventory.cpp # indra/newview/llpanelmaininventory.h # indra/newview/llpanelobject.cpp # indra/newview/llpanelobjectinventory.cpp # indra/newview/llpanelpeople.h # indra/newview/llpanelpermissions.h # indra/newview/llpanelprofileclassifieds.cpp # indra/newview/llpanelprofilepicks.cpp # indra/newview/llpanelsnapshot.h # indra/newview/llpanelsnapshotinventory.cpp # indra/newview/llpanelsnapshotlocal.cpp # indra/newview/llpanelsnapshotpostcard.cpp # indra/newview/llpreviewnotecard.h # indra/newview/llstartup.cpp # indra/newview/llstatusbar.cpp # indra/newview/llstatusbar.h # indra/newview/llsyswellwindow.h # indra/newview/lltexturectrl.h # indra/newview/lltoolbarview.cpp # indra/newview/lltoolselect.cpp # indra/newview/llwearableitemslist.cppmaster
commit
314639426d
|
|
@ -103,7 +103,7 @@ void LLAccordionCtrl::draw()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
BOOL LLAccordionCtrl::postBuild()
|
||||
bool LLAccordionCtrl::postBuild()
|
||||
{
|
||||
static LLUICachedControl<S32> scrollbar_size("UIScrollbarSize", 0);
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ BOOL LLAccordionCtrl::postBuild()
|
|||
|
||||
mScrollbar = LLUICtrlFactory::create<LLScrollbar>(sbparams);
|
||||
LLView::addChild(mScrollbar);
|
||||
mScrollbar->setVisible(FALSE);
|
||||
mScrollbar->setVisible(false);
|
||||
mScrollbar->setFollowsRight();
|
||||
mScrollbar->setFollowsTop();
|
||||
mScrollbar->setFollowsBottom();
|
||||
|
|
@ -167,7 +167,7 @@ BOOL LLAccordionCtrl::postBuild()
|
|||
|
||||
updateNoTabsHelpTextVisibility();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ LLAccordionCtrl::~LLAccordionCtrl()
|
|||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLAccordionCtrl::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
// adjust our rectangle
|
||||
LLRect rcLocal = getRect();
|
||||
|
|
@ -243,7 +243,7 @@ void LLAccordionCtrl::showScrollbar(S32 width, S32 height)
|
|||
{
|
||||
bool was_visible = mScrollbar->getVisible();
|
||||
|
||||
mScrollbar->setVisible(TRUE);
|
||||
mScrollbar->setVisible(true);
|
||||
|
||||
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
|
||||
|
||||
|
|
@ -265,9 +265,9 @@ void LLAccordionCtrl::showScrollbar(S32 width, S32 height)
|
|||
|
||||
void LLAccordionCtrl::hideScrollbar(S32 width, S32 height)
|
||||
{
|
||||
if (mScrollbar->getVisible() == FALSE)
|
||||
if (mScrollbar->getVisible() == false)
|
||||
return;
|
||||
mScrollbar->setVisible(FALSE);
|
||||
mScrollbar->setVisible(false);
|
||||
|
||||
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ void LLAccordionCtrl::updateNoTabsHelpTextVisibility()
|
|||
}
|
||||
}
|
||||
|
||||
mNoVisibleTabsHelpText->setVisible(visible_exists ? FALSE : TRUE);
|
||||
mNoVisibleTabsHelpText->setVisible(visible_exists ? false : true);
|
||||
}
|
||||
|
||||
void LLAccordionCtrl::arrangeSingle()
|
||||
|
|
@ -418,7 +418,7 @@ void LLAccordionCtrl::arrangeSingle()
|
|||
{
|
||||
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
|
||||
|
||||
if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
|
||||
if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs
|
||||
continue;
|
||||
if (!accordion_tab->isExpanded() )
|
||||
{
|
||||
|
|
@ -432,7 +432,7 @@ void LLAccordionCtrl::arrangeSingle()
|
|||
{
|
||||
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
|
||||
|
||||
if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
|
||||
if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs
|
||||
continue;
|
||||
if (!accordion_tab->isExpanded() )
|
||||
{
|
||||
|
|
@ -480,7 +480,7 @@ void LLAccordionCtrl::arrangeMultiple()
|
|||
{
|
||||
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
|
||||
|
||||
if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
|
||||
if (accordion_tab->getVisible() == false) // Skip hidden accordion tabs
|
||||
continue;
|
||||
|
||||
if (!accordion_tab->isExpanded() )
|
||||
|
|
@ -572,15 +572,15 @@ bool LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
return false;
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrl::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLAccordionCtrl::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
if (mScrollbar->getVisible() && mScrollbar->handleKeyHere(key, mask))
|
||||
return TRUE;
|
||||
return true;
|
||||
return LLPanel::handleKeyHere(key, mask);
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
BOOL drop,
|
||||
bool LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -588,17 +588,17 @@ BOOL LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
{
|
||||
// Scroll folder view if needed. Never accepts a drag or drop.
|
||||
*accept = ACCEPT_NO;
|
||||
BOOL handled = autoScroll(x, y);
|
||||
bool handled = autoScroll(x, y);
|
||||
|
||||
if (!handled)
|
||||
{
|
||||
handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type,
|
||||
cargo_data, accept, tooltip_msg) != NULL;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrl::autoScroll(S32 x, S32 y)
|
||||
bool LLAccordionCtrl::autoScroll(S32 x, S32 y)
|
||||
{
|
||||
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ BOOL LLAccordionCtrl::autoScroll(S32 x, S32 y)
|
|||
}
|
||||
}
|
||||
|
||||
return scrolling ? TRUE : FALSE;
|
||||
return scrolling ? true : false;
|
||||
}
|
||||
|
||||
void LLAccordionCtrl::updateLayout(S32 width, S32 height)
|
||||
|
|
@ -830,11 +830,11 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
|
|||
}
|
||||
else if (info.has("child_visibility_change"))
|
||||
{
|
||||
BOOL new_visibility = info["child_visibility_change"];
|
||||
bool new_visibility = info["child_visibility_change"];
|
||||
if (new_visibility)
|
||||
{
|
||||
// there is at least one visible tab
|
||||
mNoVisibleTabsHelpText->setVisible(FALSE);
|
||||
mNoVisibleTabsHelpText->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,12 +88,12 @@ public:
|
|||
LLAccordionCtrl();
|
||||
virtual ~LLAccordionCtrl();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
|
||||
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,
|
||||
virtual bool handleKeyHere (KEY key, MASK mask);
|
||||
virtual bool handleDragAndDrop (S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -101,7 +101,7 @@ public:
|
|||
//
|
||||
|
||||
// Call reshape after changing splitter's size
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
// <FS:ND> If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
|
||||
// In that case we can avvoid calling arrange over and over and just call it once when finished.
|
||||
|
|
@ -164,7 +164,7 @@ private:
|
|||
void showScrollbar (S32 width, S32 height);
|
||||
void hideScrollbar (S32 width, S32 height);
|
||||
|
||||
BOOL autoScroll (S32 x, S32 y);
|
||||
bool autoScroll (S32 x, S32 y);
|
||||
|
||||
/**
|
||||
* An adaptor for LLTabComparator
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ public:
|
|||
|
||||
virtual void draw();
|
||||
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
|
||||
std::string getTitle();
|
||||
void setTitle(const std::string& title, const std::string& hl);
|
||||
|
|
@ -79,8 +79,8 @@ public:
|
|||
|
||||
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
|
||||
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
virtual bool handleKey(KEY key, MASK mask, bool called_from_parent);
|
||||
virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -150,9 +150,9 @@ LLAccordionCtrlTab::LLAccordionCtrlTabHeader::~LLAccordionCtrlTabHeader()
|
|||
{
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild()
|
||||
bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string LLAccordionCtrlTab::LLAccordionCtrlTabHeader::getTitle()
|
||||
|
|
@ -202,7 +202,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
|
|||
S32 height = getRect().getHeight();
|
||||
|
||||
F32 alpha = getCurrentTransparency();
|
||||
gl_rect_2d(0, 0, width - 1, height - 1, mHeaderBGColor.get() % alpha, TRUE);
|
||||
gl_rect_2d(0, 0, width - 1, height - 1, mHeaderBGColor.get() % alpha, true);
|
||||
|
||||
LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());
|
||||
bool collapsible = parent && parent->getCollapsible();
|
||||
|
|
@ -245,7 +245,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
|
|||
LLUICtrl::draw();
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
|
||||
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::reshape(S32 width, S32 height, bool called_from_parent /* = true */)
|
||||
{
|
||||
S32 header_height = mHeaderTextbox->getTextPixelHeight();
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::onMouseLeave(S32 x, S32 y, MA
|
|||
mAutoOpenTimer.stop();
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
||||
bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, bool called_from_parent)
|
||||
{
|
||||
if ((key == KEY_LEFT || key == KEY_RIGHT) && mask == MASK_NONE)
|
||||
{
|
||||
|
|
@ -286,8 +286,8 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask,
|
|||
return LLUICtrl::handleKey(key, mask, called_from_parent);
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
BOOL drop,
|
||||
bool LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -303,7 +303,7 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32
|
|||
{
|
||||
parent->changeOpenClose(false);
|
||||
mAutoOpenTimer.stop();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -380,7 +380,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
|
|||
LLFocusableElement::setFocusLostCallback(boost::bind(&LLAccordionCtrlTab::deselectOnFocusLost, this));
|
||||
}
|
||||
|
||||
reshape(100, 200,FALSE);
|
||||
reshape(100, 200,false);
|
||||
}
|
||||
|
||||
LLAccordionCtrlTab::~LLAccordionCtrlTab()
|
||||
|
|
@ -407,11 +407,11 @@ void LLAccordionCtrlTab::setDisplayChildren(bool display)
|
|||
else
|
||||
{
|
||||
if (mScrollbar)
|
||||
mScrollbar->setVisible(FALSE);
|
||||
mScrollbar->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
|
||||
void LLAccordionCtrlTab::reshape(S32 width, S32 height, bool called_from_parent /* = true */)
|
||||
{
|
||||
LLRect headerRect;
|
||||
|
||||
|
|
@ -439,14 +439,14 @@ void LLAccordionCtrlTab::changeOpenClose(bool is_open)
|
|||
mExpandedHeight = getRect().getHeight();
|
||||
|
||||
setDisplayChildren(!is_open);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
if (mCommitSignal)
|
||||
{
|
||||
(*mCommitSignal)(this, getDisplayChildren());
|
||||
}
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::onVisibilityChange(BOOL new_visibility)
|
||||
void LLAccordionCtrlTab::onVisibilityChange(bool new_visibility)
|
||||
{
|
||||
LLUICtrl::onVisibilityChange(new_visibility);
|
||||
|
||||
|
|
@ -643,14 +643,14 @@ void LLAccordionCtrlTab::setHeaderVisible(bool value)
|
|||
|
||||
if (mHeader)
|
||||
{
|
||||
mHeader->setVisible(value ? TRUE : FALSE);
|
||||
mHeader->setVisible(value ? true : false);
|
||||
}
|
||||
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
};
|
||||
|
||||
//virtual
|
||||
BOOL LLAccordionCtrlTab::postBuild()
|
||||
bool LLAccordionCtrlTab::postBuild()
|
||||
{
|
||||
if (mHeader)
|
||||
{
|
||||
|
|
@ -812,7 +812,7 @@ S32 LLAccordionCtrlTab::notify(const LLSD& info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
||||
bool LLAccordionCtrlTab::handleKey(KEY key, MASK mask, bool called_from_parent)
|
||||
{
|
||||
if (!mHeader->hasFocus())
|
||||
return LLUICtrl::handleKey(key, mask, called_from_parent);
|
||||
|
|
@ -992,10 +992,10 @@ void LLAccordionCtrlTab::hideScrollbar(const LLRect& child_rect)
|
|||
if (!mContainerPanel || !mScrollbar)
|
||||
return;
|
||||
|
||||
if (mScrollbar->getVisible() == FALSE)
|
||||
if (mScrollbar->getVisible() == false)
|
||||
return;
|
||||
|
||||
mScrollbar->setVisible(FALSE);
|
||||
mScrollbar->setVisible(false);
|
||||
mScrollbar->setDocPos(0);
|
||||
|
||||
//shrink child panel
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public:
|
|||
void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close;};
|
||||
bool canOpenClose() const { return mCanOpenClose; };
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
|
||||
S32 notifyParent(const LLSD& info);
|
||||
S32 notify(const LLSD& info);
|
||||
|
|
@ -153,19 +153,19 @@ protected:
|
|||
public:
|
||||
|
||||
// Call reshape after changing size
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
/**
|
||||
* Raises notifyParent event with "child_visibility_change" = new_visibility
|
||||
*/
|
||||
void onVisibilityChange(BOOL new_visibility);
|
||||
void onVisibilityChange(bool new_visibility);
|
||||
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 handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
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 );
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static LLDefaultChildRegistry::Register<LLBadge> r("badge");
|
|||
static const S32 BADGE_OFFSET_NOT_SPECIFIED = 0x7FFFFFFF;
|
||||
|
||||
// Compiler optimization, generate extern template
|
||||
template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const;
|
||||
template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const;
|
||||
|
||||
|
||||
LLBadge::Params::Params()
|
||||
|
|
@ -249,7 +249,7 @@ void LLBadge::draw()
|
|||
S32 badge_char_length = S32_MAX;
|
||||
S32 badge_pixel_length = S32_MAX;
|
||||
F32 *right_position_out = NULL;
|
||||
BOOL do_not_use_ellipses = false;
|
||||
bool do_not_use_ellipses = false;
|
||||
|
||||
F32 badge_width = (2.0f * mPaddingHoriz) +
|
||||
mGLFont->getWidthF32(badge_label_wstring.c_str(), badge_label_begin_offset, badge_char_length);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ private:
|
|||
|
||||
// Build time optimization, generate once in .cpp file
|
||||
#ifndef LLBADGE_CPP
|
||||
extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const;
|
||||
extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const;
|
||||
#endif
|
||||
|
||||
#endif // LL_LLBADGE_H
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static LLDefaultChildRegistry::Register<LLButton> r("button");
|
|||
|
||||
// Compiler optimization, generate extern template
|
||||
template class LLButton* LLView::getChild<class LLButton>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
|
||||
// globals loaded from settings.xml
|
||||
S32 LLBUTTON_H_PAD = 0;
|
||||
|
|
@ -129,10 +129,10 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
LLBadgeOwner(getHandle()),
|
||||
mMouseDownFrame(0),
|
||||
mMouseHeldDownCount(0),
|
||||
mBorderEnabled( FALSE ),
|
||||
mFlashing( FALSE ),
|
||||
mBorderEnabled( false ),
|
||||
mFlashing( false ),
|
||||
mCurGlowStrength(0.f),
|
||||
mNeedsHighlight(FALSE),
|
||||
mNeedsHighlight(false),
|
||||
mUnselectedLabel(p.label()),
|
||||
mSelectedLabel(p.label_selected()),
|
||||
mGLFont(p.font),
|
||||
|
|
@ -174,7 +174,7 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
mHoverGlowStrength(p.hover_glow_amount),
|
||||
mCommitOnReturn(p.commit_on_return),
|
||||
mCommitOnCaptureLost(p.commit_on_capture_lost),
|
||||
mFadeWhenDisabled(FALSE),
|
||||
mFadeWhenDisabled(false),
|
||||
mForcePressedState(false),
|
||||
mDisplayPressedState(p.display_pressed_state),
|
||||
mLastDrawCharsCount(0),
|
||||
|
|
@ -233,7 +233,7 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
if (p.image_disabled() == default_params.image_disabled() )
|
||||
{
|
||||
mImageDisabled = p.image_unselected;
|
||||
mFadeWhenDisabled = TRUE;
|
||||
mFadeWhenDisabled = true;
|
||||
}
|
||||
|
||||
if (p.image_pressed_selected == default_params.image_pressed_selected)
|
||||
|
|
@ -249,7 +249,7 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
if (p.image_disabled_selected() == default_params.image_disabled_selected())
|
||||
{
|
||||
mImageDisabledSelected = p.image_selected;
|
||||
mFadeWhenDisabled = TRUE;
|
||||
mFadeWhenDisabled = true;
|
||||
}
|
||||
|
||||
if (p.image_pressed == default_params.image_pressed)
|
||||
|
|
@ -416,7 +416,7 @@ boost::signals2::connection LLButton::setHeldDownCallback( button_callback_t cb,
|
|||
return setHeldDownCallback(boost::bind(cb, data));
|
||||
}
|
||||
|
||||
BOOL LLButton::postBuild()
|
||||
bool LLButton::postBuild()
|
||||
{
|
||||
autoResize();
|
||||
|
||||
|
|
@ -468,9 +468,9 @@ bool LLButton::handleUnicodeCharHere(llwchar uni_char)
|
|||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLButton::handleKeyHere(KEY key, MASK mask )
|
||||
bool LLButton::handleKeyHere(KEY key, MASK mask )
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
if( mCommitOnReturn && KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key))
|
||||
{
|
||||
if (mIsToggle)
|
||||
|
|
@ -478,7 +478,7 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask )
|
|||
toggleState();
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
|
||||
LLUICtrl::onCommit();
|
||||
}
|
||||
|
|
@ -636,7 +636,7 @@ void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
LLUICtrl::onMouseLeave(x, y, mask);
|
||||
|
||||
mNeedsHighlight = FALSE;
|
||||
mNeedsHighlight = false;
|
||||
}
|
||||
|
||||
void LLButton::setHighlight(bool b)
|
||||
|
|
@ -687,7 +687,7 @@ void LLButton::draw()
|
|||
static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::getInstance()->mSettingGroups["config"], "EnableButtonFlashing", true);
|
||||
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
|
||||
|
||||
bool pressed_by_keyboard = FALSE;
|
||||
bool pressed_by_keyboard = false;
|
||||
if (hasFocus())
|
||||
{
|
||||
pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN));
|
||||
|
|
@ -709,7 +709,7 @@ void LLButton::draw()
|
|||
|| mForcePressedState;
|
||||
bool selected = getToggleState();
|
||||
|
||||
bool use_glow_effect = FALSE;
|
||||
bool use_glow_effect = false;
|
||||
LLColor4 highlighting_color = LLColor4::white;
|
||||
LLColor4 glow_color = LLColor4::white;
|
||||
LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
|
||||
|
|
@ -741,7 +741,7 @@ void LLButton::draw()
|
|||
else
|
||||
{
|
||||
imagep = mImageSelected;
|
||||
use_glow_effect = TRUE;
|
||||
use_glow_effect = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -753,7 +753,7 @@ void LLButton::draw()
|
|||
else
|
||||
{
|
||||
imagep = mImageUnselected;
|
||||
use_glow_effect = TRUE;
|
||||
use_glow_effect = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -795,7 +795,7 @@ void LLButton::draw()
|
|||
if (mFlashingTimer)
|
||||
{
|
||||
LLColor4 flash_color = mFlashBgColor.get();
|
||||
use_glow_effect = TRUE;
|
||||
use_glow_effect = true;
|
||||
glow_type = LLRender::BT_ALPHA; // blend the glow
|
||||
|
||||
if (mFlashingTimer->isCurrentlyHighlighted() || !mFlashingTimer->isFlashingInProgress())
|
||||
|
|
@ -816,7 +816,7 @@ void LLButton::draw()
|
|||
|
||||
if (mNeedsHighlight && !imagep)
|
||||
{
|
||||
use_glow_effect = TRUE;
|
||||
use_glow_effect = true;
|
||||
}
|
||||
|
||||
// Figure out appropriate color for the text
|
||||
|
|
@ -913,7 +913,7 @@ void LLButton::draw()
|
|||
// no image
|
||||
LL_DEBUGS() << "No image for button " << getName() << LL_ENDL;
|
||||
// draw it in pink so we can find it
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, FALSE);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, false);
|
||||
}
|
||||
|
||||
// let overlay image and text play well together
|
||||
|
|
@ -1056,12 +1056,12 @@ void LLButton::drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLButton::getToggleState() const
|
||||
bool LLButton::getToggleState() const
|
||||
{
|
||||
return getValue().asBoolean();
|
||||
}
|
||||
|
||||
void LLButton::setToggleState(BOOL b)
|
||||
void LLButton::setToggleState(bool b)
|
||||
{
|
||||
if( b != getToggleState() )
|
||||
{
|
||||
|
|
@ -1088,7 +1088,7 @@ void LLButton::setFlashing(bool b, bool force_flashing/* = false */)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLButton::toggleState()
|
||||
bool LLButton::toggleState()
|
||||
{
|
||||
bool flipped = ! getToggleState();
|
||||
setToggleState(flipped);
|
||||
|
|
@ -1103,11 +1103,11 @@ void LLButton::setLabel( const LLStringExplicit& label )
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLButton::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLButton::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
mUnselectedLabel.setArg(key, text);
|
||||
mSelectedLabel.setArg(key, text);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLButton::setLabelUnselected( const LLStringExplicit& label )
|
||||
|
|
@ -1212,14 +1212,14 @@ void LLButton::setImageDisabled(LLPointer<LLUIImage> image)
|
|||
{
|
||||
mImageDisabled = image;
|
||||
mDisabledImageColor = mImageColor;
|
||||
mFadeWhenDisabled = TRUE;
|
||||
mFadeWhenDisabled = true;
|
||||
}
|
||||
|
||||
void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image)
|
||||
{
|
||||
mImageDisabledSelected = image;
|
||||
mDisabledImageColor = mImageColor;
|
||||
mFadeWhenDisabled = TRUE;
|
||||
mFadeWhenDisabled = true;
|
||||
}
|
||||
|
||||
void LLButton::setImagePressed(LLPointer<LLUIImage> image)
|
||||
|
|
@ -1312,11 +1312,11 @@ void LLButton::addImageAttributeToXML(LLXMLNodePtr node,
|
|||
{
|
||||
if( !image_name.empty() )
|
||||
{
|
||||
node->createChild(xml_tag_name.c_str(), TRUE)->setStringValue(image_name);
|
||||
node->createChild(xml_tag_name.c_str(), true)->setStringValue(image_name);
|
||||
}
|
||||
else if( image_id != LLUUID::null )
|
||||
{
|
||||
node->createChild((xml_tag_name + "_id").c_str(), TRUE)->setUUIDValue(image_id);
|
||||
node->createChild((xml_tag_name + "_id").c_str(), true)->setUUIDValue(image_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ 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 handleKeyHere(KEY key, MASK mask);
|
||||
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);
|
||||
|
|
@ -168,7 +168,7 @@ public:
|
|||
virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual bool handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
virtual void draw();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
|
||||
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||
virtual void onMouseCaptureLost();
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
|
||||
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
|
||||
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
|
||||
void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; }
|
||||
void setUseEllipses( bool use_ellipses ) { mUseEllipses = use_ellipses; }
|
||||
|
||||
|
||||
boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb);
|
||||
|
|
@ -206,13 +206,13 @@ public:
|
|||
|
||||
F32 getHeldDownTime() const { return mMouseDownTimer.getElapsedTimeF32(); }
|
||||
|
||||
BOOL toggleState();
|
||||
BOOL getToggleState() const;
|
||||
void setToggleState(BOOL b);
|
||||
bool toggleState();
|
||||
bool getToggleState() const;
|
||||
void setToggleState(bool b);
|
||||
|
||||
void setHighlight(bool b);
|
||||
void setFlashing( bool b, bool force_flashing = false );
|
||||
BOOL getFlashing() const { return mFlashing; }
|
||||
bool getFlashing() const { return mFlashing; }
|
||||
LLFlashTimer* getFlashTimer() {return mFlashingTimer;}
|
||||
void setFlashColor(const LLUIColor &color) { mFlashBgColor = color; };
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ public:
|
|||
void autoResize(); // resize with label of current btn state
|
||||
void resize(LLUIString label); // resize with label input
|
||||
void setLabel( const LLStringExplicit& label);
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
void setLabelUnselected(const LLStringExplicit& label);
|
||||
void setLabelSelected(const LLStringExplicit& label);
|
||||
void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; }
|
||||
|
|
@ -263,12 +263,12 @@ public:
|
|||
bool labelIsTruncated() const;
|
||||
const LLUIString& getCurrentLabel() const;
|
||||
|
||||
void setScaleImage(BOOL scale) { mScaleImage = scale; }
|
||||
BOOL getScaleImage() const { return mScaleImage; }
|
||||
void setScaleImage(bool scale) { mScaleImage = scale; }
|
||||
bool getScaleImage() const { return mScaleImage; }
|
||||
|
||||
void setDropShadowedText(BOOL b) { mDropShadowedText = b; }
|
||||
void setDropShadowedText(bool b) { mDropShadowedText = b; }
|
||||
|
||||
void setBorderEnabled(BOOL b) { mBorderEnabled = b; }
|
||||
void setBorderEnabled(bool b) { mBorderEnabled = b; }
|
||||
|
||||
void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
|
||||
|
||||
|
|
@ -281,8 +281,8 @@ public:
|
|||
void setImageFlash(LLPointer<LLUIImage> image);
|
||||
void setImagePressed(LLPointer<LLUIImage> image);
|
||||
|
||||
void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; }
|
||||
BOOL getCommitOnReturn() const { return mCommitOnReturn; }
|
||||
void setCommitOnReturn(bool commit) { mCommitOnReturn = commit; }
|
||||
bool getCommitOnReturn() const { return mCommitOnReturn; }
|
||||
|
||||
static void onHeldDown(void *userdata); // to be called by gIdleCallbacks
|
||||
static void toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname);
|
||||
|
|
@ -417,7 +417,7 @@ protected:
|
|||
// Build time optimization, generate once in .cpp file
|
||||
#ifndef LLBUTTON_CPP
|
||||
extern template class LLButton* LLView::getChild<class LLButton>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
#endif
|
||||
|
||||
#endif // LL_LLBUTTON_H
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ public:
|
|||
mSourceType(CHAT_SOURCE_AGENT),
|
||||
mChatType(CHAT_TYPE_NORMAL),
|
||||
mAudible(CHAT_AUDIBLE_FULLY),
|
||||
mMuted(FALSE),
|
||||
mMuted(false),
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
|
||||
mRlvLocFiltered(FALSE),
|
||||
mRlvNamesFiltered(FALSE),
|
||||
mRlvLocFiltered(false),
|
||||
mRlvNamesFiltered(false),
|
||||
// [/RLVa:KB]
|
||||
mTime(0.0),
|
||||
mTimeStr(),
|
||||
|
|
@ -114,10 +114,10 @@ public:
|
|||
EChatSourceType mSourceType;
|
||||
EChatType mChatType;
|
||||
EChatAudible mAudible;
|
||||
BOOL mMuted; // pass muted chat to maintain list of chatters
|
||||
bool mMuted; // pass muted chat to maintain list of chatters
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
|
||||
BOOL mRlvLocFiltered;
|
||||
BOOL mRlvNamesFiltered;
|
||||
bool mRlvLocFiltered;
|
||||
bool mRlvNamesFiltered;
|
||||
// [/RLVa:KB]
|
||||
F64 mTime; // viewer only, seconds from viewer start
|
||||
std::string mTimeStr;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ void LLChatEntry::expandText()
|
|||
|
||||
// <FS:Ansariel> Store result of getVisibleLines - it calls reflow
|
||||
//int visible_lines_count = llabs(getVisibleLines(true).first - getVisibleLines(true).second);
|
||||
std::pair<BOOL, BOOL> visible_lines = getVisibleLines(true);
|
||||
std::pair<S32, S32> visible_lines = getVisibleLines(true);
|
||||
int visible_lines_count = llabs(visible_lines.first - visible_lines.second);
|
||||
// </FS:Ansariel>
|
||||
bool can_changed = getLineCount() <= line_count || line_count < mPrevExpandedLineCount ;
|
||||
|
|
@ -182,9 +182,9 @@ void LLChatEntry::onFocusLost()
|
|||
LLUICtrl::onFocusLost();
|
||||
}
|
||||
|
||||
BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
|
||||
bool LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
LLTextEditor::handleSpecialKey(key, mask);
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ private:
|
|||
// <FS:Ansariel> Changed to public so we can update history when using modifier keys
|
||||
//void updateHistory();
|
||||
|
||||
BOOL handleSpecialKey(const KEY key, const MASK mask);
|
||||
bool handleSpecialKey(const KEY key, const MASK mask);
|
||||
|
||||
|
||||
// Fired when text height expanded to mExpandLinesCount
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box");
|
|||
|
||||
// Compiler optimization, generate extern template
|
||||
template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
|
||||
void LLCheckBoxCtrl::WordWrap::declareValues()
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
|
|||
static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
|
||||
|
||||
// must be big enough to hold all children
|
||||
setUseBoundingRect(TRUE);
|
||||
setUseBoundingRect(true);
|
||||
|
||||
// *HACK Get rid of this with SL-55508...
|
||||
// this allows blank check boxes and radio boxes for now
|
||||
|
|
@ -170,13 +170,13 @@ void LLCheckBoxCtrl::onCommit()
|
|||
{
|
||||
if( getEnabled() )
|
||||
{
|
||||
setTentative(FALSE);
|
||||
setTentative(false);
|
||||
setControlValue(getValue());
|
||||
LLUICtrl::onCommit();
|
||||
}
|
||||
}
|
||||
|
||||
void LLCheckBoxCtrl::setEnabled(BOOL b)
|
||||
void LLCheckBoxCtrl::setEnabled(bool b)
|
||||
{
|
||||
LLView::setEnabled(b);
|
||||
|
||||
|
|
@ -192,10 +192,10 @@ void LLCheckBoxCtrl::setEnabled(BOOL b)
|
|||
|
||||
void LLCheckBoxCtrl::clear()
|
||||
{
|
||||
setValue( FALSE );
|
||||
setValue( false );
|
||||
}
|
||||
|
||||
void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLCheckBoxCtrl::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLRect rect = getRect();
|
||||
S32 delta_width = width - rect.getWidth();
|
||||
|
|
@ -215,10 +215,10 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
|
||||
LLRect label_rect = mLabel->getRect();
|
||||
S32 new_width = rect.getWidth() - label_rect.mLeft;
|
||||
mLabel->reshape(new_width, label_rect.getHeight(), TRUE);
|
||||
mLabel->reshape(new_width, label_rect.getHeight(), true);
|
||||
|
||||
S32 label_top = label_rect.mTop;
|
||||
mLabel->reshapeToFitText(TRUE);
|
||||
mLabel->reshapeToFitText(true);
|
||||
|
||||
label_rect = mLabel->getRect();
|
||||
if (label_top != label_rect.mTop && mWordWrap == WRAP_DOWN)
|
||||
|
|
@ -257,13 +257,13 @@ LLSD LLCheckBoxCtrl::getValue() const
|
|||
}
|
||||
|
||||
//virtual
|
||||
void LLCheckBoxCtrl::setTentative(BOOL b)
|
||||
void LLCheckBoxCtrl::setTentative(bool b)
|
||||
{
|
||||
mButton->setTentative(b);
|
||||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLCheckBoxCtrl::getTentative() const
|
||||
bool LLCheckBoxCtrl::getTentative() const
|
||||
{
|
||||
return mButton->getTentative();
|
||||
}
|
||||
|
|
@ -271,7 +271,7 @@ BOOL LLCheckBoxCtrl::getTentative() const
|
|||
void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label )
|
||||
{
|
||||
mLabel->setText( label );
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
}
|
||||
|
||||
std::string LLCheckBoxCtrl::getLabel() const
|
||||
|
|
@ -279,10 +279,10 @@ std::string LLCheckBoxCtrl::getLabel() const
|
|||
return mLabel->getText();
|
||||
}
|
||||
|
||||
BOOL LLCheckBoxCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLCheckBoxCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
BOOL res = mLabel->setTextArg(key, text);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
bool res = mLabel->setTextArg(key, text);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -293,14 +293,14 @@ void LLCheckBoxCtrl::setControlName(const std::string& control_name, LLView* con
|
|||
}
|
||||
|
||||
|
||||
// virtual Returns TRUE if the user has modified this control.
|
||||
BOOL LLCheckBoxCtrl::isDirty() const
|
||||
// virtual Returns true if the user has modified this control.
|
||||
bool LLCheckBoxCtrl::isDirty() const
|
||||
{
|
||||
if ( mButton )
|
||||
{
|
||||
return mButton->isDirty();
|
||||
}
|
||||
return FALSE; // Shouldn't get here
|
||||
return false; // Shouldn't get here
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@
|
|||
// Constants
|
||||
//
|
||||
|
||||
const BOOL RADIO_STYLE = TRUE;
|
||||
const BOOL CHECK_STYLE = FALSE;
|
||||
const bool RADIO_STYLE = true;
|
||||
const bool CHECK_STYLE = false;
|
||||
|
||||
//
|
||||
// Classes
|
||||
|
|
@ -91,28 +91,28 @@ protected:
|
|||
public:
|
||||
// LLView interface
|
||||
|
||||
virtual void setEnabled( BOOL b );
|
||||
virtual void setEnabled( bool b );
|
||||
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
// LLUICtrl interface
|
||||
virtual void setValue(const LLSD& value );
|
||||
virtual LLSD getValue() const;
|
||||
BOOL get() { return (BOOL)getValue().asBoolean(); }
|
||||
void set(BOOL value) { setValue(value); }
|
||||
bool get() { return (bool)getValue().asBoolean(); }
|
||||
void set(bool value) { setValue(value); }
|
||||
|
||||
virtual void setTentative(BOOL b);
|
||||
virtual BOOL getTentative() const;
|
||||
virtual void setTentative(bool b);
|
||||
virtual bool getTentative() const;
|
||||
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
virtual void clear();
|
||||
virtual void onCommit();
|
||||
|
||||
// LLCheckBoxCtrl interface
|
||||
virtual BOOL toggle() { return mButton->toggleState(); } // returns new state
|
||||
virtual bool toggle() { return mButton->toggleState(); } // returns new state
|
||||
|
||||
void setBtnFocus() { mButton->setFocus(TRUE); }
|
||||
void setBtnFocus() { mButton->setFocus(true); }
|
||||
|
||||
void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; }
|
||||
void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; }
|
||||
|
|
@ -125,7 +125,7 @@ public:
|
|||
|
||||
virtual void setControlName(const std::string& control_name, LLView* context);
|
||||
|
||||
virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
|
||||
virtual bool isDirty() const; // Returns true if the user has modified this control.
|
||||
virtual void resetDirty(); // Clear dirty state
|
||||
|
||||
// <FS:Ansariel> on_check callback parameter
|
||||
|
|
@ -167,7 +167,7 @@ protected:
|
|||
// Build time optimization, generate once in .cpp file
|
||||
#ifndef LLCHECKBOXCTRL_CPP
|
||||
extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
#endif
|
||||
|
||||
#endif // LL_LLCHECKBOXCTRL_H
|
||||
|
|
|
|||
|
|
@ -174,13 +174,13 @@ void LLComboBox::initFromParams(const LLComboBox::Params& p)
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLComboBox::postBuild()
|
||||
bool LLComboBox::postBuild()
|
||||
{
|
||||
if (mControlVariable)
|
||||
{
|
||||
setValue(mControlVariable->getValue()); // selects the appropriate item
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -213,16 +213,16 @@ void LLComboBox::onCommit()
|
|||
// we have selected an existing item, blitz the manual text entry with
|
||||
// the properly capitalized item
|
||||
mTextEntry->setValue(getSimple());
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mTextEntry->setTentative(false);
|
||||
}
|
||||
setControlValue(getValue());
|
||||
LLUICtrl::onCommit();
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLComboBox::isDirty() const
|
||||
bool LLComboBox::isDirty() const
|
||||
{
|
||||
BOOL grubby = FALSE;
|
||||
bool grubby = false;
|
||||
if ( mList )
|
||||
{
|
||||
grubby = mList->isDirty();
|
||||
|
|
@ -245,7 +245,7 @@ bool LLComboBox::itemExists(const std::string& name)
|
|||
}
|
||||
|
||||
// add item "name" to menu
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOOL enabled)
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, bool enabled)
|
||||
{
|
||||
LLScrollListItem* item = mList->addSimpleElement(name, pos);
|
||||
item->setEnabled(enabled);
|
||||
|
|
@ -264,7 +264,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOO
|
|||
}
|
||||
|
||||
// add item "name" with a unique id to menu
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAddPosition pos, BOOL enabled )
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAddPosition pos, bool enabled )
|
||||
{
|
||||
LLScrollListItem* item = mList->addSimpleElement(name, pos, id);
|
||||
item->setEnabled(enabled);
|
||||
|
|
@ -283,7 +283,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAd
|
|||
}
|
||||
|
||||
// add item "name" with attached userdata
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddPosition pos, BOOL enabled )
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddPosition pos, bool enabled )
|
||||
{
|
||||
LLScrollListItem* item = mList->addSimpleElement(name, pos);
|
||||
item->setEnabled(enabled);
|
||||
|
|
@ -303,7 +303,7 @@ LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddP
|
|||
}
|
||||
|
||||
// add item "name" with attached generic data
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, BOOL enabled )
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, bool enabled )
|
||||
{
|
||||
LLScrollListItem* item = mList->addSimpleElement(name, pos, value);
|
||||
item->setEnabled(enabled);
|
||||
|
|
@ -338,17 +338,17 @@ LLScrollListItem* LLComboBox::getItemByValue(const LLSD& value)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLComboBox::sortByName(BOOL ascending)
|
||||
void LLComboBox::sortByName(bool ascending)
|
||||
{
|
||||
mList->sortOnce(0, ascending);
|
||||
}
|
||||
|
||||
|
||||
// Choose an item with a given name in the menu.
|
||||
// Returns TRUE if the item was found.
|
||||
BOOL LLComboBox::setSimple(const LLStringExplicit& name)
|
||||
// Returns true if the item was found.
|
||||
bool LLComboBox::setSimple(const LLStringExplicit& name)
|
||||
{
|
||||
BOOL found = mList->selectItemByLabel(name, FALSE);
|
||||
bool found = mList->selectItemByLabel(name, false);
|
||||
|
||||
if (found)
|
||||
{
|
||||
|
|
@ -362,7 +362,7 @@ BOOL LLComboBox::setSimple(const LLStringExplicit& name)
|
|||
// virtual
|
||||
void LLComboBox::setValue(const LLSD& value)
|
||||
{
|
||||
BOOL found = mList->selectByValue(value);
|
||||
bool found = mList->selectByValue(value);
|
||||
if (found)
|
||||
{
|
||||
LLScrollListItem* item = mList->getFirstSelected();
|
||||
|
|
@ -419,9 +419,9 @@ void LLComboBox::setLabel(const LLStringExplicit& name)
|
|||
if ( mTextEntry )
|
||||
{
|
||||
mTextEntry->setText(name);
|
||||
if (mList->selectItemByLabel(name, FALSE))
|
||||
if (mList->selectItemByLabel(name, false))
|
||||
{
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mTextEntry->setTentative(false);
|
||||
mLastSelectedIndex = mList->getFirstSelectedIndex();
|
||||
}
|
||||
else
|
||||
|
|
@ -443,7 +443,7 @@ void LLComboBox::updateLabel()
|
|||
if (mTextEntry)
|
||||
{
|
||||
mTextEntry->setText(getSelectedItemLabel());
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mTextEntry->setTentative(false);
|
||||
}
|
||||
|
||||
// If combo box doesn't allow text entry update
|
||||
|
|
@ -454,9 +454,9 @@ void LLComboBox::updateLabel()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLComboBox::remove(const std::string& name)
|
||||
bool LLComboBox::remove(const std::string& name)
|
||||
{
|
||||
BOOL found = mList->selectItemByLabel(name);
|
||||
bool found = mList->selectItemByLabel(name);
|
||||
|
||||
if (found)
|
||||
{
|
||||
|
|
@ -471,15 +471,15 @@ BOOL LLComboBox::remove(const std::string& name)
|
|||
return found;
|
||||
}
|
||||
|
||||
BOOL LLComboBox::remove(S32 index)
|
||||
bool LLComboBox::remove(S32 index)
|
||||
{
|
||||
if (index < mList->getItemCount())
|
||||
{
|
||||
mList->deleteSingleItem(index);
|
||||
setLabel(getSelectedItemLabel());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Keyboard focus lost.
|
||||
|
|
@ -495,7 +495,7 @@ void LLComboBox::onFocusLost()
|
|||
LLUICtrl::onFocusLost();
|
||||
}
|
||||
|
||||
void LLComboBox::setButtonVisible(BOOL visible)
|
||||
void LLComboBox::setButtonVisible(bool visible)
|
||||
{
|
||||
static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
|
||||
|
||||
|
|
@ -509,13 +509,13 @@ void LLComboBox::setButtonVisible(BOOL visible)
|
|||
text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button;
|
||||
}
|
||||
//mTextEntry->setRect(text_entry_rect);
|
||||
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
|
||||
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), true);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLComboBox::setCurrentByIndex( S32 index )
|
||||
bool LLComboBox::setCurrentByIndex( S32 index )
|
||||
{
|
||||
BOOL found = mList->selectNthItem( index );
|
||||
bool found = mList->selectNthItem( index );
|
||||
if (found)
|
||||
{
|
||||
setLabel(getSelectedItemLabel());
|
||||
|
|
@ -534,7 +534,7 @@ S32 LLComboBox::getCurrentIndex() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
void LLComboBox::setEnabledByValue(const LLSD& value, BOOL enabled)
|
||||
void LLComboBox::setEnabledByValue(const LLSD& value, bool enabled)
|
||||
{
|
||||
LLScrollListItem *found = mList->getItem(value);
|
||||
if (found)
|
||||
|
|
@ -553,7 +553,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
|
|||
S32 shadow_size = drop_shadow_button;
|
||||
mButton->setRect(LLRect( getRect().getWidth() - llmax(8,arrow_width) - 2 * shadow_size,
|
||||
rect.mTop, rect.mRight, rect.mBottom));
|
||||
mButton->setTabStop(FALSE);
|
||||
mButton->setTabStop(false);
|
||||
mButton->setHAlign(LLFontGL::HCENTER);
|
||||
|
||||
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
|
||||
|
|
@ -571,7 +571,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
|
|||
params.label(mLabel);
|
||||
mTextEntry = LLUICtrlFactory::create<LLLineEditor> (params);
|
||||
mTextEntry->setText(cur_label);
|
||||
mTextEntry->setIgnoreTab(TRUE);
|
||||
mTextEntry->setIgnoreTab(true);
|
||||
addChild(mTextEntry);
|
||||
|
||||
// clear label on button
|
||||
|
|
@ -586,7 +586,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
|
|||
|
||||
if (mTextEntry)
|
||||
{
|
||||
mTextEntry->setVisible(FALSE);
|
||||
mTextEntry->setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -596,7 +596,7 @@ void LLComboBox::focusEditor()
|
|||
{
|
||||
if (mTextEntry)
|
||||
{
|
||||
mTextEntry->setFocus(TRUE);
|
||||
mTextEntry->setFocus(true);
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -700,15 +700,15 @@ void LLComboBox::showList()
|
|||
// NB: this call will trigger the focuslost callback which will hide the list, so do it first
|
||||
// before finally showing the list
|
||||
|
||||
mList->setFocus(TRUE);
|
||||
mList->setFocus(true);
|
||||
|
||||
// Show the list and push the button down
|
||||
mButton->setToggleState(TRUE);
|
||||
mList->setVisible(TRUE);
|
||||
mButton->setToggleState(true);
|
||||
mList->setVisible(true);
|
||||
|
||||
LLUI::getInstance()->addPopup(this);
|
||||
|
||||
setUseBoundingRect(TRUE);
|
||||
setUseBoundingRect(true);
|
||||
// updateBoundingRect();
|
||||
}
|
||||
|
||||
|
|
@ -727,11 +727,11 @@ void LLComboBox::hideList()
|
|||
else if(mLastSelectedIndex >= 0)
|
||||
mList->selectNthItem(mLastSelectedIndex);
|
||||
|
||||
mButton->setToggleState(FALSE);
|
||||
mList->setVisible(FALSE);
|
||||
mButton->setToggleState(false);
|
||||
mList->setVisible(false);
|
||||
mList->mouseOverHighlightNthItem(-1);
|
||||
|
||||
setUseBoundingRect(FALSE);
|
||||
setUseBoundingRect(false);
|
||||
LLUI::getInstance()->removePopup(this);
|
||||
// updateBoundingRect();
|
||||
}
|
||||
|
|
@ -757,7 +757,7 @@ void LLComboBox::onButtonMouseDown()
|
|||
showList();
|
||||
}
|
||||
|
||||
setFocus( TRUE );
|
||||
setFocus( true );
|
||||
|
||||
// pass mouse capture on to list if button is depressed
|
||||
if (mButton->hasMouseCapture())
|
||||
|
|
@ -831,16 +831,16 @@ bool LLComboBox::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLComboBox::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
BOOL result = FALSE;
|
||||
bool result = false;
|
||||
if (hasFocus())
|
||||
{
|
||||
if (mList->getVisible()
|
||||
&& key == KEY_ESCAPE && mask == MASK_NONE)
|
||||
{
|
||||
hideList();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
//give list a chance to pop up and handle key
|
||||
LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
|
||||
|
|
@ -863,7 +863,7 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
|
|||
// don't show list and don't eat key input when committing
|
||||
// free-form text entry with RETURN since user already knows
|
||||
// what they are trying to select
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// if selection has changed, pop open list
|
||||
else if (mList->getLastSelectedItem() != last_selected_item
|
||||
|
|
@ -906,12 +906,12 @@ void LLComboBox::setTextEntry(const LLStringExplicit& text)
|
|||
if (mTextEntry)
|
||||
{
|
||||
mTextEntry->setText(text);
|
||||
mHasAutocompletedText = FALSE;
|
||||
mHasAutocompletedText = false;
|
||||
updateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
void LLComboBox::setKeystrokeOnEsc(BOOL enable)
|
||||
void LLComboBox::setKeystrokeOnEsc(bool enable)
|
||||
{
|
||||
if (mTextEntry)
|
||||
{
|
||||
|
|
@ -930,9 +930,9 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor)
|
|||
if (key == KEY_BACKSPACE ||
|
||||
key == KEY_DELETE)
|
||||
{
|
||||
if (mList->selectItemByLabel(line_editor->getText(), FALSE))
|
||||
if (mList->selectItemByLabel(line_editor->getText(), false))
|
||||
{
|
||||
line_editor->setTentative(FALSE);
|
||||
line_editor->setTentative(false);
|
||||
mLastSelectedIndex = mList->getFirstSelectedIndex();
|
||||
}
|
||||
else
|
||||
|
|
@ -967,7 +967,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor)
|
|||
}
|
||||
}
|
||||
line_editor->selectAll();
|
||||
line_editor->setTentative(FALSE);
|
||||
line_editor->setTentative(false);
|
||||
}
|
||||
else if (key == KEY_UP)
|
||||
{
|
||||
|
|
@ -982,7 +982,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor)
|
|||
}
|
||||
}
|
||||
line_editor->selectAll();
|
||||
line_editor->setTentative(FALSE);
|
||||
line_editor->setTentative(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1011,14 +1011,14 @@ void LLComboBox::updateSelection()
|
|||
prearrangeList(mTextEntry->getText());
|
||||
}
|
||||
|
||||
if (mList->selectItemByLabel(full_string, FALSE))
|
||||
if (mList->selectItemByLabel(full_string, false))
|
||||
{
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mTextEntry->setTentative(false);
|
||||
mLastSelectedIndex = mList->getFirstSelectedIndex();
|
||||
}
|
||||
// <FS:Ansariel> Allow fulltext search in comboboxes
|
||||
//else if (mList->selectItemByPrefix(left_wstring, FALSE))
|
||||
else if ((!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("FSComboboxSubstringSearch") || mForceDisableFulltextSearch) && mList->selectItemByPrefix(left_wstring, FALSE))
|
||||
//else if (mList->selectItemByPrefix(left_wstring, false))
|
||||
else if ((!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("FSComboboxSubstringSearch") || mForceDisableFulltextSearch) && mList->selectItemByPrefix(left_wstring, false))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLWString selected_item = utf8str_to_wstring(getSelectedItemLabel());
|
||||
|
|
@ -1026,19 +1026,19 @@ void LLComboBox::updateSelection()
|
|||
mTextEntry->setText(wstring_to_utf8str(wtext));
|
||||
mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size());
|
||||
mTextEntry->endSelection();
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mHasAutocompletedText = TRUE;
|
||||
mTextEntry->setTentative(false);
|
||||
mHasAutocompletedText = true;
|
||||
mLastSelectedIndex = mList->getFirstSelectedIndex();
|
||||
}
|
||||
// <FS:Ansariel> Allow fulltext search in comboboxes
|
||||
else if (LLUI::getInstance()->mSettingGroups["config"]->getBOOL("FSComboboxSubstringSearch") && !mForceDisableFulltextSearch && mList->selectItemBySubstring(left_wstring, FALSE))
|
||||
else if (LLUI::getInstance()->mSettingGroups["config"]->getBOOL("FSComboboxSubstringSearch") && !mForceDisableFulltextSearch && mList->selectItemBySubstring(left_wstring, false))
|
||||
{
|
||||
LLWString selected_item = utf8str_to_wstring(getSelectedItemLabel());
|
||||
mTextEntry->setText(wstring_to_utf8str(left_wstring) + " (" + getSelectedItemLabel() + ")");
|
||||
mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size());
|
||||
mTextEntry->endSelection();
|
||||
mTextEntry->setTentative(FALSE);
|
||||
mHasAutocompletedText = TRUE;
|
||||
mTextEntry->setTentative(false);
|
||||
mHasAutocompletedText = true;
|
||||
mLastSelectedIndex = mList->getFirstSelectedIndex();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -1047,7 +1047,7 @@ void LLComboBox::updateSelection()
|
|||
mList->deselectAllItems();
|
||||
mTextEntry->setText(wstring_to_utf8str(user_wstring)); // removes text added by autocompletion
|
||||
mTextEntry->setTentative(mTextEntryTentative);
|
||||
mHasAutocompletedText = FALSE;
|
||||
mHasAutocompletedText = false;
|
||||
mLastSelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1060,7 +1060,7 @@ void LLComboBox::onTextCommit(const LLSD& data)
|
|||
mTextEntry->selectAll();
|
||||
}
|
||||
|
||||
void LLComboBox::setFocus(BOOL b)
|
||||
void LLComboBox::setFocus(bool b)
|
||||
{
|
||||
LLUICtrl::setFocus(b);
|
||||
|
||||
|
|
@ -1069,7 +1069,7 @@ void LLComboBox::setFocus(BOOL b)
|
|||
mList->clearSearchString();
|
||||
if (mList->getVisible())
|
||||
{
|
||||
mList->setFocus(TRUE);
|
||||
mList->setFocus(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1137,7 +1137,7 @@ void LLComboBox::imageLoaded()
|
|||
{
|
||||
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
|
||||
text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * drop_shadow_button;
|
||||
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
|
||||
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1182,7 +1182,7 @@ void LLComboBox::clearRows()
|
|||
mList->clearRows();
|
||||
}
|
||||
|
||||
void LLComboBox::sortByColumn(const std::string& name, BOOL ascending)
|
||||
void LLComboBox::sortByColumn(const std::string& name, bool ascending)
|
||||
{
|
||||
mList->sortByColumn(name, ascending);
|
||||
}
|
||||
|
|
@ -1190,9 +1190,9 @@ void LLComboBox::sortByColumn(const std::string& name, BOOL ascending)
|
|||
//============================================================================
|
||||
//LLCtrlSelectionInterface functions
|
||||
|
||||
BOOL LLComboBox::setCurrentByID(const LLUUID& id)
|
||||
bool LLComboBox::setCurrentByID(const LLUUID& id)
|
||||
{
|
||||
BOOL found = mList->selectByID( id );
|
||||
bool found = mList->selectByID( id );
|
||||
|
||||
if (found)
|
||||
{
|
||||
|
|
@ -1207,9 +1207,9 @@ LLUUID LLComboBox::getCurrentID() const
|
|||
{
|
||||
return mList->getStringUUIDSelectedItem();
|
||||
}
|
||||
BOOL LLComboBox::setSelectedByValue(const LLSD& value, BOOL selected)
|
||||
bool LLComboBox::setSelectedByValue(const LLSD& value, bool selected)
|
||||
{
|
||||
BOOL found = mList->setSelectedByValue(value, selected);
|
||||
bool found = mList->setSelectedByValue(value, selected);
|
||||
if (found)
|
||||
{
|
||||
setLabel(getSelectedItemLabel());
|
||||
|
|
@ -1222,32 +1222,32 @@ LLSD LLComboBox::getSelectedValue()
|
|||
return mList->getSelectedValue();
|
||||
}
|
||||
|
||||
BOOL LLComboBox::isSelected(const LLSD& value) const
|
||||
bool LLComboBox::isSelected(const LLSD& value) const
|
||||
{
|
||||
return mList->isSelected(value);
|
||||
}
|
||||
|
||||
BOOL LLComboBox::operateOnSelection(EOperation op)
|
||||
bool LLComboBox::operateOnSelection(EOperation op)
|
||||
{
|
||||
if (op == OP_DELETE)
|
||||
{
|
||||
mList->deleteSelectedItems();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLComboBox::operateOnAll(EOperation op)
|
||||
bool LLComboBox::operateOnAll(EOperation op)
|
||||
{
|
||||
if (op == OP_DELETE)
|
||||
{
|
||||
clearRows();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLComboBox::selectItemRange( S32 first, S32 last )
|
||||
bool LLComboBox::selectItemRange( S32 first, S32 last )
|
||||
{
|
||||
return mList->selectItemRange(first, last);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
|
||||
virtual ~LLComboBox();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
|
||||
protected:
|
||||
friend class LLUICtrlFactory;
|
||||
|
|
@ -113,17 +113,17 @@ public:
|
|||
virtual void onFocusLost();
|
||||
|
||||
virtual bool handleToolTip(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleUnicodeCharHere(llwchar uni_char);
|
||||
|
||||
// LLUICtrl interface
|
||||
virtual void clear(); // select nothing
|
||||
virtual void onCommit();
|
||||
virtual BOOL acceptsTextInput() const { return mAllowTextEntry; }
|
||||
virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
|
||||
virtual bool acceptsTextInput() const { return mAllowTextEntry; }
|
||||
virtual bool isDirty() const; // Returns true if the user has modified this control.
|
||||
virtual void resetDirty(); // Clear dirty state
|
||||
|
||||
virtual void setFocus(BOOL b);
|
||||
virtual void setFocus(bool b);
|
||||
|
||||
// Selects item by underlying LLSD value, using LLSD::asString() matching.
|
||||
// For simple items, this is just the name of the label.
|
||||
|
|
@ -134,22 +134,22 @@ public:
|
|||
virtual LLSD getValue() const;
|
||||
|
||||
void setTextEntry(const LLStringExplicit& text);
|
||||
void setKeystrokeOnEsc(BOOL enable);
|
||||
void setKeystrokeOnEsc(bool enable);
|
||||
|
||||
LLScrollListItem* add(const std::string& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu
|
||||
LLScrollListItem* add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLScrollListItem* add(const std::string& name, void* userdata, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLScrollListItem* add(const std::string& name, LLSD value, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLScrollListItem* add(const std::string& name, EAddPosition pos = ADD_BOTTOM, bool enabled = true); // add item "name" to menu
|
||||
LLScrollListItem* add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, bool enabled = true);
|
||||
LLScrollListItem* add(const std::string& name, void* userdata, EAddPosition pos = ADD_BOTTOM, bool enabled = true);
|
||||
LLScrollListItem* add(const std::string& name, LLSD value, EAddPosition pos = ADD_BOTTOM, bool enabled = true);
|
||||
LLScrollListItem* addSeparator(EAddPosition pos = ADD_BOTTOM);
|
||||
BOOL remove( S32 index ); // remove item by index, return TRUE if found and removed
|
||||
bool remove( S32 index ); // remove item by index, return true if found and removed
|
||||
void removeall() { clearRows(); }
|
||||
bool itemExists(const std::string& name);
|
||||
LLScrollListItem* getItemByValue(const LLSD& value); // <FS:Ansariel> Get items by value
|
||||
|
||||
void sortByName(BOOL ascending = TRUE); // Sort the entries in the combobox by name
|
||||
void sortByName(bool ascending = true); // Sort the entries in the combobox by name
|
||||
|
||||
// Select current item by name using selectItemByLabel. Returns FALSE if not found.
|
||||
BOOL setSimple(const LLStringExplicit& name);
|
||||
// Select current item by name using selectItemByLabel. Returns false if not found.
|
||||
bool setSimple(const LLStringExplicit& name);
|
||||
// Get name of current item. Returns an empty string if not found.
|
||||
const std::string getSimple() const;
|
||||
// Get contents of column x of selected row
|
||||
|
|
@ -162,12 +162,12 @@ public:
|
|||
// Updates the combobox label to match the selected list item.
|
||||
void updateLabel();
|
||||
|
||||
BOOL remove(const std::string& name); // remove item "name", return TRUE if found and removed
|
||||
bool remove(const std::string& name); // remove item "name", return true if found and removed
|
||||
|
||||
BOOL setCurrentByIndex( S32 index );
|
||||
bool setCurrentByIndex( S32 index );
|
||||
S32 getCurrentIndex() const;
|
||||
|
||||
void setEnabledByValue(const LLSD& value, BOOL enabled);
|
||||
void setEnabledByValue(const LLSD& value, bool enabled);
|
||||
|
||||
void createLineEditor(const Params&);
|
||||
|
||||
|
|
@ -188,21 +188,21 @@ public:
|
|||
virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
|
||||
virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
|
||||
virtual void clearRows();
|
||||
virtual void sortByColumn(const std::string& name, BOOL ascending);
|
||||
virtual void sortByColumn(const std::string& name, bool ascending);
|
||||
|
||||
// LLCtrlSelectionInterface functions
|
||||
virtual BOOL getCanSelect() const { return TRUE; }
|
||||
virtual BOOL selectFirstItem() { return setCurrentByIndex(0); }
|
||||
virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); }
|
||||
virtual BOOL selectItemRange( S32 first, S32 last );
|
||||
virtual bool getCanSelect() const { return true; }
|
||||
virtual bool selectFirstItem() { return setCurrentByIndex(0); }
|
||||
virtual bool selectNthItem( S32 index ) { return setCurrentByIndex(index); }
|
||||
virtual bool selectItemRange( S32 first, S32 last );
|
||||
virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); }
|
||||
virtual BOOL setCurrentByID( const LLUUID& id );
|
||||
virtual bool setCurrentByID( const LLUUID& id );
|
||||
virtual LLUUID getCurrentID() const; // LLUUID::null if no items in menu
|
||||
virtual BOOL setSelectedByValue(const LLSD& value, BOOL selected);
|
||||
virtual bool setSelectedByValue(const LLSD& value, bool selected);
|
||||
virtual LLSD getSelectedValue();
|
||||
virtual BOOL isSelected(const LLSD& value) const;
|
||||
virtual BOOL operateOnSelection(EOperation op);
|
||||
virtual BOOL operateOnAll(EOperation op);
|
||||
virtual bool isSelected(const LLSD& value) const;
|
||||
virtual bool operateOnSelection(EOperation op);
|
||||
virtual bool operateOnAll(EOperation op);
|
||||
|
||||
//========================================================================
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ public:
|
|||
*/
|
||||
boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); }
|
||||
|
||||
void setButtonVisible(BOOL visible);
|
||||
void setButtonVisible(bool visible);
|
||||
|
||||
void onButtonMouseDown();
|
||||
void onListMouseUp();
|
||||
|
|
@ -239,13 +239,13 @@ protected:
|
|||
EPreferredPosition mListPosition;
|
||||
LLPointer<LLUIImage> mArrowImage;
|
||||
LLUIString mLabel;
|
||||
BOOL mHasAutocompletedText;
|
||||
bool mHasAutocompletedText;
|
||||
|
||||
private:
|
||||
BOOL mAllowTextEntry;
|
||||
BOOL mAllowNewValues;
|
||||
bool mAllowTextEntry;
|
||||
bool mAllowNewValues;
|
||||
S32 mMaxChars;
|
||||
BOOL mTextEntryTentative;
|
||||
bool mTextEntryTentative;
|
||||
commit_callback_t mPrearrangeCallback;
|
||||
commit_callback_t mTextEntryCallback;
|
||||
commit_callback_t mTextChangedCallback;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void LLConsole::setLinePersistTime(F32 seconds)
|
|||
mFadeTime = mLinePersistTime - FADE_DURATION;
|
||||
}
|
||||
|
||||
void LLConsole::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLConsole::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
S32 new_width = llmax(50, llmin(getRect().getWidth(), width));
|
||||
S32 new_height = llmax(llfloor(mFont->getLineHeight()) + 15, llmin(getRect().getHeight(), height));
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public:
|
|||
// each line lasts this long after being added
|
||||
void setLinePersistTime(F32 seconds);
|
||||
|
||||
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
// -1 = monospace, 0 means small, font size = 1 means big
|
||||
void setFontSize(S32 size_index);
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ LLContainerView::~LLContainerView()
|
|||
// Children all cleaned up by default view destructor.
|
||||
}
|
||||
|
||||
BOOL LLContainerView::postBuild()
|
||||
bool LLContainerView::postBuild()
|
||||
{
|
||||
setDisplayChildren(mDisplayChildren);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
return TRUE;
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLContainerView::addChild(LLView* child, S32 tab_group)
|
||||
|
|
@ -95,7 +95,7 @@ bool LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
if( mShowLabel && (y >= getRect().getHeight() - 10) )
|
||||
{
|
||||
setDisplayChildren(!mDisplayChildren);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), false);
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ void LLContainerView::draw()
|
|||
}
|
||||
|
||||
|
||||
void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLContainerView::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLRect scroller_rect;
|
||||
scroller_rect.setOriginAndSize(0, 0, width, height);
|
||||
|
|
@ -167,7 +167,7 @@ void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
}
|
||||
}
|
||||
|
||||
void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLContainerView::arrange(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
// Determine the sizes and locations of all contained views
|
||||
S32 total_height = 0;
|
||||
|
|
@ -250,7 +250,7 @@ void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent)
|
|||
{
|
||||
if (getParent())
|
||||
{
|
||||
getParent()->reshape(getParent()->getRect().getWidth(), getParent()->getRect().getHeight(), FALSE);
|
||||
getParent()->reshape(getParent()->getRect().getWidth(), getParent()->getRect().getHeight(), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ void LLContainerView::setLabel(const std::string& label)
|
|||
mLabel = label;
|
||||
}
|
||||
|
||||
void LLContainerView::setDisplayChildren(const BOOL displayChildren)
|
||||
void LLContainerView::setDisplayChildren(const bool displayChildren)
|
||||
{
|
||||
mDisplayChildren = displayChildren;
|
||||
for (child_list_const_iter_t child_iter = getChildList()->begin();
|
||||
|
|
|
|||
|
|
@ -53,12 +53,12 @@ public:
|
|||
// </FS:Zi>
|
||||
Params()
|
||||
: label("label"),
|
||||
show_label("show_label", FALSE),
|
||||
show_label("show_label", false),
|
||||
// <FS:Zi> Add background visible flag and color to container_view so we can have blank scrollview containers
|
||||
background_visible("background_visible", true),
|
||||
bg_color("bg_color", LLColor4(0.f, 0.f, 0.f, 0.25f)),
|
||||
// </FS:Zi>
|
||||
display_children("display_children", TRUE)
|
||||
display_children("display_children", true)
|
||||
{
|
||||
changeDefault(mouse_opaque, false);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ protected:
|
|||
public:
|
||||
~LLContainerView();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
|
||||
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
|
@ -81,22 +81,22 @@ public:
|
|||
/*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
/*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options.
|
||||
|
||||
void setLabel(const std::string& label);
|
||||
void showLabel(BOOL show) { mShowLabel = show; }
|
||||
void setDisplayChildren(const BOOL displayChildren);
|
||||
BOOL getDisplayChildren() { return mDisplayChildren; }
|
||||
void showLabel(bool show) { mShowLabel = show; }
|
||||
void setDisplayChildren(const bool displayChildren);
|
||||
bool getDisplayChildren() { return mDisplayChildren; }
|
||||
void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;}
|
||||
|
||||
private:
|
||||
LLScrollContainer* mScrollContainer;
|
||||
void arrange(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
BOOL mShowLabel;
|
||||
void arrange(S32 width, S32 height, bool called_from_parent = true);
|
||||
bool mShowLabel;
|
||||
|
||||
protected:
|
||||
BOOL mDisplayChildren;
|
||||
bool mDisplayChildren;
|
||||
std::string mLabel;
|
||||
// <FS:Zi> Add background visible flag and color to container_view so we can have blank scrollview containers
|
||||
bool mBackgroundVisible;
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@
|
|||
LLCtrlSelectionInterface::~LLCtrlSelectionInterface()
|
||||
{ }
|
||||
|
||||
BOOL LLCtrlSelectionInterface::selectByValue(LLSD value)
|
||||
bool LLCtrlSelectionInterface::selectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, TRUE);
|
||||
return setSelectedByValue(value, true);
|
||||
}
|
||||
|
||||
BOOL LLCtrlSelectionInterface::deselectByValue(LLSD value)
|
||||
bool LLCtrlSelectionInterface::deselectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, FALSE);
|
||||
return setSelectedByValue(value, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -47,29 +47,29 @@ public:
|
|||
OP_DESELECT,
|
||||
};
|
||||
|
||||
virtual BOOL getCanSelect() const = 0;
|
||||
virtual bool getCanSelect() const = 0;
|
||||
|
||||
virtual S32 getItemCount() const = 0;
|
||||
|
||||
virtual BOOL selectFirstItem() = 0;
|
||||
virtual BOOL selectNthItem( S32 index ) = 0;
|
||||
virtual BOOL selectItemRange( S32 first, S32 last ) = 0;
|
||||
virtual bool selectFirstItem() = 0;
|
||||
virtual bool selectNthItem( S32 index ) = 0;
|
||||
virtual bool selectItemRange( S32 first, S32 last ) = 0;
|
||||
|
||||
virtual S32 getFirstSelectedIndex() const = 0;
|
||||
|
||||
// TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function
|
||||
virtual BOOL setCurrentByID( const LLUUID& id ) = 0;
|
||||
virtual bool setCurrentByID( const LLUUID& id ) = 0;
|
||||
virtual LLUUID getCurrentID() const = 0;
|
||||
|
||||
BOOL selectByValue(const LLSD value);
|
||||
BOOL deselectByValue(const LLSD value);
|
||||
virtual BOOL setSelectedByValue(const LLSD& value, BOOL selected) = 0;
|
||||
bool selectByValue(const LLSD value);
|
||||
bool deselectByValue(const LLSD value);
|
||||
virtual bool setSelectedByValue(const LLSD& value, bool selected) = 0;
|
||||
virtual LLSD getSelectedValue() = 0;
|
||||
|
||||
virtual BOOL isSelected(const LLSD& value) const = 0;
|
||||
virtual bool isSelected(const LLSD& value) const = 0;
|
||||
|
||||
virtual BOOL operateOnSelection(EOperation op) = 0;
|
||||
virtual BOOL operateOnAll(EOperation op) = 0;
|
||||
virtual bool operateOnSelection(EOperation op) = 0;
|
||||
virtual bool operateOnAll(EOperation op) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlListInterface : public LLCtrlSelectionInterface
|
||||
|
|
@ -88,7 +88,7 @@ public:
|
|||
virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos, const LLSD& id) = 0;
|
||||
|
||||
virtual void clearRows() = 0;
|
||||
virtual void sortByColumn(const std::string& name, BOOL ascending) = 0;
|
||||
virtual void sortByColumn(const std::string& name, bool ascending) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlScrollInterface
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ void LLDockableFloater::init(LLDockableFloater* thiz)
|
|||
thiz->resetInstance();
|
||||
|
||||
// all dockable floaters should have close, dock and minimize buttons
|
||||
thiz->setCanClose(TRUE);
|
||||
thiz->setCanClose(true);
|
||||
thiz->setCanDock(true);
|
||||
thiz->setCanMinimize(TRUE);
|
||||
thiz->setCanMinimize(true);
|
||||
thiz->setOverlapsScreenChannel(false);
|
||||
thiz->mForceDocking = false;
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ LLDockableFloater::~LLDockableFloater()
|
|||
{
|
||||
}
|
||||
|
||||
BOOL LLDockableFloater::postBuild()
|
||||
bool LLDockableFloater::postBuild()
|
||||
{
|
||||
// Remember we should force docking when the floater is opened for the first time
|
||||
if (mIsDockedStateForcedCallback != NULL && mIsDockedStateForcedCallback())
|
||||
|
|
@ -108,14 +108,14 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname)
|
|||
// if floater undocked
|
||||
else if (instance != NULL)
|
||||
{
|
||||
instance->setMinimized(FALSE);
|
||||
instance->setMinimized(false);
|
||||
if (instance->getVisible())
|
||||
{
|
||||
instance->setVisible(FALSE);
|
||||
instance->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
instance->setVisible(TRUE);
|
||||
instance->setVisible(true);
|
||||
gFloaterView->bringToFront(instance);
|
||||
}
|
||||
}
|
||||
|
|
@ -127,13 +127,13 @@ void LLDockableFloater::resetInstance()
|
|||
{
|
||||
if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked())
|
||||
{
|
||||
sInstanceHandle.get()->setVisible(FALSE);
|
||||
sInstanceHandle.get()->setVisible(false);
|
||||
}
|
||||
sInstanceHandle = getHandle();
|
||||
}
|
||||
}
|
||||
|
||||
void LLDockableFloater::setVisible(BOOL visible)
|
||||
void LLDockableFloater::setVisible(bool visible)
|
||||
{
|
||||
// Force docking if requested
|
||||
if (visible && mForceDocking)
|
||||
|
|
@ -160,12 +160,12 @@ void LLDockableFloater::setVisible(BOOL visible)
|
|||
LLFloater::setVisible(visible);
|
||||
}
|
||||
|
||||
void LLDockableFloater::setMinimized(BOOL minimize)
|
||||
void LLDockableFloater::setMinimized(bool minimize)
|
||||
{
|
||||
if(minimize && isDocked())
|
||||
{
|
||||
// minimizing a docked floater just hides it
|
||||
setVisible(FALSE);
|
||||
setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -185,14 +185,14 @@ LLView * LLDockableFloater::getDockWidget()
|
|||
|
||||
void LLDockableFloater::onDockHidden()
|
||||
{
|
||||
setCanDock(FALSE);
|
||||
setCanDock(false);
|
||||
}
|
||||
|
||||
void LLDockableFloater::onDockShown()
|
||||
{
|
||||
if (!isMinimized())
|
||||
{
|
||||
setCanDock(TRUE);
|
||||
setCanDock(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public:
|
|||
* If descendant class overrides postBuild() in order to perform specific
|
||||
* construction then it must still invoke its superclass' implementation.
|
||||
*/
|
||||
/* virtula */BOOL postBuild();
|
||||
/* virtula */bool postBuild();
|
||||
/* virtual */void setDocked(bool docked, bool pop_on_undock = true);
|
||||
/* virtual */void draw();
|
||||
|
||||
|
|
@ -89,13 +89,13 @@ public:
|
|||
* If descendant class overrides setVisible() then it must still invoke its
|
||||
* superclass' implementation.
|
||||
*/
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ void setVisible(bool visible);
|
||||
|
||||
/**
|
||||
* If descendant class overrides setMinimized() then it must still invoke its
|
||||
* superclass' implementation.
|
||||
*/
|
||||
/*virtual*/ void setMinimized(BOOL minimize);
|
||||
/*virtual*/ void setMinimized(bool minimize);
|
||||
|
||||
LLView * getDockWidget();
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ protected:
|
|||
|
||||
// Checks if docking should be forced.
|
||||
// It may be useful e.g. if floater created in mouselook mode (see EXT-5609)
|
||||
boost::function<BOOL ()> mIsDockedStateForcedCallback;
|
||||
boost::function<bool ()> mIsDockedStateForcedCallback;
|
||||
|
||||
//private: // <FS:Ansariel> Make mDockControl accessible from children because of FIRE-16803
|
||||
std::unique_ptr<LLDockControl> mDockControl;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ LLDragHandle::LLDragHandle(const LLDragHandle::Params& p)
|
|||
mLastMouseScreenY( 0 ),
|
||||
mTitleBox( NULL ),
|
||||
mMaxTitleWidth( 0 ),
|
||||
mForeground( TRUE ),
|
||||
mForeground( true ),
|
||||
mDragHighlightColor(p.drag_highlight_color()),
|
||||
mDragShadowColor(p.drag_shadow_color())
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ void LLDragHandle::initFromParams(const LLDragHandle::Params& p)
|
|||
setTitle( p.label );
|
||||
}
|
||||
|
||||
void LLDragHandle::setTitleVisible(BOOL visible)
|
||||
void LLDragHandle::setTitleVisible(bool visible)
|
||||
{
|
||||
if(mTitleBox)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ void LLDragHandleTop::draw()
|
|||
|
||||
LLRect title_rect = mTitleBox->getRect();
|
||||
S32 title_right = title_rect.mLeft + mTitleWidth;
|
||||
BOOL show_right_side = title_right < getRect().getWidth();
|
||||
bool show_right_side = title_right < getRect().getWidth();
|
||||
|
||||
for( S32 i=0; i<4; i++ )
|
||||
{
|
||||
|
|
@ -212,7 +212,7 @@ void LLDragHandleLeft::draw()
|
|||
// no titles yet
|
||||
//LLRect title_rect = mTitleBox->getRect();
|
||||
//S32 title_right = title_rect.mLeft + mTitleWidth;
|
||||
//BOOL show_right_side = title_right < getRect().getWidth();
|
||||
//bool show_right_side = title_right < getRect().getWidth();
|
||||
|
||||
S32 line = left;
|
||||
for( S32 i=0; i<4; i++ )
|
||||
|
|
@ -265,13 +265,13 @@ void LLDragHandleTop::reshapeTitleBox()
|
|||
mTitleBox->setShape( title_rect );
|
||||
}
|
||||
|
||||
void LLDragHandleTop::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLDragHandleTop::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLView::reshape(width, height, called_from_parent);
|
||||
reshapeTitleBox();
|
||||
}
|
||||
|
||||
void LLDragHandleLeft::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLDragHandleLeft::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLView::reshape(width, height, called_from_parent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ public:
|
|||
|
||||
virtual void setValue(const LLSD& value);
|
||||
|
||||
void setForeground(BOOL b) { mForeground = b; }
|
||||
BOOL getForeground() const { return mForeground; }
|
||||
void setForeground(bool b) { mForeground = b; }
|
||||
bool getForeground() const { return mForeground; }
|
||||
void setMaxTitleWidth(S32 max_width) {mMaxTitleWidth = llmin(max_width, mMaxTitleWidth); }
|
||||
S32 getMaxTitleWidth() const { return mMaxTitleWidth; }
|
||||
void setButtonsRect(const LLRect& rect){ mButtonsRect = rect; }
|
||||
LLRect getButtonsRect() { return mButtonsRect; }
|
||||
void setTitleVisible(BOOL visible);
|
||||
void setTitleVisible(bool visible);
|
||||
|
||||
virtual void setTitle( const std::string& title ) = 0;
|
||||
virtual std::string getTitle() const = 0;
|
||||
|
|
@ -95,7 +95,7 @@ private:
|
|||
LLUIColor mDragHighlightColor;
|
||||
LLUIColor mDragShadowColor;
|
||||
S32 mMaxTitleWidth;
|
||||
BOOL mForeground;
|
||||
bool mForeground;
|
||||
|
||||
// Pixels near the edge to snap floaters.
|
||||
static S32 sSnapMargin;
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
virtual void setTitle( const std::string& title );
|
||||
virtual std::string getTitle() const;
|
||||
virtual void draw();
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
private:
|
||||
void reshapeTitleBox();
|
||||
|
|
@ -134,7 +134,7 @@ public:
|
|||
virtual void setTitle( const std::string& title );
|
||||
virtual std::string getTitle() const;
|
||||
virtual void draw();
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,29 +35,29 @@ public:
|
|||
virtual ~LLEditMenuHandler();
|
||||
|
||||
virtual void undo() {};
|
||||
virtual BOOL canUndo() const { return FALSE; }
|
||||
virtual bool canUndo() const { return false; }
|
||||
|
||||
virtual void redo() {};
|
||||
virtual BOOL canRedo() const { return FALSE; }
|
||||
virtual bool canRedo() const { return false; }
|
||||
|
||||
virtual void cut() {};
|
||||
virtual BOOL canCut() const { return FALSE; }
|
||||
virtual bool canCut() const { return false; }
|
||||
|
||||
virtual void copy() {};
|
||||
virtual BOOL canCopy() const { return FALSE; }
|
||||
virtual bool canCopy() const { return false; }
|
||||
|
||||
virtual void paste() {};
|
||||
virtual BOOL canPaste() const { return FALSE; }
|
||||
virtual bool canPaste() const { return false; }
|
||||
|
||||
// "delete" is a keyword
|
||||
virtual void doDelete() {};
|
||||
virtual BOOL canDoDelete() const { return FALSE; }
|
||||
virtual bool canDoDelete() const { return false; }
|
||||
|
||||
virtual void selectAll() {};
|
||||
virtual BOOL canSelectAll() const { return FALSE; }
|
||||
virtual bool canSelectAll() const { return false; }
|
||||
|
||||
virtual void deselect() {};
|
||||
virtual BOOL canDeselect() const { return FALSE; }
|
||||
virtual bool canDeselect() const { return false; }
|
||||
|
||||
// TODO: Instead of being a public data member, it would be better to hide it altogether
|
||||
// and have a "set" method and then a bunch of static versions of the cut, copy, paste
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
LLFilterEditor::LLFilterEditor(const LLFilterEditor::Params& p)
|
||||
: LLSearchEditor(p)
|
||||
{
|
||||
setCommitOnFocusLost(FALSE); // we'll commit on every keystroke, don't re-commit when we take focus away (i.e. we go to interact with the actual results!)
|
||||
setCommitOnFocusLost(false); // we'll commit on every keystroke, don't re-commit when we take focus away (i.e. we go to interact with the actual results!)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ LLFlatListView::Params::Params()
|
|||
magical_hacky_height_padding("magical_hacky_height_padding")
|
||||
{};
|
||||
|
||||
void LLFlatListView::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
|
||||
void LLFlatListView::reshape(S32 width, S32 height, bool called_from_parent /* = true */)
|
||||
{
|
||||
S32 delta = height - getRect().getHeight();
|
||||
LLScrollContainer::reshape(width, height, called_from_parent);
|
||||
|
|
@ -538,7 +538,7 @@ void LLFlatListView::draw()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFlatListView::postBuild()
|
||||
bool LLFlatListView::postBuild()
|
||||
{
|
||||
setTabStop(true);
|
||||
return LLScrollContainer::postBuild();
|
||||
|
|
@ -620,7 +620,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask)
|
|||
return;
|
||||
}
|
||||
|
||||
setFocus(TRUE);
|
||||
setFocus(true);
|
||||
|
||||
bool select_item = !isSelected(item_pair);
|
||||
|
||||
|
|
@ -724,10 +724,10 @@ void LLFlatListView::onItemRightMouseClick(item_pair_t* item_pair, MASK mask)
|
|||
onItemMouseClick(item_pair, mask);
|
||||
}
|
||||
|
||||
BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLFlatListView::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
BOOL reset_selection = (mask != MASK_SHIFT);
|
||||
BOOL handled = FALSE;
|
||||
bool reset_selection = (mask != MASK_SHIFT);
|
||||
bool handled = false;
|
||||
switch (key)
|
||||
{
|
||||
case KEY_RETURN:
|
||||
|
|
@ -735,7 +735,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
|
|||
if (mSelectedItemPairs.size() && mask == MASK_NONE)
|
||||
{
|
||||
mOnReturnSignal(this, getValue());
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -763,7 +763,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
|
|||
{
|
||||
if (mask == MASK_NONE)
|
||||
{
|
||||
setFocus(FALSE); // pass focus to the game area (EXT-8357)
|
||||
setFocus(false); // pass focus to the game area (EXT-8357)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -789,7 +789,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
|
|||
localRectToScreen(selected_rc, &screen_rc);
|
||||
notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue()));*/
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
return handled ? handled : LLScrollContainer::handleKeyHere(key, mask);
|
||||
|
|
@ -1050,7 +1050,7 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti
|
|||
return false;
|
||||
}
|
||||
|
||||
BOOL LLFlatListView::canSelectAll() const
|
||||
bool LLFlatListView::canSelectAll() const
|
||||
{
|
||||
return 0 != size() && mAllowSelection && mMultipleSelection;
|
||||
}
|
||||
|
|
@ -1210,14 +1210,14 @@ void LLFlatListView::onFocusReceived()
|
|||
{
|
||||
if (size())
|
||||
{
|
||||
mSelectedItemsBorder->setVisible(TRUE);
|
||||
mSelectedItemsBorder->setVisible(true);
|
||||
}
|
||||
gEditMenuHandler = this;
|
||||
}
|
||||
// virtual
|
||||
void LLFlatListView::onFocusLost()
|
||||
{
|
||||
mSelectedItemsBorder->setVisible(FALSE);
|
||||
mSelectedItemsBorder->setVisible(false);
|
||||
// Route menu back to the default
|
||||
if (gEditMenuHandler == this)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public:
|
|||
};
|
||||
|
||||
// disable traversal when finding widget to hand focus off to
|
||||
/*virtual*/ BOOL canFocusChildren() const { return FALSE; }
|
||||
/*virtual*/ bool canFocusChildren() const { return false; }
|
||||
|
||||
/**
|
||||
* Connects callback to signal called when Return key is pressed.
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
boost::signals2::connection setDoubleClickCallback( const mouse_signal_t::slot_type& cb ) { return mItemsPanel->setDoubleClickCallback(cb); }
|
||||
|
||||
/** Overridden LLPanel's reshape, height is ignored, the list sets its height to accommodate all items */
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
/** Returns full rect of child panel */
|
||||
const LLRect& getItemsRect() const;
|
||||
|
|
@ -353,7 +353,7 @@ protected:
|
|||
|
||||
virtual bool selectNextItemPair(bool is_up_direction, bool reset_selection);
|
||||
|
||||
virtual BOOL canSelectAll() const;
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void selectAll();
|
||||
|
||||
virtual bool isSelected(item_pair_t* item_pair) const;
|
||||
|
|
@ -371,9 +371,9 @@ protected:
|
|||
*/
|
||||
void notifyParentItemsRectChanged();
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
|
||||
virtual void onFocusReceived();
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
|
|||
};
|
||||
|
||||
LLMultiFloater* LLFloater::sHostp = NULL;
|
||||
BOOL LLFloater::sQuitting = FALSE; // Flag to prevent storing visibility controls while quitting
|
||||
bool LLFloater::sQuitting = false; // Flag to prevent storing visibility controls while quitting
|
||||
|
||||
LLFloaterView* gFloaterView = NULL;
|
||||
|
||||
|
|
@ -277,15 +277,15 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
|
|||
mHeaderHeight(p.header_height),
|
||||
mLegacyHeaderHeight(p.legacy_header_height),
|
||||
mDefaultRectForGroup(true),
|
||||
mMinimized(FALSE),
|
||||
mForeground(FALSE),
|
||||
mFirstLook(TRUE),
|
||||
mMinimized(false),
|
||||
mForeground(false),
|
||||
mFirstLook(true),
|
||||
mButtonScale(1.0f),
|
||||
mAutoFocus(TRUE), // automatically take focus when opened
|
||||
mAutoFocus(true), // automatically take focus when opened
|
||||
mCanDock(false),
|
||||
mDocked(false),
|
||||
mTornOff(false),
|
||||
mHasBeenDraggedWhileMinimized(FALSE),
|
||||
mHasBeenDraggedWhileMinimized(false),
|
||||
mPreviousMinimizedBottom(0),
|
||||
mPreviousMinimizedLeft(0),
|
||||
mDefaultRelativeX(p.rel_x),
|
||||
|
|
@ -298,10 +298,10 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
|
|||
// mNotificationContext = new LLFloaterNotificationContext(getHandle());
|
||||
|
||||
// Clicks stop here.
|
||||
setMouseOpaque(TRUE);
|
||||
setMouseOpaque(true);
|
||||
|
||||
// Floaters always draw their background, unlike every other panel.
|
||||
setBackgroundVisible(TRUE);
|
||||
setBackgroundVisible(true);
|
||||
|
||||
// Floaters start not minimized. When minimized, they save their
|
||||
// prior rectangle to be used on restore.
|
||||
|
|
@ -332,36 +332,36 @@ void LLFloater::initFloater(const Params& p)
|
|||
// Close button.
|
||||
if (mCanClose)
|
||||
{
|
||||
mButtonsEnabled[BUTTON_CLOSE] = TRUE;
|
||||
mButtonsEnabled[BUTTON_CLOSE] = true;
|
||||
}
|
||||
|
||||
// Help button: '?'
|
||||
//SL-14050 Disable all Help question marks
|
||||
// <FS:Ansariel> Nope!
|
||||
mButtonsEnabled[BUTTON_HELP] = !mHelpTopic.empty();// FALSE;
|
||||
mButtonsEnabled[BUTTON_HELP] = !mHelpTopic.empty();// false;
|
||||
|
||||
// Minimize button only for top draggers
|
||||
if ( !mDragOnLeft && mCanMinimize )
|
||||
{
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = TRUE;
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = true;
|
||||
}
|
||||
|
||||
if(mCanDock)
|
||||
{
|
||||
mButtonsEnabled[BUTTON_DOCK] = TRUE;
|
||||
mButtonsEnabled[BUTTON_DOCK] = true;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
if (mCanSnooze)
|
||||
{
|
||||
mButtonsEnabled[BUTTON_SNOOZE] = TRUE;
|
||||
mButtonsEnabled[BUTTON_SNOOZE] = true;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
buildButtons(p);
|
||||
|
||||
// Floaters are created in the invisible state
|
||||
setVisible(FALSE);
|
||||
setVisible(false);
|
||||
|
||||
if (!getParent())
|
||||
{
|
||||
|
|
@ -564,7 +564,7 @@ LLFloater::~LLFloater()
|
|||
// This is important so that floaters with persistent rects (i.e., those
|
||||
// created with rect control rather than an LLRect) are restored in their
|
||||
// correct, non-minimized positions.
|
||||
setMinimized( FALSE );
|
||||
setMinimized( false );
|
||||
|
||||
delete mDragHandle;
|
||||
for (S32 i = 0; i < 4; i++)
|
||||
|
|
@ -605,7 +605,7 @@ void LLFloater::storeVisibilityControl()
|
|||
// <FS:Zi> Make sure that hosted floaters always save "not visible", so they won't
|
||||
// pull up their host on restart
|
||||
//getControlGroup()->setBOOL( mVisibilityControl, getVisible() );
|
||||
BOOL visible = FALSE;
|
||||
bool visible = false;
|
||||
if (mTornOff)
|
||||
{
|
||||
visible = getVisible();
|
||||
|
|
@ -644,12 +644,12 @@ LLControlGroup* LLFloater::getControlGroup()
|
|||
return LLUI::getInstance()->mSettingGroups["account"];
|
||||
}
|
||||
|
||||
void LLFloater::setVisible( BOOL visible )
|
||||
void LLFloater::setVisible( bool visible )
|
||||
{
|
||||
LLPanel::setVisible(visible); // calls onVisibilityChange()
|
||||
if( visible && mFirstLook )
|
||||
{
|
||||
mFirstLook = FALSE;
|
||||
mFirstLook = false;
|
||||
}
|
||||
|
||||
if( !visible )
|
||||
|
|
@ -678,7 +678,7 @@ void LLFloater::setVisible( BOOL visible )
|
|||
}
|
||||
|
||||
|
||||
void LLFloater::setIsSingleInstance(BOOL is_single_instance)
|
||||
void LLFloater::setIsSingleInstance(bool is_single_instance)
|
||||
{
|
||||
mSingleInstance = is_single_instance;
|
||||
if (!mIsReuseInitialized)
|
||||
|
|
@ -689,12 +689,12 @@ void LLFloater::setIsSingleInstance(BOOL is_single_instance)
|
|||
|
||||
|
||||
// virtual
|
||||
void LLFloater::onVisibilityChange ( BOOL new_visibility )
|
||||
void LLFloater::onVisibilityChange ( bool new_visibility )
|
||||
{
|
||||
if (new_visibility)
|
||||
{
|
||||
if (getHost())
|
||||
getHost()->setFloaterFlashing(this, FALSE);
|
||||
getHost()->setFloaterFlashing(this, false);
|
||||
}
|
||||
LLPanel::onVisibilityChange ( new_visibility );
|
||||
}
|
||||
|
|
@ -736,7 +736,7 @@ void LLFloater::openFloater(const LLSD& key)
|
|||
|
||||
if (getHost() != NULL)
|
||||
{
|
||||
getHost()->setMinimized(FALSE);
|
||||
getHost()->setMinimized(false);
|
||||
getHost()->setVisibleAndFrontmost(mAutoFocus);
|
||||
getHost()->showFloater(this);
|
||||
// <FS:Zi> Make sure the floater knows it's not torn off
|
||||
|
|
@ -753,7 +753,7 @@ void LLFloater::openFloater(const LLSD& key)
|
|||
floater_to_stack = LLFloaterReg::getLastFloaterCascading();
|
||||
}
|
||||
applyControlsAndPosition(floater_to_stack);
|
||||
setMinimized(FALSE);
|
||||
setMinimized(false);
|
||||
setVisibleAndFrontmost(mAutoFocus);
|
||||
}
|
||||
|
||||
|
|
@ -779,7 +779,7 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
|
||||
// Always unminimize before trying to close.
|
||||
// Most of the time the user will never see this state.
|
||||
setMinimized(FALSE);
|
||||
setMinimized(false);
|
||||
|
||||
if (canClose())
|
||||
{
|
||||
|
|
@ -812,7 +812,7 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
LLFloater* dependee = mDependeeHandle.get();
|
||||
if (dependee && !dependee->isDead())
|
||||
{
|
||||
dependee->setFocus(TRUE);
|
||||
dependee->setFocus(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -854,11 +854,11 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
// Hide the instance
|
||||
if (getHost())
|
||||
{
|
||||
getHost()->setVisible(FALSE);
|
||||
getHost()->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
setVisible(FALSE);
|
||||
setVisible(false);
|
||||
if (!mReuseInstance)
|
||||
{
|
||||
destroy();
|
||||
|
|
@ -867,7 +867,7 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
}
|
||||
else
|
||||
{
|
||||
setVisible(FALSE); // hide before destroying (so onVisibilityChange() gets called)
|
||||
setVisible(false); // hide before destroying (so onVisibilityChange() gets called)
|
||||
if (!mReuseInstance)
|
||||
{
|
||||
destroy();
|
||||
|
|
@ -891,7 +891,7 @@ void LLFloater::closeHostedFloater()
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLFloater::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLPanel::reshape(width, height, called_from_parent);
|
||||
}
|
||||
|
|
@ -900,7 +900,7 @@ void LLFloater::releaseFocus()
|
|||
{
|
||||
LLUI::getInstance()->removePopup(this);
|
||||
|
||||
setFocus(FALSE);
|
||||
setFocus(false);
|
||||
|
||||
if( gFocusMgr.childHasMouseCapture( this ) )
|
||||
{
|
||||
|
|
@ -1194,12 +1194,12 @@ std::string LLFloater::getShortTitle() const
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLFloater::canSnapTo(const LLView* other_view)
|
||||
bool LLFloater::canSnapTo(const LLView* other_view)
|
||||
{
|
||||
if (NULL == other_view)
|
||||
{
|
||||
LL_WARNS() << "other_view is NULL" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (other_view != getParent())
|
||||
|
|
@ -1210,7 +1210,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
|
|||
&& mDependents.find(other_floaterp->getHandle()) != mDependents.end())
|
||||
{
|
||||
// this is a dependent that is already snapped to us, so don't snap back to it
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1300,16 +1300,16 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
|
|||
else
|
||||
{
|
||||
// If minimized, and origin has changed, set
|
||||
// mHasBeenDraggedWhileMinimized to TRUE
|
||||
// mHasBeenDraggedWhileMinimized to true
|
||||
if ((new_rect.mLeft != old_rect.mLeft) ||
|
||||
(new_rect.mBottom != old_rect.mBottom))
|
||||
{
|
||||
mHasBeenDraggedWhileMinimized = TRUE;
|
||||
mHasBeenDraggedWhileMinimized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloater::setMinimized(BOOL minimize)
|
||||
void LLFloater::setMinimized(bool minimize)
|
||||
{
|
||||
const LLFloater::Params& default_params = LLFloater::getDefaultParams();
|
||||
S32 floater_header_size = default_params.header_height;
|
||||
|
|
@ -1325,7 +1325,7 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
if (minimize)
|
||||
{
|
||||
// minimized flag should be turned on before release focus
|
||||
mMinimized = TRUE;
|
||||
mMinimized = true;
|
||||
mExpandedRect = getRect();
|
||||
|
||||
// If the floater has been dragged while minimized in the
|
||||
|
|
@ -1344,11 +1344,11 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
|
||||
if (mButtonsEnabled[BUTTON_MINIMIZE])
|
||||
{
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = FALSE;
|
||||
mButtonsEnabled[BUTTON_RESTORE] = TRUE;
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = false;
|
||||
mButtonsEnabled[BUTTON_RESTORE] = true;
|
||||
}
|
||||
|
||||
setBorderVisible(TRUE);
|
||||
setBorderVisible(true);
|
||||
|
||||
for(handle_set_iter_t dependent_it = mDependents.begin();
|
||||
dependent_it != mDependents.end();
|
||||
|
|
@ -1359,11 +1359,11 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
{
|
||||
if (floaterp->isMinimizeable())
|
||||
{
|
||||
floaterp->setMinimized(TRUE);
|
||||
floaterp->setMinimized(true);
|
||||
}
|
||||
else if (!floaterp->isMinimized())
|
||||
{
|
||||
floaterp->setVisible(FALSE);
|
||||
floaterp->setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1375,16 +1375,16 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
{
|
||||
if (mResizeBar[i] != NULL)
|
||||
{
|
||||
mResizeBar[i]->setEnabled(FALSE);
|
||||
mResizeBar[i]->setEnabled(false);
|
||||
}
|
||||
if (mResizeHandle[i] != NULL)
|
||||
{
|
||||
mResizeHandle[i]->setEnabled(FALSE);
|
||||
mResizeHandle[i]->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Reshape *after* setting mMinimized
|
||||
reshape( minimized_width, floater_header_size, TRUE);
|
||||
reshape( minimized_width, floater_header_size, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1400,8 +1400,8 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom );
|
||||
if (mButtonsEnabled[BUTTON_RESTORE])
|
||||
{
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = TRUE;
|
||||
mButtonsEnabled[BUTTON_RESTORE] = FALSE;
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = true;
|
||||
mButtonsEnabled[BUTTON_RESTORE] = false;
|
||||
}
|
||||
|
||||
// show dependent floater
|
||||
|
|
@ -1412,8 +1412,8 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
LLFloater* floaterp = dependent_it->get();
|
||||
if (floaterp)
|
||||
{
|
||||
floaterp->setMinimized(FALSE);
|
||||
floaterp->setVisible(TRUE);
|
||||
floaterp->setMinimized(false);
|
||||
floaterp->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1429,10 +1429,10 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
}
|
||||
}
|
||||
|
||||
mMinimized = FALSE;
|
||||
mMinimized = false;
|
||||
setFrontmost();
|
||||
// Reshape *after* setting mMinimized
|
||||
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
|
||||
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), true );
|
||||
}
|
||||
|
||||
make_ui_sound("UISndWindowClose");
|
||||
|
|
@ -1440,7 +1440,7 @@ void LLFloater::setMinimized(BOOL minimize)
|
|||
applyTitle ();
|
||||
}
|
||||
|
||||
void LLFloater::setFocus( BOOL b )
|
||||
void LLFloater::setFocus( bool b )
|
||||
{
|
||||
if (b && getIsChrome())
|
||||
{
|
||||
|
|
@ -1448,7 +1448,7 @@ void LLFloater::setFocus( BOOL b )
|
|||
}
|
||||
LLView* last_focus = gFocusMgr.getLastFocusForGroup(this);
|
||||
// a descendent already has focus
|
||||
BOOL child_had_focus = hasFocus();
|
||||
bool child_had_focus = hasFocus();
|
||||
|
||||
// give focus to first valid descendent
|
||||
LLPanel::setFocus(b);
|
||||
|
|
@ -1471,7 +1471,7 @@ void LLFloater::setFocus( BOOL b )
|
|||
last_focus->isInVisibleChain())
|
||||
{
|
||||
// *FIX: should handle case where focus doesn't stick
|
||||
last_focus->setFocus(TRUE);
|
||||
last_focus->setFocus(true);
|
||||
}
|
||||
}
|
||||
updateTransparency(b ? TT_ACTIVE : TT_INACTIVE);
|
||||
|
|
@ -1486,15 +1486,15 @@ void LLFloater::setRect(const LLRect &rect)
|
|||
}
|
||||
|
||||
// virtual
|
||||
void LLFloater::setIsChrome(BOOL is_chrome)
|
||||
void LLFloater::setIsChrome(bool is_chrome)
|
||||
{
|
||||
// chrome floaters don't take focus at all
|
||||
if (is_chrome)
|
||||
{
|
||||
// remove focus if we're changing to chrome
|
||||
setFocus(FALSE);
|
||||
setFocus(false);
|
||||
// can't Ctrl-Tab to "chrome" floaters
|
||||
setFocusRoot(FALSE);
|
||||
setFocusRoot(false);
|
||||
mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome)));
|
||||
}
|
||||
|
||||
|
|
@ -1502,7 +1502,7 @@ void LLFloater::setIsChrome(BOOL is_chrome)
|
|||
}
|
||||
|
||||
// Change the draw style to account for the foreground state.
|
||||
void LLFloater::setForeground(BOOL front)
|
||||
void LLFloater::setForeground(bool front)
|
||||
{
|
||||
if (front != mForeground)
|
||||
{
|
||||
|
|
@ -1547,13 +1547,13 @@ void LLFloater::setHost(LLMultiFloater* host)
|
|||
// add tear off button
|
||||
if (mCanTearOff)
|
||||
{
|
||||
mButtonsEnabled[BUTTON_TEAR_OFF] = TRUE;
|
||||
mButtonsEnabled[BUTTON_TEAR_OFF] = true;
|
||||
}
|
||||
}
|
||||
else if (!mHostHandle.isDead() && !host)
|
||||
{
|
||||
mButtonScale = 1.f;
|
||||
//mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE;
|
||||
//mButtonsEnabled[BUTTON_TEAR_OFF] = false;
|
||||
}
|
||||
if (host)
|
||||
{
|
||||
|
|
@ -1588,7 +1588,7 @@ void LLFloater::moveResizeHandlesToFront()
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
BOOL LLFloater::isFrontmost()
|
||||
bool LLFloater::isFrontmost()
|
||||
{
|
||||
LLFloaterView* floater_view = getParentByType<LLFloaterView>();
|
||||
return getVisible()
|
||||
|
|
@ -1596,7 +1596,7 @@ BOOL LLFloater::isFrontmost()
|
|||
&& floater_view->getFrontmost() == this);
|
||||
}
|
||||
|
||||
void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition)
|
||||
void LLFloater::addDependentFloater(LLFloater* floaterp, bool reposition)
|
||||
{
|
||||
mDependents.insert(floaterp->getHandle());
|
||||
floaterp->mDependeeHandle = getHandle();
|
||||
|
|
@ -1606,7 +1606,7 @@ void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition)
|
|||
floaterp->setRect(gFloaterView->findNeighboringPosition(this, floaterp));
|
||||
floaterp->setSnapTarget(getHandle());
|
||||
}
|
||||
gFloaterView->adjustToFitScreen(floaterp, FALSE, TRUE);
|
||||
gFloaterView->adjustToFitScreen(floaterp, false, true);
|
||||
if (floaterp->isFrontmost())
|
||||
{
|
||||
// make sure to bring self and sibling floaters to front
|
||||
|
|
@ -1614,7 +1614,7 @@ void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloater::addDependentFloater(LLHandle<LLFloater> dependent, BOOL reposition)
|
||||
void LLFloater::addDependentFloater(LLHandle<LLFloater> dependent, bool reposition)
|
||||
{
|
||||
LLFloater* dependent_floaterp = dependent.get();
|
||||
if(dependent_floaterp)
|
||||
|
|
@ -1629,7 +1629,7 @@ void LLFloater::removeDependentFloater(LLFloater* floaterp)
|
|||
floaterp->mDependeeHandle = LLHandle<LLFloater>();
|
||||
}
|
||||
|
||||
BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index)
|
||||
bool LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index)
|
||||
{
|
||||
if( mButtonsEnabled[index] )
|
||||
{
|
||||
|
|
@ -1642,10 +1642,10 @@ BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index
|
|||
my_butt->handleMouseDown(local_x, local_y, mask))
|
||||
{
|
||||
// the button handled it
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
|
|
@ -1679,7 +1679,7 @@ bool LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
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;
|
||||
if(offerClickToButton(x, y, mask, BUTTON_SNOOZE)) return true;
|
||||
|
||||
setFrontmost(true, false);
|
||||
// Otherwise pass to drag handle for movement
|
||||
|
|
@ -1741,23 +1741,23 @@ void LLFloater::bringToFront( S32 x, S32 y )
|
|||
|
||||
|
||||
// virtual
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
|
||||
void LLFloater::setVisibleAndFrontmost(bool take_focus,const LLSD& key)
|
||||
{
|
||||
LLUIUsage::instance().logFloater(getInstanceName());
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if (hostp)
|
||||
{
|
||||
hostp->setVisible(TRUE);
|
||||
hostp->setVisible(true);
|
||||
hostp->setFrontmost(take_focus);
|
||||
}
|
||||
else
|
||||
{
|
||||
setVisible(TRUE);
|
||||
setVisible(true);
|
||||
setFrontmost(take_focus);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloater::setFrontmost(BOOL take_focus, BOOL restore)
|
||||
void LLFloater::setFrontmost(bool take_focus, bool restore)
|
||||
{
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if (hostp)
|
||||
|
|
@ -1792,7 +1792,7 @@ void LLFloater::setCanDock(bool b)
|
|||
}
|
||||
else
|
||||
{
|
||||
mButtonsEnabled[BUTTON_DOCK] = FALSE;
|
||||
mButtonsEnabled[BUTTON_DOCK] = false;
|
||||
}
|
||||
}
|
||||
updateTitleButtons();
|
||||
|
|
@ -1807,7 +1807,7 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock)
|
|||
|
||||
if (mDocked)
|
||||
{
|
||||
setMinimized(FALSE);
|
||||
setMinimized(false);
|
||||
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
|
||||
}
|
||||
|
||||
|
|
@ -1849,9 +1849,9 @@ void LLFloater::onClickTearOff(LLFloater* self)
|
|||
new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - floater_header_size - 5, self->getRect().getWidth(), self->getRect().getHeight());
|
||||
self->setRect(new_rect);
|
||||
}
|
||||
gFloaterView->adjustToFitScreen(self, FALSE);
|
||||
gFloaterView->adjustToFitScreen(self, false);
|
||||
// give focus to new window to keep continuity for the user
|
||||
self->setFocus(TRUE);
|
||||
self->setFocus(true);
|
||||
self->setTornOff(true);
|
||||
}
|
||||
else //Attach to parent.
|
||||
|
|
@ -1863,7 +1863,7 @@ void LLFloater::onClickTearOff(LLFloater* self)
|
|||
{
|
||||
self->storeRectControl();
|
||||
}
|
||||
self->setMinimized(FALSE); // to reenable minimize button if it was minimized
|
||||
self->setMinimized(false); // to reenable minimize button if it was minimized
|
||||
new_host->showFloater(self);
|
||||
// make sure host is visible
|
||||
new_host->openFloater(new_host->getKey());
|
||||
|
|
@ -1901,7 +1901,7 @@ void LLFloater::onClickHelp( LLFloater* self )
|
|||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
void LLFloater::setCanSnooze(BOOL can_snooze)
|
||||
void LLFloater::setCanSnooze(bool can_snooze)
|
||||
{
|
||||
mCanSnooze = can_snooze;
|
||||
mButtonsEnabled[BUTTON_SNOOZE] = mCanSnooze;
|
||||
|
|
@ -2039,7 +2039,7 @@ void LLFloater::draw()
|
|||
const LLFontGL* font = LLFontGL::getFontSansSerif();
|
||||
LLRect r = getRect();
|
||||
gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - font->getLineHeight() - 1,
|
||||
titlebar_focus_color % alpha, 0, TRUE);
|
||||
titlebar_focus_color % alpha, 0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2052,13 +2052,13 @@ void LLFloater::draw()
|
|||
{
|
||||
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
|
||||
// is this button a direct descendent and not a nested widget (e.g. checkbox)?
|
||||
BOOL focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this;
|
||||
bool focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this;
|
||||
// only enable default button when current focus is not a button
|
||||
getDefaultButton()->setBorderEnabled(!focus_is_child_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
getDefaultButton()->setBorderEnabled(FALSE);
|
||||
getDefaultButton()->setBorderEnabled(false);
|
||||
}
|
||||
}
|
||||
if (isMinimized())
|
||||
|
|
@ -2067,7 +2067,7 @@ void LLFloater::draw()
|
|||
{
|
||||
drawChild(mButtons[i]);
|
||||
}
|
||||
drawChild(mDragHandle, 0, 0, TRUE);
|
||||
drawChild(mDragHandle, 0, 0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2082,7 +2082,7 @@ void LLFloater::draw()
|
|||
LLFloater* old_host = mLastHostHandle.get();
|
||||
if (!old_host)
|
||||
{
|
||||
setCanTearOff(FALSE);
|
||||
setCanTearOff(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2131,14 +2131,14 @@ void LLFloater::updateTransparency(ETypeTransparency transparency_type)
|
|||
updateTransparency(this, transparency_type);
|
||||
}
|
||||
|
||||
void LLFloater::setCanMinimize(BOOL can_minimize)
|
||||
void LLFloater::setCanMinimize(bool can_minimize)
|
||||
{
|
||||
// if removing minimize/restore button programmatically,
|
||||
// go ahead and unminimize floater
|
||||
mCanMinimize = can_minimize;
|
||||
if (!can_minimize)
|
||||
{
|
||||
setMinimized(FALSE);
|
||||
setMinimized(false);
|
||||
}
|
||||
|
||||
mButtonsEnabled[BUTTON_MINIMIZE] = can_minimize && !isMinimized();
|
||||
|
|
@ -2147,7 +2147,7 @@ void LLFloater::setCanMinimize(BOOL can_minimize)
|
|||
updateTitleButtons();
|
||||
}
|
||||
|
||||
void LLFloater::setCanClose(BOOL can_close)
|
||||
void LLFloater::setCanClose(bool can_close)
|
||||
{
|
||||
mCanClose = can_close;
|
||||
mButtonsEnabled[BUTTON_CLOSE] = can_close;
|
||||
|
|
@ -2155,7 +2155,7 @@ void LLFloater::setCanClose(BOOL can_close)
|
|||
updateTitleButtons();
|
||||
}
|
||||
|
||||
void LLFloater::setCanTearOff(BOOL can_tear_off)
|
||||
void LLFloater::setCanTearOff(bool can_tear_off)
|
||||
{
|
||||
mCanTearOff = can_tear_off;
|
||||
mButtonsEnabled[BUTTON_TEAR_OFF] = mCanTearOff && !mHostHandle.isDead();
|
||||
|
|
@ -2164,23 +2164,23 @@ void LLFloater::setCanTearOff(BOOL can_tear_off)
|
|||
}
|
||||
|
||||
|
||||
void LLFloater::setCanResize(BOOL can_resize)
|
||||
void LLFloater::setCanResize(bool can_resize)
|
||||
{
|
||||
mResizable = can_resize;
|
||||
enableResizeCtrls(can_resize);
|
||||
}
|
||||
|
||||
void LLFloater::setCanDrag(BOOL can_drag)
|
||||
void LLFloater::setCanDrag(bool can_drag)
|
||||
{
|
||||
// if we delete drag handle, we no longer have access to the floater's title
|
||||
// so just enable/disable it
|
||||
if (!can_drag && mDragHandle->getEnabled())
|
||||
{
|
||||
mDragHandle->setEnabled(FALSE);
|
||||
mDragHandle->setEnabled(false);
|
||||
}
|
||||
else if (can_drag && !mDragHandle->getEnabled())
|
||||
{
|
||||
mDragHandle->setEnabled(TRUE);
|
||||
mDragHandle->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2264,14 +2264,14 @@ void LLFloater::updateTitleButtons()
|
|||
buttons_rect.mLeft = btn_rect.mLeft;
|
||||
}
|
||||
mButtons[i]->setRect(btn_rect);
|
||||
mButtons[i]->setVisible(TRUE);
|
||||
mButtons[i]->setVisible(true);
|
||||
// the restore button should have a tab stop so that it takes action when you Ctrl-Tab to a minimized floater
|
||||
mButtons[i]->setTabStop(i == BUTTON_RESTORE);
|
||||
sendChildToFront(mButtons[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
mButtons[i]->setVisible(FALSE);
|
||||
mButtons[i]->setVisible(false);
|
||||
}
|
||||
}
|
||||
if (mDragHandle)
|
||||
|
|
@ -2513,7 +2513,7 @@ static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view");
|
|||
|
||||
LLFloaterView::LLFloaterView (const Params& p)
|
||||
: LLUICtrl (p),
|
||||
mFocusCycleMode(FALSE),
|
||||
mFocusCycleMode(false),
|
||||
mMinimizePositionVOffset(0),
|
||||
mSnapOffsetBottom(0),
|
||||
mSnapOffsetChatBar(0),
|
||||
|
|
@ -2524,7 +2524,7 @@ LLFloaterView::LLFloaterView (const Params& p)
|
|||
}
|
||||
|
||||
// By default, adjust vertical.
|
||||
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLFloaterView::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLView::reshape(width, height, called_from_parent);
|
||||
|
||||
|
|
@ -2594,7 +2594,7 @@ void LLFloaterView::restoreAll()
|
|||
LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
|
||||
if (floaterp)
|
||||
{
|
||||
floaterp->setMinimized(FALSE);
|
||||
floaterp->setMinimized(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2669,7 +2669,7 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF
|
|||
}
|
||||
|
||||
|
||||
void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore)
|
||||
void LLFloaterView::bringToFront(LLFloater* child, bool give_focus, bool restore)
|
||||
{
|
||||
if (!child)
|
||||
return;
|
||||
|
|
@ -2678,7 +2678,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
|
|||
{
|
||||
if (give_focus && !gFocusMgr.childHasKeyboardFocus(child))
|
||||
{
|
||||
child->setFocus(TRUE);
|
||||
child->setFocus(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -2731,7 +2731,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
|
|||
// always unminimize dependee, but allow dependents to stay minimized
|
||||
if (!floaterp->isDependent())
|
||||
{
|
||||
floaterp->setMinimized(FALSE);
|
||||
floaterp->setMinimized(false);
|
||||
}
|
||||
}
|
||||
floaters_to_move.clear();
|
||||
|
|
@ -2756,12 +2756,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
|
|||
|
||||
if(restore)
|
||||
{
|
||||
child->setMinimized(FALSE);
|
||||
child->setMinimized(false);
|
||||
}
|
||||
|
||||
if (give_focus && !gFocusMgr.childHasKeyboardFocus(child))
|
||||
{
|
||||
child->setFocus(TRUE);
|
||||
child->setFocus(true);
|
||||
// floater did not take focus, so relinquish focus to world
|
||||
if (!child->hasFocus())
|
||||
{
|
||||
|
|
@ -2782,7 +2782,7 @@ void LLFloaterView::highlightFocusedFloater()
|
|||
continue;
|
||||
}
|
||||
|
||||
BOOL floater_or_dependent_has_focus = gFocusMgr.childHasKeyboardFocus(floater);
|
||||
bool floater_or_dependent_has_focus = gFocusMgr.childHasKeyboardFocus(floater);
|
||||
for(LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin();
|
||||
dependent_it != floater->mDependents.end();
|
||||
++dependent_it)
|
||||
|
|
@ -2790,7 +2790,7 @@ void LLFloaterView::highlightFocusedFloater()
|
|||
LLFloater* dependent_floaterp = dependent_it->get();
|
||||
if (dependent_floaterp && gFocusMgr.childHasKeyboardFocus(dependent_floaterp))
|
||||
{
|
||||
floater_or_dependent_has_focus = TRUE;
|
||||
floater_or_dependent_has_focus = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2836,7 +2836,7 @@ void LLFloaterView::unhighlightFocusedFloater()
|
|||
{
|
||||
LLFloater *floater = (LLFloater *)(*child_it);
|
||||
|
||||
floater->setForeground(FALSE);
|
||||
floater->setForeground(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2845,7 +2845,7 @@ void LLFloaterView::focusFrontFloater()
|
|||
LLFloater* floaterp = getFrontmost();
|
||||
if (floaterp)
|
||||
{
|
||||
floaterp->setFocus(TRUE);
|
||||
floaterp->setFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2871,7 +2871,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
|
|||
col < snap_rect_local.getWidth() - minimized_width;
|
||||
col += minimized_width)
|
||||
{
|
||||
bool foundGap = TRUE;
|
||||
bool foundGap = true;
|
||||
for(child_list_const_iter_t child_it = getChildList()->begin();
|
||||
child_it != getChildList()->end();
|
||||
++child_it) //loop floaters
|
||||
|
|
@ -2891,7 +2891,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
|
|||
{
|
||||
// needs the check for off grid. can't drag,
|
||||
// but window resize makes them off
|
||||
foundGap = FALSE;
|
||||
foundGap = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2930,7 +2930,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
|
|||
row -= floater_header_size ) //loop rows
|
||||
{
|
||||
|
||||
bool foundGap = TRUE;
|
||||
bool foundGap = true;
|
||||
for(child_list_const_iter_t child_it = getChildList()->begin();
|
||||
child_it != getChildList()->end();
|
||||
++child_it) //loop floaters
|
||||
|
|
@ -2947,7 +2947,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
|
|||
{
|
||||
// needs the check for off grid. can't drag,
|
||||
// but window resize makes them off
|
||||
foundGap = FALSE;
|
||||
foundGap = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -3051,7 +3051,7 @@ void LLFloaterView::showHiddenFloaters()
|
|||
mHiddenFloaters.clear();
|
||||
}
|
||||
|
||||
BOOL LLFloaterView::allChildrenClosed()
|
||||
bool LLFloaterView::allChildrenClosed()
|
||||
{
|
||||
// see if there are any visible floaters (some floaters "close"
|
||||
// by setting themselves invisible)
|
||||
|
|
@ -3091,7 +3091,7 @@ void LLFloaterView::refresh()
|
|||
LLRect snap_rect = getSnapRect();
|
||||
if (snap_rect != mLastSnapRect)
|
||||
{
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
|
||||
reshape(getRect().getWidth(), getRect().getHeight(), true);
|
||||
}
|
||||
}// <FS:KC> Fix for bad edge snapping
|
||||
|
||||
|
|
@ -3107,7 +3107,7 @@ void LLFloaterView::refresh()
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars/* = false*/)
|
||||
void LLFloaterView::adjustToFitScreen(LLFloater* floater, bool allow_partial_outside, bool snap_in_toolbars/* = false*/)
|
||||
{
|
||||
if (floater->getParent() != this)
|
||||
{
|
||||
|
|
@ -3334,7 +3334,7 @@ void LLFloaterView::syncFloaterTabOrder()
|
|||
|
||||
if( !gFocusMgr.childHasKeyboardFocus( modal_dialog ) )
|
||||
{
|
||||
modal_dialog->setFocus(TRUE);
|
||||
modal_dialog->setFocus(true);
|
||||
}
|
||||
|
||||
if( !gFocusMgr.childHasMouseCapture( modal_dialog ) )
|
||||
|
|
@ -3350,7 +3350,7 @@ void LLFloaterView::syncFloaterTabOrder()
|
|||
LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
|
||||
if (gFocusMgr.childHasKeyboardFocus(floaterp))
|
||||
{
|
||||
bringToFront(floaterp, FALSE);
|
||||
bringToFront(floaterp, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -3390,7 +3390,7 @@ S32 LLFloaterView::getZOrder(LLFloater* child)
|
|||
return rv;
|
||||
}
|
||||
|
||||
void LLFloaterView::pushVisibleAll(BOOL visible, const skip_list_t& skip_list)
|
||||
void LLFloaterView::pushVisibleAll(bool visible, const skip_list_t& skip_list)
|
||||
{
|
||||
for (child_list_const_iter_t child_iter = getChildList()->begin();
|
||||
child_iter != getChildList()->end(); ++child_iter)
|
||||
|
|
@ -3642,7 +3642,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
setupParamsForExport(output_params, parent);
|
||||
output_node->setName(node->getName()->mString);
|
||||
parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLUICtrlFactory::instance().pushFileName(xml_filename);
|
||||
|
|
@ -3651,7 +3651,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
{
|
||||
LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
Params referenced_params;
|
||||
|
|
@ -3721,7 +3721,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
setRect(rect);
|
||||
}
|
||||
|
||||
BOOL result;
|
||||
bool result;
|
||||
result = postBuild();
|
||||
|
||||
if (!result)
|
||||
|
|
@ -3730,7 +3730,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
}
|
||||
|
||||
applyRectControl(); // If we have a saved rect control, apply it
|
||||
gFloaterView->adjustToFitScreen(this, FALSE); // Floaters loaded from XML should all fit on screen
|
||||
gFloaterView->adjustToFitScreen(this, false); // Floaters loaded from XML should all fit on screen
|
||||
|
||||
moveResizeHandlesToFront();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,20 +46,20 @@ class LLMultiFloater;
|
|||
class LLFloater;
|
||||
|
||||
|
||||
const BOOL RESIZE_YES = TRUE;
|
||||
const BOOL RESIZE_NO = FALSE;
|
||||
const bool RESIZE_YES = true;
|
||||
const bool RESIZE_NO = false;
|
||||
|
||||
const BOOL DRAG_ON_TOP = FALSE;
|
||||
const BOOL DRAG_ON_LEFT = TRUE;
|
||||
const bool DRAG_ON_TOP = false;
|
||||
const bool DRAG_ON_LEFT = true;
|
||||
|
||||
const BOOL MINIMIZE_YES = TRUE;
|
||||
const BOOL MINIMIZE_NO = FALSE;
|
||||
const bool MINIMIZE_YES = true;
|
||||
const bool MINIMIZE_NO = false;
|
||||
|
||||
const BOOL CLOSE_YES = TRUE;
|
||||
const BOOL CLOSE_NO = FALSE;
|
||||
const bool CLOSE_YES = true;
|
||||
const bool CLOSE_NO = false;
|
||||
|
||||
const BOOL ADJUST_VERTICAL_YES = TRUE;
|
||||
const BOOL ADJUST_VERTICAL_NO = FALSE;
|
||||
const bool ADJUST_VERTICAL_YES = true;
|
||||
const bool ADJUST_VERTICAL_NO = false;
|
||||
|
||||
namespace LLFloaterEnums
|
||||
{
|
||||
|
|
@ -229,13 +229,13 @@ public:
|
|||
bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
|
||||
|
||||
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
|
||||
/*virtual*/ BOOL canSnapTo(const LLView* other_view);
|
||||
/*virtual*/ bool canSnapTo(const LLView* other_view);
|
||||
/*virtual*/ void setSnappedTo(const LLView* snap_view);
|
||||
/*virtual*/ void setFocus( BOOL b );
|
||||
/*virtual*/ void setIsChrome(BOOL is_chrome);
|
||||
/*virtual*/ void setFocus( bool b );
|
||||
/*virtual*/ void setIsChrome(bool is_chrome);
|
||||
/*virtual*/ void setRect(const LLRect &rect);
|
||||
void setIsSingleInstance(BOOL is_single_instance);
|
||||
BOOL getIsSingleInstance() { return mSingleInstance; }
|
||||
void setIsSingleInstance(bool is_single_instance);
|
||||
bool getIsSingleInstance() { return mSingleInstance; }
|
||||
|
||||
void initFloater(const Params& p);
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ public:
|
|||
// Close the floater or its host. Use when hidding or toggling a floater instance.
|
||||
virtual void closeHostedFloater();
|
||||
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
// Release keyboard and mouse focus
|
||||
void releaseFocus();
|
||||
|
|
@ -264,13 +264,13 @@ public:
|
|||
std::string getTitle() const;
|
||||
void setShortTitle( const std::string& short_title );
|
||||
std::string getShortTitle() const;
|
||||
virtual void setMinimized(BOOL b);
|
||||
virtual void setMinimized(bool b);
|
||||
void moveResizeHandlesToFront();
|
||||
void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE);
|
||||
void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE);
|
||||
void addDependentFloater(LLFloater* dependent, bool reposition = true);
|
||||
void addDependentFloater(LLHandle<LLFloater> dependent_handle, bool reposition = true);
|
||||
LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); }
|
||||
void removeDependentFloater(LLFloater* dependent);
|
||||
BOOL isMinimized() const { return mMinimized; }
|
||||
bool isMinimized() const { return mMinimized; }
|
||||
/// isShown() differs from getVisible() in that isShown() also considers
|
||||
/// isMinimized(). isShown() is true only if visible and not minimized.
|
||||
bool isShown() const;
|
||||
|
|
@ -279,18 +279,18 @@ public:
|
|||
static bool isShown(const LLFloater* floater);
|
||||
static bool isVisible(const LLFloater* floater);
|
||||
static bool isMinimized(const LLFloater* floater);
|
||||
BOOL isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts
|
||||
virtual BOOL isFrontmost();
|
||||
BOOL isDependent() { return !mDependeeHandle.isDead(); }
|
||||
void setCanMinimize(BOOL can_minimize);
|
||||
void setCanClose(BOOL can_close);
|
||||
void setCanTearOff(BOOL can_tear_off);
|
||||
virtual void setCanResize(BOOL can_resize);
|
||||
void setCanDrag(BOOL can_drag);
|
||||
bool isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts
|
||||
virtual bool isFrontmost();
|
||||
bool isDependent() { return !mDependeeHandle.isDead(); }
|
||||
void setCanMinimize(bool can_minimize);
|
||||
void setCanClose(bool can_close);
|
||||
void setCanTearOff(bool can_tear_off);
|
||||
virtual void setCanResize(bool can_resize);
|
||||
void setCanDrag(bool can_drag);
|
||||
bool getCanDrag();
|
||||
void setCanSnooze(BOOL can_snooze); // <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
void setCanSnooze(bool can_snooze); // <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
void setHost(LLMultiFloater* host);
|
||||
BOOL isResizable() const { return mResizable; }
|
||||
bool isResizable() const { return mResizable; }
|
||||
void setResizeLimits( S32 min_width, S32 min_height );
|
||||
void getResizeLimits( S32* min_width, S32* min_height ) { *min_width = mMinWidth; *min_height = mMinHeight; }
|
||||
|
||||
|
|
@ -321,16 +321,16 @@ public:
|
|||
|
||||
// This cannot be "const" until all derived floater canClose()
|
||||
// methods are const as well. JC
|
||||
virtual BOOL canClose() { return TRUE; }
|
||||
virtual bool canClose() { return true; }
|
||||
|
||||
/*virtual*/ void setVisible(BOOL visible); // do not override
|
||||
/*virtual*/ void onVisibilityChange ( BOOL new_visibility ); // do not override
|
||||
/*virtual*/ void setVisible(bool visible); // do not override
|
||||
/*virtual*/ void onVisibilityChange ( bool new_visibility ); // do not override
|
||||
|
||||
void setFrontmost(BOOL take_focus = TRUE, BOOL restore = TRUE);
|
||||
virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
|
||||
void setFrontmost(bool take_focus = true, bool restore = true);
|
||||
virtual void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD());
|
||||
|
||||
// Defaults to false.
|
||||
virtual BOOL canSaveAs() const { return FALSE; }
|
||||
virtual bool canSaveAs() const { return false; }
|
||||
|
||||
virtual void saveAs() {}
|
||||
|
||||
|
|
@ -409,8 +409,8 @@ protected:
|
|||
void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized
|
||||
const LLRect& getExpandedRect() const { return mExpandedRect; }
|
||||
|
||||
void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened
|
||||
BOOL getAutoFocus() const { return mAutoFocus; }
|
||||
void setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened
|
||||
bool getAutoFocus() const { return mAutoFocus; }
|
||||
LLDragHandle* getDragHandle() const { return mDragHandle; }
|
||||
|
||||
void destroy(); // Don't call this directly. You probably want to call closeFloater()
|
||||
|
|
@ -429,7 +429,7 @@ protected:
|
|||
F32 contex_cone_out_alpha = CONTEXT_CONE_OUT_ALPHA);
|
||||
|
||||
private:
|
||||
void setForeground(BOOL b); // called only by floaterview
|
||||
void setForeground(bool b); // called only by floaterview
|
||||
void cleanupHandles(); // remove handles to dead floaters
|
||||
void createMinimizeButton();
|
||||
void buildButtons(const Params& p);
|
||||
|
|
@ -446,7 +446,7 @@ private:
|
|||
*/
|
||||
static std::string getButtonTooltip(const Params& p, EFloaterButton e, bool is_chrome);
|
||||
|
||||
BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);
|
||||
bool offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);
|
||||
void addResizeCtrls();
|
||||
void layoutResizeCtrls();
|
||||
void addDragHandle();
|
||||
|
|
@ -495,20 +495,20 @@ private:
|
|||
LLUIString mTitle;
|
||||
LLUIString mShortTitle;
|
||||
|
||||
BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater
|
||||
bool mSingleInstance; // true if there is only ever one instance of the floater
|
||||
bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it
|
||||
bool mIsReuseInitialized; // true if mReuseInstance already set from parameters
|
||||
// <FS:Ansariel> Make this accessible from child classes
|
||||
//std::string mInstanceName; // Store the instance name so we can remove ourselves from the list
|
||||
|
||||
BOOL mDropShadow; // ## Zi: Optional Drop Shadows
|
||||
bool mDropShadow; // ## Zi: Optional Drop Shadows
|
||||
S32 mLabelVPadding; // <FS:Zi> Make vertical label padding a per-skin option
|
||||
BOOL mCanTearOff;
|
||||
BOOL mCanMinimize;
|
||||
BOOL mCanClose;
|
||||
BOOL mDragOnLeft;
|
||||
BOOL mResizable;
|
||||
BOOL mCanSnooze; // <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
bool mCanTearOff;
|
||||
bool mCanMinimize;
|
||||
bool mCanClose;
|
||||
bool mDragOnLeft;
|
||||
bool mResizable;
|
||||
bool mCanSnooze; // <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
|
||||
LLFloaterEnums::EOpenPositioning mPositioning;
|
||||
LLCoordFloater mPosition;
|
||||
|
|
@ -518,12 +518,12 @@ private:
|
|||
S32 mHeaderHeight; // height in pixels of header for title, drag bar
|
||||
S32 mLegacyHeaderHeight;// HACK see initFloaterXML()
|
||||
|
||||
BOOL mMinimized;
|
||||
BOOL mForeground;
|
||||
bool mMinimized;
|
||||
bool mForeground;
|
||||
LLHandle<LLFloater> mDependeeHandle;
|
||||
|
||||
|
||||
BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible.
|
||||
bool mFirstLook; // true if the _next_ time this floater is visible will be the first time in the session that it is visible.
|
||||
|
||||
typedef std::set<LLHandle<LLFloater> > handle_set_t;
|
||||
typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t;
|
||||
|
|
@ -531,7 +531,7 @@ private:
|
|||
|
||||
bool mButtonsEnabled[BUTTON_COUNT];
|
||||
F32 mButtonScale;
|
||||
BOOL mAutoFocus;
|
||||
bool mAutoFocus;
|
||||
LLHandle<LLFloater> mSnappedTo;
|
||||
|
||||
LLHandle<LLFloater> mHostHandle;
|
||||
|
|
@ -542,7 +542,7 @@ private:
|
|||
bool mTornOff;
|
||||
|
||||
static LLMultiFloater* sHostp;
|
||||
static BOOL sQuitting;
|
||||
static bool sQuitting;
|
||||
static std::string sButtonNames[BUTTON_COUNT];
|
||||
static std::string sButtonToolTips[BUTTON_COUNT];
|
||||
static std::string sButtonToolTipsIndex[BUTTON_COUNT];
|
||||
|
|
@ -550,7 +550,7 @@ private:
|
|||
typedef void(*click_callback)(LLFloater*);
|
||||
static click_callback sButtonCallbacks[BUTTON_COUNT];
|
||||
|
||||
BOOL mHasBeenDraggedWhileMinimized;
|
||||
bool mHasBeenDraggedWhileMinimized;
|
||||
S32 mPreviousMinimizedBottom;
|
||||
S32 mPreviousMinimizedLeft;
|
||||
|
||||
|
|
@ -579,7 +579,7 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ LLRect getSnapRect() const;
|
||||
/*virtual*/ void refresh();
|
||||
|
|
@ -587,25 +587,25 @@ public:
|
|||
LLRect findNeighboringPosition( LLFloater* reference_floater, LLFloater* neighbor );
|
||||
|
||||
// Given a child of gFloaterView, make sure this view can fit entirely onscreen.
|
||||
void adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars = false);
|
||||
void adjustToFitScreen(LLFloater* floater, bool allow_partial_outside, bool snap_in_toolbars = false);
|
||||
|
||||
void setMinimizePositionVerticalOffset(S32 offset) { mMinimizePositionVOffset = offset; }
|
||||
void getMinimizePosition( S32 *left, S32 *bottom);
|
||||
void restoreAll(); // un-minimize all floaters
|
||||
typedef std::set<LLView*> skip_list_t;
|
||||
void pushVisibleAll(BOOL visible, const skip_list_t& skip_list = skip_list_t());
|
||||
void pushVisibleAll(bool visible, const skip_list_t& skip_list = skip_list_t());
|
||||
void popVisibleAll(const skip_list_t& skip_list = skip_list_t());
|
||||
|
||||
void setCycleMode(BOOL mode) { mFocusCycleMode = mode; }
|
||||
BOOL getCycleMode() const { return mFocusCycleMode; }
|
||||
void bringToFront( LLFloater* child, BOOL give_focus = TRUE, BOOL restore = TRUE );
|
||||
void setCycleMode(bool mode) { mFocusCycleMode = mode; }
|
||||
bool getCycleMode() const { return mFocusCycleMode; }
|
||||
void bringToFront( LLFloater* child, bool give_focus = true, bool restore = true );
|
||||
void highlightFocusedFloater();
|
||||
void unhighlightFocusedFloater();
|
||||
void focusFrontFloater();
|
||||
void destroyAllChildren();
|
||||
// attempt to close all floaters
|
||||
void closeAllChildren(bool app_quitting);
|
||||
BOOL allChildrenClosed();
|
||||
bool allChildrenClosed();
|
||||
void shiftFloaters(S32 x_offset, S32 y_offset);
|
||||
|
||||
void hideAllFloaters();
|
||||
|
|
@ -650,7 +650,7 @@ private:
|
|||
LLRect mToolbarBottomRect;
|
||||
LLRect mToolbarRightRect;
|
||||
LLHandle<LLView> mSnapView;
|
||||
BOOL mFocusCycleMode;
|
||||
bool mFocusCycleMode;
|
||||
S32 mSnapOffsetBottom;
|
||||
S32 mSnapOffsetChatBar; // <FS:KC> Fix for bad edge snapping
|
||||
S32 mSnapOffsetLeft; // <FS:KC> Fix for bad edge snapping
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ bool LLFloaterReg::canShowInstance(const std::string& name, const LLSD& key)
|
|||
// [/RLVa:KB]
|
||||
|
||||
//static
|
||||
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
|
||||
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
|
||||
{
|
||||
// if( sBlockShowFloaters
|
||||
// // see EXT-7090
|
||||
|
|
@ -322,7 +322,7 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key,
|
|||
LL_INFOS() << "show instance for refreshing group ID: " << key.asString() << LL_ENDL;
|
||||
instance->openFloater(key);
|
||||
if (focus)
|
||||
instance->setFocus(TRUE);
|
||||
instance->setFocus(true);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
|
|||
}
|
||||
else
|
||||
{
|
||||
return showInstance(name, key, TRUE) ? true : false;
|
||||
return showInstance(name, key, true) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ void LLFloaterReg::showInitialVisibleInstances()
|
|||
std::string controlname = getVisibilityControlName(name);
|
||||
if (LLFloater::getControlGroup()->controlExists(controlname))
|
||||
{
|
||||
BOOL isvis = LLFloater::getControlGroup()->getBOOL(controlname);
|
||||
bool isvis = LLFloater::getControlGroup()->getBOOL(controlname);
|
||||
if (isvis)
|
||||
{
|
||||
// <FS:Ansariel> Set correct window transparency at login
|
||||
|
|
@ -399,7 +399,7 @@ void LLFloaterReg::hideVisibleInstances(const std::set<std::string>& exceptions)
|
|||
for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
|
||||
{
|
||||
LLFloater* floater = *iter;
|
||||
floater->pushVisible(FALSE);
|
||||
floater->pushVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -476,7 +476,7 @@ std::string LLFloaterReg::getBaseControlName(const std::string& name)
|
|||
std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
|
||||
{
|
||||
std::string controlname = getVisibilityControlName(name);
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, FALSE,
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, false,
|
||||
llformat("Window Visibility for %s", name.c_str()),
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
|
|
@ -486,7 +486,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
|
|||
std::string LLFloaterReg::declareDockStateControl(const std::string& name)
|
||||
{
|
||||
std::string controlname = getDockStateControlName(name);
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, TRUE,
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, true,
|
||||
llformat("Window Docking state for %s", name.c_str()),
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
|
|
@ -566,7 +566,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
//if (host->isMinimized() || !host->isShown() || !host->isFrontmost())
|
||||
if (host->isMinimized() || !host->isShown() || (!host->hasFocus() || !host->isFrontmost()))
|
||||
{
|
||||
host->setMinimized(FALSE);
|
||||
host->setMinimized(false);
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
|
|
@ -574,7 +574,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
{
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
instance->setFocus(TRUE);
|
||||
instance->setFocus(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -585,7 +585,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
{
|
||||
if (instance->isMinimized())
|
||||
{
|
||||
instance->setMinimized(FALSE);
|
||||
instance->setMinimized(false);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else if (!instance->isShown())
|
||||
|
|
@ -628,7 +628,7 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke
|
|||
{
|
||||
if (host->isMinimized() || !host->isShown() || !host->isFrontmost())
|
||||
{
|
||||
host->setMinimized(FALSE);
|
||||
host->setMinimized(false);
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
|
|
@ -636,14 +636,14 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke
|
|||
{
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
instance->setFocus(TRUE);
|
||||
instance->setFocus(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (instance->isMinimized())
|
||||
{
|
||||
instance->setMinimized(FALSE);
|
||||
instance->setMinimized(false);
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else if (!instance->isShown())
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public:
|
|||
static bool canShowInstance(const std::string& name, const LLSD& key = LLSD());
|
||||
// [/RLVa:KB]
|
||||
// return NULL if instance not found or can't create instance (no builder)
|
||||
static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE);
|
||||
static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false);
|
||||
// Close a floater (may destroy or set invisible)
|
||||
// return false if can't find instance
|
||||
static bool hideInstance(const std::string& name, const LLSD& key = LLSD());
|
||||
|
|
@ -174,7 +174,7 @@ public:
|
|||
}
|
||||
|
||||
template <class T>
|
||||
static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE)
|
||||
static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false)
|
||||
{
|
||||
return dynamic_cast<T*>(showInstance(name, key, focus));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
|
|||
|
||||
LLFlyoutButton::LLFlyoutButton(const Params& p)
|
||||
: LLComboBox(p),
|
||||
mToggleState(FALSE),
|
||||
mToggleState(false),
|
||||
mActionButton(NULL)
|
||||
{
|
||||
// Always use text box
|
||||
|
|
@ -69,7 +69,7 @@ void LLFlyoutButton::draw()
|
|||
LLComboBox::draw();
|
||||
}
|
||||
|
||||
void LLFlyoutButton::setToggleState(BOOL state)
|
||||
void LLFlyoutButton::setToggleState(bool state)
|
||||
{
|
||||
mToggleState = state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ protected:
|
|||
public:
|
||||
virtual void draw();
|
||||
|
||||
void setToggleState(BOOL state);
|
||||
void setToggleState(bool state);
|
||||
|
||||
void onActionButtonClick(const LLSD& data);
|
||||
|
||||
protected:
|
||||
LLButton* mActionButton;
|
||||
BOOL mToggleState;
|
||||
bool mToggleState;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLYOUTBUTTON_H
|
||||
|
|
|
|||
|
|
@ -41,21 +41,21 @@ LLFocusableElement::LLFocusableElement()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFocusableElement::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
||||
bool LLFocusableElement::handleKey(KEY key, MASK mask, bool called_from_parent)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFocusableElement::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent)
|
||||
bool LLFocusableElement::handleKeyUp(KEY key, MASK mask, bool called_from_parent)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFocusableElement::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
|
||||
bool LLFocusableElement::handleUnicodeChar(llwchar uni_char, bool called_from_parent)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -96,12 +96,12 @@ void LLFocusableElement::onTopLost()
|
|||
if (mTopLostCallback) (*mTopLostCallback)(this);
|
||||
}
|
||||
|
||||
BOOL LLFocusableElement::hasFocus() const
|
||||
bool LLFocusableElement::hasFocus() const
|
||||
{
|
||||
return gFocusMgr.getKeyboardFocus() == this;
|
||||
}
|
||||
|
||||
void LLFocusableElement::setFocus(BOOL b)
|
||||
void LLFocusableElement::setFocus(bool b)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -149,9 +149,9 @@ LLFocusMgr::LLFocusMgr()
|
|||
mKeyboardFocus( NULL ),
|
||||
mLastKeyboardFocus( NULL ),
|
||||
mDefaultKeyboardFocus( NULL ),
|
||||
mKeystrokesOnly(FALSE),
|
||||
mKeystrokesOnly(false),
|
||||
mTopCtrl( NULL ),
|
||||
mAppHasFocus(TRUE), // Macs don't seem to notify us that we've gotten focus, so default to true
|
||||
mAppHasFocus(true), // Macs don't seem to notify us that we've gotten focus, so default to true
|
||||
mImpl(new LLFocusMgr::Impl)
|
||||
{
|
||||
}
|
||||
|
|
@ -186,7 +186,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view )
|
|||
LLUI::getInstance()->removePopup(view);
|
||||
}
|
||||
|
||||
void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL keystrokes_only)
|
||||
void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, bool lock, bool keystrokes_only)
|
||||
{
|
||||
// notes if keyboard focus is changed again (by onFocusLost/onFocusReceived)
|
||||
// making the rest of our processing unnecessary since it will already be
|
||||
|
|
@ -269,7 +269,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL
|
|||
// releasing keyboard focus, move to the default.
|
||||
if (mDefaultKeyboardFocus != NULL && mKeyboardFocus == NULL)
|
||||
{
|
||||
mDefaultKeyboardFocus->setFocus(TRUE);
|
||||
mDefaultKeyboardFocus->setFocus(true);
|
||||
}
|
||||
|
||||
LLView* focus_subtree = dynamic_cast<LLView*>(mKeyboardFocus);
|
||||
|
|
@ -301,23 +301,23 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL
|
|||
}
|
||||
|
||||
|
||||
// Returns TRUE is parent or any descedent of parent has keyboard focus.
|
||||
BOOL LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const
|
||||
// Returns true is parent or any descedent of parent has keyboard focus.
|
||||
bool LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const
|
||||
{
|
||||
LLView* focus_view = dynamic_cast<LLView*>(mKeyboardFocus);
|
||||
while( focus_view )
|
||||
{
|
||||
if( focus_view == parent )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
focus_view = focus_view->getParent();
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns TRUE is parent or any descedent of parent is the mouse captor.
|
||||
BOOL LLFocusMgr::childHasMouseCapture( const LLView* parent ) const
|
||||
// Returns true is parent or any descedent of parent is the mouse captor.
|
||||
bool LLFocusMgr::childHasMouseCapture( const LLView* parent ) const
|
||||
{
|
||||
if( mMouseCaptor && dynamic_cast<LLView*>(mMouseCaptor) != NULL )
|
||||
{
|
||||
|
|
@ -326,12 +326,12 @@ BOOL LLFocusMgr::childHasMouseCapture( const LLView* parent ) const
|
|||
{
|
||||
if( captor_view == parent )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
captor_view = captor_view->getParent();
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus )
|
||||
|
|
@ -400,18 +400,18 @@ void LLFocusMgr::removeMouseCaptureWithoutCallback( const LLMouseHandler* captor
|
|||
}
|
||||
|
||||
|
||||
BOOL LLFocusMgr::childIsTopCtrl( const LLView* parent ) const
|
||||
bool LLFocusMgr::childIsTopCtrl( const LLView* parent ) const
|
||||
{
|
||||
LLView* top_view = (LLView*)mTopCtrl;
|
||||
while( top_view )
|
||||
{
|
||||
if( top_view == parent )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
top_view = top_view->getParent();
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -471,7 +471,7 @@ void LLFocusMgr::triggerFocusFlash()
|
|||
mFocusFlashTimer.reset();
|
||||
}
|
||||
|
||||
void LLFocusMgr::setAppHasFocus(BOOL focus)
|
||||
void LLFocusMgr::setAppHasFocus(bool focus)
|
||||
{
|
||||
if (!mAppHasFocus && focus)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ public:
|
|||
LLFocusableElement();
|
||||
virtual ~LLFocusableElement();
|
||||
|
||||
virtual void setFocus( BOOL b );
|
||||
virtual BOOL hasFocus() const;
|
||||
virtual void setFocus( bool b );
|
||||
virtual bool hasFocus() const;
|
||||
|
||||
typedef boost::signals2::signal<void(LLFocusableElement*)> focus_signal_t;
|
||||
|
||||
|
|
@ -56,9 +56,9 @@ public:
|
|||
boost::signals2::connection setTopLostCallback(const focus_signal_t::slot_type& cb);
|
||||
|
||||
// These were brought up the hierarchy from LLView so that we don't have to use dynamic_cast when dealing with keyboard focus.
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
|
||||
virtual bool handleKey(KEY key, MASK mask, bool called_from_parent);
|
||||
virtual bool handleKeyUp(KEY key, MASK mask, bool called_from_parent);
|
||||
virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent);
|
||||
|
||||
/**
|
||||
* If true this LLFocusableElement wants to receive KEYUP and KEYDOWN messages
|
||||
|
|
@ -89,23 +89,23 @@ public:
|
|||
void setMouseCapture(LLMouseHandler* new_captor); // new_captor = NULL to release the mouse.
|
||||
LLMouseHandler* getMouseCapture() const { return mMouseCaptor; }
|
||||
void removeMouseCaptureWithoutCallback( const LLMouseHandler* captor );
|
||||
BOOL childHasMouseCapture( const LLView* parent ) const;
|
||||
bool childHasMouseCapture( const LLView* parent ) const;
|
||||
|
||||
// Keyboard Focus
|
||||
void setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock = FALSE, BOOL keystrokes_only = FALSE); // new_focus = NULL to release the focus.
|
||||
void setKeyboardFocus(LLFocusableElement* new_focus, bool lock = false, bool keystrokes_only = false); // new_focus = NULL to release the focus.
|
||||
LLFocusableElement* getKeyboardFocus() const { return mKeyboardFocus; }
|
||||
LLFocusableElement* getLastKeyboardFocus() const { return mLastKeyboardFocus; }
|
||||
BOOL childHasKeyboardFocus( const LLView* parent ) const;
|
||||
bool childHasKeyboardFocus( const LLView* parent ) const;
|
||||
void removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus );
|
||||
BOOL getKeystrokesOnly() { return mKeystrokesOnly; }
|
||||
void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; }
|
||||
bool getKeystrokesOnly() { return mKeystrokesOnly; }
|
||||
void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; }
|
||||
|
||||
F32 getFocusFlashAmt() const;
|
||||
S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); }
|
||||
LLColor4 getFocusColor() const;
|
||||
void triggerFocusFlash();
|
||||
BOOL getAppHasFocus() const { return mAppHasFocus; }
|
||||
void setAppHasFocus(BOOL focus);
|
||||
bool getAppHasFocus() const { return mAppHasFocus; }
|
||||
void setAppHasFocus(bool focus);
|
||||
LLView* getLastFocusForGroup(LLView* subtree_root) const;
|
||||
void clearLastFocusForGroup(LLView* subtree_root);
|
||||
|
||||
|
|
@ -119,13 +119,13 @@ public:
|
|||
void setTopCtrl(LLUICtrl* new_top);
|
||||
LLUICtrl* getTopCtrl() const { return mTopCtrl; }
|
||||
void removeTopCtrlWithoutCallback( const LLUICtrl* top_view );
|
||||
BOOL childIsTopCtrl( const LLView* parent ) const;
|
||||
bool childIsTopCtrl( const LLView* parent ) const;
|
||||
|
||||
// All Three
|
||||
void releaseFocusIfNeeded( LLView* top_view );
|
||||
void lockFocus();
|
||||
void unlockFocus();
|
||||
BOOL focusLocked() const { return mLockedView != NULL; }
|
||||
bool focusLocked() const { return mLockedView != NULL; }
|
||||
|
||||
bool keyboardFocusHasAccelerators() const;
|
||||
|
||||
|
|
@ -141,14 +141,14 @@ private:
|
|||
LLFocusableElement* mKeyboardFocus; // Keyboard events are preemptively routed to this object
|
||||
LLFocusableElement* mLastKeyboardFocus; // who last had focus
|
||||
LLFocusableElement* mDefaultKeyboardFocus;
|
||||
BOOL mKeystrokesOnly;
|
||||
bool mKeystrokesOnly;
|
||||
|
||||
// Top View
|
||||
LLUICtrl* mTopCtrl;
|
||||
|
||||
LLFrameTimer mFocusFlashTimer;
|
||||
|
||||
BOOL mAppHasFocus;
|
||||
bool mAppHasFocus;
|
||||
|
||||
Impl * mImpl;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ F32 LLFolderView::sAutoOpenTime = 1.f;
|
|||
class LLCloseAllFoldersFunctor : public LLFolderViewFunctor
|
||||
{
|
||||
public:
|
||||
LLCloseAllFoldersFunctor(BOOL close) { mOpen = !close; }
|
||||
LLCloseAllFoldersFunctor(bool close) { mOpen = !close; }
|
||||
virtual ~LLCloseAllFoldersFunctor() {}
|
||||
virtual void doFolder(LLFolderViewFolder* folder);
|
||||
virtual void doItem(LLFolderViewItem* item);
|
||||
|
||||
BOOL mOpen;
|
||||
bool mOpen;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -167,21 +167,21 @@ LLFolderView::LLFolderView(const Params& p)
|
|||
mAllowMultiSelect(p.allow_multiselect),
|
||||
mAllowDrag(p.allow_drag),
|
||||
mShowEmptyMessage(p.show_empty_message),
|
||||
mShowFolderHierarchy(FALSE),
|
||||
mShowFolderHierarchy(false),
|
||||
mRenameItem( NULL ),
|
||||
mNeedsScroll( FALSE ),
|
||||
mNeedsScroll( false ),
|
||||
mUseLabelSuffix(p.use_label_suffix),
|
||||
mSuppressFolderMenu(p.suppress_folder_menu),
|
||||
mPinningSelectedItem(FALSE),
|
||||
mNeedsAutoSelect( FALSE ),
|
||||
mAutoSelectOverride(FALSE),
|
||||
mNeedsAutoRename(FALSE),
|
||||
mShowSelectionContext(FALSE),
|
||||
mShowSingleSelection(FALSE),
|
||||
mPinningSelectedItem(false),
|
||||
mNeedsAutoSelect( false ),
|
||||
mAutoSelectOverride(false),
|
||||
mNeedsAutoRename(false),
|
||||
mShowSelectionContext(false),
|
||||
mShowSingleSelection(false),
|
||||
mArrangeGeneration(0),
|
||||
mSignalSelectCallback(0),
|
||||
mMinWidth(0),
|
||||
mDragAndDropThisFrame(FALSE),
|
||||
mDragAndDropThisFrame(false),
|
||||
// [SL:KB] - Patch: Inventory-DragDrop | Checked: 2014-02-04 (Catznip-3.6)
|
||||
mDragStartX(0),
|
||||
mDragStartY(0),
|
||||
|
|
@ -209,7 +209,7 @@ LLFolderView::LLFolderView(const Params& p)
|
|||
mAutoOpenItems.setDepth(AUTO_OPEN_STACK_DEPTH);
|
||||
mAutoOpenCandidate = NULL;
|
||||
mAutoOpenTimer.stop();
|
||||
mKeyboardSelection = FALSE;
|
||||
mKeyboardSelection = false;
|
||||
mIndentation = getParentFolder() ? getParentFolder()->getIndentation() + mLocalIndentation : 0;
|
||||
|
||||
//clear label
|
||||
|
|
@ -284,9 +284,9 @@ LLFolderView::~LLFolderView( void )
|
|||
mViewModel = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFolderView::canFocusChildren() const
|
||||
bool LLFolderView::canFocusChildren() const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFolderView::addFolder( LLFolderViewFolder* folder)
|
||||
|
|
@ -297,7 +297,7 @@ void LLFolderView::addFolder( LLFolderViewFolder* folder)
|
|||
void LLFolderView::closeAllFolders()
|
||||
{
|
||||
// Close all the folders
|
||||
setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
|
||||
setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN);
|
||||
arrangeAll();
|
||||
}
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ void LLFolderView::openTopLevelFolders()
|
|||
iter != mFolders.end();)
|
||||
{
|
||||
folders_t::iterator fit = iter++;
|
||||
(*fit)->setOpen(TRUE);
|
||||
(*fit)->setOpen(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +347,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter )
|
|||
getViewModelItem()->filter(filter);
|
||||
}
|
||||
|
||||
void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLFolderView::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLRect scroll_rect;
|
||||
if (mScrollContainer)
|
||||
|
|
@ -364,7 +364,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
width = scroll_rect.getWidth();
|
||||
}
|
||||
LLView::reshape(width, height, called_from_parent);
|
||||
mReshapeSignal(mSelectedItems, FALSE);
|
||||
mReshapeSignal(mSelectedItems, false);
|
||||
}
|
||||
|
||||
void LLFolderView::addToSelectionList(LLFolderViewItem* item)
|
||||
|
|
@ -375,9 +375,9 @@ void LLFolderView::addToSelectionList(LLFolderViewItem* item)
|
|||
}
|
||||
if (mSelectedItems.size())
|
||||
{
|
||||
mSelectedItems.back()->setIsCurSelection(FALSE);
|
||||
mSelectedItems.back()->setIsCurSelection(false);
|
||||
}
|
||||
item->setIsCurSelection(TRUE);
|
||||
item->setIsCurSelection(true);
|
||||
mSelectedItems.push_back(item);
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)
|
|||
{
|
||||
if (mSelectedItems.size())
|
||||
{
|
||||
mSelectedItems.back()->setIsCurSelection(FALSE);
|
||||
mSelectedItems.back()->setIsCurSelection(false);
|
||||
}
|
||||
|
||||
selected_items_t::iterator item_iter;
|
||||
|
|
@ -402,7 +402,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)
|
|||
}
|
||||
if (mSelectedItems.size())
|
||||
{
|
||||
mSelectedItems.back()->setIsCurSelection(TRUE);
|
||||
mSelectedItems.back()->setIsCurSelection(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -423,19 +423,19 @@ LLFolderView::selected_items_t& LLFolderView::getSelectedItems( void )
|
|||
}
|
||||
|
||||
// Record the selected item and pass it down the hierachy.
|
||||
BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
||||
BOOL take_keyboard_focus)
|
||||
bool LLFolderView::setSelection(LLFolderViewItem* selection, bool openitem,
|
||||
bool take_keyboard_focus)
|
||||
{
|
||||
mSignalSelectCallback = take_keyboard_focus ? SIGNAL_KEYBOARD_FOCUS : SIGNAL_NO_KEYBOARD_FOCUS;
|
||||
|
||||
if( selection == this )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( selection && take_keyboard_focus)
|
||||
{
|
||||
mParentPanel.get()->setFocus(TRUE);
|
||||
mParentPanel.get()->setFocus(true);
|
||||
}
|
||||
|
||||
// clear selection down here because change of keyboard focus can potentially
|
||||
|
|
@ -447,7 +447,7 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
|||
addToSelectionList(selection);
|
||||
}
|
||||
|
||||
BOOL rv = LLFolderViewFolder::setSelection(selection, openitem, take_keyboard_focus);
|
||||
bool rv = LLFolderViewFolder::setSelection(selection, openitem, take_keyboard_focus);
|
||||
if(openitem && selection)
|
||||
{
|
||||
selection->getParentFolder()->requestArrange();
|
||||
|
|
@ -458,14 +458,14 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
|||
return rv;
|
||||
}
|
||||
|
||||
BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
||||
bool LLFolderView::changeSelection(LLFolderViewItem* selection, bool selected)
|
||||
{
|
||||
BOOL rv = FALSE;
|
||||
bool rv = false;
|
||||
|
||||
// can't select root folder
|
||||
if(!selection || selection == this)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mAllowMultiSelect)
|
||||
|
|
@ -482,7 +482,7 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL on_list = (item_iter != mSelectedItems.end());
|
||||
bool on_list = (item_iter != mSelectedItems.end());
|
||||
|
||||
if(selected && !on_list)
|
||||
{
|
||||
|
|
@ -514,7 +514,7 @@ void LLFolderView::sanitizeSelection()
|
|||
LLFolderViewItem* item = *item_iter;
|
||||
|
||||
// ensure that each ancestor is open and potentially passes filtering
|
||||
BOOL visible = false;
|
||||
bool visible = false;
|
||||
if(item->getViewModelItem() != NULL)
|
||||
{
|
||||
visible = item->getViewModelItem()->potentiallyVisible(); // initialize from filter state for this item
|
||||
|
|
@ -562,7 +562,7 @@ void LLFolderView::sanitizeSelection()
|
|||
std::vector<LLFolderViewItem*>::iterator item_it;
|
||||
for (item_it = items_to_remove.begin(); item_it != items_to_remove.end(); ++item_it )
|
||||
{
|
||||
changeSelection(*item_it, FALSE); // toggle selection (also removes from list)
|
||||
changeSelection(*item_it, false); // toggle selection (also removes from list)
|
||||
}
|
||||
|
||||
// if nothing selected after prior constraints...
|
||||
|
|
@ -600,7 +600,7 @@ void LLFolderView::sanitizeSelection()
|
|||
|
||||
if (new_selection)
|
||||
{
|
||||
setSelection(new_selection, FALSE, FALSE);
|
||||
setSelection(new_selection, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -686,12 +686,12 @@ void LLFolderView::draw()
|
|||
|
||||
if (hasVisibleChildren())
|
||||
{
|
||||
mStatusTextBox->setVisible( FALSE );
|
||||
mStatusTextBox->setVisible( false );
|
||||
}
|
||||
else if (mShowEmptyMessage)
|
||||
{
|
||||
mStatusTextBox->setValue(getFolderViewModel()->getStatusText(mItems.empty() && mFolders.empty()));
|
||||
mStatusTextBox->setVisible( TRUE );
|
||||
mStatusTextBox->setVisible( true );
|
||||
|
||||
// firstly reshape message textbox with current size. This is necessary to
|
||||
// LLTextBox::getTextPixelHeight works properly
|
||||
|
|
@ -733,7 +733,7 @@ void LLFolderView::draw()
|
|||
// and arrow for the root folder
|
||||
LLView::draw();
|
||||
|
||||
mDragAndDropThisFrame = FALSE;
|
||||
mDragAndDropThisFrame = false;
|
||||
}
|
||||
|
||||
void LLFolderView::finishRenamingItem( void )
|
||||
|
|
@ -852,7 +852,7 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item )
|
|||
while (close_item && close_item != item->getParentFolder())
|
||||
{
|
||||
mAutoOpenItems.pop();
|
||||
close_item->setOpenArrangeRecursively(FALSE);
|
||||
close_item->setOpenArrangeRecursively(false);
|
||||
close_item = mAutoOpenItems.check();
|
||||
}
|
||||
|
||||
|
|
@ -860,7 +860,7 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item )
|
|||
|
||||
mAutoOpenItems.push(item);
|
||||
|
||||
item->setOpen(TRUE);
|
||||
item->setOpen(true);
|
||||
if(!item->isSingleFolderMode())
|
||||
{
|
||||
LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect());
|
||||
|
|
@ -874,7 +874,7 @@ void LLFolderView::closeAutoOpenedFolders()
|
|||
while (mAutoOpenItems.check())
|
||||
{
|
||||
LLFolderViewFolder* close_item = mAutoOpenItems.pop();
|
||||
close_item->setOpen(FALSE);
|
||||
close_item->setOpen(false);
|
||||
}
|
||||
|
||||
if (mAutoOpenCandidate)
|
||||
|
|
@ -885,7 +885,7 @@ void LLFolderView::closeAutoOpenedFolders()
|
|||
mAutoOpenTimer.stop();
|
||||
}
|
||||
|
||||
BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder)
|
||||
bool LLFolderView::autoOpenTest(LLFolderViewFolder* folder)
|
||||
{
|
||||
if (folder && mAutoOpenCandidate == folder)
|
||||
{
|
||||
|
|
@ -899,10 +899,10 @@ BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder)
|
|||
{
|
||||
autoOpenItem(folder);
|
||||
mAutoOpenTimer.stop();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise new candidate, restart timer
|
||||
|
|
@ -912,14 +912,14 @@ BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder)
|
|||
}
|
||||
mAutoOpenCandidate = folder;
|
||||
mAutoOpenTimer.start();
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLFolderView::canCopy() const
|
||||
bool LLFolderView::canCopy() const
|
||||
{
|
||||
if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0)))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it)
|
||||
|
|
@ -927,10 +927,10 @@ BOOL LLFolderView::canCopy() const
|
|||
const LLFolderViewItem* item = *selected_it;
|
||||
if (!item->getViewModelItem()->isItemCopyable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// copy selected item
|
||||
|
|
@ -955,11 +955,11 @@ void LLFolderView::copy()
|
|||
mSearchString.clear();
|
||||
}
|
||||
|
||||
BOOL LLFolderView::canCut() const
|
||||
bool LLFolderView::canCut() const
|
||||
{
|
||||
if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0)))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it)
|
||||
|
|
@ -969,10 +969,10 @@ BOOL LLFolderView::canCut() const
|
|||
|
||||
if (!listener || !listener->isItemRemovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFolderView::cut()
|
||||
|
|
@ -1009,11 +1009,11 @@ void LLFolderView::cut()
|
|||
mSearchString.clear();
|
||||
}
|
||||
|
||||
BOOL LLFolderView::canPaste() const
|
||||
bool LLFolderView::canPaste() const
|
||||
{
|
||||
if (mSelectedItems.empty())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getVisible() && getEnabled())
|
||||
|
|
@ -1042,13 +1042,13 @@ BOOL LLFolderView::canPaste() const
|
|||
listener = folderp->getViewModelItem();
|
||||
if (!listener || !listener->isClipboardPasteable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// paste selected item
|
||||
|
|
@ -1108,17 +1108,17 @@ void LLFolderView::startRenamingSelectedItem( void )
|
|||
|
||||
mRenamer->setText(item->getName());
|
||||
mRenamer->selectAll();
|
||||
mRenamer->setVisible( TRUE );
|
||||
mRenamer->setVisible( true );
|
||||
// set focus will fail unless item is visible
|
||||
mRenamer->setFocus( TRUE );
|
||||
mRenamer->setFocus( true );
|
||||
mRenamer->setTopLostCallback(boost::bind(&LLFolderView::onRenamerLost, this));
|
||||
LLUI::getInstance()->addPopup(mRenamer);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
||||
bool LLFolderView::handleKeyHere( KEY key, MASK mask )
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
// SL-51858: Key presses are not being passed to the Popup menu.
|
||||
// A proper fix is non-trivial so instead just close the menu.
|
||||
|
|
@ -1133,7 +1133,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
case KEY_F2:
|
||||
mSearchString.clear();
|
||||
startRenamingSelectedItem();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_RETURN:
|
||||
|
|
@ -1143,7 +1143,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
finishRenamingItem();
|
||||
mSearchString.clear();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -1152,7 +1152,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if( mRenameItem && mRenamer->getVisible() )
|
||||
{
|
||||
closeRenamer();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
mSearchString.clear();
|
||||
break;
|
||||
|
|
@ -1163,7 +1163,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
mScrollContainer->pageUp(30);
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_PAGE_DOWN:
|
||||
|
|
@ -1172,7 +1172,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
mScrollContainer->pageDown(30);
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_HOME:
|
||||
|
|
@ -1181,7 +1181,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
mScrollContainer->goToTop();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_END:
|
||||
|
|
@ -1196,14 +1196,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if((mSelectedItems.size() > 0) && mScrollContainer)
|
||||
{
|
||||
LLFolderViewItem* last_selected = getCurSelectedItem();
|
||||
BOOL shift_select = mask & MASK_SHIFT;
|
||||
bool shift_select = mask & MASK_SHIFT;
|
||||
// don't shift select down to children of folders (they are implicitly selected through parent)
|
||||
LLFolderViewItem* next = last_selected->getNextOpenNode(!shift_select);
|
||||
|
||||
if (!mKeyboardSelection || (!shift_select && (!next || next == last_selected)))
|
||||
{
|
||||
setSelection(last_selected, FALSE, TRUE);
|
||||
mKeyboardSelection = TRUE;
|
||||
setSelection(last_selected, false, true);
|
||||
mKeyboardSelection = true;
|
||||
}
|
||||
|
||||
if (shift_select)
|
||||
|
|
@ -1213,12 +1213,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if (next->isSelected())
|
||||
{
|
||||
// shrink selection
|
||||
changeSelection(last_selected, FALSE);
|
||||
changeSelection(last_selected, false);
|
||||
}
|
||||
else if (last_selected->getParentFolder() == next->getParentFolder())
|
||||
{
|
||||
// grow selection
|
||||
changeSelection(next, TRUE);
|
||||
changeSelection(next, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1232,11 +1232,11 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed
|
||||
{
|
||||
clearSelection();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
setSelection( next, FALSE, TRUE );
|
||||
setSelection( next, false, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1244,14 +1244,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed
|
||||
{
|
||||
clearSelection();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
scrollToShowSelection();
|
||||
mSearchString.clear();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1259,14 +1259,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if((mSelectedItems.size() > 0) && mScrollContainer)
|
||||
{
|
||||
LLFolderViewItem* last_selected = mSelectedItems.back();
|
||||
BOOL shift_select = mask & MASK_SHIFT;
|
||||
bool shift_select = mask & MASK_SHIFT;
|
||||
// don't shift select down to children of folders (they are implicitly selected through parent)
|
||||
LLFolderViewItem* prev = last_selected->getPreviousOpenNode(!shift_select);
|
||||
|
||||
if (!mKeyboardSelection || (!shift_select && prev == this))
|
||||
{
|
||||
setSelection(last_selected, FALSE, TRUE);
|
||||
mKeyboardSelection = TRUE;
|
||||
setSelection(last_selected, false, true);
|
||||
mKeyboardSelection = true;
|
||||
}
|
||||
|
||||
if (shift_select)
|
||||
|
|
@ -1276,12 +1276,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if (prev->isSelected())
|
||||
{
|
||||
// shrink selection
|
||||
changeSelection(last_selected, FALSE);
|
||||
changeSelection(last_selected, false);
|
||||
}
|
||||
else if (last_selected->getParentFolder() == prev->getParentFolder())
|
||||
{
|
||||
// grow selection
|
||||
changeSelection(prev, TRUE);
|
||||
changeSelection(prev, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1295,18 +1295,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if(notifyParent(LLSD().with("action","select_prev")) > 0 )//message was processed
|
||||
{
|
||||
clearSelection();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
setSelection( prev, FALSE, TRUE );
|
||||
setSelection( prev, false, true );
|
||||
}
|
||||
}
|
||||
scrollToShowSelection();
|
||||
mSearchString.clear();
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1314,9 +1314,9 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
if(mSelectedItems.size())
|
||||
{
|
||||
LLFolderViewItem* last_selected = getCurSelectedItem();
|
||||
last_selected->setOpen( TRUE );
|
||||
last_selected->setOpen( true );
|
||||
mSearchString.clear();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1326,21 +1326,21 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
LLFolderViewItem* last_selected = getCurSelectedItem();
|
||||
if(last_selected && last_selected->isSingleFolderMode())
|
||||
{
|
||||
handled = FALSE;
|
||||
handled = false;
|
||||
break;
|
||||
}
|
||||
LLFolderViewItem* parent_folder = last_selected->getParentFolder();
|
||||
if (!last_selected->isOpen() && parent_folder && parent_folder->getParentFolder())
|
||||
{
|
||||
setSelection(parent_folder, FALSE, TRUE);
|
||||
setSelection(parent_folder, false, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
last_selected->setOpen( FALSE );
|
||||
last_selected->setOpen( false );
|
||||
}
|
||||
mSearchString.clear();
|
||||
scrollToShowSelection();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1376,11 +1376,11 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
if (menu && menu->getVisible())
|
||||
{
|
||||
menu->setVisible(FALSE);
|
||||
menu->setVisible(false);
|
||||
}
|
||||
setSelection(NULL, FALSE, TRUE);
|
||||
setSelection(nullptr, false, true);
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -1456,7 +1456,7 @@ bool LLFolderView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward)
|
||||
bool LLFolderView::search(LLFolderViewItem* first_item, const std::string &search_string, bool backward)
|
||||
{
|
||||
// get first selected item
|
||||
LLFolderViewItem* search_item = first_item;
|
||||
|
|
@ -1473,7 +1473,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
|
|||
}
|
||||
|
||||
// search over all open nodes for first substring match (with wrapping)
|
||||
BOOL found = FALSE;
|
||||
bool found = false;
|
||||
LLFolderViewItem* original_search_item = search_item;
|
||||
do
|
||||
{
|
||||
|
|
@ -1504,7 +1504,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
|
|||
S32 search_string_length = llmin(upper_case_string.size(), current_item_label.size());
|
||||
if (!current_item_label.compare(0, search_string_length, upper_case_string))
|
||||
{
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (backward)
|
||||
|
|
@ -1521,7 +1521,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
|
|||
|
||||
if (found)
|
||||
{
|
||||
setSelection(search_item, FALSE, TRUE);
|
||||
setSelection(search_item, false, true);
|
||||
scrollToShowSelection();
|
||||
}
|
||||
|
||||
|
|
@ -1620,7 +1620,7 @@ bool LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
|||
}
|
||||
|
||||
// Add "--no options--" if the menu is completely blank.
|
||||
BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const
|
||||
bool LLFolderView::addNoOptions(LLMenuGL* menu) const
|
||||
{
|
||||
const std::string nooptions_str = "--no options--";
|
||||
LLView *nooptions_item = NULL;
|
||||
|
|
@ -1633,7 +1633,7 @@ BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const
|
|||
LLView *menu_item = (*itor);
|
||||
if (menu_item->getVisible())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
std::string name = menu_item->getName();
|
||||
if (menu_item->getName() == nooptions_str)
|
||||
|
|
@ -1643,11 +1643,11 @@ BOOL LLFolderView::addNoOptions(LLMenuGL* menu) const
|
|||
}
|
||||
if (nooptions_item)
|
||||
{
|
||||
nooptions_item->setVisible(TRUE);
|
||||
nooptions_item->setEnabled(FALSE);
|
||||
return TRUE;
|
||||
nooptions_item->setVisible(true);
|
||||
nooptions_item->setEnabled(false);
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLFolderView::handleHover( S32 x, S32 y, MASK mask )
|
||||
|
|
@ -1671,15 +1671,15 @@ void LLFolderView::setHoveredItem(LLFolderViewItem* itemp)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
bool LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
mDragAndDropThisFrame = TRUE;
|
||||
mDragAndDropThisFrame = true;
|
||||
// have children handle it first
|
||||
BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
|
||||
bool handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
|
||||
accept, tooltip_msg);
|
||||
|
||||
// when drop is not handled by child, it should be handled
|
||||
|
|
@ -1710,7 +1710,7 @@ void LLFolderView::scrollToShowSelection()
|
|||
{
|
||||
if ( mSelectedItems.size() )
|
||||
{
|
||||
mNeedsScroll = TRUE;
|
||||
mNeedsScroll = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1723,7 +1723,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr
|
|||
// don't scroll to items when mouse is being used to scroll/drag and drop
|
||||
if (gFocusMgr.childHasMouseCapture(mScrollContainer))
|
||||
{
|
||||
mNeedsScroll = FALSE;
|
||||
mNeedsScroll = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1761,18 +1761,18 @@ LLRect LLFolderView::getVisibleRect()
|
|||
return visible_rect;
|
||||
}
|
||||
|
||||
BOOL LLFolderView::getShowSelectionContext()
|
||||
bool LLFolderView::getShowSelectionContext()
|
||||
{
|
||||
if (mShowSelectionContext)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
|
||||
if (menu && menu->getVisible())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFolderView::setShowSingleSelection(bool show)
|
||||
|
|
@ -1803,7 +1803,7 @@ void LLFolderView::update()
|
|||
|
||||
if (filter_object.isModified() && filter_object.isNotDefault() && mParentPanel.get()->getVisible())
|
||||
{
|
||||
mNeedsAutoSelect = TRUE;
|
||||
mNeedsAutoSelect = true;
|
||||
}
|
||||
|
||||
// Filter to determine visibility before arranging
|
||||
|
|
@ -1830,7 +1830,7 @@ void LLFolderView::update()
|
|||
applyFunctorRecursively(functor);
|
||||
}
|
||||
|
||||
// Open filtered folders for folder views with mAutoSelectOverride=TRUE.
|
||||
// Open filtered folders for folder views with mAutoSelectOverride=true.
|
||||
// Used by LLPlacesFolderView.
|
||||
if (filter_object.showAllResults())
|
||||
{
|
||||
|
|
@ -1843,7 +1843,7 @@ void LLFolderView::update()
|
|||
scrollToShowSelection();
|
||||
}
|
||||
|
||||
BOOL filter_finished = mViewModel->contentsReady()
|
||||
bool filter_finished = mViewModel->contentsReady()
|
||||
&& (getViewModelItem()->passedFilter()
|
||||
|| ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration()
|
||||
&& !filter_modified));
|
||||
|
|
@ -1852,10 +1852,10 @@ void LLFolderView::update()
|
|||
|| gFocusMgr.childHasMouseCapture(mParentPanel.get()))
|
||||
{
|
||||
// finishing the filter process, giving focus to the folder view, or dragging the scrollbar all stop the auto select process
|
||||
mNeedsAutoSelect = FALSE;
|
||||
mNeedsAutoSelect = false;
|
||||
}
|
||||
|
||||
BOOL is_visible = isInVisibleChain() || mForceArrange;
|
||||
bool is_visible = isInVisibleChain() || mForceArrange;
|
||||
|
||||
//Puts folders/items in proper positions
|
||||
// arrange() takes the model filter flag into account and call sort() if necessary (CHUI-849)
|
||||
|
|
@ -1880,7 +1880,7 @@ void LLFolderView::update()
|
|||
if (!mPinningSelectedItem && !mSelectedItems.empty())
|
||||
{
|
||||
// lets pin it!
|
||||
mPinningSelectedItem = TRUE;
|
||||
mPinningSelectedItem = true;
|
||||
|
||||
//Computes visible area
|
||||
const LLRect visible_content_rect = (mScrollContainer ? mScrollContainer->getVisibleContentRect() : LLRect());
|
||||
|
|
@ -1915,7 +1915,7 @@ void LLFolderView::update()
|
|||
// stop pinning selected item after folders stop rearranging
|
||||
if (!needsArrange())
|
||||
{
|
||||
mPinningSelectedItem = FALSE;
|
||||
mPinningSelectedItem = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1951,7 +1951,7 @@ void LLFolderView::update()
|
|||
}
|
||||
if (!needs_arrange || !is_visible)
|
||||
{
|
||||
mNeedsScroll = FALSE;
|
||||
mNeedsScroll = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1968,15 +1968,15 @@ void LLFolderView::update()
|
|||
if (mSignalSelectCallback)
|
||||
{
|
||||
//RN: we use keyboard focus as a proxy for user-explicit actions
|
||||
BOOL take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS);
|
||||
bool take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS);
|
||||
mSelectSignal(mSelectedItems, take_keyboard_focus);
|
||||
}
|
||||
mSignalSelectCallback = FALSE;
|
||||
mSignalSelectCallback = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mSignalSelectCallback = FALSE;
|
||||
mSignalSelectCallback = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2011,7 +2011,7 @@ void LLFolderView::updateRenamerPosition()
|
|||
|
||||
S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_rect.getWidth() - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
|
||||
S32 height = mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD;
|
||||
mRenamer->reshape( width, height, TRUE );
|
||||
mRenamer->reshape( width, height, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2023,9 +2023,9 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu)
|
|||
LLView::child_list_t::const_iterator menu_itor;
|
||||
for (menu_itor = list->begin(); menu_itor != list->end(); ++menu_itor)
|
||||
{
|
||||
(*menu_itor)->setVisible(FALSE);
|
||||
(*menu_itor)->pushVisible(TRUE);
|
||||
(*menu_itor)->setEnabled(TRUE);
|
||||
(*menu_itor)->setVisible(false);
|
||||
(*menu_itor)->pushVisible(true);
|
||||
(*menu_itor)->setEnabled(true);
|
||||
}
|
||||
|
||||
// Successively filter out invalid options
|
||||
|
|
@ -2091,7 +2091,7 @@ bool LLFolderView::selectFirstItem()
|
|||
{
|
||||
LLFolderViewItem* itemp = folder->getNextFromChild(0,true);
|
||||
if(itemp)
|
||||
setSelection(itemp,FALSE,TRUE);
|
||||
setSelection(itemp,false,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2102,7 +2102,7 @@ bool LLFolderView::selectFirstItem()
|
|||
LLFolderViewItem* itemp = (*iit);
|
||||
if (itemp->getVisible())
|
||||
{
|
||||
setSelection(itemp,FALSE,TRUE);
|
||||
setSelection(itemp,false,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2116,7 +2116,7 @@ bool LLFolderView::selectLastItem()
|
|||
LLFolderViewItem* itemp = (*iit);
|
||||
if (itemp->getVisible())
|
||||
{
|
||||
setSelection(itemp,FALSE,TRUE);
|
||||
setSelection(itemp,false,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2128,7 +2128,7 @@ bool LLFolderView::selectLastItem()
|
|||
{
|
||||
LLFolderViewItem* itemp = folder->getPreviousFromChild(0,true);
|
||||
if(itemp)
|
||||
setSelection(itemp,FALSE,TRUE);
|
||||
setSelection(itemp,false,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2169,15 +2169,15 @@ void LLFolderView::onRenamerLost()
|
|||
{
|
||||
if (mRenamer && mRenamer->getVisible())
|
||||
{
|
||||
mRenamer->setVisible(FALSE);
|
||||
mRenamer->setVisible(false);
|
||||
|
||||
// will commit current name (which could be same as original name)
|
||||
mRenamer->setFocus(FALSE);
|
||||
mRenamer->setFocus(false);
|
||||
}
|
||||
|
||||
if( mRenameItem )
|
||||
{
|
||||
setSelection( mRenameItem, TRUE );
|
||||
setSelection( mRenameItem, true );
|
||||
mRenameItem = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -2185,17 +2185,17 @@ void LLFolderView::onRenamerLost()
|
|||
LLFolderViewItem* LLFolderView::getNextUnselectedItem()
|
||||
{
|
||||
LLFolderViewItem* last_item = *mSelectedItems.rbegin();
|
||||
LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE);
|
||||
LLFolderViewItem* new_selection = last_item->getNextOpenNode(false);
|
||||
while(new_selection && new_selection->isSelected())
|
||||
{
|
||||
new_selection = new_selection->getNextOpenNode(FALSE);
|
||||
new_selection = new_selection->getNextOpenNode(false);
|
||||
}
|
||||
if (!new_selection)
|
||||
{
|
||||
new_selection = last_item->getPreviousOpenNode(FALSE);
|
||||
new_selection = last_item->getPreviousOpenNode(false);
|
||||
while (new_selection && (new_selection->isInSelection()))
|
||||
{
|
||||
new_selection = new_selection->getPreviousOpenNode(FALSE);
|
||||
new_selection = new_selection->getPreviousOpenNode(false);
|
||||
}
|
||||
}
|
||||
return new_selection;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
LLFolderView(const Params&);
|
||||
virtual ~LLFolderView( void );
|
||||
|
||||
virtual BOOL canFocusChildren() const;
|
||||
virtual bool canFocusChildren() const;
|
||||
|
||||
virtual const LLFolderView* getRoot() const { return this; }
|
||||
virtual LLFolderView* getRoot() { return this; }
|
||||
|
|
@ -120,7 +120,7 @@ public:
|
|||
LLFolderViewGroupedItemModel* getFolderViewGroupedItemModel() { return mGroupedItemModel; }
|
||||
const LLFolderViewGroupedItemModel* getFolderViewGroupedItemModel() const { return mGroupedItemModel; }
|
||||
|
||||
typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;
|
||||
typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, bool user_action)> signal_t;
|
||||
void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); }
|
||||
void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); }
|
||||
|
||||
|
|
@ -156,12 +156,12 @@ public:
|
|||
selected_items_t& getSelectedItems( void );
|
||||
|
||||
// Record the selected item and pass it down the hierarchy.
|
||||
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
|
||||
BOOL take_keyboard_focus = TRUE);
|
||||
virtual bool setSelection(LLFolderViewItem* selection, bool openitem,
|
||||
bool take_keyboard_focus = true);
|
||||
|
||||
// This method is used to toggle the selection of an item. Walks
|
||||
// children, and keeps track of selected objects.
|
||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||
virtual bool changeSelection(LLFolderViewItem* selection, bool selected);
|
||||
|
||||
virtual std::set<LLFolderViewItem*> getSelectionList() const;
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ public:
|
|||
bool isOverDragThreshold(S32 screen_x, S32 screen_y);
|
||||
// [/SL:KB]
|
||||
bool startDrag();
|
||||
void setDragAndDropThisFrame() { mDragAndDropThisFrame = TRUE; }
|
||||
void setDragAndDropThisFrame() { mDragAndDropThisFrame = true; }
|
||||
void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; }
|
||||
LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; }
|
||||
|
||||
|
|
@ -185,17 +185,17 @@ public:
|
|||
|
||||
void autoOpenItem(LLFolderViewFolder* item);
|
||||
void closeAutoOpenedFolders();
|
||||
BOOL autoOpenTest(LLFolderViewFolder* item);
|
||||
BOOL isOpen() const { return TRUE; } // root folder always open
|
||||
bool autoOpenTest(LLFolderViewFolder* item);
|
||||
bool isOpen() const { return true; } // root folder always open
|
||||
|
||||
// Copy & paste
|
||||
virtual BOOL canCopy() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual void copy();
|
||||
|
||||
virtual BOOL canCut() const;
|
||||
virtual bool canCut() const;
|
||||
virtual void cut();
|
||||
|
||||
virtual BOOL canPaste() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual void paste();
|
||||
|
||||
LLFolderViewItem* getNextUnselectedItem();
|
||||
|
|
@ -204,21 +204,21 @@ public:
|
|||
void startRenamingSelectedItem( void );
|
||||
|
||||
// LLView functionality
|
||||
///*virtual*/ BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent );
|
||||
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
|
||||
///*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 handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
/*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(FALSE); }
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(false); }
|
||||
virtual void draw();
|
||||
virtual void deleteAllChildren();
|
||||
|
||||
|
|
@ -228,22 +228,22 @@ public:
|
|||
void setScrollContainer( LLScrollContainer* parent ) { mScrollContainer = parent; }
|
||||
LLRect getVisibleRect();
|
||||
|
||||
BOOL search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward);
|
||||
bool search(LLFolderViewItem* first_item, const std::string &search_string, bool backward);
|
||||
void setShowSelectionContext(bool show) { mShowSelectionContext = show; }
|
||||
BOOL getShowSelectionContext();
|
||||
bool getShowSelectionContext();
|
||||
void setShowSingleSelection(bool show);
|
||||
BOOL getShowSingleSelection() { return mShowSingleSelection; }
|
||||
bool getShowSingleSelection() { return mShowSingleSelection; }
|
||||
F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); }
|
||||
bool getUseEllipses() { return mUseEllipses; }
|
||||
S32 getSelectedCount() { return (S32)mSelectedItems.size(); }
|
||||
|
||||
void update(); // needs to be called periodically (e.g. once per frame)
|
||||
|
||||
BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
|
||||
BOOL needsAutoRename() { return mNeedsAutoRename; }
|
||||
void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; }
|
||||
void setPinningSelectedItem(BOOL val) { mPinningSelectedItem = val; }
|
||||
void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; }
|
||||
bool needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
|
||||
bool needsAutoRename() { return mNeedsAutoRename; }
|
||||
void setNeedsAutoRename(bool val) { mNeedsAutoRename = val; }
|
||||
void setPinningSelectedItem(bool val) { mPinningSelectedItem = val; }
|
||||
void setAutoSelectOverride(bool val) { mAutoSelectOverride = val; }
|
||||
|
||||
bool showItemLinkOverlays() { return mShowItemLinkOverlays; }
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ protected:
|
|||
bool selectFirstItem();
|
||||
bool selectLastItem();
|
||||
|
||||
BOOL addNoOptions(LLMenuGL* menu) const;
|
||||
bool addNoOptions(LLMenuGL* menu) const;
|
||||
|
||||
|
||||
protected:
|
||||
|
|
@ -393,14 +393,14 @@ public:
|
|||
class LLSelectFirstFilteredItem : public LLFolderViewFunctor
|
||||
{
|
||||
public:
|
||||
LLSelectFirstFilteredItem() : mItemSelected(FALSE), mFolderSelected(FALSE) {}
|
||||
LLSelectFirstFilteredItem() : mItemSelected(false), mFolderSelected(false) {}
|
||||
virtual ~LLSelectFirstFilteredItem() {}
|
||||
virtual void doFolder(LLFolderViewFolder* folder);
|
||||
virtual void doItem(LLFolderViewItem* item);
|
||||
BOOL wasItemSelected() { return mItemSelected || mFolderSelected; }
|
||||
bool wasItemSelected() { return mItemSelected || mFolderSelected; }
|
||||
protected:
|
||||
BOOL mItemSelected;
|
||||
BOOL mFolderSelected;
|
||||
bool mItemSelected;
|
||||
bool mFolderSelected;
|
||||
};
|
||||
|
||||
class LLOpenFilteredFolders : public LLFolderViewFunctor
|
||||
|
|
@ -415,15 +415,15 @@ public:
|
|||
class LLSaveFolderState : public LLFolderViewFunctor
|
||||
{
|
||||
public:
|
||||
LLSaveFolderState() : mApply(FALSE) {}
|
||||
LLSaveFolderState() : mApply(false) {}
|
||||
virtual ~LLSaveFolderState() {}
|
||||
virtual void doFolder(LLFolderViewFolder* folder);
|
||||
virtual void doItem(LLFolderViewItem* item) {}
|
||||
void setApply(BOOL apply);
|
||||
void setApply(bool apply);
|
||||
void clearOpenFolders() { mOpenFolders.clear(); }
|
||||
protected:
|
||||
std::set<LLUUID> mOpenFolders;
|
||||
BOOL mApply;
|
||||
bool mApply;
|
||||
};
|
||||
|
||||
class LLOpenFoldersWithSelection : public LLFolderViewFunctor
|
||||
|
|
|
|||
|
|
@ -135,18 +135,18 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
|
|||
mSuffixNeedsRefresh(false),
|
||||
mLabelPaddingRight(DEFAULT_LABEL_PADDING_RIGHT),
|
||||
mParentFolder( NULL ),
|
||||
mIsSelected( FALSE ),
|
||||
mIsCurSelection( FALSE ),
|
||||
mSelectPending(FALSE),
|
||||
mIsSelected( false ),
|
||||
mIsCurSelection( false ),
|
||||
mSelectPending(false),
|
||||
mIsItemCut(false),
|
||||
mCutGeneration(0),
|
||||
mLabelStyle( LLFontGL::NORMAL ),
|
||||
mHasVisibleChildren(FALSE),
|
||||
mHasVisibleChildren(false),
|
||||
mLocalIndentation(p.folder_indentation),
|
||||
mIndentation(0),
|
||||
mItemHeight(p.item_height),
|
||||
mControlLabelRotation(0.f),
|
||||
mDragAndDropTarget(FALSE),
|
||||
mDragAndDropTarget(false),
|
||||
mLabel(p.name),
|
||||
mRoot(p.root),
|
||||
mViewModelItem(p.listener),
|
||||
|
|
@ -204,7 +204,7 @@ LLFolderViewItem::~LLFolderViewItem()
|
|||
gFocusMgr.removeKeyboardFocusWithoutCallback(this);
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::postBuild()
|
||||
bool LLFolderViewItem::postBuild()
|
||||
{
|
||||
LLFolderViewModelItem& vmi = *getViewModelItem();
|
||||
// getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
|
||||
|
|
@ -222,7 +222,7 @@ BOOL LLFolderViewItem::postBuild()
|
|||
// while LLFolderViewItem::arrange() updates visual part
|
||||
mSuffixNeedsRefresh = true;
|
||||
mLabelWidthDirty = true;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLFolderView* LLFolderViewItem::getRoot()
|
||||
|
|
@ -235,21 +235,21 @@ const LLFolderView* LLFolderViewItem::getRoot() const
|
|||
return mRoot;
|
||||
}
|
||||
// Returns true if this object is a child (or grandchild, etc.) of potential_ancestor.
|
||||
BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor )
|
||||
bool LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor )
|
||||
{
|
||||
LLFolderViewItem* root = this;
|
||||
while( root->mParentFolder )
|
||||
{
|
||||
if( root->mParentFolder == potential_ancestor )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
root = root->mParentFolder;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children)
|
||||
LLFolderViewItem* LLFolderViewItem::getNextOpenNode(bool include_children)
|
||||
{
|
||||
if (!mParentFolder)
|
||||
{
|
||||
|
|
@ -271,7 +271,7 @@ LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children)
|
|||
return itemp;
|
||||
}
|
||||
|
||||
LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children)
|
||||
LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(bool include_children)
|
||||
{
|
||||
if (!mParentFolder)
|
||||
{
|
||||
|
|
@ -295,19 +295,19 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children)
|
|||
return itemp;
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::passedFilter(S32 filter_generation)
|
||||
bool LLFolderViewItem::passedFilter(S32 filter_generation)
|
||||
{
|
||||
return getViewModelItem()->passedFilter(filter_generation);
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation)
|
||||
bool LLFolderViewItem::isPotentiallyVisible(S32 filter_generation)
|
||||
{
|
||||
if (filter_generation < 0)
|
||||
{
|
||||
filter_generation = getFolderViewModel()->getFilter().getFirstSuccessGeneration();
|
||||
}
|
||||
LLFolderViewModelItem* model = getViewModelItem();
|
||||
BOOL visible = model->passedFilter(filter_generation);
|
||||
bool visible = model->passedFilter(filter_generation);
|
||||
if (model->getMarkedDirtyGeneration() >= filter_generation)
|
||||
{
|
||||
// unsure visibility state
|
||||
|
|
@ -367,8 +367,8 @@ void LLFolderViewItem::refreshSuffix()
|
|||
}
|
||||
|
||||
// Utility function for LLFolderView
|
||||
void LLFolderViewItem::arrangeAndSet(BOOL set_selection,
|
||||
BOOL take_keyboard_focus)
|
||||
void LLFolderViewItem::arrangeAndSet(bool set_selection,
|
||||
bool take_keyboard_focus)
|
||||
{
|
||||
LLFolderView* root = getRoot();
|
||||
if (getParentFolder())
|
||||
|
|
@ -377,7 +377,7 @@ void LLFolderViewItem::arrangeAndSet(BOOL set_selection,
|
|||
}
|
||||
if(set_selection)
|
||||
{
|
||||
getRoot()->setSelection(this, TRUE, take_keyboard_focus);
|
||||
getRoot()->setSelection(this, true, take_keyboard_focus);
|
||||
if(root)
|
||||
{
|
||||
root->scrollToShowSelection();
|
||||
|
|
@ -392,7 +392,7 @@ std::set<LLFolderViewItem*> LLFolderViewItem::getSelectionList() const
|
|||
return selection;
|
||||
}
|
||||
|
||||
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
|
||||
// addToFolder() returns true if it succeeds. false otherwise
|
||||
void LLFolderViewItem::addToFolder(LLFolderViewFolder* folder)
|
||||
{
|
||||
folder->addItem(this);
|
||||
|
|
@ -480,7 +480,7 @@ S32 LLFolderViewItem::getTextPad()
|
|||
// means 'deselect' for a leaf item. Do this optimization after
|
||||
// multiple selection is implemented to make sure it all plays nice
|
||||
// together.
|
||||
BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus)
|
||||
bool LLFolderViewItem::setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus)
|
||||
{
|
||||
if (selection == this && !mIsSelected)
|
||||
{
|
||||
|
|
@ -493,7 +493,7 @@ BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
|||
return mIsSelected;
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
||||
bool LLFolderViewItem::changeSelection(LLFolderViewItem* selection, bool selected)
|
||||
{
|
||||
if (selection == this)
|
||||
{
|
||||
|
|
@ -505,31 +505,31 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte
|
|||
{
|
||||
selectItem();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFolderViewItem::deselectItem(void)
|
||||
{
|
||||
mIsSelected = FALSE;
|
||||
mIsSelected = false;
|
||||
}
|
||||
|
||||
void LLFolderViewItem::selectItem(void)
|
||||
{
|
||||
if (mIsSelected == FALSE)
|
||||
if (mIsSelected == false)
|
||||
{
|
||||
mIsSelected = TRUE;
|
||||
mIsSelected = true;
|
||||
getViewModelItem()->selectItem();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::isMovable()
|
||||
bool LLFolderViewItem::isMovable()
|
||||
{
|
||||
return getViewModelItem()->isItemMovable();
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::isRemovable()
|
||||
bool LLFolderViewItem::isRemovable()
|
||||
{
|
||||
return getViewModelItem()->isItemRemovable();
|
||||
}
|
||||
|
|
@ -548,12 +548,12 @@ void LLFolderViewItem::destroyView()
|
|||
|
||||
// Call through to the viewed object and return true if it can be
|
||||
// removed.
|
||||
//BOOL LLFolderViewItem::removeRecursively(BOOL single_item)
|
||||
BOOL LLFolderViewItem::remove()
|
||||
//bool LLFolderViewItem::removeRecursively(bool single_item)
|
||||
bool LLFolderViewItem::remove()
|
||||
{
|
||||
if(!isRemovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return getViewModelItem()->removeItem();
|
||||
}
|
||||
|
|
@ -658,7 +658,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
|
||||
|
|
@ -768,18 +768,18 @@ void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
bool LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
BOOL accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg);
|
||||
bool handled = false;
|
||||
bool accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg);
|
||||
handled = accepted;
|
||||
if (accepted)
|
||||
{
|
||||
mDragAndDropTarget = TRUE;
|
||||
mDragAndDropTarget = true;
|
||||
*accept = ACCEPT_YES_MULTI;
|
||||
}
|
||||
else
|
||||
|
|
@ -842,7 +842,7 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L
|
|||
return mIsItemCut;
|
||||
}
|
||||
|
||||
void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor,
|
||||
void LLFolderViewItem::drawHighlight(const bool showContent, const bool hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor,
|
||||
const LLUIColor &focusOutlineColor, const LLUIColor &mouseOverColor)
|
||||
{
|
||||
const S32 focus_top = getRect().getHeight();
|
||||
|
|
@ -856,7 +856,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
|
|||
//--------------------------------------------------------------------------------//
|
||||
// Draw highlight for selected items
|
||||
// Note: Always render "current" item or flashing item, only render other selected
|
||||
// items if mShowSingleSelection is FALSE.
|
||||
// items if mShowSingleSelection is false.
|
||||
//
|
||||
if (isHighlightAllowed())
|
||||
|
||||
|
|
@ -900,7 +900,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
|
|||
focus_top,
|
||||
getRect().getWidth() - 2,
|
||||
focus_bottom,
|
||||
focusOutlineColor, FALSE);
|
||||
focusOutlineColor, false);
|
||||
}
|
||||
|
||||
if (folder_open)
|
||||
|
|
@ -909,14 +909,14 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
|
|||
focus_bottom + 1, // overlap with bottom edge of above rect
|
||||
getRect().getWidth() - 2,
|
||||
0,
|
||||
focusOutlineColor, FALSE);
|
||||
focusOutlineColor, false);
|
||||
if (showContent && !isFlashing())
|
||||
{
|
||||
gl_rect_2d(FOCUS_LEFT,
|
||||
focus_bottom + 1,
|
||||
getRect().getWidth() - 2,
|
||||
0,
|
||||
bgColor, TRUE);
|
||||
bgColor, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -926,7 +926,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
|
|||
focus_top,
|
||||
getRect().getWidth() - 2,
|
||||
focus_bottom,
|
||||
mouseOverColor, FALSE);
|
||||
mouseOverColor, false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------//
|
||||
|
|
@ -939,16 +939,16 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
|
|||
focus_top,
|
||||
getRect().getWidth() - 2,
|
||||
focus_bottom,
|
||||
bgColor, FALSE);
|
||||
bgColor, false);
|
||||
if (folder_open)
|
||||
{
|
||||
gl_rect_2d(FOCUS_LEFT,
|
||||
focus_bottom + 1, // overlap with bottom edge of above rect
|
||||
getRect().getWidth() - 2,
|
||||
0,
|
||||
bgColor, FALSE);
|
||||
bgColor, false);
|
||||
}
|
||||
mDragAndDropTarget = FALSE;
|
||||
mDragAndDropTarget = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -959,13 +959,13 @@ void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y
|
|||
//
|
||||
font->renderUTF8(mLabel, 0, x, y, color,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, TRUE);
|
||||
S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, true);
|
||||
}
|
||||
|
||||
void LLFolderViewItem::draw()
|
||||
{
|
||||
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
|
||||
const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled
|
||||
const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
|
||||
const bool filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : false); // If we have keyboard focus, draw selection filled
|
||||
|
||||
const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
|
||||
// <FS:Ansariel> Inventory specials
|
||||
|
|
@ -1069,7 +1069,7 @@ void LLFolderViewItem::draw()
|
|||
static const std::string locked_string = " (" + LLTrans::getString("LockedFolder") + ") ";
|
||||
font->renderUTF8(locked_string, 0, right_x, y, sProtectedColor,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, S32_MAX, &right_x, FALSE);
|
||||
S32_MAX, S32_MAX, &right_x, false);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
@ -1079,7 +1079,7 @@ void LLFolderViewItem::draw()
|
|||
static const std::string protected_string = " (" + LLTrans::getString("ProtectedFolder") + ") ";
|
||||
font->renderUTF8(protected_string, 0, right_x, y, sProtectedColor,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, S32_MAX, &right_x, FALSE);
|
||||
S32_MAX, S32_MAX, &right_x, false);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
@ -1090,7 +1090,7 @@ void LLFolderViewItem::draw()
|
|||
{
|
||||
suffix_font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, S32_MAX, &right_x, FALSE );
|
||||
S32_MAX, S32_MAX, &right_x, false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------//
|
||||
|
|
@ -1104,7 +1104,7 @@ void LLFolderViewItem::draw()
|
|||
F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
font->renderUTF8( combined_string, filter_offset, match_string_left, yy,
|
||||
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
filter_string_length, S32_MAX, &right_x, FALSE );
|
||||
filter_string_length, S32_MAX, &right_x, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1114,7 +1114,7 @@ void LLFolderViewItem::draw()
|
|||
F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel, filter_offset, label_filter_length);
|
||||
F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
font->renderUTF8( mLabel, filter_offset, match_string_left, yy,
|
||||
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, label_filter_length, S32_MAX, &right_x, FALSE );
|
||||
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, label_filter_length, S32_MAX, &right_x, false );
|
||||
}
|
||||
|
||||
S32 suffix_filter_length = label_filter_length > 0 ? filter_string_length - label_filter_length : filter_string_length;
|
||||
|
|
@ -1123,7 +1123,7 @@ void LLFolderViewItem::draw()
|
|||
S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
|
||||
F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, mLabel.size()) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length);
|
||||
F32 yy = (F32)getRect().getHeight() - suffix_font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
suffix_font->renderUTF8( mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, suffix_filter_length, S32_MAX, &right_x, FALSE );
|
||||
suffix_font->renderUTF8( mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, suffix_filter_length, S32_MAX, &right_x, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1166,7 +1166,7 @@ bool LLFolderViewItem::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
else
|
||||
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'.
|
||||
// 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;
|
||||
|
||||
|
|
@ -1181,8 +1181,8 @@ bool LLFolderViewItem::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
|
||||
LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):
|
||||
LLFolderViewItem( p ),
|
||||
mIsOpen(FALSE),
|
||||
mExpanderHighlighted(FALSE),
|
||||
mIsOpen(false),
|
||||
mExpanderHighlighted(false),
|
||||
mCurHeight(0.f),
|
||||
mTargetHeight(0.f),
|
||||
mAutoOpenCountdown(0.f),
|
||||
|
|
@ -1217,7 +1217,7 @@ LLFolderViewFolder::~LLFolderViewFolder( void )
|
|||
gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
|
||||
}
|
||||
|
||||
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
|
||||
// addToFolder() returns true if it succeeds. false otherwise
|
||||
void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder)
|
||||
{
|
||||
folder->addFolder(this);
|
||||
|
|
@ -1377,7 +1377,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
> ll_round(mCurHeight) + mMaxFolderItemOverlap)
|
||||
{
|
||||
// hide if beyond current folder height
|
||||
(*fit)->setVisible(FALSE);
|
||||
(*fit)->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1389,7 +1389,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
if (getRect().getHeight() - (*iit)->getRect().mBottom
|
||||
> ll_round(mCurHeight) + mMaxFolderItemOverlap)
|
||||
{
|
||||
(*iit)->setVisible(FALSE);
|
||||
(*iit)->setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1407,7 +1407,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
return ll_round(mTargetHeight);
|
||||
}
|
||||
|
||||
BOOL LLFolderViewFolder::needsArrange()
|
||||
bool LLFolderViewFolder::needsArrange()
|
||||
{
|
||||
return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
|
||||
}
|
||||
|
|
@ -1419,17 +1419,17 @@ bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation)
|
|||
|
||||
// Passes selection information on to children and record selection
|
||||
// information if necessary.
|
||||
BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
||||
BOOL take_keyboard_focus)
|
||||
bool LLFolderViewFolder::setSelection(LLFolderViewItem* selection, bool openitem,
|
||||
bool take_keyboard_focus)
|
||||
{
|
||||
BOOL rv = FALSE;
|
||||
bool rv = false;
|
||||
if (selection == this)
|
||||
{
|
||||
if (!isSelected())
|
||||
{
|
||||
selectItem();
|
||||
}
|
||||
rv = TRUE;
|
||||
rv = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1437,9 +1437,9 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||
{
|
||||
deselectItem();
|
||||
}
|
||||
rv = FALSE;
|
||||
rv = false;
|
||||
}
|
||||
BOOL child_selected = FALSE;
|
||||
bool child_selected = false;
|
||||
|
||||
for (folders_t::iterator iter = mFolders.begin();
|
||||
iter != mFolders.end();)
|
||||
|
|
@ -1447,8 +1447,8 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||
folders_t::iterator fit = iter++;
|
||||
if((*fit)->setSelection(selection, openitem, take_keyboard_focus))
|
||||
{
|
||||
rv = TRUE;
|
||||
child_selected = TRUE;
|
||||
rv = true;
|
||||
child_selected = true;
|
||||
}
|
||||
}
|
||||
for (items_t::iterator iter = mItems.begin();
|
||||
|
|
@ -1457,13 +1457,13 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||
items_t::iterator iit = iter++;
|
||||
if((*iit)->setSelection(selection, openitem, take_keyboard_focus))
|
||||
{
|
||||
rv = TRUE;
|
||||
child_selected = TRUE;
|
||||
rv = true;
|
||||
child_selected = true;
|
||||
}
|
||||
}
|
||||
if(openitem && child_selected && !mSingleFolderMode)
|
||||
{
|
||||
setOpenArrangeRecursively(TRUE);
|
||||
setOpenArrangeRecursively(true);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -1471,15 +1471,15 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||
// This method is used to change the selection of an item.
|
||||
// Recursively traverse all children; if 'selection' is 'this' then change
|
||||
// the select status if necessary.
|
||||
// Returns TRUE if the selection state of this folder, or of a child, was changed.
|
||||
BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
||||
// Returns true if the selection state of this folder, or of a child, was changed.
|
||||
bool LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, bool selected)
|
||||
{
|
||||
BOOL rv = FALSE;
|
||||
bool rv = false;
|
||||
if(selection == this)
|
||||
{
|
||||
if (isSelected() != selected)
|
||||
{
|
||||
rv = TRUE;
|
||||
rv = true;
|
||||
if (selected)
|
||||
{
|
||||
selectItem();
|
||||
|
|
@ -1497,7 +1497,7 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec
|
|||
folders_t::iterator fit = iter++;
|
||||
if((*fit)->changeSelection(selection, selected))
|
||||
{
|
||||
rv = TRUE;
|
||||
rv = true;
|
||||
}
|
||||
}
|
||||
for (items_t::iterator iter = mItems.begin();
|
||||
|
|
@ -1506,7 +1506,7 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec
|
|||
items_t::iterator iit = iter++;
|
||||
if((*iit)->changeSelection(selection, selected))
|
||||
{
|
||||
rv = TRUE;
|
||||
rv = true;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
|
@ -1690,7 +1690,7 @@ void LLFolderViewFolder::gatherChildRangeExclusive(LLFolderViewItem* start, LLFo
|
|||
|
||||
void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection)
|
||||
{
|
||||
if (getRoot()->getAllowMultiSelect() == FALSE) return;
|
||||
if (getRoot()->getAllowMultiSelect() == false) return;
|
||||
|
||||
LLFolderViewItem* cur_selected_item = getRoot()->getCurSelectedItem();
|
||||
if (cur_selected_item == NULL)
|
||||
|
|
@ -1739,7 +1739,7 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection)
|
|||
|
||||
LLFolderView* root = getRoot();
|
||||
|
||||
BOOL selection_reverse = new_selection->isSelected(); //indication that some elements are being deselected
|
||||
bool selection_reverse = new_selection->isSelected(); //indication that some elements are being deselected
|
||||
|
||||
// array always go from 'will be selected' to ' will be unselected', iterate
|
||||
// in opposite direction to simplify identification of 'point of origin' in
|
||||
|
|
@ -1749,12 +1749,12 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection)
|
|||
++it)
|
||||
{
|
||||
LLFolderViewItem* item = *it;
|
||||
BOOL selected = item->isSelected();
|
||||
bool selected = item->isSelected();
|
||||
if (!selection_reverse && selected)
|
||||
{
|
||||
// it is our 'point of origin' where we shift/expand from
|
||||
// don't deselect it
|
||||
selection_reverse = TRUE;
|
||||
selection_reverse = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1765,11 +1765,11 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection)
|
|||
if (selection_reverse)
|
||||
{
|
||||
// at some point we reversed selection, first element should be deselected
|
||||
root->changeSelection(last_selected_item_from_cur, FALSE);
|
||||
root->changeSelection(last_selected_item_from_cur, false);
|
||||
}
|
||||
|
||||
// element we expand to should always be selected
|
||||
root->changeSelection(new_selection, TRUE);
|
||||
root->changeSelection(new_selection, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1827,11 +1827,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item, bool deparent_mode
|
|||
removeChild(item);
|
||||
}
|
||||
|
||||
BOOL LLFolderViewFolder::isMovable()
|
||||
bool LLFolderViewFolder::isMovable()
|
||||
{
|
||||
if( !(getViewModelItem()->isItemMovable()) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (items_t::iterator iter = mItems.begin();
|
||||
|
|
@ -1840,7 +1840,7 @@ BOOL LLFolderViewFolder::isMovable()
|
|||
items_t::iterator iit = iter++;
|
||||
if(!(*iit)->isMovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1850,18 +1850,18 @@ BOOL LLFolderViewFolder::isMovable()
|
|||
folders_t::iterator fit = iter++;
|
||||
if(!(*fit)->isMovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLFolderViewFolder::isRemovable()
|
||||
bool LLFolderViewFolder::isRemovable()
|
||||
{
|
||||
if( !(getViewModelItem()->isItemRemovable()) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (items_t::iterator iter = mItems.begin();
|
||||
|
|
@ -1870,7 +1870,7 @@ BOOL LLFolderViewFolder::isRemovable()
|
|||
items_t::iterator iit = iter++;
|
||||
if(!(*iit)->isRemovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1880,10 +1880,10 @@ BOOL LLFolderViewFolder::isRemovable()
|
|||
folders_t::iterator fit = iter++;
|
||||
if(!(*fit)->isRemovable())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFolderViewFolder::destroyRoot()
|
||||
|
|
@ -1903,7 +1903,7 @@ void LLFolderViewFolder::addItem(LLFolderViewItem* item)
|
|||
mItems.push_back(item);
|
||||
|
||||
item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
|
||||
item->setVisible(FALSE);
|
||||
item->setVisible(false);
|
||||
|
||||
addChild(item);
|
||||
|
||||
|
|
@ -1926,7 +1926,7 @@ void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
|
|||
mFolders.push_back(folder);
|
||||
folder->setOrigin(0, 0);
|
||||
folder->reshape(getRect().getWidth(), 0);
|
||||
folder->setVisible(FALSE);
|
||||
folder->setVisible(false);
|
||||
// rearrange all descendants too, as our indentation level might have changed
|
||||
//folder->requestArrange();
|
||||
//requestSort();
|
||||
|
|
@ -1957,7 +1957,7 @@ void LLFolderViewFolder::toggleOpen()
|
|||
}
|
||||
|
||||
// Force a folder open or closed
|
||||
void LLFolderViewFolder::setOpen(BOOL openitem)
|
||||
void LLFolderViewFolder::setOpen(bool openitem)
|
||||
{
|
||||
if(mSingleFolderMode)
|
||||
{
|
||||
|
|
@ -1974,9 +1974,9 @@ void LLFolderViewFolder::setOpen(BOOL openitem)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse)
|
||||
void LLFolderViewFolder::setOpenArrangeRecursively(bool openitem, ERecurseType recurse)
|
||||
{
|
||||
BOOL was_open = isOpen();
|
||||
bool was_open = isOpen();
|
||||
mIsOpen = openitem;
|
||||
if(!was_open && openitem)
|
||||
{
|
||||
|
|
@ -2011,17 +2011,17 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
|
||||
BOOL drop,
|
||||
bool LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType c_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
BOOL accepted = mViewModelItem->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg);
|
||||
bool accepted = mViewModelItem->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg);
|
||||
if (accepted)
|
||||
{
|
||||
mDragAndDropTarget = TRUE;
|
||||
mDragAndDropTarget = true;
|
||||
*accept = ACCEPT_YES_MULTI;
|
||||
}
|
||||
else
|
||||
|
|
@ -2032,7 +2032,7 @@ BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
|
|||
// drag and drop to child item, so clear pending auto-opens
|
||||
getRoot()->autoOpenTest(NULL);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFolderViewFolder::openItem( void )
|
||||
|
|
@ -2075,14 +2075,14 @@ void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor)
|
|||
}
|
||||
|
||||
// LLView functionality
|
||||
BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
BOOL drop,
|
||||
bool LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
if (isOpen())
|
||||
{
|
||||
|
|
@ -2096,11 +2096,11 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << LL_ENDL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask,
|
||||
BOOL drop,
|
||||
bool LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -2110,14 +2110,14 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask,
|
|||
{
|
||||
*accept = ACCEPT_NO;
|
||||
tooltip_msg = LLTrans::getString("TooltipOutboxCannotDropOnRoot");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg);
|
||||
bool accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg);
|
||||
|
||||
if (accepted)
|
||||
{
|
||||
mDragAndDropTarget = TRUE;
|
||||
mDragAndDropTarget = true;
|
||||
*accept = ACCEPT_YES_MULTI;
|
||||
}
|
||||
else
|
||||
|
|
@ -2130,7 +2130,7 @@ BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask,
|
|||
getRoot()->autoOpenTest(this);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2260,19 +2260,19 @@ void LLFolderViewFolder::draw()
|
|||
LLView::draw();
|
||||
}
|
||||
|
||||
mExpanderHighlighted = FALSE;
|
||||
mExpanderHighlighted = false;
|
||||
}
|
||||
|
||||
// this does prefix traversal, as folders are listed above their contents
|
||||
LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children )
|
||||
LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, bool include_children )
|
||||
{
|
||||
BOOL found_item = FALSE;
|
||||
bool found_item = false;
|
||||
|
||||
LLFolderViewItem* result = NULL;
|
||||
// when not starting from a given item, start at beginning
|
||||
if(item == NULL)
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
}
|
||||
|
||||
// find current item among children
|
||||
|
|
@ -2290,16 +2290,16 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item,
|
|||
{
|
||||
if(item == (*fit))
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
// if we are on downwards traversal
|
||||
if (include_children && (*fit)->isOpen())
|
||||
{
|
||||
// look for first descendant
|
||||
return (*fit)->getNextFromChild(NULL, TRUE);
|
||||
return (*fit)->getNextFromChild(NULL, true);
|
||||
}
|
||||
// otherwise advance to next folder
|
||||
++fit;
|
||||
include_children = TRUE;
|
||||
include_children = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2311,7 +2311,7 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item,
|
|||
{
|
||||
if(item == (*iit))
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
// point to next item
|
||||
++iit;
|
||||
break;
|
||||
|
|
@ -2324,7 +2324,7 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item,
|
|||
{
|
||||
// you should never call this method with an item that isn't a child
|
||||
// so we should always find something
|
||||
llassert(FALSE);
|
||||
llassert(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2362,22 +2362,22 @@ LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item,
|
|||
{
|
||||
// If there are no siblings or children to go to, recurse up one level in the tree
|
||||
// and skip children for this folder, as we've already discounted them
|
||||
result = mParentFolder->getNextFromChild(this, FALSE);
|
||||
result = mParentFolder->getNextFromChild(this, false);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// this does postfix traversal, as folders are listed above their contents
|
||||
LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children )
|
||||
LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, bool include_children )
|
||||
{
|
||||
BOOL found_item = FALSE;
|
||||
bool found_item = false;
|
||||
|
||||
LLFolderViewItem* result = NULL;
|
||||
// when not starting from a given item, start at end
|
||||
if(item == NULL)
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
}
|
||||
|
||||
// find current item among children
|
||||
|
|
@ -2395,7 +2395,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it
|
|||
{
|
||||
if(item == (*iit))
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
// point to next item
|
||||
++iit;
|
||||
break;
|
||||
|
|
@ -2409,7 +2409,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it
|
|||
{
|
||||
if(item == (*fit))
|
||||
{
|
||||
found_item = TRUE;
|
||||
found_item = true;
|
||||
// point to next folder
|
||||
++fit;
|
||||
break;
|
||||
|
|
@ -2422,7 +2422,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it
|
|||
{
|
||||
// you should never call this method with an item that isn't a child
|
||||
// so we should always find something
|
||||
llassert(FALSE);
|
||||
llassert(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -168,21 +168,21 @@ protected:
|
|||
|
||||
static LLFontGL* getLabelFontForStyle(U8 style);
|
||||
|
||||
BOOL mIsSelected;
|
||||
bool mIsSelected;
|
||||
|
||||
public:
|
||||
static void initClass();
|
||||
static void cleanupClass();
|
||||
|
||||
BOOL postBuild();
|
||||
bool postBuild();
|
||||
|
||||
virtual void openItem( void );
|
||||
|
||||
void arrangeAndSet(BOOL set_selection, BOOL take_keyboard_focus);
|
||||
void arrangeAndSet(bool set_selection, bool take_keyboard_focus);
|
||||
|
||||
virtual ~LLFolderViewItem( void );
|
||||
|
||||
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
|
||||
// addToFolder() returns true if it succeeds. false otherwise
|
||||
virtual void addToFolder(LLFolderViewFolder* folder);
|
||||
|
||||
// Finds width and height of this object and it's children. Also
|
||||
|
|
@ -194,13 +194,13 @@ public:
|
|||
S32 getTextPad();
|
||||
|
||||
// If 'selection' is 'this' then note that otherwise ignore.
|
||||
// Returns TRUE if this item ends up being selected.
|
||||
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus);
|
||||
// Returns true if this item ends up being selected.
|
||||
virtual bool setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus);
|
||||
|
||||
// This method is used to set the selection state of an item.
|
||||
// If 'selection' is 'this' then note selection.
|
||||
// Returns TRUE if the selection state of this item was changed.
|
||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||
// Returns true if the selection state of this item was changed.
|
||||
virtual bool changeSelection(LLFolderViewItem* selection, bool selected);
|
||||
|
||||
// this method is used to deselect this element
|
||||
void deselectItem();
|
||||
|
|
@ -212,24 +212,24 @@ public:
|
|||
virtual std::set<LLFolderViewItem*> getSelectionList() const;
|
||||
|
||||
// Returns true is this object and all of its children can be removed (deleted by user)
|
||||
virtual BOOL isRemovable();
|
||||
virtual bool isRemovable();
|
||||
|
||||
// Returns true is this object and all of its children can be moved
|
||||
virtual BOOL isMovable();
|
||||
virtual bool isMovable();
|
||||
|
||||
// destroys this item recursively
|
||||
virtual void destroyView();
|
||||
|
||||
BOOL isSelected() const { return mIsSelected; }
|
||||
bool isSelected() const { return mIsSelected; }
|
||||
bool isInSelection() const;
|
||||
|
||||
void setUnselected() { mIsSelected = FALSE; }
|
||||
void setUnselected() { mIsSelected = false; }
|
||||
|
||||
void setIsCurSelection(BOOL select) { mIsCurSelection = select; }
|
||||
void setIsCurSelection(bool select) { mIsCurSelection = select; }
|
||||
|
||||
BOOL getIsCurSelection() const { return mIsCurSelection; }
|
||||
bool getIsCurSelection() const { return mIsCurSelection; }
|
||||
|
||||
BOOL hasVisibleChildren() const { return mHasVisibleChildren; }
|
||||
bool hasVisibleChildren() const { return mHasVisibleChildren; }
|
||||
|
||||
// true if object can't have children
|
||||
virtual bool isFolderComplete() { return true; }
|
||||
|
|
@ -239,8 +239,8 @@ public:
|
|||
|
||||
// Call through to the viewed object and return true if it can be
|
||||
// removed. Returns true if it's removed.
|
||||
//virtual BOOL removeRecursively(BOOL single_item);
|
||||
BOOL remove();
|
||||
//virtual bool removeRecursively(bool single_item);
|
||||
bool remove();
|
||||
|
||||
// Build an appropriate context menu for the item. Flags unused.
|
||||
void buildContextMenu(class LLMenuGL& menu, U32 flags);
|
||||
|
|
@ -259,8 +259,8 @@ public:
|
|||
|
||||
void setParentFolder(LLFolderViewFolder* parent) { mParentFolder = parent; }
|
||||
|
||||
LLFolderViewItem* getNextOpenNode( BOOL include_children = TRUE );
|
||||
LLFolderViewItem* getPreviousOpenNode( BOOL include_children = TRUE );
|
||||
LLFolderViewItem* getNextOpenNode( bool include_children = true );
|
||||
LLFolderViewItem* getPreviousOpenNode( bool include_children = true );
|
||||
|
||||
const LLFolderViewModelItem* getViewModelItem( void ) const { return mViewModelItem; }
|
||||
LLFolderViewModelItem* getViewModelItem( void ) { return mViewModelItem; }
|
||||
|
|
@ -272,16 +272,16 @@ public:
|
|||
void rename(const std::string& new_name);
|
||||
|
||||
// Show children
|
||||
virtual void setOpen(BOOL open = TRUE) {};
|
||||
virtual BOOL isOpen() const { return FALSE; }
|
||||
virtual void setOpen(bool open = true) {};
|
||||
virtual bool isOpen() const { return false; }
|
||||
|
||||
virtual LLFolderView* getRoot();
|
||||
virtual const LLFolderView* getRoot() const;
|
||||
BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor );
|
||||
bool isDescendantOf( const LLFolderViewFolder* potential_ancestor );
|
||||
S32 getIndentation() const { return mIndentation; }
|
||||
|
||||
virtual BOOL passedFilter(S32 filter_generation = -1);
|
||||
virtual BOOL isPotentiallyVisible(S32 filter_generation = -1);
|
||||
virtual bool passedFilter(S32 filter_generation = -1);
|
||||
virtual bool isPotentiallyVisible(S32 filter_generation = -1);
|
||||
|
||||
// refresh information from the object being viewed.
|
||||
// refreshes label, suffixes and sets icons. Expensive!
|
||||
|
|
@ -302,14 +302,14 @@ public:
|
|||
|
||||
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||
|
||||
//virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return LLView::findChildView(name, recurse); }
|
||||
//virtual LLView* findChildView(const std::string& name, bool recurse) const { return LLView::findChildView(name, recurse); }
|
||||
|
||||
// virtual void handleDropped();
|
||||
virtual void draw();
|
||||
void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color);
|
||||
void drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor);
|
||||
void drawHighlight(const bool showContent, const bool hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor);
|
||||
void drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x);
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -339,7 +339,7 @@ protected:
|
|||
friend class LLUICtrlFactory;
|
||||
|
||||
void updateLabelRotation();
|
||||
virtual bool isCollapsed() { return FALSE; }
|
||||
virtual bool isCollapsed() { return false; }
|
||||
|
||||
public:
|
||||
typedef std::list<LLFolderViewItem*> items_t;
|
||||
|
|
@ -349,8 +349,8 @@ protected:
|
|||
items_t mItems;
|
||||
folders_t mFolders;
|
||||
|
||||
BOOL mIsOpen;
|
||||
BOOL mExpanderHighlighted;
|
||||
bool mIsOpen;
|
||||
bool mExpanderHighlighted;
|
||||
F32 mCurHeight;
|
||||
F32 mTargetHeight;
|
||||
F32 mAutoOpenCountdown;
|
||||
|
|
@ -371,40 +371,40 @@ public:
|
|||
|
||||
virtual ~LLFolderViewFolder( void );
|
||||
|
||||
LLFolderViewItem* getNextFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
|
||||
LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
|
||||
LLFolderViewItem* getNextFromChild( LLFolderViewItem*, bool include_children = true );
|
||||
LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, bool include_children = true );
|
||||
|
||||
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
|
||||
// addToFolder() returns true if it succeeds. false otherwise
|
||||
virtual void addToFolder(LLFolderViewFolder* folder);
|
||||
|
||||
// Finds width and height of this object and it's children. Also
|
||||
// makes sure that this view and it's children are the right size.
|
||||
virtual S32 arrange( S32* width, S32* height );
|
||||
|
||||
BOOL needsArrange();
|
||||
bool needsArrange();
|
||||
|
||||
bool descendantsPassedFilter(S32 filter_generation = -1);
|
||||
|
||||
// Passes selection information on to children and record
|
||||
// selection information if necessary.
|
||||
// Returns TRUE if this object (or a child) ends up being selected.
|
||||
// If 'openitem' is TRUE then folders are opened up along the way to the selection.
|
||||
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus = TRUE);
|
||||
// Returns true if this object (or a child) ends up being selected.
|
||||
// If 'openitem' is true then folders are opened up along the way to the selection.
|
||||
virtual bool setSelection(LLFolderViewItem* selection, bool openitem, bool take_keyboard_focus = true);
|
||||
|
||||
// This method is used to change the selection of an item.
|
||||
// Recursively traverse all children; if 'selection' is 'this' then change
|
||||
// the select status if necessary.
|
||||
// Returns TRUE if the selection state of this folder, or of a child, was changed.
|
||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||
// Returns true if the selection state of this folder, or of a child, was changed.
|
||||
virtual bool changeSelection(LLFolderViewItem* selection, bool selected);
|
||||
|
||||
// this method is used to group select items
|
||||
void extendSelectionTo(LLFolderViewItem* selection);
|
||||
|
||||
// Returns true is this object and all of its children can be removed.
|
||||
virtual BOOL isRemovable();
|
||||
virtual bool isRemovable();
|
||||
|
||||
// Returns true is this object and all of its children can be moved
|
||||
virtual BOOL isMovable();
|
||||
virtual bool isMovable();
|
||||
|
||||
// destroys this folder, and all children
|
||||
virtual void destroyView();
|
||||
|
|
@ -431,7 +431,7 @@ public:
|
|||
virtual void toggleOpen();
|
||||
|
||||
// Force a folder open or closed
|
||||
virtual void setOpen(BOOL openitem = TRUE);
|
||||
virtual void setOpen(bool openitem = true);
|
||||
|
||||
// Called when a child is refreshed.
|
||||
virtual void requestArrange();
|
||||
|
|
@ -440,14 +440,14 @@ public:
|
|||
// method was written because the list iterators destroy the state
|
||||
// of other iterations, thus, we can't arrange while iterating
|
||||
// through the children (such as when setting which is selected.
|
||||
virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO);
|
||||
virtual void setOpenArrangeRecursively(bool openitem, ERecurseType recurse = RECURSE_NO);
|
||||
|
||||
// Get the current state of the folder.
|
||||
virtual BOOL isOpen() const { return mIsOpen; }
|
||||
virtual bool isOpen() const { return mIsOpen; }
|
||||
|
||||
// special case if an object is dropped on the child.
|
||||
BOOL handleDragAndDropFromChild(MASK mask,
|
||||
BOOL drop,
|
||||
bool handleDragAndDropFromChild(MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -466,14 +466,14 @@ public:
|
|||
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,
|
||||
virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
BOOL handleDragAndDropToThisFolder(MASK mask,
|
||||
BOOL drop,
|
||||
bool handleDragAndDropToThisFolder(MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
|
|||
|
|
@ -163,24 +163,24 @@ public:
|
|||
|
||||
virtual void navigateToFolder(bool new_window = false, bool change_mode = false) = 0;
|
||||
|
||||
virtual BOOL isItemWearable() const { return FALSE; }
|
||||
virtual bool isItemWearable() const { return false; }
|
||||
|
||||
virtual BOOL isItemRenameable() const = 0;
|
||||
virtual bool isItemRenameable() const = 0;
|
||||
virtual bool renameItem(const std::string& new_name) = 0;
|
||||
|
||||
virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder
|
||||
virtual bool isItemMovable( void ) const = 0; // Can be moved to another folder
|
||||
virtual void move( LLFolderViewModelItem* parent_listener ) = 0;
|
||||
|
||||
virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed
|
||||
virtual BOOL removeItem() = 0;
|
||||
virtual bool isItemRemovable( void ) const = 0; // Can be destroyed
|
||||
virtual bool removeItem() = 0;
|
||||
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) = 0;
|
||||
|
||||
virtual bool isItemCopyable(bool can_copy_as_link = true) const = 0;
|
||||
virtual BOOL copyToClipboard() const = 0;
|
||||
virtual BOOL cutToClipboard() = 0;
|
||||
virtual bool copyToClipboard() const = 0;
|
||||
virtual bool cutToClipboard() = 0;
|
||||
virtual bool isCutToClipboard() { return false; };
|
||||
|
||||
virtual BOOL isClipboardPasteable() const = 0;
|
||||
virtual bool isClipboardPasteable() const = 0;
|
||||
virtual void pasteFromClipboard() = 0;
|
||||
virtual void pasteLinkFromClipboard() = 0;
|
||||
|
||||
|
|
@ -208,10 +208,10 @@ public:
|
|||
virtual void clearChildren() = 0;
|
||||
|
||||
// This method will be called to determine if a drop can be
|
||||
// performed, and will set drop to TRUE if a drop is
|
||||
// requested. Returns TRUE if a drop is possible/happened,
|
||||
// otherwise FALSE.
|
||||
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
|
||||
// performed, and will set drop to true if a drop is
|
||||
// requested. Returns true if a drop is possible/happened,
|
||||
// otherwise false.
|
||||
virtual bool dragOrDrop(MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
std::string& tooltip_msg) = 0;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ bool LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
|
|||
return LLUICtrl::handleHover(x, y, mask);
|
||||
}
|
||||
|
||||
void LLIconCtrl::onVisibilityChange(BOOL new_visibility)
|
||||
void LLIconCtrl::onVisibilityChange(bool new_visibility)
|
||||
{
|
||||
LLUICtrl::onVisibilityChange(new_visibility);
|
||||
if (mPriority == LLGLTexture::BOOST_ICON)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
virtual bool handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
// lluictrl overrides
|
||||
void onVisibilityChange(BOOL new_visibility);
|
||||
void onVisibilityChange(bool new_visibility);
|
||||
virtual void setValue(const LLSD& value );
|
||||
|
||||
std::string getImageName() const;
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
|
||||
// Line start tokens
|
||||
{
|
||||
BOOL line_done = FALSE;
|
||||
bool line_done = false;
|
||||
for (token_list_t::iterator iter = mLineTokenList.begin();
|
||||
iter != mLineTokenList.end(); ++iter)
|
||||
{
|
||||
|
|
@ -573,7 +573,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
|
||||
//create segments from seg_start to seg_end
|
||||
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
|
||||
line_done = TRUE; // to break out of second loop.
|
||||
line_done = true; // to break out of second loop.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -815,7 +815,7 @@ bool LLKeywords::loadFromLegacyFile(const std::string& filename)
|
|||
if ( (!LLUICtrlFactory::getLayeredXMLNode(filename, xml_root)) || (xml_root.isNull()) || (!xml_root->hasName("script_library")) )
|
||||
{
|
||||
LL_WARNS() << "Could not read the script library (" << filename << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
for (LLXMLNode* pNode = xml_root->getFirstChild(); pNode != NULL; pNode = pNode->getNextSibling())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ LLLayoutPanel::LLLayoutPanel(const Params& p)
|
|||
mMinDim(p.min_dim),
|
||||
mAutoResize(p.auto_resize),
|
||||
mUserResize(p.user_resize),
|
||||
mCollapsed(FALSE),
|
||||
mCollapsed(false),
|
||||
mCollapseAmt(0.f),
|
||||
mVisibleAmt(1.f), // default to fully visible
|
||||
mResizeBar(NULL),
|
||||
|
|
@ -144,8 +144,8 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation )
|
|||
? getRect().getWidth()
|
||||
: getRect().getHeight()));
|
||||
|
||||
if (mAutoResize == FALSE
|
||||
&& mUserResize == TRUE
|
||||
if (mAutoResize == false
|
||||
&& mUserResize == true
|
||||
&& mMinDim == -1 )
|
||||
{
|
||||
setMinDim(layout_dim);
|
||||
|
|
@ -153,7 +153,7 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation )
|
|||
mTargetDim = llmax(layout_dim, getMinDim());
|
||||
}
|
||||
|
||||
void LLLayoutPanel::setVisible( BOOL visible )
|
||||
void LLLayoutPanel::setVisible( bool visible )
|
||||
{
|
||||
if (visible != getVisible())
|
||||
{
|
||||
|
|
@ -166,7 +166,7 @@ void LLLayoutPanel::setVisible( BOOL visible )
|
|||
LLPanel::setVisible(visible);
|
||||
}
|
||||
|
||||
void LLLayoutPanel::reshape( S32 width, S32 height, BOOL called_from_parent /*= TRUE*/ )
|
||||
void LLLayoutPanel::reshape( S32 width, S32 height, bool called_from_parent /*= true*/ )
|
||||
{
|
||||
if (width == getRect().getWidth() && height == getRect().getHeight() && !LLView::sForceReshape) return;
|
||||
|
||||
|
|
@ -352,10 +352,10 @@ void LLLayoutStack::removeChild(LLView* view)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLayoutStack::postBuild()
|
||||
bool LLLayoutStack::postBuild()
|
||||
{
|
||||
updateLayout();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
|
||||
|
|
@ -379,7 +379,7 @@ bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
|
|||
{
|
||||
height = dim;
|
||||
}
|
||||
panelp->reshape(width, height, TRUE);
|
||||
panelp->reshape(width, height, true);
|
||||
}
|
||||
// </FS:Zi>
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
|
|||
createResizeBar(panelp);
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
BOOL result = LLView::addChild(child, tab_group);
|
||||
bool result = LLView::addChild(child, tab_group);
|
||||
|
||||
updateFractionalSizes();
|
||||
return result;
|
||||
|
|
@ -402,11 +402,11 @@ void LLLayoutStack::addPanel(LLLayoutPanel* panel, EAnimate animate)
|
|||
if (animate == ANIMATE)
|
||||
{
|
||||
panel->mVisibleAmt = 0.f;
|
||||
panel->setVisible(TRUE);
|
||||
panel->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
|
||||
void LLLayoutStack::collapsePanel(LLPanel* panel, bool collapsed)
|
||||
{
|
||||
LLLayoutPanel* panel_container = findEmbeddedPanel(panel);
|
||||
if (!panel_container) return;
|
||||
|
|
@ -681,7 +681,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
|
|||
border_params.shadow_dark_color = LLUIColorTable::instance().getColor("ResizebarBorderDark");
|
||||
|
||||
addBorder(border_params);
|
||||
setBorderVisible(TRUE);
|
||||
setBorderVisible(true);
|
||||
|
||||
LLImagePanel::Params image_panel;
|
||||
mDragHandleImage = LLUI::getUIImage(LLResizeBar::RIGHT == mSide ? "Vertical Drag Handle" : "Horizontal Drag Handle");
|
||||
|
|
@ -694,7 +694,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
|
|||
|
||||
//if (mShowDragHandle)
|
||||
//{
|
||||
// setBackgroundVisible(TRUE);
|
||||
// setBackgroundVisible(true);
|
||||
// setTransparentColor(LLUIColorTable::instance().getColor("ResizebarBody"));
|
||||
//}
|
||||
|
||||
|
|
@ -1050,7 +1050,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
|
|||
//normalizeFractionalSizes();
|
||||
}
|
||||
|
||||
void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLLayoutStack::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
mNeedsLayout = true;
|
||||
LLView::reshape(width, height, called_from_parent);
|
||||
|
|
@ -1063,7 +1063,7 @@ void LLLayoutStack::updateResizeBarLimits()
|
|||
{
|
||||
if (!visible_panelp->getVisible() || visible_panelp->mCollapsed)
|
||||
{
|
||||
visible_panelp->mResizeBar->setVisible(FALSE);
|
||||
visible_panelp->mResizeBar->setVisible(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1073,14 +1073,14 @@ void LLLayoutStack::updateResizeBarLimits()
|
|||
&& (visible_panelp->mAutoResize || visible_panelp->mUserResize) // current panel is resizable
|
||||
&& (previous_visible_panelp->mAutoResize || previous_visible_panelp->mUserResize)) // previous panel is resizable
|
||||
{
|
||||
visible_panelp->mResizeBar->setVisible(TRUE);
|
||||
visible_panelp->mResizeBar->setVisible(true);
|
||||
S32 previous_panel_headroom = previous_visible_panelp->getVisibleDim() - previous_visible_panelp->getRelevantMinDim();
|
||||
visible_panelp->mResizeBar->setResizeLimits(visible_panelp->getRelevantMinDim(),
|
||||
visible_panelp->getVisibleDim() + previous_panel_headroom);
|
||||
}
|
||||
else
|
||||
{
|
||||
visible_panelp->mResizeBar->setVisible(FALSE);
|
||||
visible_panelp->mResizeBar->setVisible(false);
|
||||
}
|
||||
|
||||
previous_visible_panelp = visible_panelp;
|
||||
|
|
@ -1118,7 +1118,7 @@ void LLLayoutStack::refreshFromSettings()
|
|||
{
|
||||
height = dim;
|
||||
}
|
||||
panelp->reshape(width, height, TRUE);
|
||||
panelp->reshape(width, height, true);
|
||||
}
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ public:
|
|||
/*virtual*/ void draw();
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild(LLView*);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
/*virtual*/ bool addChild(LLView* child, S32 tab_group = 0);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
|
||||
|
|
@ -90,7 +90,7 @@ public:
|
|||
} EAnimate;
|
||||
|
||||
void addPanel(LLLayoutPanel* panel, EAnimate animate = NO_ANIMATE);
|
||||
void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE);
|
||||
void collapsePanel(LLPanel* panel, bool collapsed = true);
|
||||
S32 getNumPanels() { return mPanels.size(); }
|
||||
|
||||
void updateLayout();
|
||||
|
|
@ -170,10 +170,10 @@ public:
|
|||
|
||||
void handleReshape(const LLRect& new_rect, bool by_user);
|
||||
|
||||
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
|
||||
void setVisible(BOOL visible);
|
||||
void setVisible(bool visible);
|
||||
|
||||
S32 getLayoutDim() const;
|
||||
S32 getTargetDim() const;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ static LLDefaultChildRegistry::Register<LLLineEditor> r1("line_editor");
|
|||
|
||||
// Compiler optimization, generate extern template
|
||||
template class LLLineEditor* LLView::getChild<class LLLineEditor>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
|
||||
//
|
||||
// Member functions
|
||||
|
|
@ -127,10 +127,10 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
|
|||
mTextLeftEdge(0), // computed in updateTextPadding() below
|
||||
mTextRightEdge(0), // computed in updateTextPadding() below
|
||||
mCommitOnFocusLost( p.commit_on_focus_lost ),
|
||||
mKeystrokeOnEsc(FALSE),
|
||||
mKeystrokeOnEsc(false),
|
||||
mRevertOnEsc( p.revert_on_esc ),
|
||||
mKeystrokeCallback( p.keystroke_callback() ),
|
||||
mIsSelecting( FALSE ),
|
||||
mIsSelecting( false ),
|
||||
mSelectionStart( 0 ),
|
||||
mSelectionEnd( 0 ),
|
||||
mLastSelectionX(-1),
|
||||
|
|
@ -138,23 +138,23 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
|
|||
mLastSelectionStart(-1),
|
||||
mLastSelectionEnd(-1),
|
||||
mBorderThickness( 0 ),
|
||||
mIgnoreArrowKeys( FALSE ),
|
||||
mIgnoreArrowKeys( false ),
|
||||
mIgnoreTab( p.ignore_tab ),
|
||||
mDrawAsterixes( p.is_password ),
|
||||
mSpellCheck( p.spellcheck ),
|
||||
mSpellCheckStart(-1),
|
||||
mSpellCheckEnd(-1),
|
||||
mSelectAllonFocusReceived( p.select_on_focus ),
|
||||
mSelectAllonCommit( TRUE ),
|
||||
mPassDelete(FALSE),
|
||||
mReadOnly(FALSE),
|
||||
mSelectAllonCommit( true ),
|
||||
mPassDelete(false),
|
||||
mReadOnly(false),
|
||||
mBgImage( p.background_image ),
|
||||
mBgImageDisabled( p.background_image_disabled ),
|
||||
mBgImageFocused( p.background_image_focused ),
|
||||
mShowImageFocused( p.bg_image_always_focused ),
|
||||
mUseBgColor(p.use_bg_color),
|
||||
mHaveHistory(FALSE),
|
||||
mReplaceNewlinesWithSpaces( TRUE ),
|
||||
mHaveHistory(false),
|
||||
mReplaceNewlinesWithSpaces( true ),
|
||||
mLabel(p.label),
|
||||
mCursorColor(p.cursor_color()),
|
||||
mBgColor(p.bg_color()),
|
||||
|
|
@ -170,7 +170,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
|
|||
{
|
||||
llassert( mMaxLengthBytes > 0 );
|
||||
|
||||
LLUICtrl::setEnabled(TRUE);
|
||||
LLUICtrl::setEnabled(true);
|
||||
setEnabled(p.enabled);
|
||||
|
||||
mScrollTimer.reset();
|
||||
|
|
@ -215,7 +215,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
|
|||
|
||||
LLLineEditor::~LLLineEditor()
|
||||
{
|
||||
mCommitOnFocusLost = FALSE;
|
||||
mCommitOnFocusLost = false;
|
||||
|
||||
// Make sure no context menu linger around once the widget is deleted
|
||||
LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get());
|
||||
|
|
@ -232,7 +232,7 @@ LLLineEditor::~LLLineEditor()
|
|||
void LLLineEditor::initFromParams(const LLLineEditor::Params& params)
|
||||
{
|
||||
LLUICtrl::initFromParams(params);
|
||||
LLUICtrl::setEnabled(TRUE);
|
||||
LLUICtrl::setEnabled(true);
|
||||
setEnabled(params.enabled);
|
||||
}
|
||||
|
||||
|
|
@ -281,9 +281,9 @@ void LLLineEditor::onCommit()
|
|||
if (mSelectAllonCommit) selectAll();
|
||||
}
|
||||
|
||||
// Returns TRUE if user changed value at all
|
||||
// Returns true if user changed value at all
|
||||
// virtual
|
||||
BOOL LLLineEditor::isDirty() const
|
||||
bool LLLineEditor::isDirty() const
|
||||
{
|
||||
return mText.getString() != mPrevText;
|
||||
}
|
||||
|
|
@ -344,14 +344,14 @@ void LLLineEditor::updateHistory()
|
|||
}
|
||||
}
|
||||
|
||||
void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLLineEditor::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLUICtrl::reshape(width, height, called_from_parent);
|
||||
updateTextPadding(); // For clamping side-effect.
|
||||
setCursor(mCursorPos); // For clamping side-effect.
|
||||
}
|
||||
|
||||
void LLLineEditor::setEnabled(BOOL enabled)
|
||||
void LLLineEditor::setEnabled(bool enabled)
|
||||
{
|
||||
mReadOnly = !enabled;
|
||||
setTabStop(!mReadOnly);
|
||||
|
|
@ -406,7 +406,7 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit
|
|||
|
||||
// Check to see if entire field is selected.
|
||||
S32 len = mText.length();
|
||||
BOOL all_selected = (len > 0)
|
||||
bool all_selected = (len > 0)
|
||||
&& (( mSelectionStart == 0 && mSelectionEnd == len )
|
||||
|| ( mSelectionStart == len && mSelectionEnd == 0 ));
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ void LLLineEditor::resetScrollPosition()
|
|||
setCursor(getCursor());
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canDeselect() const
|
||||
bool LLLineEditor::canDeselect() const
|
||||
{
|
||||
return hasSelection();
|
||||
}
|
||||
|
|
@ -527,13 +527,13 @@ void LLLineEditor::deselect()
|
|||
{
|
||||
mSelectionStart = 0;
|
||||
mSelectionEnd = 0;
|
||||
mIsSelecting = FALSE;
|
||||
mIsSelecting = false;
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::startSelection()
|
||||
{
|
||||
mIsSelecting = TRUE;
|
||||
mIsSelecting = true;
|
||||
mSelectionStart = getCursor();
|
||||
mSelectionEnd = getCursor();
|
||||
}
|
||||
|
|
@ -542,14 +542,14 @@ void LLLineEditor::endSelection()
|
|||
{
|
||||
if( mIsSelecting )
|
||||
{
|
||||
mIsSelecting = FALSE;
|
||||
mIsSelecting = false;
|
||||
mSelectionEnd = getCursor();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canSelectAll() const
|
||||
bool LLLineEditor::canSelectAll() const
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLLineEditor::selectAll()
|
||||
|
|
@ -563,7 +563,7 @@ void LLLineEditor::selectAll()
|
|||
mSelectionEnd = 0;
|
||||
setCursor(mSelectionEnd);
|
||||
//mScrollHPos = 0;
|
||||
mIsSelecting = TRUE;
|
||||
mIsSelecting = true;
|
||||
// <FS:AW> Linux primary "clipboard" tainted by auto-selection
|
||||
//updatePrimary();
|
||||
}
|
||||
|
|
@ -1007,19 +1007,19 @@ void LLLineEditor::addChar(const llwchar uni_char)
|
|||
|
||||
S32 new_bytes = wchar_utf8_length(new_c);
|
||||
|
||||
BOOL allow_char = TRUE;
|
||||
bool allow_char = true;
|
||||
|
||||
// Check byte length limit
|
||||
if ((new_bytes + cur_bytes) > mMaxLengthBytes)
|
||||
{
|
||||
allow_char = FALSE;
|
||||
allow_char = false;
|
||||
}
|
||||
else if (mMaxLengthChars)
|
||||
{
|
||||
S32 wide_chars = mText.getWString().size();
|
||||
if ((wide_chars + 1) > mMaxLengthChars)
|
||||
{
|
||||
allow_char = FALSE;
|
||||
allow_char = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1083,7 +1083,7 @@ void LLLineEditor::setSelection(S32 start, S32 end)
|
|||
{
|
||||
S32 len = mText.length();
|
||||
|
||||
mIsSelecting = TRUE;
|
||||
mIsSelecting = true;
|
||||
|
||||
// JC, yes, this seems odd, but I think you have to presume a
|
||||
// selection dragged from the end towards the start.
|
||||
|
|
@ -1092,7 +1092,7 @@ void LLLineEditor::setSelection(S32 start, S32 end)
|
|||
setCursor(start);
|
||||
}
|
||||
|
||||
void LLLineEditor::setDrawAsterixes(BOOL b)
|
||||
void LLLineEditor::setDrawAsterixes(bool b)
|
||||
{
|
||||
mDrawAsterixes = b;
|
||||
updateAllowingLanguageInput();
|
||||
|
|
@ -1127,13 +1127,13 @@ S32 LLLineEditor::nextWordPos(S32 cursorPos) const
|
|||
}
|
||||
|
||||
|
||||
BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask)
|
||||
bool LLLineEditor::handleSelectionKey(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
if( mask & MASK_SHIFT )
|
||||
{
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
|
|
@ -1186,7 +1186,7 @@ BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask)
|
|||
}
|
||||
|
||||
default:
|
||||
handled = FALSE;
|
||||
handled = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1219,7 +1219,7 @@ void LLLineEditor::deleteSelection()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canCut() const
|
||||
bool LLLineEditor::canCut() const
|
||||
{
|
||||
return !mReadOnly && !mDrawAsterixes && hasSelection();
|
||||
}
|
||||
|
|
@ -1243,7 +1243,7 @@ void LLLineEditor::cut()
|
|||
deleteSelection();
|
||||
|
||||
// Validate new string and rollback the if needed.
|
||||
BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
if( need_to_rollback )
|
||||
{
|
||||
rollback.doRollback( this );
|
||||
|
|
@ -1256,7 +1256,7 @@ void LLLineEditor::cut()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canCopy() const
|
||||
bool LLLineEditor::canCopy() const
|
||||
{
|
||||
return !mDrawAsterixes && hasSelection();
|
||||
}
|
||||
|
|
@ -1273,7 +1273,7 @@ void LLLineEditor::copy()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canPaste() const
|
||||
bool LLLineEditor::canPaste() const
|
||||
{
|
||||
return !mReadOnly && LLClipboard::instance().isTextAvailable();
|
||||
}
|
||||
|
|
@ -1371,7 +1371,7 @@ void LLLineEditor::pasteHelper(bool is_primary)
|
|||
deselect();
|
||||
|
||||
// Validate new string and rollback the if needed.
|
||||
BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
if( need_to_rollback )
|
||||
{
|
||||
rollback.doRollback( this );
|
||||
|
|
@ -1396,7 +1396,7 @@ void LLLineEditor::copyPrimary()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canPastePrimary() const
|
||||
bool LLLineEditor::canPastePrimary() const
|
||||
{
|
||||
return !mReadOnly && LLClipboard::instance().isTextAvailable(true);
|
||||
}
|
||||
|
|
@ -1409,9 +1409,9 @@ void LLLineEditor::updatePrimary()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
||||
bool LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
|
|
@ -1421,7 +1421,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
gKeyboard->toggleInsertMode();
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_BACKSPACE:
|
||||
|
|
@ -1448,7 +1448,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
// <FS> Ctrl-Backspace remove word
|
||||
|
|
@ -1466,7 +1466,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
if (!mIgnoreArrowKeys)
|
||||
{
|
||||
setCursor(0);
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1479,7 +1479,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
{
|
||||
setCursor(len);
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1506,7 +1506,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1533,7 +1533,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1552,7 +1552,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1569,7 +1569,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
{
|
||||
LLUI::getInstance()->reportBadKeystroke();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1598,10 +1598,10 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
|
||||
bool LLLineEditor::handleKeyHere(KEY key, MASK mask )
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
BOOL selection_modified = FALSE;
|
||||
bool handled = false;
|
||||
bool selection_modified = false;
|
||||
|
||||
if ( gFocusMgr.getKeyboardFocus() == this )
|
||||
{
|
||||
|
|
@ -1643,7 +1643,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
|
|||
deselect();
|
||||
}
|
||||
|
||||
BOOL need_to_rollback = FALSE;
|
||||
bool need_to_rollback = false;
|
||||
|
||||
// If read-only, don't allow changes
|
||||
need_to_rollback |= (mReadOnly && (mText.getString() == rollback.getText()));
|
||||
|
|
@ -1702,7 +1702,7 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
|
|||
|
||||
deselect();
|
||||
|
||||
BOOL need_to_rollback = FALSE;
|
||||
bool need_to_rollback = false;
|
||||
|
||||
// Validate new string and rollback the keystroke if needed.
|
||||
need_to_rollback |= ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
|
|
@ -1728,7 +1728,7 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLLineEditor::canDoDelete() const
|
||||
bool LLLineEditor::canDoDelete() const
|
||||
{
|
||||
return ( !mReadOnly && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) );
|
||||
}
|
||||
|
|
@ -1758,7 +1758,7 @@ void LLLineEditor::doDelete()
|
|||
}
|
||||
|
||||
// Validate new string and rollback the if needed.
|
||||
BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
|
||||
if( need_to_rollback )
|
||||
{
|
||||
rollback.doRollback( this );
|
||||
|
|
@ -1779,7 +1779,7 @@ void LLLineEditor::drawBackground()
|
|||
F32 alpha = getCurrentTransparency();
|
||||
if (mUseBgColor)
|
||||
{
|
||||
gl_rect_2d(getLocalRect(), mBgColor % alpha, TRUE);
|
||||
gl_rect_2d(getLocalRect(), mBgColor % alpha, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2000,7 +2000,7 @@ void LLLineEditor::draw()
|
|||
&rendered_pixels_right);
|
||||
}
|
||||
#if 1 // for when we're ready for image art.
|
||||
mBorder->setVisible(FALSE); // no more programmatic art.
|
||||
mBorder->setVisible(false); // no more programmatic art.
|
||||
#endif
|
||||
|
||||
if ( (getSpellCheck()) && (mText.length() > 2) )
|
||||
|
|
@ -2101,7 +2101,7 @@ void LLLineEditor::draw()
|
|||
// If we're editing...
|
||||
if( hasFocus())
|
||||
{
|
||||
//mBorder->setVisible(TRUE); // ok, programmer art just this once.
|
||||
//mBorder->setVisible(true); // ok, programmer art just this once.
|
||||
// (Flash the cursor every half second)
|
||||
if (!mReadOnly && gFocusMgr.getAppHasFocus())
|
||||
{
|
||||
|
|
@ -2163,16 +2163,16 @@ void LLLineEditor::draw()
|
|||
LLFontGL::NO_SHADOW,
|
||||
S32_MAX,
|
||||
mTextRightEdge - ll_round(rendered_pixels_right),
|
||||
&rendered_pixels_right, FALSE);
|
||||
&rendered_pixels_right, false);
|
||||
}
|
||||
|
||||
|
||||
// Draw children (border)
|
||||
//mBorder->setVisible(TRUE);
|
||||
mBorder->setKeyboardFocusHighlight( TRUE );
|
||||
//mBorder->setVisible(true);
|
||||
mBorder->setKeyboardFocusHighlight( true );
|
||||
LLView::draw();
|
||||
mBorder->setKeyboardFocusHighlight( FALSE );
|
||||
//mBorder->setVisible(FALSE);
|
||||
mBorder->setKeyboardFocusHighlight( false );
|
||||
//mBorder->setVisible(false);
|
||||
}
|
||||
else // does not have keyboard input
|
||||
{
|
||||
|
|
@ -2188,7 +2188,7 @@ void LLLineEditor::draw()
|
|||
LLFontGL::NO_SHADOW,
|
||||
S32_MAX,
|
||||
mTextRightEdge - ll_round(rendered_pixels_right),
|
||||
&rendered_pixels_right, FALSE);
|
||||
&rendered_pixels_right, false);
|
||||
}
|
||||
// Draw children (border)
|
||||
LLView::draw();
|
||||
|
|
@ -2245,19 +2245,19 @@ void LLLineEditor::onTabInto()
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLLineEditor::acceptsTextInput() const
|
||||
bool LLLineEditor::acceptsTextInput() const
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Start or stop the editor from accepting text-editing keystrokes
|
||||
void LLLineEditor::setFocus( BOOL new_state )
|
||||
void LLLineEditor::setFocus( bool new_state )
|
||||
{
|
||||
BOOL old_state = hasFocus();
|
||||
bool old_state = hasFocus();
|
||||
|
||||
if (!new_state)
|
||||
{
|
||||
getWindow()->allowLanguageTextInput(this, FALSE);
|
||||
getWindow()->allowLanguageTextInput(this, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2268,7 +2268,7 @@ void LLLineEditor::setFocus( BOOL new_state )
|
|||
// 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;
|
||||
}
|
||||
|
||||
if( new_state )
|
||||
|
|
@ -2350,13 +2350,13 @@ bool LLLineEditor::prevalidateInput(const LLWString& wstr)
|
|||
}
|
||||
|
||||
// static
|
||||
BOOL LLLineEditor::postvalidateFloat(const std::string &str)
|
||||
bool LLLineEditor::postvalidateFloat(const std::string &str)
|
||||
{
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
|
||||
BOOL success = TRUE;
|
||||
BOOL has_decimal = FALSE;
|
||||
BOOL has_digit = FALSE;
|
||||
bool success = true;
|
||||
bool has_decimal = false;
|
||||
bool has_digit = false;
|
||||
|
||||
LLWString trimmed = utf8str_to_wstring(str);
|
||||
LLWStringUtil::trim(trimmed);
|
||||
|
|
@ -2381,22 +2381,22 @@ BOOL LLLineEditor::postvalidateFloat(const std::string &str)
|
|||
if( has_decimal )
|
||||
{
|
||||
// can't have two
|
||||
success = FALSE;
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
has_decimal = TRUE;
|
||||
has_decimal = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
if( LLStringOps::isDigit( trimmed[i] ) )
|
||||
{
|
||||
has_digit = TRUE;
|
||||
has_digit = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
success = FALSE;
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2408,7 +2408,7 @@ BOOL LLLineEditor::postvalidateFloat(const std::string &str)
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::evaluateFloat()
|
||||
bool LLLineEditor::evaluateFloat()
|
||||
{
|
||||
bool success;
|
||||
F32 result = 0.f;
|
||||
|
|
@ -2440,7 +2440,7 @@ void LLLineEditor::onMouseCaptureLost()
|
|||
}
|
||||
|
||||
|
||||
void LLLineEditor::setSelectAllonFocusReceived(BOOL b)
|
||||
void LLLineEditor::setSelectAllonFocusReceived(bool b)
|
||||
{
|
||||
mSelectAllonFocusReceived = b;
|
||||
}
|
||||
|
|
@ -2461,16 +2461,16 @@ void LLLineEditor::setKeystrokeCallback(callback_t callback, void* user_data)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
mText.setArg(key, text);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLLineEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
mLabel.setArg(key, text);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2499,15 +2499,15 @@ void LLLineEditor::updateAllowingLanguageInput()
|
|||
if (hasFocus() && !mReadOnly && !mDrawAsterixes && mPrevalidateFunc == NULL)
|
||||
#endif // <FS:Zi>
|
||||
{
|
||||
window->allowLanguageTextInput(this, TRUE);
|
||||
window->allowLanguageTextInput(this, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window->allowLanguageTextInput(this, FALSE);
|
||||
window->allowLanguageTextInput(this, false);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::hasPreeditString() const
|
||||
bool LLLineEditor::hasPreeditString() const
|
||||
{
|
||||
return (mPreeditPositions.size() > 1);
|
||||
}
|
||||
|
|
@ -2713,7 +2713,7 @@ S32 LLLineEditor::getPreeditFontSize() const
|
|||
return ll_round(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]);
|
||||
}
|
||||
|
||||
void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace)
|
||||
void LLLineEditor::setReplaceNewlinesWithSpaces(bool replace)
|
||||
{
|
||||
mReplaceNewlinesWithSpaces = replace;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,31 +131,31 @@ public:
|
|||
/*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 handleKeyHere(KEY key, MASK mask );
|
||||
/*virtual*/ bool handleUnicodeCharHere(llwchar uni_char);
|
||||
/*virtual*/ void onMouseCaptureLost();
|
||||
|
||||
// LLEditMenuHandler overrides
|
||||
virtual void cut();
|
||||
virtual BOOL canCut() const;
|
||||
virtual bool canCut() const;
|
||||
virtual void copy();
|
||||
virtual BOOL canCopy() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual void paste();
|
||||
virtual BOOL canPaste() const;
|
||||
virtual bool canPaste() const;
|
||||
|
||||
virtual void updatePrimary();
|
||||
virtual void copyPrimary();
|
||||
virtual void pastePrimary();
|
||||
virtual BOOL canPastePrimary() const;
|
||||
virtual bool canPastePrimary() const;
|
||||
|
||||
virtual void doDelete();
|
||||
virtual BOOL canDoDelete() const;
|
||||
virtual bool canDoDelete() const;
|
||||
|
||||
virtual void selectAll();
|
||||
virtual BOOL canSelectAll() const;
|
||||
virtual bool canSelectAll() const;
|
||||
|
||||
virtual void deselect();
|
||||
virtual BOOL canDeselect() const;
|
||||
virtual bool canDeselect() const;
|
||||
|
||||
// LLSpellCheckMenuHandler overrides
|
||||
/*virtual*/ bool getSpellCheck() const;
|
||||
|
|
@ -177,26 +177,26 @@ public:
|
|||
|
||||
// view overrides
|
||||
virtual void draw();
|
||||
virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE);
|
||||
virtual void reshape(S32 width,S32 height,bool called_from_parent=true);
|
||||
virtual void onFocusReceived();
|
||||
virtual void onFocusLost();
|
||||
virtual void setEnabled(BOOL enabled);
|
||||
virtual void setEnabled(bool enabled);
|
||||
|
||||
// UI control overrides
|
||||
virtual void clear();
|
||||
virtual void onTabInto();
|
||||
virtual void setFocus( BOOL b );
|
||||
virtual void setFocus( bool b );
|
||||
virtual void setRect(const LLRect& rect);
|
||||
virtual BOOL acceptsTextInput() const;
|
||||
virtual bool acceptsTextInput() const;
|
||||
virtual void onCommit();
|
||||
virtual BOOL isDirty() const; // Returns TRUE if user changed value at all
|
||||
virtual bool isDirty() const; // Returns true if user changed value at all
|
||||
virtual void resetDirty(); // Clear dirty state
|
||||
|
||||
// assumes UTF8 text
|
||||
virtual void setValue(const LLSD& value );
|
||||
virtual LLSD getValue() const;
|
||||
virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setTextArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
//<FS:TS> FIRE-11373: Autoreplace doesn't work in nearby chat bar
|
||||
typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t;
|
||||
|
|
@ -226,9 +226,9 @@ public:
|
|||
void setSelection(S32 start, S32 end);
|
||||
virtual void getSelectionRange(S32 *position, S32 *length) const;
|
||||
|
||||
void setCommitOnFocusLost( BOOL b ) { mCommitOnFocusLost = b; }
|
||||
void setRevertOnEsc( BOOL b ) { mRevertOnEsc = b; }
|
||||
void setKeystrokeOnEsc(BOOL b) { mKeystrokeOnEsc = b; }
|
||||
void setCommitOnFocusLost( bool b ) { mCommitOnFocusLost = b; }
|
||||
void setRevertOnEsc( bool b ) { mRevertOnEsc = b; }
|
||||
void setKeystrokeOnEsc(bool b) { mKeystrokeOnEsc = b; }
|
||||
|
||||
void setCursorColor(const LLColor4& c) { mCursorColor = c; }
|
||||
const LLColor4& getCursorColor() const { return mCursorColor.get(); }
|
||||
|
|
@ -244,23 +244,23 @@ public:
|
|||
const LLFontGL* getFont() const { return mGLFont; }
|
||||
void setFont(const LLFontGL* font);
|
||||
|
||||
void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; }
|
||||
void setIgnoreTab(BOOL b) { mIgnoreTab = b; }
|
||||
void setPassDelete(BOOL b) { mPassDelete = b; }
|
||||
void setDrawAsterixes(BOOL b);
|
||||
void setIgnoreArrowKeys(bool b) { mIgnoreArrowKeys = b; }
|
||||
void setIgnoreTab(bool b) { mIgnoreTab = b; }
|
||||
void setPassDelete(bool b) { mPassDelete = b; }
|
||||
void setDrawAsterixes(bool b);
|
||||
|
||||
// get the cursor position of the beginning/end of the prev/next word in the text
|
||||
S32 prevWordPos(S32 cursorPos) const;
|
||||
S32 nextWordPos(S32 cursorPos) const;
|
||||
|
||||
BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); }
|
||||
bool hasSelection() const { return (mSelectionStart != mSelectionEnd); }
|
||||
void startSelection();
|
||||
void endSelection();
|
||||
void extendSelection(S32 new_cursor_pos);
|
||||
void deleteSelection();
|
||||
|
||||
void setSelectAllonFocusReceived(BOOL b);
|
||||
void setSelectAllonCommit(BOOL b) { mSelectAllonCommit = b; }
|
||||
void setSelectAllonFocusReceived(bool b);
|
||||
void setSelectAllonCommit(bool b) { mSelectAllonCommit = b; }
|
||||
|
||||
void onKeystroke();
|
||||
typedef boost::function<void (LLLineEditor* caller, void* user_data)> callback_t;
|
||||
|
|
@ -279,16 +279,16 @@ public:
|
|||
// Also callback that this method sets differs from setPrevalidate in a way that it validates just inputed
|
||||
// symbols, before existing text is modified, but setPrevalidate validates line after it was modified.
|
||||
void setPrevalidateInput(LLTextValidate::validate_func_t func);
|
||||
static BOOL postvalidateFloat(const std::string &str);
|
||||
static bool postvalidateFloat(const std::string &str);
|
||||
|
||||
bool prevalidateInput(const LLWString& wstr);
|
||||
BOOL evaluateFloat();
|
||||
bool evaluateFloat();
|
||||
|
||||
// line history support:
|
||||
void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off
|
||||
void setEnableLineHistory( bool enabled ) { mHaveHistory = enabled; } // switches line history on or off
|
||||
void updateHistory(); // stores current line in history
|
||||
|
||||
void setReplaceNewlinesWithSpaces(BOOL replace);
|
||||
void setReplaceNewlinesWithSpaces(bool replace);
|
||||
|
||||
void resetContextMenu() { setContextMenu(NULL); };
|
||||
|
||||
|
|
@ -316,9 +316,9 @@ public:
|
|||
void setCursorAtLocalPos(S32 local_mouse_x);
|
||||
S32 findPixelNearestPos(S32 cursor_offset = 0) const;
|
||||
S32 calcCursorPos(S32 mouse_x);
|
||||
BOOL handleSpecialKey(KEY key, MASK mask);
|
||||
BOOL handleSelectionKey(KEY key, MASK mask);
|
||||
BOOL handleControlKey(KEY key, MASK mask);
|
||||
bool handleSpecialKey(KEY key, MASK mask);
|
||||
bool handleSelectionKey(KEY key, MASK mask);
|
||||
bool handleControlKey(KEY key, MASK mask);
|
||||
S32 handleCommitKey(KEY key, MASK mask);
|
||||
void updateTextPadding();
|
||||
|
||||
|
|
@ -329,7 +329,7 @@ public:
|
|||
// private data members
|
||||
//
|
||||
void updateAllowingLanguageInput();
|
||||
BOOL hasPreeditString() const;
|
||||
bool hasPreeditString() const;
|
||||
// Implementation (overrides) of LLPreeditor
|
||||
virtual void resetPreedit();
|
||||
virtual void updatePreedit(const LLWString &preedit_string,
|
||||
|
|
@ -350,7 +350,7 @@ protected:
|
|||
LLUIString mLabel; // text label that is visible when no user text provided
|
||||
|
||||
// line history support:
|
||||
BOOL mHaveHistory; // flag for enabled line history
|
||||
bool mHaveHistory; // flag for enabled line history
|
||||
typedef std::vector<std::string> line_history_t;
|
||||
line_history_t mLineHistory; // line history storage
|
||||
line_history_t::iterator mCurrentHistoryLine; // currently browsed history line
|
||||
|
|
@ -367,13 +367,13 @@ protected:
|
|||
S32 mTextLeftEdge; // Pixels, cached left edge of text based on left padding and width
|
||||
S32 mTextRightEdge; // Pixels, cached right edge of text based on right padding and width
|
||||
|
||||
BOOL mCommitOnFocusLost;
|
||||
BOOL mRevertOnEsc;
|
||||
BOOL mKeystrokeOnEsc;
|
||||
bool mCommitOnFocusLost;
|
||||
bool mRevertOnEsc;
|
||||
bool mKeystrokeOnEsc;
|
||||
|
||||
keystroke_callback_t mKeystrokeCallback;
|
||||
|
||||
BOOL mIsSelecting; // Selection for clipboard operations
|
||||
bool mIsSelecting; // Selection for clipboard operations
|
||||
S32 mSelectionStart;
|
||||
S32 mSelectionEnd;
|
||||
S32 mLastSelectionX;
|
||||
|
|
@ -404,17 +404,17 @@ protected:
|
|||
|
||||
S32 mBorderThickness;
|
||||
|
||||
BOOL mIgnoreArrowKeys;
|
||||
BOOL mIgnoreTab;
|
||||
BOOL mDrawAsterixes;
|
||||
bool mIgnoreArrowKeys;
|
||||
bool mIgnoreTab;
|
||||
bool mDrawAsterixes;
|
||||
|
||||
BOOL mSelectAllonFocusReceived;
|
||||
BOOL mSelectAllonCommit;
|
||||
BOOL mPassDelete;
|
||||
bool mSelectAllonFocusReceived;
|
||||
bool mSelectAllonCommit;
|
||||
bool mPassDelete;
|
||||
|
||||
BOOL mReadOnly;
|
||||
bool mReadOnly;
|
||||
|
||||
BOOL mShowImageFocused;
|
||||
bool mShowImageFocused;
|
||||
|
||||
bool mUseBgColor;
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ private:
|
|||
LLPointer<LLUIImage> mBgImageDisabled;
|
||||
LLPointer<LLUIImage> mBgImageFocused;
|
||||
|
||||
BOOL mReplaceNewlinesWithSpaces; // if false, will replace pasted newlines with paragraph symbol.
|
||||
bool mReplaceNewlinesWithSpaces; // if false, will replace pasted newlines with paragraph symbol.
|
||||
|
||||
// private helper class
|
||||
class LLLineEditorRollback
|
||||
|
|
@ -467,7 +467,7 @@ private:
|
|||
std::string mText;
|
||||
S32 mCursorPos;
|
||||
S32 mScrollHPos;
|
||||
BOOL mIsSelecting;
|
||||
bool mIsSelecting;
|
||||
S32 mSelectionStart;
|
||||
S32 mSelectionEnd;
|
||||
}; // end class LLLineEditorRollback
|
||||
|
|
@ -477,7 +477,7 @@ private:
|
|||
// Build time optimization, generate once in .cpp file
|
||||
#ifndef LLLINEEDITOR_CPP
|
||||
extern template class LLLineEditor* LLView::getChild<class LLLineEditor>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
#endif
|
||||
|
||||
#endif // LL_LINEEDITOR_
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
/*static*/ std::stack<LLRect> LLScreenClipRect::sClipRectStack;
|
||||
|
||||
|
||||
LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled)
|
||||
LLScreenClipRect::LLScreenClipRect(const LLRect& rect, bool enabled)
|
||||
: mScissorState(GL_SCISSOR_TEST),
|
||||
mEnabled(enabled)
|
||||
{
|
||||
|
|
@ -99,7 +99,7 @@ void LLScreenClipRect::updateScissorRegion()
|
|||
//---------------------------------------------------------------------------
|
||||
// LLLocalClipRect
|
||||
//---------------------------------------------------------------------------
|
||||
LLLocalClipRect::LLLocalClipRect(const LLRect& rect, BOOL enabled /* = TRUE */)
|
||||
LLLocalClipRect::LLLocalClipRect(const LLRect& rect, bool enabled /* = true */)
|
||||
: LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX,
|
||||
rect.mTop + LLFontGL::sCurOrigin.mY,
|
||||
rect.mRight + LLFontGL::sCurOrigin.mX,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
class LLScreenClipRect
|
||||
{
|
||||
public:
|
||||
LLScreenClipRect(const LLRect& rect, BOOL enabled = TRUE);
|
||||
LLScreenClipRect(const LLRect& rect, bool enabled = true);
|
||||
virtual ~LLScreenClipRect();
|
||||
|
||||
private:
|
||||
|
|
@ -48,7 +48,7 @@ private:
|
|||
|
||||
private:
|
||||
LLGLState mScissorState;
|
||||
BOOL mEnabled;
|
||||
bool mEnabled;
|
||||
|
||||
static std::stack<LLRect> sClipRectStack;
|
||||
};
|
||||
|
|
@ -56,7 +56,7 @@ private:
|
|||
class LLLocalClipRect : public LLScreenClipRect
|
||||
{
|
||||
public:
|
||||
LLLocalClipRect(const LLRect& rect, BOOL enabled = TRUE);
|
||||
LLLocalClipRect(const LLRect& rect, bool enabled = true);
|
||||
~LLLocalClipRect();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void LLMenuButton::hideMenu()
|
|||
LLToggleableMenu* menu = getMenu();
|
||||
if (menu)
|
||||
{
|
||||
menu->setVisible(FALSE);
|
||||
menu->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,9 +118,9 @@ void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_T
|
|||
menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2));
|
||||
}
|
||||
|
||||
BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
|
||||
bool LLMenuButton::handleKeyHere(KEY key, MASK mask )
|
||||
{
|
||||
if (!getMenu()) return FALSE;
|
||||
if (!getMenu()) return false;
|
||||
|
||||
if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key))
|
||||
{
|
||||
|
|
@ -129,17 +129,17 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
|
|||
LLUICtrl::handleMouseDown(-1, -1, MASK_NONE);
|
||||
|
||||
toggleMenu();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLToggleableMenu* menu = getMenu();
|
||||
if (menu && menu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE)
|
||||
{
|
||||
menu->setVisible(FALSE);
|
||||
return TRUE;
|
||||
menu->setVisible(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
|
||||
|
||||
/*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
|
||||
/*virtual*/ bool handleKeyHere(KEY key, MASK mask );
|
||||
|
||||
void hideMenu();
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -90,7 +90,7 @@ protected:
|
|||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
// LLView overrides
|
||||
/*virtual*/ void onVisibilityChange(BOOL new_visibility);
|
||||
/*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);
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
/*virtual*/ LLSD getValue() const;
|
||||
|
||||
virtual bool hasAccelerator(const KEY &key, const MASK &mask) const;
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
virtual bool handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
LLColor4 getHighlightBgColor() { return mHighlightBackground.get(); }
|
||||
|
||||
|
|
@ -115,17 +115,17 @@ public:
|
|||
virtual U32 getNominalHeight( void ) const;
|
||||
|
||||
// Marks item as not needing space for check marks or accelerator keys
|
||||
virtual void setBriefItem(BOOL brief);
|
||||
virtual BOOL isBriefItem() const;
|
||||
virtual void setBriefItem(bool brief);
|
||||
virtual bool isBriefItem() const;
|
||||
|
||||
virtual BOOL addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp);
|
||||
void setAllowKeyRepeat(BOOL allow) { mAllowKeyRepeat = allow; }
|
||||
BOOL getAllowKeyRepeat() const { return mAllowKeyRepeat; }
|
||||
virtual bool addToAcceleratorList(std::list<LLMenuKeyboardBinding*> *listp);
|
||||
void setAllowKeyRepeat(bool allow) { mAllowKeyRepeat = allow; }
|
||||
bool getAllowKeyRepeat() const { return mAllowKeyRepeat; }
|
||||
|
||||
// change the label
|
||||
void setLabel( const LLStringExplicit& label ) { mLabel = label; }
|
||||
std::string getLabel( void ) const { return mLabel.getString(); }
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
// Get the parent menu for this item
|
||||
virtual class LLMenuGL* getMenu() const;
|
||||
|
|
@ -151,19 +151,19 @@ public:
|
|||
|
||||
virtual void onCommit( void );
|
||||
|
||||
virtual void setHighlight( BOOL highlight );
|
||||
virtual BOOL getHighlight() const { return mHighlight; }
|
||||
virtual void setHighlight( bool highlight );
|
||||
virtual bool getHighlight() const { return mHighlight; }
|
||||
|
||||
// determine if this represents an active sub-menu
|
||||
virtual BOOL isActive( void ) const { return FALSE; }
|
||||
virtual bool isActive( void ) const { return false; }
|
||||
|
||||
// determine if this represents an open sub-menu
|
||||
virtual BOOL isOpen( void ) const { return FALSE; }
|
||||
virtual bool isOpen( void ) const { return false; }
|
||||
|
||||
virtual void setEnabledSubMenus(BOOL enable){};
|
||||
virtual void setEnabledSubMenus(bool enable){};
|
||||
|
||||
// LLView Functionality
|
||||
virtual BOOL handleKeyHere( KEY key, MASK mask );
|
||||
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 );
|
||||
|
|
@ -173,13 +173,13 @@ public:
|
|||
|
||||
virtual void draw( void );
|
||||
|
||||
BOOL getHover() const { return mGotHover; }
|
||||
bool getHover() const { return mGotHover; }
|
||||
|
||||
void setDrawTextDisabled(BOOL disabled) { mDrawTextDisabled = disabled; }
|
||||
BOOL getDrawTextDisabled() const { return mDrawTextDisabled; }
|
||||
void setDrawTextDisabled(bool disabled) { mDrawTextDisabled = disabled; }
|
||||
bool getDrawTextDisabled() const { return mDrawTextDisabled; }
|
||||
|
||||
protected:
|
||||
void setHover(BOOL hover) { mGotHover = hover; }
|
||||
void setHover(bool hover) { mGotHover = hover; }
|
||||
|
||||
// This function appends the character string representation of
|
||||
// the current accelerator key and mask to the provided string.
|
||||
|
|
@ -208,19 +208,19 @@ protected:
|
|||
LLUIColor mHighlightBackground;
|
||||
LLUIColor mHighlightForeground;
|
||||
|
||||
BOOL mHighlight;
|
||||
bool mHighlight;
|
||||
private:
|
||||
// Keyboard and mouse variables
|
||||
BOOL mAllowKeyRepeat;
|
||||
BOOL mGotHover;
|
||||
bool mAllowKeyRepeat;
|
||||
bool mGotHover;
|
||||
|
||||
// If true, suppress normal space for check marks on the left and accelerator
|
||||
// keys on the right.
|
||||
BOOL mBriefItem;
|
||||
bool mBriefItem;
|
||||
|
||||
// Font for this item
|
||||
const LLFontGL* mFont;
|
||||
BOOL mDrawTextDisabled;
|
||||
bool mDrawTextDisabled;
|
||||
|
||||
KEY mJumpKey;
|
||||
};
|
||||
|
|
@ -289,8 +289,8 @@ public:
|
|||
|
||||
virtual void onCommit( void );
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleAcceleratorKey(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
//virtual void draw();
|
||||
|
||||
|
|
@ -448,18 +448,18 @@ public:
|
|||
/*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);
|
||||
/*virtual*/ void setVisible(bool visible);
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild( LLView* ctrl);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
|
||||
virtual bool hasAccelerator(const KEY &key, const MASK &mask) const;
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
virtual bool handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
LLMenuGL* findChildMenuByName(const std::string& name, BOOL recurse) const;
|
||||
LLMenuGL* findChildMenuByName(const std::string& name, bool recurse) const;
|
||||
|
||||
BOOL clearHoverItem();
|
||||
bool clearHoverItem();
|
||||
|
||||
// return the name label
|
||||
const std::string& getLabel( void ) const { return mLabel.getString(); }
|
||||
|
|
@ -468,37 +468,37 @@ public:
|
|||
// background colors
|
||||
void setBackgroundColor( const LLUIColor& color ) { mBackgroundColor = color; }
|
||||
const LLUIColor& getBackgroundColor() const { return mBackgroundColor; }
|
||||
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
|
||||
void setCanTearOff(BOOL tear_off);
|
||||
void setBackgroundVisible( bool b ) { mBgVisible = b; }
|
||||
void setCanTearOff(bool tear_off);
|
||||
|
||||
// add a separator to this menu
|
||||
virtual BOOL addSeparator();
|
||||
virtual bool addSeparator();
|
||||
|
||||
// for branching menu items, bring sub menus up to root level of menu hierarchy
|
||||
virtual void updateParent( LLView* parentp );
|
||||
|
||||
// setItemEnabled() - pass the name and the enable flag for a
|
||||
// menu item. TRUE will make sure it's enabled, FALSE will disable
|
||||
// menu item. true will make sure it's enabled, false will disable
|
||||
// it.
|
||||
void setItemEnabled( const std::string& name, BOOL enable );
|
||||
void setItemEnabled( const std::string& name, bool enable );
|
||||
|
||||
// propagate message to submenus
|
||||
void setEnabledSubMenus(BOOL enable);
|
||||
void setEnabledSubMenus(bool enable);
|
||||
|
||||
void setItemVisible( const std::string& name, BOOL visible);
|
||||
void setItemVisible( const std::string& name, bool visible);
|
||||
|
||||
void setItemLabel(const std::string &name, const std::string &label);
|
||||
|
||||
// sets the left,bottom corner of menu, useful for popups
|
||||
void setLeftAndBottom(S32 left, S32 bottom);
|
||||
|
||||
virtual BOOL handleJumpKey(KEY key);
|
||||
virtual bool handleJumpKey(KEY key);
|
||||
|
||||
virtual BOOL jumpKeysActive();
|
||||
virtual bool jumpKeysActive();
|
||||
|
||||
virtual BOOL isOpen();
|
||||
virtual bool isOpen();
|
||||
|
||||
void needsArrange() { mNeedsArrange = TRUE; }
|
||||
void needsArrange() { mNeedsArrange = true; }
|
||||
// Shape this menu to fit the current state of the children, and
|
||||
// adjust the child rects to fit. This is called automatically
|
||||
// when you add items. *FIX: We may need to deal with visibility
|
||||
|
|
@ -521,8 +521,8 @@ public:
|
|||
LLMenuItemGL* getItem(std::string name);
|
||||
LLMenuItemGL* getHighlightedItem();
|
||||
|
||||
LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE);
|
||||
LLMenuItemGL* highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE);
|
||||
LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, bool skip_disabled = true);
|
||||
LLMenuItemGL* highlightPrevItem(LLMenuItemGL* cur_item, bool skip_disabled = true);
|
||||
|
||||
void buildDrawLabels();
|
||||
void createJumpKeys();
|
||||
|
|
@ -531,37 +531,37 @@ public:
|
|||
static void showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S32 mouse_x = 0, S32 mouse_y = 0);
|
||||
|
||||
// Whether to drop shadow menu bar
|
||||
void setDropShadowed( const BOOL shadowed );
|
||||
void setDropShadowed( const bool shadowed );
|
||||
|
||||
void setParentMenuItem( LLMenuItemGL* parent_menu_item ) { mParentMenuItem = parent_menu_item->getHandle(); }
|
||||
LLMenuItemGL* getParentMenuItem() const { return dynamic_cast<LLMenuItemGL*>(mParentMenuItem.get()); }
|
||||
|
||||
void setTornOff(BOOL torn_off);
|
||||
BOOL getTornOff() { return mTornOff; }
|
||||
void setTornOff(bool torn_off);
|
||||
bool getTornOff() { return mTornOff; }
|
||||
|
||||
BOOL getCanTearOff() { return mTearOffItem != NULL; }
|
||||
bool getCanTearOff() { return mTearOffItem != NULL; }
|
||||
|
||||
KEY getJumpKey() const { return mJumpKey; }
|
||||
void setJumpKey(KEY key) { mJumpKey = key; }
|
||||
|
||||
static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; }
|
||||
static BOOL getKeyboardMode() { return sKeyboardMode; }
|
||||
static void setKeyboardMode(bool mode) { sKeyboardMode = mode; }
|
||||
static bool getKeyboardMode() { return sKeyboardMode; }
|
||||
|
||||
S32 getShortcutPad() { return mShortcutPad; }
|
||||
|
||||
bool scrollItems(EScrollingDirection direction);
|
||||
BOOL isScrollable() const { return mScrollable; }
|
||||
bool isScrollable() const { return mScrollable; }
|
||||
|
||||
static class LLMenuHolderGL* sMenuContainer;
|
||||
|
||||
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
|
||||
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
|
||||
|
||||
void setAlwaysShowMenu(BOOL show) { mAlwaysShowMenu = show; }
|
||||
BOOL getAlwaysShowMenu() { return mAlwaysShowMenu; }
|
||||
void setAlwaysShowMenu(bool show) { mAlwaysShowMenu = show; }
|
||||
bool getAlwaysShowMenu() { return mAlwaysShowMenu; }
|
||||
|
||||
// add a context menu branch
|
||||
BOOL appendContextSubMenu(LLMenuGL *menu);
|
||||
bool appendContextSubMenu(LLMenuGL *menu);
|
||||
|
||||
// <FS:Ansariel> Items-accessor
|
||||
typedef std::list< LLMenuItemGL* > item_list_t;
|
||||
|
|
@ -571,10 +571,10 @@ protected:
|
|||
void createSpilloverBranch();
|
||||
void cleanupSpilloverBranch();
|
||||
// Add the menu item to this menu.
|
||||
virtual BOOL append( LLMenuItemGL* item );
|
||||
virtual bool append( LLMenuItemGL* item );
|
||||
|
||||
// add a menu - this will create a cascading menu
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
virtual bool appendMenu( LLMenuGL* menu );
|
||||
|
||||
// Used in LLContextMenu and in LLTogleableMenu
|
||||
// to add an item of context menu branch
|
||||
|
|
@ -594,33 +594,33 @@ protected:
|
|||
S32 mMouseVelY;
|
||||
U32 mMaxScrollableItems;
|
||||
U32 mPreferredWidth;
|
||||
BOOL mHorizontalLayout;
|
||||
BOOL mScrollable;
|
||||
BOOL mKeepFixedSize;
|
||||
BOOL mNeedsArrange;
|
||||
bool mHorizontalLayout;
|
||||
bool mScrollable;
|
||||
bool mKeepFixedSize;
|
||||
bool mNeedsArrange;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
static LLColor4 sDefaultBackgroundColor;
|
||||
static BOOL sKeyboardMode;
|
||||
static bool sKeyboardMode;
|
||||
|
||||
BOOL mAlwaysShowMenu;
|
||||
bool mAlwaysShowMenu;
|
||||
|
||||
LLUIColor mBackgroundColor;
|
||||
BOOL mBgVisible;
|
||||
bool mBgVisible;
|
||||
LLHandle<LLView> mParentMenuItem;
|
||||
LLUIString mLabel;
|
||||
BOOL mDropShadowed; // Whether to drop shadow
|
||||
bool mDropShadowed; // Whether to drop shadow
|
||||
bool mHasSelection;
|
||||
LLFrameTimer mFadeTimer;
|
||||
LLTimer mScrollItemsTimer;
|
||||
BOOL mTornOff;
|
||||
bool mTornOff;
|
||||
class LLMenuItemTearOffGL* mTearOffItem;
|
||||
class LLMenuItemBranchGL* mSpilloverBranch;
|
||||
LLMenuGL* mSpilloverMenu;
|
||||
KEY mJumpKey;
|
||||
BOOL mCreateJumpKeys;
|
||||
bool mCreateJumpKeys;
|
||||
S32 mShortcutPad;
|
||||
bool mResetScrollPositionOnShow;
|
||||
}; // end class LLMenuGL
|
||||
|
|
@ -651,44 +651,44 @@ public:
|
|||
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);
|
||||
virtual bool handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
// check if we've used these accelerators already
|
||||
virtual BOOL addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp);
|
||||
virtual bool addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *listp);
|
||||
|
||||
// called to rebuild the draw label
|
||||
virtual void buildDrawLabel( void );
|
||||
|
||||
virtual void onCommit( void );
|
||||
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
|
||||
virtual bool handleKey(KEY key, MASK mask, bool called_from_parent);
|
||||
virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent);
|
||||
|
||||
// set the hover status (called by it's menu) and if the object is
|
||||
// active. This is used for behavior transfer.
|
||||
virtual void setHighlight( BOOL highlight );
|
||||
virtual void setHighlight( bool highlight );
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
virtual BOOL isActive() const;
|
||||
virtual bool isActive() const;
|
||||
|
||||
virtual BOOL isOpen() const;
|
||||
virtual bool isOpen() const;
|
||||
|
||||
LLMenuGL* getBranch() const { return (LLMenuGL*)mBranchHandle.get(); }
|
||||
|
||||
virtual void updateBranchParent( LLView* parentp );
|
||||
|
||||
// LLView Functionality
|
||||
virtual void onVisibilityChange( BOOL curVisibilityIn );
|
||||
virtual void onVisibilityChange( bool curVisibilityIn );
|
||||
|
||||
virtual void draw();
|
||||
|
||||
virtual void setEnabledSubMenus(BOOL enabled) { if (getBranch()) getBranch()->setEnabledSubMenus(enabled); }
|
||||
virtual void setEnabledSubMenus(bool enabled) { if (getBranch()) getBranch()->setEnabledSubMenus(enabled); }
|
||||
|
||||
virtual void openMenu();
|
||||
|
||||
virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE) const;
|
||||
virtual LLView* findChildView(const std::string& name, BOOL recurse = TRUE) const;
|
||||
virtual LLView* getChildView(const std::string& name, bool recurse = true) const;
|
||||
virtual LLView* findChildView(const std::string& name, bool recurse = true) const;
|
||||
|
||||
private:
|
||||
LLHandle<LLView> mBranchHandle;
|
||||
|
|
@ -721,7 +721,7 @@ public:
|
|||
|
||||
// LLView Functionality
|
||||
// can't set visibility directly, must call show or hide
|
||||
virtual void setVisible (BOOL visible);
|
||||
virtual void setVisible (bool visible);
|
||||
|
||||
virtual void show (S32 x, S32 y, LLView* spawning_view = NULL);
|
||||
virtual void hide ();
|
||||
|
|
@ -738,7 +738,7 @@ public:
|
|||
void setSpawningView(LLHandle<LLView> spawning_view) { mSpawningViewHandle = spawning_view; }
|
||||
|
||||
protected:
|
||||
BOOL mHoveredAnyItem;
|
||||
bool mHoveredAnyItem;
|
||||
LLMenuItemGL* mHoverItem;
|
||||
LLRootHandle<LLContextMenu> mHandle;
|
||||
LLHandle<LLView> mSpawningViewHandle;
|
||||
|
|
@ -771,7 +771,7 @@ public:
|
|||
virtual void onCommit( void );
|
||||
|
||||
LLContextMenu* getBranch() { return mBranch.get(); }
|
||||
void setHighlight( BOOL highlight );
|
||||
void setHighlight( bool highlight );
|
||||
|
||||
protected:
|
||||
void showSubMenu();
|
||||
|
|
@ -794,17 +794,17 @@ public:
|
|||
LLMenuBarGL( const Params& p );
|
||||
virtual ~LLMenuBarGL();
|
||||
|
||||
/*virtual*/ BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
|
||||
/*virtual*/ BOOL handleJumpKey(KEY key);
|
||||
/*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*/ void draw();
|
||||
/*virtual*/ BOOL jumpKeysActive();
|
||||
/*virtual*/ bool jumpKeysActive();
|
||||
|
||||
// add a vertical separator to this menu
|
||||
virtual BOOL addSeparator();
|
||||
virtual bool addSeparator();
|
||||
|
||||
// LLView Functionality
|
||||
virtual bool handleHover( S32 x, S32 y, MASK mask );
|
||||
|
|
@ -812,11 +812,11 @@ public:
|
|||
// Returns x position of rightmost child, usually Help menu
|
||||
S32 getRightmostMenuEdge();
|
||||
|
||||
void resetMenuTrigger() { mAltKeyTrigger = FALSE; }
|
||||
void resetMenuTrigger() { mAltKeyTrigger = false; }
|
||||
|
||||
private:
|
||||
// add a menu - this will create a drop down menu.
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
virtual bool appendMenu( LLMenuGL* menu );
|
||||
// rearrange the child rects so they fit the shape of the menu
|
||||
// bar.
|
||||
virtual void arrange( void );
|
||||
|
|
@ -824,7 +824,7 @@ private:
|
|||
void checkMenuTrigger();
|
||||
|
||||
std::list <LLMenuKeyboardBinding*> mAccelerators;
|
||||
BOOL mAltKeyTrigger;
|
||||
bool mAltKeyTrigger;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -840,9 +840,9 @@ public:
|
|||
LLMenuHolderGL(const Params& p);
|
||||
virtual ~LLMenuHolderGL() {}
|
||||
|
||||
virtual BOOL hideMenus();
|
||||
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
void setCanHide(BOOL can_hide) { mCanHide = can_hide; }
|
||||
virtual bool hideMenus();
|
||||
void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
void setCanHide(bool can_hide) { mCanHide = can_hide; }
|
||||
|
||||
// LLView functionality
|
||||
virtual void draw();
|
||||
|
|
@ -852,10 +852,10 @@ public:
|
|||
// Close context menus on right mouse up not handled by menus.
|
||||
/*virtual*/ bool handleRightMouseUp( S32 x, S32 y, MASK mask );
|
||||
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual bool handleKey(KEY key, MASK mask, bool called_from_parent);
|
||||
virtual const LLRect getMenuRect() const { return getLocalRect(); }
|
||||
LLView*const getVisibleMenu() const;
|
||||
virtual BOOL hasVisibleMenu() const {return getVisibleMenu() != NULL;}
|
||||
virtual bool hasVisibleMenu() const {return getVisibleMenu() != NULL;}
|
||||
|
||||
static void setActivatedItem(LLMenuItemGL* item);
|
||||
|
||||
|
|
@ -867,7 +867,7 @@ private:
|
|||
static LLHandle<LLView> sItemLastSelectedHandle;
|
||||
static LLFrameTimer sItemActivationTimer;
|
||||
|
||||
BOOL mCanHide;
|
||||
bool mCanHide;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -885,8 +885,8 @@ public:
|
|||
virtual void draw(void);
|
||||
virtual void onFocusReceived();
|
||||
virtual void onFocusLost();
|
||||
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
virtual void translate(S32 x, S32 y);
|
||||
|
||||
void updateSize();
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@
|
|||
// static
|
||||
std::list<LLModalDialog*> LLModalDialog::sModalStack;
|
||||
|
||||
LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal )
|
||||
LLModalDialog::LLModalDialog( const LLSD& key, bool modal )
|
||||
: LLFloater(key),
|
||||
mModal( modal )
|
||||
{
|
||||
if (modal)
|
||||
{
|
||||
setCanMinimize(FALSE);
|
||||
setCanClose(FALSE);
|
||||
setCanMinimize(false);
|
||||
setCanClose(false);
|
||||
}
|
||||
setVisible( FALSE );
|
||||
setBackgroundVisible(TRUE);
|
||||
setBackgroundOpaque(TRUE);
|
||||
setVisible( false );
|
||||
setBackgroundVisible(true);
|
||||
setBackgroundOpaque(true);
|
||||
centerOnScreen(); // default position
|
||||
mCloseSignal.connect(boost::bind(&LLModalDialog::stopModal, this));
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ LLModalDialog::~LLModalDialog()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLModalDialog::postBuild()
|
||||
bool LLModalDialog::postBuild()
|
||||
{
|
||||
return LLFloater::postBuild();
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ void LLModalDialog::openFloater(const LLSD& key)
|
|||
LLFloater::setFloaterHost(thost);
|
||||
}
|
||||
|
||||
void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLModalDialog::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLFloater::reshape(width, height, called_from_parent);
|
||||
centerOnScreen();
|
||||
|
|
@ -102,14 +102,14 @@ void LLModalDialog::onOpen(const LLSD& key)
|
|||
LLModalDialog* front = sModalStack.front();
|
||||
if (front != this)
|
||||
{
|
||||
front->setVisible(FALSE);
|
||||
front->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
// This is a modal dialog. It sucks up all mouse and keyboard operations.
|
||||
gFocusMgr.setMouseCapture( this );
|
||||
LLUI::getInstance()->addPopup(this);
|
||||
setFocus(TRUE);
|
||||
setFocus(true);
|
||||
|
||||
std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this);
|
||||
if (iter != sModalStack.end())
|
||||
|
|
@ -142,12 +142,12 @@ void LLModalDialog::stopModal()
|
|||
if (!sModalStack.empty())
|
||||
{
|
||||
LLModalDialog* front = sModalStack.front();
|
||||
front->setVisible(TRUE);
|
||||
front->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLModalDialog::setVisible( BOOL visible )
|
||||
void LLModalDialog::setVisible( bool visible )
|
||||
{
|
||||
if (mModal)
|
||||
{
|
||||
|
|
@ -158,7 +158,7 @@ void LLModalDialog::setVisible( BOOL visible )
|
|||
|
||||
// The dialog view is a root view
|
||||
LLUI::getInstance()->addPopup(this);
|
||||
setFocus( TRUE );
|
||||
setFocus( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -256,27 +256,27 @@ bool LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )
|
||||
bool LLModalDialog::handleKeyHere(KEY key, MASK mask )
|
||||
{
|
||||
LLFloater::handleKeyHere(key, mask );
|
||||
|
||||
if (mModal)
|
||||
{
|
||||
// Suck up all keystokes except CTRL-Q.
|
||||
BOOL is_quit = ('Q' == key) && (MASK_CONTROL == mask);
|
||||
bool is_quit = ('Q' == key) && (MASK_CONTROL == mask);
|
||||
return !is_quit;
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't process escape key until message box has been on screen a minimal amount of time
|
||||
// to avoid accidentally destroying the message box when user is hitting escape at the time it appears
|
||||
BOOL enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f;
|
||||
bool enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f;
|
||||
if (enough_time_elapsed && key == KEY_ESCAPE)
|
||||
{
|
||||
closeFloater();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ void LLModalDialog::onAppFocusLost()
|
|||
gFocusMgr.setMouseCapture( NULL );
|
||||
}
|
||||
|
||||
instance->setFocus(FALSE);
|
||||
instance->setFocus(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ void LLModalDialog::onAppFocusGained()
|
|||
|
||||
// This is a modal dialog. It sucks up all mouse and keyboard operations.
|
||||
gFocusMgr.setMouseCapture( instance );
|
||||
instance->setFocus(TRUE);
|
||||
instance->setFocus(true);
|
||||
LLUI::getInstance()->addPopup(instance);
|
||||
|
||||
instance->centerOnScreen();
|
||||
|
|
|
|||
|
|
@ -39,15 +39,15 @@ class LLModalDialog;
|
|||
class LLModalDialog : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLModalDialog( const LLSD& key, BOOL modal = true );
|
||||
LLModalDialog( const LLSD& key, bool modal = true );
|
||||
virtual ~LLModalDialog();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
|
||||
/*virtual*/ void openFloater(const LLSD& key = LLSD());
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*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);
|
||||
|
|
@ -55,12 +55,12 @@ public:
|
|||
/*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*/ bool handleKeyHere(KEY key, MASK mask );
|
||||
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ void setVisible(bool visible);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
BOOL isModal() const { return mModal; }
|
||||
bool isModal() const { return mModal; }
|
||||
void stopModal();
|
||||
|
||||
static void onAppFocusLost();
|
||||
|
|
@ -75,7 +75,7 @@ protected:
|
|||
private:
|
||||
|
||||
LLFrameTimer mVisibleTime;
|
||||
const BOOL mModal;
|
||||
const bool mModal;
|
||||
|
||||
static std::list<LLModalDialog*> sModalStack; // Top of stack is currently being displayed
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params)
|
|||
: LLFloater(key),
|
||||
mTabContainer(NULL),
|
||||
mTabPos(LLTabContainer::TOP),
|
||||
mAutoResize(TRUE),
|
||||
mAutoResize(true),
|
||||
mOrigMinWidth(params.min_width),
|
||||
mOrigMinHeight(params.min_height)
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ void LLMultiFloater::onClose(bool app_quitting)
|
|||
{
|
||||
if(isMinimized())
|
||||
{
|
||||
setMinimized(FALSE);
|
||||
setMinimized(false);
|
||||
}
|
||||
LLFloater::onClose(app_quitting);
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ void LLMultiFloater::draw()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLMultiFloater::closeAllFloaters()
|
||||
bool LLMultiFloater::closeAllFloaters()
|
||||
{
|
||||
S32 tabToClose = 0;
|
||||
S32 lastTabCount = mTabContainer->getTabCount();
|
||||
|
|
@ -111,8 +111,8 @@ BOOL LLMultiFloater::closeAllFloaters()
|
|||
}
|
||||
}
|
||||
if( mTabContainer->getTabCount() != 0 )
|
||||
return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE.
|
||||
return TRUE; //else all tabs were successfully closed...
|
||||
return false; // Couldn't close all the tabs (pending save dialog?) so return false.
|
||||
return true; //else all tabs were successfully closed...
|
||||
}
|
||||
|
||||
void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
|
||||
|
|
@ -140,7 +140,7 @@ void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
|
|||
}
|
||||
|
||||
/**
|
||||
void addFloater(LLFloater* floaterp, BOOL select_added_floater)
|
||||
void addFloater(LLFloater* floaterp, bool select_added_floater)
|
||||
|
||||
Adds the LLFloater pointed to by floaterp to this.
|
||||
If floaterp is already hosted by this, then it is re-added to get
|
||||
|
|
@ -150,7 +150,7 @@ void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
|
|||
|
||||
Affects: mTabContainer, floaterp
|
||||
**/
|
||||
void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point)
|
||||
void LLMultiFloater::addFloater(LLFloater* floaterp, bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point)
|
||||
{
|
||||
if (!floaterp)
|
||||
{
|
||||
|
|
@ -191,18 +191,18 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater,
|
|||
floater_data.mSaveRect = floaterp->mSaveRect;
|
||||
|
||||
// remove minimize and close buttons
|
||||
floaterp->setCanMinimize(FALSE);
|
||||
floaterp->setCanResize(FALSE);
|
||||
floaterp->setCanDrag(FALSE);
|
||||
floaterp->mSaveRect = FALSE;
|
||||
floaterp->setCanMinimize(false);
|
||||
floaterp->setCanResize(false);
|
||||
floaterp->setCanDrag(false);
|
||||
floaterp->mSaveRect = false;
|
||||
floaterp->storeRectControl();
|
||||
// avoid double rendering of floater background (makes it more opaque)
|
||||
floaterp->setBackgroundVisible(FALSE);
|
||||
floaterp->setBackgroundVisible(false);
|
||||
|
||||
// <FS> Update torn off status and add title bar; Do this AFTER we stored the original rect!
|
||||
if (!mHostedFloaterShowtitlebar)
|
||||
{
|
||||
floaterp->getDragHandle()->setTitleVisible(FALSE);
|
||||
floaterp->getDragHandle()->setTitleVisible(false);
|
||||
LLRect rect = floaterp->getRect();
|
||||
rect.mTop -= floaterp->getHeaderHeight();
|
||||
floaterp->setRect(rect);
|
||||
|
|
@ -237,7 +237,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater,
|
|||
floaterp->setHost(this);
|
||||
if (isMinimized())
|
||||
{
|
||||
floaterp->setVisible(FALSE);
|
||||
floaterp->setVisible(false);
|
||||
}
|
||||
|
||||
// Tabs sometimes overlap resize handle
|
||||
|
|
@ -263,14 +263,14 @@ void LLMultiFloater::updateFloaterTitle(LLFloater* floaterp)
|
|||
|
||||
|
||||
/**
|
||||
BOOL selectFloater(LLFloater* floaterp)
|
||||
bool selectFloater(LLFloater* floaterp)
|
||||
|
||||
If the LLFloater pointed to by floaterp is hosted by this,
|
||||
then its tab is selected and returns true. Otherwise returns false.
|
||||
|
||||
Affects: mTabContainer
|
||||
**/
|
||||
BOOL LLMultiFloater::selectFloater(LLFloater* floaterp)
|
||||
bool LLMultiFloater::selectFloater(LLFloater* floaterp)
|
||||
{
|
||||
return mTabContainer->selectTabPanel(floaterp);
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ void LLMultiFloater::showFloater(LLFloater* floaterp, LLTabContainer::eInsertion
|
|||
if (floaterp != mTabContainer->getCurrentPanel() &&
|
||||
!mTabContainer->selectTabPanel(floaterp))
|
||||
{
|
||||
addFloater(floaterp, TRUE, insertion_point);
|
||||
addFloater(floaterp, true, insertion_point);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp)
|
|||
// <FS> Update torn off status and add title bar
|
||||
if (!mHostedFloaterShowtitlebar)
|
||||
{
|
||||
floaterp->getDragHandle()->setTitleVisible(TRUE);
|
||||
floaterp->getDragHandle()->setTitleVisible(true);
|
||||
LLRect rect = floaterp->getRect();
|
||||
rect.mTop += floaterp->getHeaderHeight();
|
||||
floaterp->setRect(rect);
|
||||
|
|
@ -331,8 +331,8 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp)
|
|||
mFloaterDataMap.erase(found_data_it);
|
||||
}
|
||||
mTabContainer->removeTabPanel(floaterp);
|
||||
floaterp->setBackgroundVisible(TRUE);
|
||||
floaterp->setCanDrag(TRUE);
|
||||
floaterp->setBackgroundVisible(true);
|
||||
floaterp->setCanDrag(true);
|
||||
floaterp->setHost(NULL);
|
||||
floaterp->applyRectControl();
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ void LLMultiFloater::tabClose()
|
|||
}
|
||||
}
|
||||
|
||||
void LLMultiFloater::setVisible(BOOL visible)
|
||||
void LLMultiFloater::setVisible(bool visible)
|
||||
{
|
||||
// *FIX: shouldn't have to do this, fix adding to minimized multifloater
|
||||
LLFloater::setVisible(visible);
|
||||
|
|
@ -388,7 +388,7 @@ void LLMultiFloater::setVisible(BOOL visible)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLMultiFloater::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
// <FS:Ansariel> This won't work - CTRL-W is intercepted by LLFileCloseWindow!
|
||||
if (key == 'W' && mask == MASK_CONTROL)
|
||||
|
|
@ -403,10 +403,10 @@ BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
|
|||
// bring back focus on tab container if there are any tab left
|
||||
if(mTabContainer->getTabCount() > 0)
|
||||
{
|
||||
mTabContainer->setFocus(TRUE);
|
||||
mTabContainer->setFocus(true);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return LLFloater::handleKeyHere(key, mask);
|
||||
|
|
@ -436,7 +436,7 @@ S32 LLMultiFloater::getFloaterCount()
|
|||
}
|
||||
|
||||
/**
|
||||
BOOL isFloaterFlashing(LLFloater* floaterp)
|
||||
bool isFloaterFlashing(LLFloater* floaterp)
|
||||
|
||||
Returns true if the LLFloater pointed to by floaterp
|
||||
is currently in a flashing state and is hosted by this.
|
||||
|
|
@ -444,24 +444,24 @@ S32 LLMultiFloater::getFloaterCount()
|
|||
|
||||
Requires: floaterp != NULL
|
||||
**/
|
||||
BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp)
|
||||
bool LLMultiFloater::isFloaterFlashing(LLFloater* floaterp)
|
||||
{
|
||||
if ( floaterp && floaterp->getHost() == this )
|
||||
return mTabContainer->getTabPanelFlashing(floaterp);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
|
||||
bool setFloaterFlashing(LLFloater* floaterp, bool flashing)
|
||||
|
||||
Sets the current flashing state of the LLFloater pointed
|
||||
to by floaterp to be the BOOL flashing if the LLFloater pointed
|
||||
to by floaterp to be the bool flashing if the LLFloater pointed
|
||||
to by floaterp is hosted by this.
|
||||
|
||||
Requires: floaterp != NULL
|
||||
**/
|
||||
void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
|
||||
void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, bool flashing)
|
||||
{
|
||||
if ( floaterp && floaterp->getHost() == this )
|
||||
mTabContainer->setTabPanelFlashing(floaterp, flashing);
|
||||
|
|
@ -493,7 +493,7 @@ void LLMultiFloater::setTabContainer(LLTabContainer* tab_container)
|
|||
}
|
||||
// </FS>
|
||||
|
||||
void LLMultiFloater::setCanResize(BOOL can_resize)
|
||||
void LLMultiFloater::setCanResize(bool can_resize)
|
||||
{
|
||||
LLFloater::setCanResize(can_resize);
|
||||
if (!mTabContainer) return;
|
||||
|
|
@ -507,7 +507,7 @@ void LLMultiFloater::setCanResize(BOOL can_resize)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLMultiFloater::postBuild()
|
||||
bool LLMultiFloater::postBuild()
|
||||
{
|
||||
mCloseSignal.connect(boost::bind(&LLMultiFloater::closeAllFloaters, this));
|
||||
|
||||
|
|
@ -516,7 +516,7 @@ BOOL LLMultiFloater::postBuild()
|
|||
|
||||
if (mTabContainer)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// <FS> Update torn off status and add title bar
|
||||
|
|
@ -525,7 +525,7 @@ BOOL LLMultiFloater::postBuild()
|
|||
// </FS>
|
||||
|
||||
setCanResize(mResizable);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLMultiFloater::updateResizeLimits()
|
||||
|
|
@ -558,7 +558,7 @@ void LLMultiFloater::updateResizeLimits()
|
|||
|
||||
// make sure this window is visible on screen when it has been modified
|
||||
// (tab added, etc)
|
||||
gFloaterView->adjustToFitScreen(this, TRUE);
|
||||
gFloaterView->adjustToFitScreen(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ void LLMultiFloater::closeDockedFloater()
|
|||
// bring back focus on tab container if there are any tab left
|
||||
if(mTabContainer->getTabCount() > 0)
|
||||
{
|
||||
mTabContainer->setFocus(TRUE);
|
||||
mTabContainer->setFocus(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,16 +43,16 @@ public:
|
|||
|
||||
void buildTabContainer();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
virtual void draw();
|
||||
virtual void setVisible(BOOL visible);
|
||||
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual void setVisible(bool visible);
|
||||
/*virtual*/ bool handleKeyHere(KEY key, MASK mask);
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
|
||||
virtual void setCanResize(BOOL can_resize);
|
||||
virtual void setCanResize(bool can_resize);
|
||||
virtual void growToFit(S32 content_width, S32 content_height);
|
||||
virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
|
||||
virtual void addFloater(LLFloater* floaterp, bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
|
||||
|
||||
virtual void showFloater(LLFloater* floaterp, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
|
||||
virtual void removeFloater(LLFloater* floaterp);
|
||||
|
|
@ -60,16 +60,16 @@ public:
|
|||
virtual void tabOpen(LLFloater* opened_floater, bool from_click);
|
||||
virtual void tabClose();
|
||||
|
||||
virtual BOOL selectFloater(LLFloater* floaterp);
|
||||
virtual bool selectFloater(LLFloater* floaterp);
|
||||
virtual void selectNextFloater();
|
||||
virtual void selectPrevFloater();
|
||||
|
||||
virtual LLFloater* getActiveFloater();
|
||||
virtual BOOL isFloaterFlashing(LLFloater* floaterp);
|
||||
virtual bool isFloaterFlashing(LLFloater* floaterp);
|
||||
virtual S32 getFloaterCount();
|
||||
|
||||
virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing);
|
||||
virtual BOOL closeAllFloaters(); //Returns FALSE if the floater could not be closed due to pending confirmation dialogs
|
||||
virtual void setFloaterFlashing(LLFloater* floaterp, bool flashing);
|
||||
virtual bool closeAllFloaters(); //Returns false if the floater could not be closed due to pending confirmation dialogs
|
||||
// <FS> Update torn off status and add title bar
|
||||
//void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; } // LL Code
|
||||
void setTabContainer(LLTabContainer* tab_container);
|
||||
|
|
@ -87,9 +87,9 @@ protected:
|
|||
{
|
||||
S32 mWidth;
|
||||
S32 mHeight;
|
||||
BOOL mCanMinimize;
|
||||
BOOL mCanResize;
|
||||
BOOL mSaveRect;
|
||||
bool mCanMinimize;
|
||||
bool mCanResize;
|
||||
bool mSaveRect;
|
||||
};
|
||||
|
||||
LLTabContainer* mTabContainer;
|
||||
|
|
@ -98,7 +98,7 @@ protected:
|
|||
floater_data_map_t mFloaterDataMap;
|
||||
|
||||
LLTabContainer::TabPosition mTabPos;
|
||||
BOOL mAutoResize;
|
||||
bool mAutoResize;
|
||||
S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ F32 LLMultiSlider::getNearestIncrement(F32 value) const
|
|||
return mMinValue + value;
|
||||
}
|
||||
|
||||
void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from_event)
|
||||
void LLMultiSlider::setSliderValue(const std::string& name, F32 value, bool from_event)
|
||||
{
|
||||
// exit if not there
|
||||
if(!mValue.has(name)) {
|
||||
|
|
@ -263,7 +263,7 @@ void LLMultiSlider::setValue(const LLSD& value)
|
|||
mCurSlider = mIt->first;
|
||||
|
||||
for(; mIt != value.endMap(); mIt++) {
|
||||
setSliderValue(mIt->first, (F32)mIt->second.asReal(), TRUE);
|
||||
setSliderValue(mIt->first, (F32)mIt->second.asReal(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -378,7 +378,7 @@ const std::string& LLMultiSlider::addSlider(F32 val)
|
|||
mCurSlider = newName.str();
|
||||
|
||||
// move the slider
|
||||
setSliderValue(mCurSlider, initVal, TRUE);
|
||||
setSliderValue(mCurSlider, initVal, true);
|
||||
|
||||
return mCurSlider;
|
||||
}
|
||||
|
|
@ -411,7 +411,7 @@ bool LLMultiSlider::addSlider(F32 val, const std::string& name)
|
|||
mCurSlider = name;
|
||||
|
||||
// move the slider
|
||||
setSliderValue(mCurSlider, initVal, TRUE);
|
||||
setSliderValue(mCurSlider, initVal, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -614,25 +614,25 @@ bool LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLMultiSlider::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
switch(key)
|
||||
{
|
||||
case KEY_UP:
|
||||
case KEY_DOWN:
|
||||
// eat up and down keys to be consistent
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
setCurSliderValue(getCurSliderValue() - getIncrement());
|
||||
onCommit();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
setCurSliderValue(getCurSliderValue() + getIncrement());
|
||||
onCommit();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -700,7 +700,7 @@ void LLMultiSlider::draw()
|
|||
mIt->second.mTop + extra_triangle_height,
|
||||
mIt->second.mLeft + mIt->second.getWidth() / 2,
|
||||
mIt->second.mBottom - extra_triangle_height,
|
||||
mTriangleColor.get() % opacity, TRUE);
|
||||
mTriangleColor.get() % opacity, true);
|
||||
}
|
||||
}
|
||||
else if (!mRoundedSquareImgp && !mThumbImagep)
|
||||
|
|
@ -725,23 +725,23 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
|
||||
// the draw command
|
||||
gl_rect_2d(mIt->second, curThumbColor, TRUE);
|
||||
gl_rect_2d(mIt->second, curThumbColor, true);
|
||||
}
|
||||
|
||||
// now draw the current and hover sliders
|
||||
if(curSldrIt != mThumbRects.end())
|
||||
{
|
||||
gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), TRUE);
|
||||
gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), true);
|
||||
}
|
||||
|
||||
// and draw the drag start
|
||||
if (gFocusMgr.getMouseCapture() == this)
|
||||
{
|
||||
gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, FALSE);
|
||||
gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, false);
|
||||
}
|
||||
else if (hoverSldrIt != mThumbRects.end())
|
||||
{
|
||||
gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), TRUE);
|
||||
gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public:
|
|||
// Multi-slider rounds values to nearest increments (bias towards rounding down)
|
||||
F32 getNearestIncrement(F32 value) const;
|
||||
|
||||
void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE);
|
||||
void setSliderValue(const std::string& name, F32 value, bool from_event = false);
|
||||
F32 getSliderValue(const std::string& name) const;
|
||||
F32 getSliderValueFromPos(S32 xpos, S32 ypos) const;
|
||||
LLRect getSliderThumbRect(const std::string& name) const;
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
F32 getCurSliderValue() const { return getSliderValue(mCurSlider); }
|
||||
void setCurSlider(const std::string& name);
|
||||
void resetCurSlider();
|
||||
void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); }
|
||||
void setCurSliderValue(F32 val, bool from_event = false) { setSliderValue(mCurSlider, val, from_event); }
|
||||
|
||||
/*virtual*/ void setValue(const LLSD& value) override;
|
||||
/*virtual*/ LLSD getValue() const override { return mValue; }
|
||||
|
|
@ -113,7 +113,7 @@ public:
|
|||
/*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*/ bool handleKeyHere(KEY key, MASK mask) override;
|
||||
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override;
|
||||
/*virtual*/ void draw() override;
|
||||
|
||||
|
|
@ -130,11 +130,11 @@ protected:
|
|||
static S32 mNameCounter;
|
||||
|
||||
S32 mMaxNumSliders;
|
||||
BOOL mAllowOverlap;
|
||||
BOOL mLoopOverlap;
|
||||
bool mAllowOverlap;
|
||||
bool mLoopOverlap;
|
||||
F32 mOverlapThreshold;
|
||||
BOOL mDrawTrack;
|
||||
BOOL mUseTriangle; /// hacked in toggle to use a triangle
|
||||
bool mDrawTrack;
|
||||
bool mUseTriangle; /// hacked in toggle to use a triangle
|
||||
|
||||
S32 mMouseOffset;
|
||||
LLRect mDragStartThumbRect;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p)
|
|||
mEditor->setFocusReceivedCallback( boost::bind(LLMultiSliderCtrl::onEditorGainFocus, _1, this) );
|
||||
// don't do this, as selecting the entire text is single clicking in some cases
|
||||
// and double clicking in others
|
||||
//mEditor->setSelectAllonFocusReceived(TRUE);
|
||||
//mEditor->setSelectAllonFocusReceived(true);
|
||||
addChild(mEditor);
|
||||
}
|
||||
else
|
||||
|
|
@ -219,7 +219,7 @@ void LLMultiSliderCtrl::setValue(const LLSD& value)
|
|||
updateText();
|
||||
}
|
||||
|
||||
void LLMultiSliderCtrl::setSliderValue(const std::string& name, F32 v, BOOL from_event)
|
||||
void LLMultiSliderCtrl::setSliderValue(const std::string& name, F32 v, bool from_event)
|
||||
{
|
||||
mMultiSlider->setSliderValue(name, v, from_event );
|
||||
mCurValue = mMultiSlider->getCurSliderValue();
|
||||
|
|
@ -237,9 +237,9 @@ void LLMultiSliderCtrl::resetCurSlider()
|
|||
mMultiSlider->resetCurSlider();
|
||||
}
|
||||
|
||||
BOOL LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
BOOL res = FALSE;
|
||||
bool res = false;
|
||||
if (mLabelBox)
|
||||
{
|
||||
res = mLabelBox->setTextArg(key, text);
|
||||
|
|
@ -329,7 +329,7 @@ void LLMultiSliderCtrl::clear()
|
|||
|
||||
}
|
||||
|
||||
BOOL LLMultiSliderCtrl::isMouseHeldDown()
|
||||
bool LLMultiSliderCtrl::isMouseHeldDown()
|
||||
{
|
||||
return gFocusMgr.getMouseCapture() == mMultiSlider;
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata)
|
|||
if (!self) // cast failed - wrong type! :O
|
||||
return;
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
F32 val = self->mCurValue;
|
||||
F32 saved_val = self->mCurValue;
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata)
|
|||
self->setCurSliderValue( val ); // set the value temporarily so that the callback can retrieve it.
|
||||
if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) )
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -409,14 +409,14 @@ void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata)
|
|||
if (!self)
|
||||
return;
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
F32 saved_val = self->mCurValue;
|
||||
F32 new_val = self->mMultiSlider->getCurSliderValue();
|
||||
|
||||
self->mCurValue = new_val; // set the value temporarily so that the callback can retrieve it.
|
||||
if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) )
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
}
|
||||
|
||||
if( success )
|
||||
|
|
@ -434,7 +434,7 @@ void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata)
|
|||
self->updateText();
|
||||
}
|
||||
|
||||
void LLMultiSliderCtrl::setEnabled(BOOL b)
|
||||
void LLMultiSliderCtrl::setEnabled(bool b)
|
||||
{
|
||||
LLF32UICtrl::setEnabled( b );
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ void LLMultiSliderCtrl::setEnabled(BOOL b)
|
|||
}
|
||||
|
||||
|
||||
void LLMultiSliderCtrl::setTentative(BOOL b)
|
||||
void LLMultiSliderCtrl::setTentative(bool b)
|
||||
{
|
||||
if( mEditor )
|
||||
{
|
||||
|
|
@ -469,11 +469,11 @@ void LLMultiSliderCtrl::setTentative(BOOL b)
|
|||
|
||||
void LLMultiSliderCtrl::onCommit()
|
||||
{
|
||||
setTentative(FALSE);
|
||||
setTentative(false);
|
||||
|
||||
if( mEditor )
|
||||
{
|
||||
mEditor->setTentative(FALSE);
|
||||
mEditor->setTentative(false);
|
||||
}
|
||||
|
||||
setControlValue(getValueF32());
|
||||
|
|
|
|||
|
|
@ -83,24 +83,24 @@ public:
|
|||
virtual ~LLMultiSliderCtrl();
|
||||
|
||||
F32 getSliderValue(const std::string& name) const { return mMultiSlider->getSliderValue(name); }
|
||||
void setSliderValue(const std::string& name, F32 v, BOOL from_event = FALSE);
|
||||
void setSliderValue(const std::string& name, F32 v, bool from_event = false);
|
||||
|
||||
virtual void setValue(const LLSD& value );
|
||||
virtual LLSD getValue() const { return mMultiSlider->getValue(); }
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
const std::string& getCurSlider() const { return mMultiSlider->getCurSlider(); }
|
||||
F32 getCurSliderValue() const { return mCurValue; }
|
||||
void setCurSlider(const std::string& name);
|
||||
void resetCurSlider();
|
||||
void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mMultiSlider->getCurSlider(), val, from_event); }
|
||||
void setCurSliderValue(F32 val, bool from_event = false) { setSliderValue(mMultiSlider->getCurSlider(), val, from_event); }
|
||||
|
||||
virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); }
|
||||
virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); }
|
||||
|
||||
BOOL isMouseHeldDown();
|
||||
bool isMouseHeldDown();
|
||||
|
||||
virtual void setEnabled( BOOL b );
|
||||
virtual void setEnabled( bool b );
|
||||
virtual void clear();
|
||||
virtual void setPrecision(S32 precision);
|
||||
void setMinValue(F32 min_value) {mMultiSlider->setMinValue(min_value);}
|
||||
|
|
@ -138,7 +138,7 @@ public:
|
|||
|
||||
virtual void onTabInto();
|
||||
|
||||
virtual void setTentative(BOOL b); // marks value as tentative
|
||||
virtual void setTentative(bool b); // marks value as tentative
|
||||
virtual void onCommit(); // mark not tentative, then commit
|
||||
|
||||
virtual void setControlName(const std::string& control_name, LLView* context);
|
||||
|
|
@ -155,8 +155,8 @@ private:
|
|||
|
||||
private:
|
||||
const LLFontGL* mFont;
|
||||
BOOL mShowText;
|
||||
BOOL mCanEditText;
|
||||
bool mShowText;
|
||||
bool mCanEditText;
|
||||
|
||||
S32 mPrecision;
|
||||
LLTextBox* mLabelBox;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
|
|||
ui_inst->mSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name));
|
||||
}
|
||||
|
||||
BOOL show_notification = TRUE;
|
||||
bool show_notification = true;
|
||||
if (p.ignore.control.isProvided())
|
||||
{
|
||||
mIgnoreSetting = ui_inst->mSettingGroups["config"]->getControl(p.ignore.control);
|
||||
|
|
@ -1558,7 +1558,7 @@ bool LLNotifications::loadTemplates()
|
|||
|
||||
std::string base_filename = search_paths.front();
|
||||
LLXMLNodePtr root;
|
||||
BOOL success = LLXMLNode::getLayeredXMLNode(root, search_paths);
|
||||
bool success = LLXMLNode::getLayeredXMLNode(root, search_paths);
|
||||
|
||||
if (!success || root.isNull() || !root->hasName( "notifications" ))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -445,11 +445,11 @@ public:
|
|||
// return response LLSD filled in with default form contents and (optionally) the default button selected
|
||||
LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON);
|
||||
|
||||
// returns index of first button with value==TRUE
|
||||
// returns index of first button with value==true
|
||||
// usually this the button the user clicked on
|
||||
// returns -1 if no button clicked (e.g. form has not been displayed)
|
||||
static S32 getSelectedOption(const LLSD& notification, const LLSD& response);
|
||||
// returns name of first button with value==TRUE
|
||||
// returns name of first button with value==true
|
||||
static std::string getSelectedOptionName(const LLSD& notification);
|
||||
|
||||
// after someone responds to a notification (usually by clicking a button,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ LLPanel::factory_stack_t LLPanel::sFactoryStack;
|
|||
|
||||
// Compiler optimization, generate extern template
|
||||
template class LLPanel* LLView::getChild<class LLPanel>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
|
||||
LLPanel::LocalizedString::LocalizedString()
|
||||
: name("name"),
|
||||
|
|
@ -127,9 +127,9 @@ LLPanel::~LLPanel()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLPanel::isPanel() const
|
||||
bool LLPanel::isPanel() const
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLPanel::addBorder(LLViewBorder::Params p)
|
||||
|
|
@ -167,13 +167,13 @@ void LLPanel::clearCtrls()
|
|||
for (LLPanel::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it)
|
||||
{
|
||||
LLUICtrl* ctrl = *ctrl_it;
|
||||
ctrl->setFocus( FALSE );
|
||||
ctrl->setEnabled( FALSE );
|
||||
ctrl->setFocus( false );
|
||||
ctrl->setEnabled( false );
|
||||
ctrl->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanel::setCtrlsEnabled( BOOL b )
|
||||
void LLPanel::setCtrlsEnabled( bool b )
|
||||
{
|
||||
LLPanel::ctrl_list_t ctrls = getCtrlList();
|
||||
for (LLPanel::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it)
|
||||
|
|
@ -247,13 +247,13 @@ void LLPanel::updateDefaultBtn()
|
|||
if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled())
|
||||
{
|
||||
LLButton* buttonp = dynamic_cast<LLButton*>(gFocusMgr.getKeyboardFocus());
|
||||
BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn();
|
||||
bool focus_is_child_button = buttonp && buttonp->getCommitOnReturn();
|
||||
// only enable default button when current focus is not a return-capturing button
|
||||
mDefaultBtn->setBorderEnabled(!focus_is_child_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
mDefaultBtn->setBorderEnabled(FALSE);
|
||||
mDefaultBtn->setBorderEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -261,19 +261,19 @@ void LLPanel::updateDefaultBtn()
|
|||
void LLPanel::refresh()
|
||||
{
|
||||
// do nothing by default
|
||||
// but is automatically called in setFocus(TRUE)
|
||||
// but is automatically called in setFocus(true)
|
||||
}
|
||||
|
||||
void LLPanel::setDefaultBtn(LLButton* btn)
|
||||
{
|
||||
if (mDefaultBtn && mDefaultBtn->getEnabled())
|
||||
{
|
||||
mDefaultBtn->setBorderEnabled(FALSE);
|
||||
mDefaultBtn->setBorderEnabled(false);
|
||||
}
|
||||
mDefaultBtn = btn;
|
||||
if (mDefaultBtn)
|
||||
{
|
||||
mDefaultBtn->setBorderEnabled(TRUE);
|
||||
mDefaultBtn->setBorderEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -290,17 +290,17 @@ void LLPanel::setDefaultBtn(const std::string& id)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
|
||||
bool LLPanel::handleKeyHere( KEY key, MASK mask )
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
|
||||
// handle user hitting ESC to defocus
|
||||
if (key == KEY_ESCAPE)
|
||||
{
|
||||
setFocus(FALSE);
|
||||
return TRUE;
|
||||
setFocus(false);
|
||||
return true;
|
||||
}
|
||||
else if( (mask == MASK_SHIFT) && (KEY_TAB == key))
|
||||
{
|
||||
|
|
@ -310,7 +310,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
|
|||
LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
|
||||
if (focus_root)
|
||||
{
|
||||
handled = focus_root->focusPrevItem(FALSE);
|
||||
handled = focus_root->focusPrevItem(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
|
|||
LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
|
||||
if (focus_root)
|
||||
{
|
||||
handled = focus_root->focusNextItem(FALSE);
|
||||
handled = focus_root->focusNextItem(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -335,38 +335,38 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
|
|||
{
|
||||
// current focus is a return-capturing button,
|
||||
// let *that* button handle the return key
|
||||
handled = FALSE;
|
||||
handled = false;
|
||||
}
|
||||
else if (mDefaultBtn && mDefaultBtn->getVisible() && mDefaultBtn->getEnabled())
|
||||
{
|
||||
// If we have a default button, click it when return is pressed
|
||||
mDefaultBtn->onCommit();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
else if (cur_focus->acceptsTextInput())
|
||||
{
|
||||
// call onCommit for text input handling control
|
||||
cur_focus->onCommit();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLPanel::onVisibilityChange ( BOOL new_visibility )
|
||||
void LLPanel::onVisibilityChange ( bool new_visibility )
|
||||
{
|
||||
LLUICtrl::onVisibilityChange ( new_visibility );
|
||||
if (mVisibleSignal)
|
||||
(*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass BOOL as LLSD
|
||||
(*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass bool as LLSD
|
||||
}
|
||||
|
||||
void LLPanel::setFocus(BOOL b)
|
||||
void LLPanel::setFocus(bool b)
|
||||
{
|
||||
if( b && !hasFocus())
|
||||
{
|
||||
// give ourselves focus preemptively, to avoid infinite loop
|
||||
LLUICtrl::setFocus(TRUE);
|
||||
LLUICtrl::setFocus(true);
|
||||
// then try to pass to first valid child
|
||||
focusFirstItem();
|
||||
}
|
||||
|
|
@ -376,7 +376,7 @@ void LLPanel::setFocus(BOOL b)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanel::setBorderVisible(BOOL b)
|
||||
void LLPanel::setBorderVisible(bool b)
|
||||
{
|
||||
if (mBorder)
|
||||
{
|
||||
|
|
@ -504,7 +504,7 @@ static LLTrace::BlockTimerStatHandle FTM_PANEL_SETUP("Panel Setup");
|
|||
static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PANEL_POSTBUILD("Panel PostBuild");
|
||||
|
||||
BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params)
|
||||
bool LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params)
|
||||
{
|
||||
Params params(default_params);
|
||||
{
|
||||
|
|
@ -533,7 +533,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
|
|||
setupParamsForExport(output_params, parent);
|
||||
output_node->setName(node->getName()->mString);
|
||||
parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLUICtrlFactory::instance().pushFileName(xml_filename);
|
||||
|
|
@ -543,7 +543,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
|
|||
{
|
||||
LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
parser.readXUI(referenced_xml, params, LLUICtrlFactory::getInstance()->getCurFileName());
|
||||
|
|
@ -590,7 +590,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
|
|||
postBuild();
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLPanel::hasString(const std::string& name)
|
||||
|
|
@ -658,7 +658,7 @@ void LLPanel::childSetEnabled(const std::string& id, bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanel::childSetFocus(const std::string& id, BOOL focus)
|
||||
void LLPanel::childSetFocus(const std::string& id, bool focus)
|
||||
{
|
||||
LLUICtrl* child = findChild<LLUICtrl>(id);
|
||||
if (child)
|
||||
|
|
@ -667,7 +667,7 @@ void LLPanel::childSetFocus(const std::string& id, BOOL focus)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLPanel::childHasFocus(const std::string& id)
|
||||
bool LLPanel::childHasFocus(const std::string& id)
|
||||
{
|
||||
LLUICtrl* child = findChild<LLUICtrl>(id);
|
||||
if (child)
|
||||
|
|
@ -676,7 +676,7 @@ BOOL LLPanel::childHasFocus(const std::string& id)
|
|||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -752,24 +752,24 @@ LLSD LLPanel::childGetValue(const std::string& id) const
|
|||
return LLSD();
|
||||
}
|
||||
|
||||
BOOL LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
|
||||
bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
|
||||
{
|
||||
LLUICtrl* child = findChild<LLUICtrl>(id);
|
||||
if (child)
|
||||
{
|
||||
return child->setTextArg(key, text);
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
|
||||
bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
|
||||
{
|
||||
LLView* child = findChild<LLView>(id);
|
||||
if (child)
|
||||
{
|
||||
return child->setLabelArg(key, text);
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_type& function)
|
||||
|
|
@ -803,10 +803,10 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::
|
|||
//-----------------------------------------------------------------------------
|
||||
// buildPanel()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params)
|
||||
bool LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL didPost = FALSE;
|
||||
bool didPost = false;
|
||||
LLXMLNodePtr root;
|
||||
|
||||
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
#include <queue>
|
||||
|
||||
const S32 LLPANEL_BORDER_WIDTH = 1;
|
||||
const BOOL BORDER_YES = TRUE;
|
||||
const BOOL BORDER_NO = FALSE;
|
||||
const bool BORDER_YES = true;
|
||||
const bool BORDER_NO = false;
|
||||
|
||||
class LLButton;
|
||||
class LLUIImage;
|
||||
|
|
@ -107,20 +107,20 @@ protected:
|
|||
public:
|
||||
typedef std::vector<class LLUICtrl *> ctrl_list_t;
|
||||
|
||||
BOOL buildFromFile(const std::string &filename, const LLPanel::Params& default_params = getDefaultParams());
|
||||
bool buildFromFile(const std::string &filename, const LLPanel::Params& default_params = getDefaultParams());
|
||||
|
||||
static LLPanel* createFactoryPanel(const std::string& name);
|
||||
|
||||
/*virtual*/ ~LLPanel();
|
||||
|
||||
// LLView interface
|
||||
/*virtual*/ BOOL isPanel() const;
|
||||
/*virtual*/ bool isPanel() const;
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
|
||||
/*virtual*/ void onVisibilityChange ( BOOL new_visibility );
|
||||
/*virtual*/ bool handleKeyHere( KEY key, MASK mask );
|
||||
/*virtual*/ void onVisibilityChange ( bool new_visibility );
|
||||
|
||||
// From LLFocusableElement
|
||||
/*virtual*/ void setFocus( BOOL b );
|
||||
/*virtual*/ void setFocus( bool b );
|
||||
|
||||
// New virtuals
|
||||
virtual void refresh(); // called in setFocus()
|
||||
|
|
@ -131,8 +131,8 @@ public:
|
|||
void addBorder( LLViewBorder::Params p);
|
||||
void addBorder();
|
||||
void removeBorder();
|
||||
BOOL hasBorder() const { return mBorder != NULL; }
|
||||
void setBorderVisible( BOOL b );
|
||||
bool hasBorder() const { return mBorder != NULL; }
|
||||
void setBorderVisible( bool b );
|
||||
|
||||
void setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; }
|
||||
const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; }
|
||||
|
|
@ -144,10 +144,10 @@ public:
|
|||
LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; }
|
||||
LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
|
||||
LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
|
||||
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
|
||||
BOOL isBackgroundVisible() const { return mBgVisible; }
|
||||
void setBackgroundOpaque(BOOL b) { mBgOpaque = b; }
|
||||
BOOL isBackgroundOpaque() const { return mBgOpaque; }
|
||||
void setBackgroundVisible( bool b ) { mBgVisible = b; }
|
||||
bool isBackgroundVisible() const { return mBgVisible; }
|
||||
void setBackgroundOpaque(bool b) { mBgOpaque = b; }
|
||||
bool isBackgroundOpaque() const { return mBgOpaque; }
|
||||
void setDefaultBtn(LLButton* btn = NULL);
|
||||
void setDefaultBtn(const std::string& id);
|
||||
void updateDefaultBtn();
|
||||
|
|
@ -156,7 +156,7 @@ public:
|
|||
void setHelpTopic(const std::string& help_topic) { mHelpTopic = help_topic; }
|
||||
std::string getHelpTopic() const { return mHelpTopic; }
|
||||
|
||||
void setCtrlsEnabled(BOOL b);
|
||||
void setCtrlsEnabled(bool b);
|
||||
ctrl_list_t getCtrlList() const;
|
||||
|
||||
LLHandle<LLPanel> getHandle() const { return getDerivedHandle<LLPanel>(); }
|
||||
|
|
@ -167,7 +167,7 @@ public:
|
|||
EnableCallbackRegistry::ScopedRegistrar& getEnableCallbackRegistrar() { return mEnableCallbackRegistrar; }
|
||||
|
||||
void initFromParams(const Params& p);
|
||||
BOOL initPanelXML( LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params);
|
||||
bool initPanelXML( LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params);
|
||||
|
||||
bool hasString(const std::string& name);
|
||||
std::string getString(const std::string& name, const LLStringUtil::format_map_t& args) const;
|
||||
|
|
@ -184,8 +184,8 @@ public:
|
|||
void childDisable(const std::string& name) { childSetEnabled(name, false); };
|
||||
|
||||
// LLUICtrl
|
||||
void childSetFocus(const std::string& id, BOOL focus = TRUE);
|
||||
BOOL childHasFocus(const std::string& id);
|
||||
void childSetFocus(const std::string& id, bool focus = true);
|
||||
bool childHasFocus(const std::string& id);
|
||||
|
||||
// *TODO: Deprecate; for backwards compatability only:
|
||||
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
|
||||
|
|
@ -203,9 +203,9 @@ public:
|
|||
LLSD childGetValue(const std::string& id) const;
|
||||
|
||||
// For setting text / label replacement params, e.g. "Hello [NAME]"
|
||||
// Not implemented for all types, defaults to noop, returns FALSE if not applicaple
|
||||
BOOL childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
|
||||
BOOL childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
|
||||
// Not implemented for all types, defaults to noop, returns false if not applicaple
|
||||
bool childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
|
||||
bool childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
|
||||
|
||||
// LLButton
|
||||
void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value);
|
||||
|
|
@ -238,8 +238,8 @@ protected:
|
|||
std::string mXMLFilename;
|
||||
|
||||
private:
|
||||
BOOL mBgVisible; // any background at all?
|
||||
BOOL mBgOpaque; // use opaque color or image
|
||||
bool mBgVisible; // any background at all?
|
||||
bool mBgOpaque; // use opaque color or image
|
||||
LLUIColor mBgOpaqueColor;
|
||||
LLUIColor mBgAlphaColor;
|
||||
LLUIColor mBgOpaqueImageOverlay;
|
||||
|
|
@ -259,7 +259,7 @@ private:
|
|||
// Build time optimization, generate once in .cpp file
|
||||
#ifndef LLPANEL_CPP
|
||||
extern template class LLPanel* LLView::getChild<class LLPanel>(
|
||||
const std::string& name, BOOL recurse) const;
|
||||
const std::string& name, bool recurse) const;
|
||||
#endif
|
||||
|
||||
typedef boost::function<LLPanel* (void)> LLPanelClassCreatorFunc;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
/*virtual*/ ~LLRadioCtrl();
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool postBuild();
|
||||
/*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
|
||||
LLSD getPayload() { return mPayload; }
|
||||
|
|
@ -119,16 +119,16 @@ LLRadioGroup::~LLRadioGroup()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLRadioGroup::postBuild()
|
||||
bool LLRadioGroup::postBuild()
|
||||
{
|
||||
if (!mRadioButtons.empty())
|
||||
{
|
||||
mRadioButtons[0]->setTabStop(true);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled)
|
||||
void LLRadioGroup::setIndexEnabled(S32 index, bool enabled)
|
||||
{
|
||||
S32 count = 0;
|
||||
for (button_list_t::iterator iter = mRadioButtons.begin();
|
||||
|
|
@ -138,7 +138,7 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled)
|
|||
if (count == index)
|
||||
{
|
||||
child->setEnabled(enabled);
|
||||
if (index == mSelectedIndex && enabled == FALSE)
|
||||
if (index == mSelectedIndex && enabled == false)
|
||||
{
|
||||
setSelectedIndex(-1);
|
||||
}
|
||||
|
|
@ -173,30 +173,30 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
||||
bool LLRadioGroup::setSelectedIndex(S32 index, bool from_event)
|
||||
{
|
||||
if ((S32)mRadioButtons.size() <= index )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (index < -1)
|
||||
{
|
||||
// less then minimum value
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect)
|
||||
{
|
||||
// -1 is "nothing selected"
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mSelectedIndex >= 0)
|
||||
{
|
||||
LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex];
|
||||
old_radio_item->setTabStop(false);
|
||||
old_radio_item->setValue( FALSE );
|
||||
old_radio_item->setValue( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -209,11 +209,11 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
|||
{
|
||||
LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
|
||||
radio_item->setTabStop(true);
|
||||
radio_item->setValue( TRUE );
|
||||
radio_item->setValue( true );
|
||||
|
||||
if (hasFocus())
|
||||
{
|
||||
radio_item->focusFirstItem(FALSE, FALSE);
|
||||
radio_item->focusFirstItem(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
|||
setControlValue(getValue());
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLRadioGroup::focusSelectedRadioBtn()
|
||||
|
|
@ -232,18 +232,18 @@ void LLRadioGroup::focusSelectedRadioBtn()
|
|||
LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
|
||||
if (radio_item->hasTabStop() && radio_item->getEnabled())
|
||||
{
|
||||
radio_item->focusFirstItem(FALSE, FALSE);
|
||||
radio_item->focusFirstItem(false, false);
|
||||
}
|
||||
}
|
||||
else if (mRadioButtons[0]->hasTabStop() || hasTabStop())
|
||||
{
|
||||
focusFirstItem(FALSE, FALSE);
|
||||
focusFirstItem(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
// do any of the tab buttons have keyboard focus?
|
||||
if (mask == MASK_NONE)
|
||||
{
|
||||
|
|
@ -258,7 +258,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_UP:
|
||||
if (!setSelectedIndex((getSelectedIndex() - 1)))
|
||||
|
|
@ -269,7 +269,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
if (!setSelectedIndex((getSelectedIndex() - 1)))
|
||||
|
|
@ -280,7 +280,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
if (!setSelectedIndex((getSelectedIndex() + 1)))
|
||||
|
|
@ -291,7 +291,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -358,11 +358,11 @@ void LLRadioGroup::setValue( const LLSD& value )
|
|||
// string not found, try integer
|
||||
if (value.isInteger())
|
||||
{
|
||||
setSelectedIndex((S32) value.asInteger(), TRUE);
|
||||
setSelectedIndex((S32) value.asInteger(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
setSelectedIndex(-1, TRUE);
|
||||
setSelectedIndex(-1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -381,9 +381,9 @@ LLSD LLRadioGroup::getValue() const
|
|||
}
|
||||
|
||||
// LLCtrlSelectionInterface functions
|
||||
BOOL LLRadioGroup::setCurrentByID( const LLUUID& id )
|
||||
bool LLRadioGroup::setCurrentByID( const LLUUID& id )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID LLRadioGroup::getCurrentID() const
|
||||
|
|
@ -391,7 +391,7 @@ LLUUID LLRadioGroup::getCurrentID() const
|
|||
return LLUUID::null;
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::setSelectedByValue(const LLSD& value, BOOL selected)
|
||||
bool LLRadioGroup::setSelectedByValue(const LLSD& value, bool selected)
|
||||
{
|
||||
S32 idx = 0;
|
||||
for (button_list_t::const_iterator iter = mRadioButtons.begin();
|
||||
|
|
@ -400,12 +400,12 @@ BOOL LLRadioGroup::setSelectedByValue(const LLSD& value, BOOL selected)
|
|||
if((*iter)->getPayload().asString() == value.asString())
|
||||
{
|
||||
setSelectedIndex(idx);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLSD LLRadioGroup::getSelectedValue()
|
||||
|
|
@ -413,7 +413,7 @@ LLSD LLRadioGroup::getSelectedValue()
|
|||
return getValue();
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::isSelected(const LLSD& value) const
|
||||
bool LLRadioGroup::isSelected(const LLSD& value) const
|
||||
{
|
||||
S32 idx = 0;
|
||||
for (button_list_t::const_iterator iter = mRadioButtons.begin();
|
||||
|
|
@ -423,22 +423,22 @@ BOOL LLRadioGroup::isSelected(const LLSD& value) const
|
|||
{
|
||||
if (idx == mSelectedIndex)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::operateOnSelection(EOperation op)
|
||||
bool LLRadioGroup::operateOnSelection(EOperation op)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLRadioGroup::operateOnAll(EOperation op)
|
||||
bool LLRadioGroup::operateOnAll(EOperation op)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLRadioGroup::ItemParams::ItemParams()
|
||||
|
|
@ -458,7 +458,7 @@ LLRadioCtrl::LLRadioCtrl(const LLRadioGroup::ItemParams& p)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLRadioCtrl::postBuild()
|
||||
bool LLRadioCtrl::postBuild()
|
||||
{
|
||||
// Old-style radio_item used the text contents to indicate the label,
|
||||
// but new-style radio_item uses label attribute.
|
||||
|
|
@ -467,7 +467,7 @@ BOOL LLRadioCtrl::postBuild()
|
|||
{
|
||||
setLabel(value);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -64,15 +64,15 @@ public:
|
|||
|
||||
virtual ~LLRadioGroup();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual bool postBuild();
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
void setIndexEnabled(S32 index, BOOL enabled);
|
||||
void setIndexEnabled(S32 index, bool enabled);
|
||||
// return the index value of the selected item
|
||||
S32 getSelectedIndex() const { return mSelectedIndex; }
|
||||
// set the index value programatically
|
||||
BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE);
|
||||
bool setSelectedIndex(S32 index, bool from_event = false);
|
||||
// foxus child by index if it can get focus
|
||||
void focusSelectedRadioBtn();
|
||||
|
||||
|
|
@ -88,18 +88,18 @@ public:
|
|||
|
||||
// LLCtrlSelectionInterface functions
|
||||
/*virtual*/ S32 getItemCount() const { return mRadioButtons.size(); }
|
||||
/*virtual*/ BOOL getCanSelect() const { return TRUE; }
|
||||
/*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); }
|
||||
/*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); }
|
||||
/*virtual*/ BOOL selectItemRange( S32 first, S32 last ) { return setSelectedIndex(first); }
|
||||
/*virtual*/ bool getCanSelect() const { return true; }
|
||||
/*virtual*/ bool selectFirstItem() { return setSelectedIndex(0); }
|
||||
/*virtual*/ bool selectNthItem( S32 index ) { return setSelectedIndex(index); }
|
||||
/*virtual*/ bool selectItemRange( S32 first, S32 last ) { return setSelectedIndex(first); }
|
||||
/*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); }
|
||||
/*virtual*/ BOOL setCurrentByID( const LLUUID& id );
|
||||
/*virtual*/ bool setCurrentByID( const LLUUID& id );
|
||||
/*virtual*/ LLUUID getCurrentID() const; // LLUUID::null if no items in menu
|
||||
/*virtual*/ BOOL setSelectedByValue(const LLSD& value, BOOL selected);
|
||||
/*virtual*/ bool setSelectedByValue(const LLSD& value, bool selected);
|
||||
/*virtual*/ LLSD getSelectedValue();
|
||||
/*virtual*/ BOOL isSelected(const LLSD& value) const;
|
||||
/*virtual*/ BOOL operateOnSelection(EOperation op);
|
||||
/*virtual*/ BOOL operateOnAll(EOperation op);
|
||||
/*virtual*/ bool isSelected(const LLSD& value) const;
|
||||
/*virtual*/ bool operateOnSelection(EOperation op);
|
||||
/*virtual*/ bool operateOnAll(EOperation op);
|
||||
|
||||
private:
|
||||
const LLFontGL* mFont;
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ public:
|
|||
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; }
|
||||
void setAllowDoubleClickSnapping(BOOL allow) { mAllowDoubleClickSnapping = allow; }
|
||||
void setEnableSnapping(bool enable) { mSnappingEnabled = enable; }
|
||||
void setAllowDoubleClickSnapping(bool allow) { mAllowDoubleClickSnapping = allow; }
|
||||
bool canResize() { return getEnabled() && mMaxSize > mMinSize; }
|
||||
void setResizeListener(boost::function<void(void*)> listener) {mResizeListener = listener;}
|
||||
void setImagePanel(LLPanel * panelp);
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ void LLResizeHandle::draw()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLResizeHandle::pointInHandle( S32 x, S32 y )
|
||||
bool LLResizeHandle::pointInHandle( S32 x, S32 y )
|
||||
{
|
||||
if( pointInView(x, y) )
|
||||
{
|
||||
|
|
@ -378,8 +378,8 @@ BOOL LLResizeHandle::pointInHandle( S32 x, S32 y )
|
|||
case LEFT_TOP: return (x <= RESIZE_BORDER_WIDTH) || (y >= TOP_BORDER);
|
||||
case LEFT_BOTTOM: return (x <= RESIZE_BORDER_WIDTH) || (y <= RESIZE_BORDER_WIDTH);
|
||||
case RIGHT_TOP: return (x >= RIGHT_BORDER) || (y >= TOP_BORDER);
|
||||
case RIGHT_BOTTOM: return TRUE;
|
||||
case RIGHT_BOTTOM: return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public:
|
|||
void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; }
|
||||
|
||||
private:
|
||||
BOOL pointInHandle( S32 x, S32 y );
|
||||
bool pointInHandle( S32 x, S32 y );
|
||||
|
||||
S32 mDragLastScreenX;
|
||||
S32 mDragLastScreenY;
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@ std::string LLResMgr::getMonetaryString( S32 input ) const
|
|||
|
||||
|
||||
// Note: we assume here that the currency symbol goes on the left. (Hey, it's Lindens! We can just decide.)
|
||||
BOOL negative = (input < 0 );
|
||||
BOOL negative_before = negative && (conv->n_sign_posn != 2);
|
||||
BOOL negative_after = negative && (conv->n_sign_posn == 2);
|
||||
bool negative = (input < 0 );
|
||||
bool negative_before = negative && (conv->n_sign_posn != 2);
|
||||
bool negative_after = negative && (conv->n_sign_posn == 2);
|
||||
|
||||
std::string digits = llformat("%u", abs(input));
|
||||
if( !grouping || !grouping[0] )
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ LLScrollbar::LLScrollbar(const Params & p)
|
|||
mDocPos( p.doc_pos ),
|
||||
mPageSize( p.page_size ),
|
||||
mStepSize( p.step_size ),
|
||||
mDocChanged(FALSE),
|
||||
mDocChanged(false),
|
||||
mDragStartX( 0 ),
|
||||
mDragStartY( 0 ),
|
||||
mHoverGlowStrength(0.15f),
|
||||
|
|
@ -136,19 +136,19 @@ void LLScrollbar::setDocParams( S32 size, S32 pos )
|
|||
{
|
||||
mDocSize = size;
|
||||
setDocPos(pos);
|
||||
mDocChanged = TRUE;
|
||||
mDocChanged = true;
|
||||
|
||||
updateThumbRect();
|
||||
}
|
||||
|
||||
// returns true if document position really changed
|
||||
bool LLScrollbar::setDocPos(S32 pos, BOOL update_thumb)
|
||||
bool LLScrollbar::setDocPos(S32 pos, bool update_thumb)
|
||||
{
|
||||
pos = llclamp(pos, 0, getDocPosMax());
|
||||
if (pos != mDocPos)
|
||||
{
|
||||
mDocPos = pos;
|
||||
mDocChanged = TRUE;
|
||||
mDocChanged = true;
|
||||
|
||||
if( mChangeCallback )
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ void LLScrollbar::setDocSize(S32 size)
|
|||
{
|
||||
mDocSize = size;
|
||||
setDocPos(mDocPos);
|
||||
mDocChanged = TRUE;
|
||||
mDocChanged = true;
|
||||
|
||||
updateThumbRect();
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ void LLScrollbar::setPageSize( S32 page_size )
|
|||
{
|
||||
mPageSize = page_size;
|
||||
setDocPos(mDocPos);
|
||||
mDocChanged = TRUE;
|
||||
mDocChanged = true;
|
||||
|
||||
updateThumbRect();
|
||||
}
|
||||
|
|
@ -329,7 +329,7 @@ bool LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
|
|||
S32 new_pos = llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines );
|
||||
// Note: we do not call updateThumbRect() here. Instead we let the thumb and the document go slightly
|
||||
// out of sync (less than a line's worth) to make the thumb feel responsive.
|
||||
changeLine( new_pos - mDocPos, FALSE );
|
||||
changeLine( new_pos - mDocPos, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ bool LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
|
|||
|
||||
// Note: we do not call updateThumbRect() here. Instead we let the thumb and the document go slightly
|
||||
// out of sync (less than a line's worth) to make the thumb feel responsive.
|
||||
changeLine( new_pos - mDocPos, FALSE );
|
||||
changeLine( new_pos - mDocPos, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ bool LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
|
||||
bool LLScrollbar::handleScrollHWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
bool handled = FALSE;
|
||||
bool handled = false;
|
||||
if (LLScrollbar::HORIZONTAL == mOrientation)
|
||||
{
|
||||
handled = changeLine(clicks * mStepSize, true);
|
||||
|
|
@ -418,7 +418,7 @@ bool LLScrollbar::handleScrollHWheel(S32 x, S32 y, S32 clicks)
|
|||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
bool LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg)
|
||||
{
|
||||
// enable this to get drag and drop to control scrollbars
|
||||
|
|
@ -434,10 +434,10 @@ BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
|||
// : F32(pos - SCROLLBAR_SIZE) / usable_track_length;
|
||||
// S32 new_pos = (VERTICAL == mOrientation) ? llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines )
|
||||
// : llclamp( S32(ratio * variable_lines + 0.5f), 0, variable_lines );
|
||||
// changeLine( new_pos - mDocPos, TRUE );
|
||||
// changeLine( new_pos - mDocPos, true );
|
||||
//}
|
||||
//return TRUE;
|
||||
return FALSE;
|
||||
//return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -464,7 +464,7 @@ bool LLScrollbar::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
|
||||
|
||||
void LLScrollbar::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLScrollbar::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
if (width == getRect().getWidth() && height == getRect().getHeight()) return;
|
||||
LLView::reshape( width, height, called_from_parent );
|
||||
|
|
@ -493,14 +493,14 @@ void LLScrollbar::draw()
|
|||
|
||||
if(mBGVisible)
|
||||
{
|
||||
gl_rect_2d(getLocalRect(), mBGColor.get(), TRUE);
|
||||
gl_rect_2d(getLocalRect(), mBGColor.get(), true);
|
||||
}
|
||||
|
||||
S32 local_mouse_x;
|
||||
S32 local_mouse_y;
|
||||
LLUI::getInstance()->getMousePositionLocal(this, &local_mouse_x, &local_mouse_y);
|
||||
BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this;
|
||||
BOOL hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y));
|
||||
bool other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this;
|
||||
bool hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y));
|
||||
if (hovered)
|
||||
{
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLSmoothInterpolation::getInterpolant(0.05f));
|
||||
|
|
@ -517,9 +517,9 @@ void LLScrollbar::draw()
|
|||
gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0,
|
||||
mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(),
|
||||
mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * mThickness : getRect().getWidth(),
|
||||
mOrientation == VERTICAL ? mThickness : 0, mTrackColor.get(), TRUE);
|
||||
mOrientation == VERTICAL ? mThickness : 0, mTrackColor.get(), true);
|
||||
|
||||
gl_rect_2d(mThumbRect, mThumbColor.get(), TRUE);
|
||||
gl_rect_2d(mThumbRect, mThumbColor.get(), true);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -578,7 +578,7 @@ void LLScrollbar::draw()
|
|||
} // end draw
|
||||
|
||||
|
||||
bool LLScrollbar::changeLine( S32 delta, BOOL update_thumb )
|
||||
bool LLScrollbar::changeLine( S32 delta, bool update_thumb )
|
||||
{
|
||||
return setDocPos(mDocPos + delta, update_thumb);
|
||||
}
|
||||
|
|
@ -589,35 +589,35 @@ void LLScrollbar::setValue(const LLSD& value)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLScrollbar::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLScrollbar::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
if (getDocPosMax() == 0 && !getVisible())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
case KEY_HOME:
|
||||
setDocPos( 0 );
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_END:
|
||||
setDocPos( getDocPosMax() );
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_DOWN:
|
||||
setDocPos( getDocPos() + mStepSize );
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_UP:
|
||||
setDocPos( getDocPos() - mStepSize );
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case KEY_PAGE_DOWN:
|
||||
|
|
@ -636,7 +636,7 @@ void LLScrollbar::pageUp(S32 overlap)
|
|||
{
|
||||
if (mDocSize > mPageSize)
|
||||
{
|
||||
changeLine( -(mPageSize - overlap), TRUE );
|
||||
changeLine( -(mPageSize - overlap), true );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -644,18 +644,18 @@ void LLScrollbar::pageDown(S32 overlap)
|
|||
{
|
||||
if (mDocSize > mPageSize)
|
||||
{
|
||||
changeLine( mPageSize - overlap, TRUE );
|
||||
changeLine( mPageSize - overlap, true );
|
||||
}
|
||||
}
|
||||
|
||||
void LLScrollbar::onLineUpBtnPressed( const LLSD& data )
|
||||
{
|
||||
changeLine( -mStepSize, TRUE );
|
||||
changeLine( -mStepSize, true );
|
||||
}
|
||||
|
||||
void LLScrollbar::onLineDownBtnPressed( const LLSD& data )
|
||||
{
|
||||
changeLine( mStepSize, TRUE );
|
||||
changeLine( mStepSize, true );
|
||||
}
|
||||
|
||||
void LLScrollbar::setThickness(S32 thickness)
|
||||
|
|
|
|||
|
|
@ -82,17 +82,17 @@ public:
|
|||
virtual void setValue(const LLSD& value);
|
||||
|
||||
// Overrides from LLView
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
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 handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg);
|
||||
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
virtual void draw();
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public:
|
|||
|
||||
// How many "lines" the "document" has scrolled.
|
||||
// 0 <= DocPos <= DocSize - DocVisibile
|
||||
bool setDocPos( S32 pos, BOOL update_thumb = TRUE );
|
||||
bool setDocPos( S32 pos, bool update_thumb = true );
|
||||
S32 getDocPos() const { return mDocPos; }
|
||||
|
||||
bool isAtBeginning() const;
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
|
||||
private:
|
||||
void updateThumbRect();
|
||||
bool changeLine(S32 delta, BOOL update_thumb );
|
||||
bool changeLine(S32 delta, bool update_thumb );
|
||||
|
||||
callback_t mChangeCallback;
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ private:
|
|||
S32 mDocPos; // Position within the doc that the scrollbar is modeling, in "lines" (user size)
|
||||
S32 mPageSize; // Maximum number of lines that can be seen at one time.
|
||||
S32 mStepSize;
|
||||
BOOL mDocChanged;
|
||||
bool mDocChanged;
|
||||
|
||||
LLRect mThumbRect;
|
||||
S32 mDragStartX;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ LLScrollContainer::Params::Params()
|
|||
// Default constructor
|
||||
LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
|
||||
: LLUICtrl(p),
|
||||
mAutoScrolling( FALSE ),
|
||||
mAutoScrolling( false ),
|
||||
mAutoScrollRate( 0.f ),
|
||||
mBackgroundColor(p.bg_color()),
|
||||
mIsOpaque(p.is_opaque),
|
||||
|
|
@ -178,7 +178,7 @@ void LLScrollContainer::scrollVertical( S32 new_pos )
|
|||
|
||||
// LLView functionality
|
||||
void LLScrollContainer::reshape(S32 width, S32 height,
|
||||
BOOL called_from_parent)
|
||||
bool called_from_parent)
|
||||
{
|
||||
LLUICtrl::reshape( width, height, called_from_parent );
|
||||
|
||||
|
|
@ -191,8 +191,8 @@ void LLScrollContainer::reshape(S32 width, S32 height,
|
|||
|
||||
S32 visible_width = 0;
|
||||
S32 visible_height = 0;
|
||||
BOOL show_v_scrollbar = FALSE;
|
||||
BOOL show_h_scrollbar = FALSE;
|
||||
bool show_v_scrollbar = false;
|
||||
bool show_h_scrollbar = false;
|
||||
calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar );
|
||||
|
||||
mScrollbar[VERTICAL]->setDocSize( scrolled_rect.getHeight() );
|
||||
|
|
@ -204,7 +204,7 @@ void LLScrollContainer::reshape(S32 width, S32 height,
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLScrollContainer::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
// allow scrolled view to handle keystrokes in case it delegated keyboard focus
|
||||
// to the scroll container.
|
||||
|
|
@ -213,18 +213,18 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
|
|||
// call LLScrollContainer::handleKeyHere in turn
|
||||
if (mScrolledView && mScrolledView->handleKeyHere(key, mask))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
for( S32 i = 0; i < ORIENTATION_COUNT; i++ )
|
||||
{
|
||||
if( mScrollbar[i]->handleKeyHere(key, mask) )
|
||||
{
|
||||
updateScroll();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLScrollContainer::handleUnicodeCharHere(llwchar uni_char)
|
||||
|
|
@ -292,8 +292,8 @@ bool LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks)
|
|||
return false;
|
||||
}
|
||||
|
||||
BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
BOOL drop,
|
||||
bool LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -301,7 +301,7 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
{
|
||||
// Scroll folder view if needed. Never accepts a drag or drop.
|
||||
*accept = ACCEPT_NO;
|
||||
BOOL handled = autoScroll(x, y);
|
||||
bool handled = autoScroll(x, y);
|
||||
|
||||
if( !handled )
|
||||
{
|
||||
|
|
@ -309,7 +309,7 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
cargo_data, accept, tooltip_msg) != NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
|
||||
|
|
@ -366,7 +366,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
|||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
mAutoScrolling = true;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
|
@ -378,7 +378,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
|||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
mAutoScrolling = true;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
|||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
mAutoScrolling = true;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
|
@ -404,7 +404,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
|||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
mAutoScrolling = true;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
|||
return scrolling;
|
||||
}
|
||||
|
||||
void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
|
||||
void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, bool* show_h_scrollbar, bool* show_v_scrollbar ) const
|
||||
{
|
||||
const LLRect& doc_rect = getScrolledViewRect();
|
||||
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
|
||||
|
|
@ -426,8 +426,8 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height
|
|||
*visible_width = getRect().getWidth() - 2 * border_width;
|
||||
*visible_height = getRect().getHeight() - 2 * border_width;
|
||||
|
||||
*show_v_scrollbar = FALSE;
|
||||
*show_h_scrollbar = FALSE;
|
||||
*show_v_scrollbar = false;
|
||||
*show_h_scrollbar = false;
|
||||
|
||||
if (!mHideScrollbar)
|
||||
{
|
||||
|
|
@ -435,12 +435,12 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height
|
|||
// the display of sliders.
|
||||
if ((doc_height - *visible_height) > 1)
|
||||
{
|
||||
*show_v_scrollbar = TRUE;
|
||||
*show_v_scrollbar = true;
|
||||
*visible_width -= scrollbar_size;
|
||||
}
|
||||
if ((doc_width - *visible_width) > 1)
|
||||
{
|
||||
*show_h_scrollbar = TRUE;
|
||||
*show_h_scrollbar = true;
|
||||
*visible_height -= scrollbar_size;
|
||||
// Note: Do *not* recompute *show_v_scrollbar here because with
|
||||
// The view inside the scroll container should not be extended
|
||||
|
|
@ -449,7 +449,7 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height
|
|||
|
||||
if( !*show_v_scrollbar && ((doc_height - *visible_height) > 1) )
|
||||
{
|
||||
*show_v_scrollbar = TRUE;
|
||||
*show_v_scrollbar = true;
|
||||
*visible_width -= scrollbar_size;
|
||||
}
|
||||
}
|
||||
|
|
@ -473,7 +473,7 @@ void LLScrollContainer::draw()
|
|||
mAutoScrollRate = mMinAutoScrollRate;
|
||||
}
|
||||
// clear this flag to be set on next call to autoScroll
|
||||
mAutoScrolling = FALSE;
|
||||
mAutoScrolling = false;
|
||||
|
||||
// auto-focus when scrollbar active
|
||||
// this allows us to capture user intent (i.e. stop automatically scrolling the view/etc)
|
||||
|
|
@ -506,8 +506,8 @@ void LLScrollContainer::draw()
|
|||
{
|
||||
S32 visible_width = 0;
|
||||
S32 visible_height = 0;
|
||||
BOOL show_v_scrollbar = FALSE;
|
||||
BOOL show_h_scrollbar = FALSE;
|
||||
bool show_v_scrollbar = false;
|
||||
bool show_h_scrollbar = false;
|
||||
calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar );
|
||||
|
||||
LLLocalClipRect clip(LLRect(mInnerRect.mLeft,
|
||||
|
|
@ -578,8 +578,8 @@ void LLScrollContainer::updateScroll()
|
|||
S32 doc_height = doc_rect.getHeight();
|
||||
S32 visible_width = 0;
|
||||
S32 visible_height = 0;
|
||||
BOOL show_v_scrollbar = FALSE;
|
||||
BOOL show_h_scrollbar = FALSE;
|
||||
bool show_v_scrollbar = false;
|
||||
bool show_h_scrollbar = false;
|
||||
calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar );
|
||||
|
||||
S32 border_width = getBorderWidth();
|
||||
|
|
@ -591,14 +591,14 @@ void LLScrollContainer::updateScroll()
|
|||
}
|
||||
|
||||
scrollVertical( mScrollbar[VERTICAL]->getDocPos() );
|
||||
mScrollbar[VERTICAL]->setVisible( TRUE );
|
||||
mScrollbar[VERTICAL]->setVisible( true );
|
||||
|
||||
S32 v_scrollbar_height = visible_height;
|
||||
if( !show_h_scrollbar && mReserveScrollCorner )
|
||||
{
|
||||
v_scrollbar_height -= scrollbar_size;
|
||||
}
|
||||
mScrollbar[VERTICAL]->reshape( scrollbar_size, v_scrollbar_height, TRUE );
|
||||
mScrollbar[VERTICAL]->reshape( scrollbar_size, v_scrollbar_height, true );
|
||||
|
||||
// Make room for the horizontal scrollbar (or not)
|
||||
S32 v_scrollbar_offset = 0;
|
||||
|
|
@ -614,7 +614,7 @@ void LLScrollContainer::updateScroll()
|
|||
{
|
||||
mScrolledView->translate( 0, getRect().getHeight() - border_width - doc_rect.mTop );
|
||||
|
||||
mScrollbar[VERTICAL]->setVisible( FALSE );
|
||||
mScrollbar[VERTICAL]->setVisible( false );
|
||||
mScrollbar[VERTICAL]->setDocPos( 0 );
|
||||
}
|
||||
|
||||
|
|
@ -630,19 +630,19 @@ void LLScrollContainer::updateScroll()
|
|||
scrollHorizontal( mScrollbar[HORIZONTAL]->getDocPos() );
|
||||
}
|
||||
|
||||
mScrollbar[HORIZONTAL]->setVisible( TRUE );
|
||||
mScrollbar[HORIZONTAL]->setVisible( true );
|
||||
S32 h_scrollbar_width = visible_width;
|
||||
if( !show_v_scrollbar && mReserveScrollCorner )
|
||||
{
|
||||
h_scrollbar_width -= scrollbar_size;
|
||||
}
|
||||
mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, scrollbar_size, TRUE );
|
||||
mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, scrollbar_size, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
mScrolledView->translate( border_width - doc_rect.mLeft, 0 );
|
||||
|
||||
mScrollbar[HORIZONTAL]->setVisible( FALSE );
|
||||
mScrollbar[HORIZONTAL]->setVisible( false );
|
||||
mScrollbar[HORIZONTAL]->setDocPos( 0 );
|
||||
}
|
||||
|
||||
|
|
@ -653,7 +653,7 @@ void LLScrollContainer::updateScroll()
|
|||
mScrollbar[VERTICAL]->setPageSize( visible_height );
|
||||
} // end updateScroll
|
||||
|
||||
void LLScrollContainer::setBorderVisible(BOOL b)
|
||||
void LLScrollContainer::setBorderVisible(bool b)
|
||||
{
|
||||
mBorder->setVisible( b );
|
||||
// Recompute inner rect, as border visibility changes it
|
||||
|
|
@ -676,8 +676,8 @@ LLRect LLScrollContainer::getContentWindowRect()
|
|||
LLRect scroller_view_rect;
|
||||
S32 visible_width = 0;
|
||||
S32 visible_height = 0;
|
||||
BOOL show_h_scrollbar = FALSE;
|
||||
BOOL show_v_scrollbar = FALSE;
|
||||
bool show_h_scrollbar = false;
|
||||
bool show_v_scrollbar = false;
|
||||
calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar );
|
||||
S32 border_width = getBorderWidth();
|
||||
scroller_view_rect.setOriginAndSize(border_width,
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ public:
|
|||
|
||||
virtual void setValue(const LLSD& value) { mInnerRect.setValue(value); }
|
||||
|
||||
void setBorderVisible( BOOL b );
|
||||
void setBorderVisible( bool b );
|
||||
|
||||
void scrollToShowRect( const LLRect& rect, const LLRect& constraint);
|
||||
void scrollToShowRect( const LLRect& rect) { scrollToShowRect(rect, LLRect(0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0)); }
|
||||
|
||||
void setReserveScrollCorner( BOOL b ) { mReserveScrollCorner = b; }
|
||||
void setReserveScrollCorner( bool b ) { mReserveScrollCorner = b; }
|
||||
LLRect getVisibleContentRect();
|
||||
LLRect getContentWindowRect();
|
||||
virtual const LLRect getScrolledViewRect() const { return mScrolledView ? mScrolledView->getRect() : LLRect::null; }
|
||||
|
|
@ -108,12 +108,12 @@ public:
|
|||
LLScrollbar* getScrollbar(SCROLL_ORIENTATION orientation) { return mScrollbar[orientation]; }
|
||||
|
||||
// LLView functionality
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
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 handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
|
|
@ -137,16 +137,16 @@ private:
|
|||
virtual void scrollVertical( S32 new_pos );
|
||||
void updateScroll();
|
||||
bool autoScroll(S32 x, S32 y, bool do_scroll);
|
||||
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
|
||||
void calcVisibleSize( S32 *visible_width, S32 *visible_height, bool* show_h_scrollbar, bool* show_v_scrollbar ) const;
|
||||
|
||||
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
|
||||
S32 mSize;
|
||||
BOOL mIsOpaque;
|
||||
bool mIsOpaque;
|
||||
LLUIColor mBackgroundColor;
|
||||
LLRect mInnerRect;
|
||||
LLViewBorder* mBorder;
|
||||
BOOL mReserveScrollCorner;
|
||||
BOOL mAutoScrolling;
|
||||
bool mReserveScrollCorner;
|
||||
bool mAutoScrolling;
|
||||
F32 mAutoScrollRate;
|
||||
F32 mMinAutoScrollRate;
|
||||
F32 mMaxAutoScrollRate;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ void LLScrollingPanelList::removePanel( U32 panel_index )
|
|||
}
|
||||
}
|
||||
|
||||
void LLScrollingPanelList::updatePanels(BOOL allow_modify)
|
||||
void LLScrollingPanelList::updatePanels(bool allow_modify)
|
||||
{
|
||||
for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
|
||||
iter != mPanelList.end(); ++iter)
|
||||
|
|
@ -191,7 +191,7 @@ void LLScrollingPanelList::updatePanelVisiblilty()
|
|||
local_rect.getWidth(), local_rect.getHeight(),
|
||||
&screen_rect.mRight, &screen_rect.mTop );
|
||||
|
||||
BOOL intersects =
|
||||
bool intersects =
|
||||
( (screen_rect.mRight > parent_screen_rect.mLeft) && (screen_rect.mLeft < parent_screen_rect.mRight) ) &&
|
||||
( (screen_rect.mTop > parent_screen_rect.mBottom) && (screen_rect.mBottom < parent_screen_rect.mTop) );
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class LLScrollingPanel : public LLPanel
|
|||
{
|
||||
public:
|
||||
LLScrollingPanel(const LLPanel::Params& params) : LLPanel(params) {}
|
||||
virtual void updatePanel(BOOL allow_modify) = 0;
|
||||
virtual void updatePanel(bool allow_modify) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ public:
|
|||
S32 addPanel( LLScrollingPanel* panel );
|
||||
void removePanel( LLScrollingPanel* panel );
|
||||
void removePanel( U32 panel_index );
|
||||
void updatePanels(BOOL allow_modify);
|
||||
void updatePanels(bool allow_modify);
|
||||
const panel_list_t& getPanelList() { return mPanelList; }
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -281,9 +281,9 @@ void LLScrollListText::highlightText(S32 offset, S32 num_chars)
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLScrollListText::isText() const
|
||||
bool LLScrollListText::isText() const
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -298,7 +298,7 @@ const std::string &LLScrollListText::getToolTip() const
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListText::needsToolTip() const
|
||||
bool LLScrollListText::needsToolTip() const
|
||||
{
|
||||
// If base class has a tooltip, return that
|
||||
if (LLScrollListCell::needsToolTip())
|
||||
|
|
@ -309,7 +309,7 @@ BOOL LLScrollListText::needsToolTip() const
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLScrollListText::getVisible() const
|
||||
bool LLScrollListText::getVisible() const
|
||||
{
|
||||
return mVisible;
|
||||
}
|
||||
|
|
@ -335,7 +335,7 @@ S32 LLScrollListText::getContentWidth() const
|
|||
void LLScrollListText::setColor(const LLColor4& color)
|
||||
{
|
||||
mColor = color;
|
||||
mUseColor = TRUE;
|
||||
mUseColor = true;
|
||||
}
|
||||
|
||||
void LLScrollListText::setText(const LLStringExplicit& text)
|
||||
|
|
@ -436,7 +436,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
|
|||
string_chars,
|
||||
getTextWidth(),
|
||||
&right_x,
|
||||
TRUE);
|
||||
true);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -480,14 +480,14 @@ void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_co
|
|||
mCheckBox->draw();
|
||||
}
|
||||
|
||||
BOOL LLScrollListCheck::handleClick()
|
||||
bool LLScrollListCheck::handleClick()
|
||||
{
|
||||
if (mCheckBox->getEnabled())
|
||||
{
|
||||
mCheckBox->toggle();
|
||||
}
|
||||
// don't change selection when clicking on embedded checkbox
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
|
|
@ -509,7 +509,7 @@ void LLScrollListCheck::onCommit()
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLScrollListCheck::setEnabled(BOOL enable)
|
||||
void LLScrollListCheck::setEnabled(bool enable)
|
||||
{
|
||||
mCheckBox->setEnabled(enable);
|
||||
}
|
||||
|
|
@ -660,7 +660,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
|
|||
string_chars,
|
||||
getTextWidth(),
|
||||
&right_x,
|
||||
TRUE);
|
||||
true);
|
||||
|
||||
if (mIcon)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,16 +106,16 @@ public:
|
|||
virtual void setAltValue(const LLSD& value) { }
|
||||
virtual const std::string &getToolTip() const { return mToolTip; }
|
||||
virtual void setToolTip(const std::string &str) { mToolTip = str; }
|
||||
virtual BOOL getVisible() const { return TRUE; }
|
||||
virtual bool getVisible() const { return true; }
|
||||
virtual void setWidth(S32 width) { mWidth = width; }
|
||||
virtual void highlightText(S32 offset, S32 num_chars) {}
|
||||
virtual BOOL isText() const { return FALSE; }
|
||||
virtual BOOL needsToolTip() const { return ! mToolTip.empty(); }
|
||||
virtual bool isText() const { return false; }
|
||||
virtual bool needsToolTip() const { return ! mToolTip.empty(); }
|
||||
virtual void setColor(const LLColor4&) {}
|
||||
virtual void onCommit() {};
|
||||
|
||||
virtual BOOL handleClick() { return FALSE; }
|
||||
virtual void setEnabled(BOOL enable) { }
|
||||
virtual bool handleClick() { return false; }
|
||||
virtual void setEnabled(bool enable) { }
|
||||
|
||||
private:
|
||||
S32 mWidth;
|
||||
|
|
@ -146,13 +146,13 @@ public:
|
|||
/*virtual*/ void setAltValue(const LLSD& value);
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ const LLSD getAltValue() const;
|
||||
/*virtual*/ BOOL getVisible() const;
|
||||
/*virtual*/ bool getVisible() const;
|
||||
/*virtual*/ void highlightText(S32 offset, S32 num_chars);
|
||||
|
||||
/*virtual*/ void setColor(const LLColor4&);
|
||||
/*virtual*/ BOOL isText() const;
|
||||
/*virtual*/ bool isText() const;
|
||||
/*virtual*/ const std::string & getToolTip() const;
|
||||
/*virtual*/ BOOL needsToolTip() const;
|
||||
/*virtual*/ bool needsToolTip() const;
|
||||
|
||||
S32 getTextWidth() const { return mTextWidth;}
|
||||
void setTextWidth(S32 value) { mTextWidth = value;}
|
||||
|
|
@ -171,7 +171,7 @@ protected:
|
|||
LLColor4 mHighlightColor;
|
||||
U8 mUseColor;
|
||||
LLFontGL::HAlign mFontAlignment;
|
||||
BOOL mVisible;
|
||||
bool mVisible;
|
||||
S32 mHighlightCount;
|
||||
S32 mHighlightOffset;
|
||||
|
||||
|
|
@ -235,8 +235,8 @@ public:
|
|||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ void onCommit();
|
||||
|
||||
/*virtual*/ BOOL handleClick();
|
||||
/*virtual*/ void setEnabled(BOOL enable);
|
||||
/*virtual*/ bool handleClick();
|
||||
/*virtual*/ void setEnabled(bool enable);
|
||||
|
||||
LLCheckBoxCtrl* getCheckBox() { return mCheckBox; }
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ LLScrollColumnHeader::Params::Params()
|
|||
LLScrollColumnHeader::LLScrollColumnHeader(const LLScrollColumnHeader::Params& p)
|
||||
: LLButton(p), // use combobox params to steal images
|
||||
mColumn(p.column),
|
||||
mHasResizableElement(FALSE)
|
||||
mHasResizableElement(false)
|
||||
{
|
||||
setClickedCallback(boost::bind(&LLScrollColumnHeader::onClick, this, _2));
|
||||
|
||||
|
|
@ -74,12 +74,12 @@ LLScrollColumnHeader::~LLScrollColumnHeader()
|
|||
void LLScrollColumnHeader::draw()
|
||||
{
|
||||
std::string sort_column = mColumn->mParentCtrl->getSortColumnName();
|
||||
BOOL draw_arrow = !mColumn->mLabel.empty()
|
||||
bool draw_arrow = !mColumn->mLabel.empty()
|
||||
&& mColumn->mParentCtrl->isSorted()
|
||||
// check for indirect sorting column as well as column's sorting name
|
||||
&& (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName);
|
||||
|
||||
BOOL is_ascending = mColumn->mParentCtrl->getSortAscending();
|
||||
bool is_ascending = mColumn->mParentCtrl->getSortAscending();
|
||||
if (draw_arrow)
|
||||
{
|
||||
setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white);
|
||||
|
|
@ -241,7 +241,7 @@ void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user)
|
|||
}
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::setHasResizableElement(BOOL resizable)
|
||||
void LLScrollColumnHeader::setHasResizableElement(bool resizable)
|
||||
{
|
||||
if (mHasResizableElement != resizable)
|
||||
{
|
||||
|
|
@ -270,7 +270,7 @@ void LLScrollColumnHeader::updateResizeBars()
|
|||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (!columnp || !columnp->mHeader) continue;
|
||||
BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
|
||||
bool enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
|
||||
columnp->mHeader->enableResizeBar(enable);
|
||||
if (enable)
|
||||
{
|
||||
|
|
@ -279,12 +279,12 @@ void LLScrollColumnHeader::updateResizeBars()
|
|||
}
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::enableResizeBar(BOOL enable)
|
||||
void LLScrollColumnHeader::enableResizeBar(bool enable)
|
||||
{
|
||||
mResizeBar->setEnabled(enable);
|
||||
}
|
||||
|
||||
BOOL LLScrollColumnHeader::canResize()
|
||||
bool LLScrollColumnHeader::canResize()
|
||||
{
|
||||
return getVisible() && (mHasResizableElement || mColumn->mDynamicWidth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,17 +56,17 @@ public:
|
|||
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
|
||||
|
||||
LLScrollListColumn* getColumn() { return mColumn; }
|
||||
void setHasResizableElement(BOOL resizable);
|
||||
void setHasResizableElement(bool resizable);
|
||||
void updateResizeBars();
|
||||
BOOL canResize();
|
||||
void enableResizeBar(BOOL enable);
|
||||
bool canResize();
|
||||
void enableResizeBar(bool enable);
|
||||
|
||||
void onClick(const LLSD& data);
|
||||
|
||||
private:
|
||||
LLScrollListColumn* mColumn;
|
||||
LLResizeBar* mResizeBar;
|
||||
BOOL mHasResizableElement;
|
||||
bool mHasResizableElement;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -158,7 +158,7 @@ public:
|
|||
ESortDirection mSortDirection;
|
||||
LLUIString mLabel;
|
||||
F32 mRelWidth;
|
||||
BOOL mDynamicWidth;
|
||||
bool mDynamicWidth;
|
||||
S32 mMaxContentWidth;
|
||||
S32 mIndex;
|
||||
LLScrollListCtrl* mParentCtrl;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ static LLDefaultChildRegistry::Register<LLScrollListCtrl> r("scroll_list");
|
|||
// local structures & classes.
|
||||
struct SortScrollListItem
|
||||
{
|
||||
SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal, bool alternate_sort)
|
||||
SortScrollListItem(const std::vector<std::pair<S32, bool> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal, bool alternate_sort)
|
||||
: mSortOrders(sort_orders)
|
||||
, mSortSignal(sort_signal)
|
||||
, mAltSort(alternate_sort)
|
||||
|
|
@ -82,7 +82,7 @@ struct SortScrollListItem
|
|||
it != mSortOrders.rend(); ++it)
|
||||
{
|
||||
S32 col_idx = it->first;
|
||||
BOOL sort_ascending = it->second;
|
||||
bool sort_ascending = it->second;
|
||||
|
||||
S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column?
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ struct SortScrollListItem
|
|||
}
|
||||
|
||||
|
||||
typedef std::vector<std::pair<S32, BOOL> > sort_order_t;
|
||||
typedef std::vector<std::pair<S32, bool> > sort_order_t;
|
||||
const LLScrollListCtrl::sort_signal_t* mSortSignal;
|
||||
const sort_order_t& mSortOrders;
|
||||
const bool mAltSort;
|
||||
|
|
@ -421,7 +421,7 @@ LLScrollListCtrl::~LLScrollListCtrl()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLScrollListCtrl::setMaxItemCount(S32 max_count)
|
||||
bool LLScrollListCtrl::setMaxItemCount(S32 max_count)
|
||||
{
|
||||
if (max_count >= getItemCount())
|
||||
{
|
||||
|
|
@ -460,7 +460,7 @@ S32 LLScrollListCtrl::getItemCount() const
|
|||
return mItemList.size();
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::hasSelectedItem() const
|
||||
bool LLScrollListCtrl::hasSelectedItem() const
|
||||
{
|
||||
item_list::iterator iter;
|
||||
for (iter = mItemList.begin(); iter < mItemList.end(); )
|
||||
|
|
@ -468,11 +468,11 @@ BOOL LLScrollListCtrl::hasSelectedItem() const
|
|||
LLScrollListItem* itemp = *iter;
|
||||
if (itemp && itemp->getSelected())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// virtual LLScrolListInterface function (was deleteAllItems)
|
||||
|
|
@ -613,7 +613,7 @@ LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const
|
|||
}
|
||||
|
||||
|
||||
void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
|
||||
void LLScrollListCtrl::reshape( S32 width, S32 height, bool called_from_parent )
|
||||
{
|
||||
LLUICtrl::reshape( width, height, called_from_parent );
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ void LLScrollListCtrl::updateLayout()
|
|||
// how many lines of content in a single "page"
|
||||
S32 page_lines = getLinesPerPage();
|
||||
|
||||
BOOL scrollbar_visible = mLineHeight * getItemCount() > mItemListRect.getHeight();
|
||||
bool scrollbar_visible = mLineHeight * getItemCount() > mItemListRect.getHeight();
|
||||
if (scrollbar_visible)
|
||||
{
|
||||
// provide space on the right for scrollbar
|
||||
|
|
@ -683,9 +683,9 @@ LLRect LLScrollListCtrl::getRequiredRect()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL requires_column )
|
||||
bool LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, bool requires_column )
|
||||
{
|
||||
BOOL not_too_big = getItemCount() < mMaxItemCount;
|
||||
bool not_too_big = getItemCount() < mMaxItemCount;
|
||||
if (not_too_big)
|
||||
{
|
||||
switch( pos )
|
||||
|
|
@ -943,12 +943,12 @@ void LLScrollListCtrl::setPageLines(S32 new_page_lines)
|
|||
updateLayout();
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::selectFirstItem()
|
||||
bool LLScrollListCtrl::selectFirstItem()
|
||||
{
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
|
||||
// our $%&@#$()^%#$()*^ iterators don't let us check against the first item inside out iteration
|
||||
BOOL first_item = TRUE;
|
||||
bool first_item = true;
|
||||
|
||||
item_list::iterator iter;
|
||||
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
|
|
@ -968,7 +968,7 @@ BOOL LLScrollListCtrl::selectFirstItem()
|
|||
selectItem(itemp, -1);
|
||||
}
|
||||
}
|
||||
success = TRUE;
|
||||
success = true;
|
||||
mOriginalSelection = 0;
|
||||
}
|
||||
else
|
||||
|
|
@ -986,7 +986,7 @@ BOOL LLScrollListCtrl::selectFirstItem()
|
|||
|
||||
// Deselects all other items
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::selectNthItem( S32 target_index )
|
||||
bool LLScrollListCtrl::selectNthItem( S32 target_index )
|
||||
{
|
||||
// <FS:Ansariel> FIRE-30571: Comboboxes select all items then pressing Page-Up
|
||||
target_index = llclamp(target_index, 0, (S32)mItemList.size() - 1);
|
||||
|
|
@ -994,11 +994,11 @@ BOOL LLScrollListCtrl::selectNthItem( S32 target_index )
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
|
||||
bool LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
|
||||
{
|
||||
if (mItemList.empty())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// make sure sort is up to date
|
||||
|
|
@ -1012,7 +1012,7 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
|
|||
else
|
||||
last_index = llclamp(last_index, first_index, listlen-1);
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
S32 index = 0;
|
||||
for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); )
|
||||
{
|
||||
|
|
@ -1036,8 +1036,8 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
|
|||
if( itemp->getEnabled() )
|
||||
{
|
||||
// TODO: support range selection for cells
|
||||
selectItem(itemp, -1, FALSE);
|
||||
success = TRUE;
|
||||
selectItem(itemp, -1, false);
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1185,7 +1185,7 @@ S32 LLScrollListCtrl::selectMultiple( uuid_vec_t ids )
|
|||
if (item->getEnabled() && (item->getUUID() == (*iditr)))
|
||||
{
|
||||
// TODO: support multiple selection for cells
|
||||
selectItem(item, -1, FALSE);
|
||||
selectItem(item, -1, false);
|
||||
++count;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1242,7 +1242,7 @@ S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id ) const
|
|||
return -1;
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::selectPrevItem( BOOL extend_selection)
|
||||
void LLScrollListCtrl::selectPrevItem( bool extend_selection)
|
||||
{
|
||||
LLScrollListItem* prev_item = NULL;
|
||||
|
||||
|
|
@ -1287,7 +1287,7 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection)
|
|||
}
|
||||
|
||||
|
||||
void LLScrollListCtrl::selectNextItem( BOOL extend_selection)
|
||||
void LLScrollListCtrl::selectNextItem( bool extend_selection)
|
||||
{
|
||||
LLScrollListItem* next_item = NULL;
|
||||
|
||||
|
|
@ -1332,7 +1332,7 @@ void LLScrollListCtrl::selectNextItem( BOOL extend_selection)
|
|||
|
||||
|
||||
|
||||
void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change)
|
||||
void LLScrollListCtrl::deselectAllItems(bool no_commit_on_change)
|
||||
{
|
||||
item_list::iterator iter;
|
||||
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
|
|
@ -1379,9 +1379,9 @@ LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
|
|||
// Selects first enabled item of the given name.
|
||||
// Returns false if item not found.
|
||||
// Calls getItemByLabel in order to combine functionality
|
||||
BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sensitive, S32 column/* = 0*/)
|
||||
bool LLScrollListCtrl::selectItemByLabel(const std::string& label, bool case_sensitive, S32 column/* = 0*/)
|
||||
{
|
||||
deselectAllItems(TRUE); // ensure that no stale items are selected, even if we don't find a match
|
||||
deselectAllItems(true); // ensure that no stale items are selected, even if we don't find a match
|
||||
LLScrollListItem* item = getItemByLabel(label, case_sensitive, column);
|
||||
|
||||
bool found = NULL != item;
|
||||
|
|
@ -1398,7 +1398,7 @@ BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sen
|
|||
return found;
|
||||
}
|
||||
|
||||
LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOOL case_sensitive, S32 column)
|
||||
LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, bool case_sensitive, S32 column)
|
||||
{
|
||||
if (label.empty()) //RN: assume no empty items
|
||||
{
|
||||
|
|
@ -1429,23 +1429,23 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOO
|
|||
}
|
||||
|
||||
|
||||
BOOL LLScrollListCtrl::selectItemByPrefix(const std::string& target, BOOL case_sensitive, S32 column)
|
||||
bool LLScrollListCtrl::selectItemByPrefix(const std::string& target, bool case_sensitive, S32 column)
|
||||
{
|
||||
return selectItemByPrefix(utf8str_to_wstring(target), case_sensitive, column);
|
||||
}
|
||||
|
||||
// Selects first enabled item that has a name where the name's first part matched the target string.
|
||||
// Returns false if item not found.
|
||||
BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sensitive, S32 column)
|
||||
bool LLScrollListCtrl::selectItemByPrefix(const LLWString& target, bool case_sensitive, S32 column)
|
||||
// <FS:Ansariel> Allow selection by substring match
|
||||
{
|
||||
return selectItemByStringMatch(target, true, case_sensitive);
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::selectItemByStringMatch(const LLWString& target, bool prefix_match, BOOL case_sensitive, S32 column)
|
||||
bool LLScrollListCtrl::selectItemByStringMatch(const LLWString& target, bool prefix_match, bool case_sensitive, S32 column)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
BOOL found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
LLWString target_trimmed( target );
|
||||
S32 target_len = target_trimmed.size();
|
||||
|
|
@ -1459,11 +1459,11 @@ BOOL LLScrollListCtrl::selectItemByStringMatch(const LLWString& target, bool pre
|
|||
LLScrollListItem* item = *iter;
|
||||
// Only select enabled items with matching names
|
||||
LLScrollListCell* cellp = item->getColumn(column == -1 ? getSearchColumn() : column);
|
||||
BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE;
|
||||
bool select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : false;
|
||||
if (select)
|
||||
{
|
||||
selectItem(item, -1);
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1496,8 +1496,8 @@ BOOL LLScrollListCtrl::selectItemByStringMatch(const LLWString& target, bool pre
|
|||
LLWStringUtil::trim(trimmed_label);
|
||||
|
||||
// <FS:Ansariel> Allow selection by substring match
|
||||
//BOOL select = item->getEnabled() && trimmed_label.compare(0, target_trimmed.size(), target_trimmed) == 0;
|
||||
BOOL select;
|
||||
//bool select = item->getEnabled() && trimmed_label.compare(0, target_trimmed.size(), target_trimmed) == 0;
|
||||
bool select;
|
||||
if (prefix_match)
|
||||
{
|
||||
select = item->getEnabled() && trimmed_label.compare(0, target_trimmed.size(), target_trimmed) == 0;
|
||||
|
|
@ -1514,7 +1514,7 @@ BOOL LLScrollListCtrl::selectItemByStringMatch(const LLWString& target, bool pre
|
|||
S32 offset = item_label.find(target_trimmed);
|
||||
cellp->highlightText(offset, target_trimmed.size());
|
||||
selectItem(item, -1);
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1547,7 +1547,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
|
|||
}
|
||||
else
|
||||
{
|
||||
deselectAllItems(TRUE);
|
||||
deselectAllItems(true);
|
||||
if (!case_sensitive)
|
||||
{
|
||||
// do comparisons in lower case
|
||||
|
|
@ -1587,7 +1587,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
|
|||
{
|
||||
// find offset of matching text
|
||||
cellp->highlightText(found_iter, substring_trimmed.size());
|
||||
selectItem(item, -1, FALSE);
|
||||
selectItem(item, -1, false);
|
||||
|
||||
found++;
|
||||
|
||||
|
|
@ -1613,13 +1613,13 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
|
|||
}
|
||||
|
||||
// <FS:Ansariel> Allow selection by substring match
|
||||
BOOL LLScrollListCtrl::selectItemBySubstring(const std::string& target, BOOL case_sensitive)
|
||||
bool LLScrollListCtrl::selectItemBySubstring(const std::string& target, bool case_sensitive)
|
||||
{
|
||||
return selectItemBySubstring(utf8str_to_wstring(target), case_sensitive);
|
||||
}
|
||||
|
||||
// Returns false if item not found.
|
||||
BOOL LLScrollListCtrl::selectItemBySubstring(const LLWString& target, BOOL case_sensitive)
|
||||
bool LLScrollListCtrl::selectItemBySubstring(const LLWString& target, bool case_sensitive)
|
||||
{
|
||||
return selectItemByStringMatch(target, false, case_sensitive);
|
||||
}
|
||||
|
|
@ -1642,7 +1642,7 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
|
|||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||
|
||||
LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled)
|
||||
LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, bool enabled)
|
||||
{
|
||||
if (getItemCount() < mMaxItemCount)
|
||||
{
|
||||
|
|
@ -1657,16 +1657,16 @@ LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_te
|
|||
}
|
||||
|
||||
// Select the line or lines that match this UUID
|
||||
BOOL LLScrollListCtrl::selectByID( const LLUUID& id )
|
||||
bool LLScrollListCtrl::selectByID( const LLUUID& id )
|
||||
{
|
||||
return selectByValue( LLSD(id) );
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
|
||||
bool LLScrollListCtrl::setSelectedByValue(const LLSD& value, bool selected)
|
||||
{
|
||||
BOOL found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
if (selected && !mAllowMultipleSelection) deselectAllItems(TRUE);
|
||||
if (selected && !mAllowMultipleSelection) deselectAllItems(true);
|
||||
|
||||
item_list::iterator iter;
|
||||
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
|
|
@ -1680,12 +1680,12 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
|
|||
{
|
||||
LLSD::Binary data1 = value.asBinary();
|
||||
LLSD::Binary data2 = item->getValue().asBinary();
|
||||
found = std::equal(data1.begin(), data1.end(), data2.begin()) ? TRUE : FALSE;
|
||||
found = std::equal(data1.begin(), data1.end(), data2.begin()) ? true : false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
found = item->getValue().asString() == value.asString() ? TRUE : FALSE;
|
||||
found = item->getValue().asString() == value.asString() ? true : false;
|
||||
}
|
||||
|
||||
if (found)
|
||||
|
|
@ -1711,7 +1711,7 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
|
|||
return found;
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::isSelected(const LLSD& value) const
|
||||
bool LLScrollListCtrl::isSelected(const LLSD& value) const
|
||||
{
|
||||
item_list::const_iterator iter;
|
||||
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
|
|
@ -1722,7 +1722,7 @@ BOOL LLScrollListCtrl::isSelected(const LLSD& value) const
|
|||
return item->getSelected();
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID LLScrollListCtrl::getStringUUIDSelectedItem() const
|
||||
|
|
@ -1935,7 +1935,7 @@ void LLScrollListCtrl::draw()
|
|||
LLUICtrl::draw();
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::setEnabled(BOOL enabled)
|
||||
void LLScrollListCtrl::setEnabled(bool enabled)
|
||||
{
|
||||
mCanSelect = enabled;
|
||||
setTabStop(enabled);
|
||||
|
|
@ -2036,11 +2036,11 @@ bool LLScrollListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
||||
bool LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (!mCanSelect) return FALSE;
|
||||
if (!mCanSelect) return false;
|
||||
|
||||
BOOL selection_changed = FALSE;
|
||||
bool selection_changed = false;
|
||||
|
||||
LLScrollListItem* hit_item = hitItem(x, y);
|
||||
|
||||
|
|
@ -2082,17 +2082,17 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
|||
// </FS:Ansariel> Fix for FS-specific people list (radar)
|
||||
if (item == hit_item || item == lastSelected)
|
||||
{
|
||||
selectItem(item, getColumnIndexFromOffset(x), FALSE);
|
||||
selectItem(item, getColumnIndexFromOffset(x), false);
|
||||
selecting = !selecting;
|
||||
if (hit_item == lastSelected)
|
||||
{
|
||||
// stop selecting now, since we just clicked on our last selected item
|
||||
selecting = FALSE;
|
||||
selecting = false;
|
||||
}
|
||||
}
|
||||
if (selecting)
|
||||
{
|
||||
selectItem(item, getColumnIndexFromOffset(x), FALSE);
|
||||
selectItem(item, getColumnIndexFromOffset(x), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2107,7 +2107,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
if(!(mMaxSelectable > 0 && getAllSelected().size() >= mMaxSelectable))
|
||||
{
|
||||
selectItem(hit_item, getColumnIndexFromOffset(x), FALSE);
|
||||
selectItem(hit_item, getColumnIndexFromOffset(x), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2120,7 +2120,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
else
|
||||
{
|
||||
deselectAllItems(TRUE);
|
||||
deselectAllItems(true);
|
||||
selectItem(hit_item, getColumnIndexFromOffset(x));
|
||||
}
|
||||
}
|
||||
|
|
@ -2141,7 +2141,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
|
|||
else
|
||||
{
|
||||
//mLastSelected = NULL;
|
||||
//deselectAllItems(TRUE);
|
||||
//deselectAllItems(true);
|
||||
}
|
||||
|
||||
return selection_changed;
|
||||
|
|
@ -2163,7 +2163,7 @@ bool LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
handleClick(x, y, mask);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -2285,7 +2285,7 @@ bool LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
menu->show(x, y);
|
||||
LLMenuGL::showPopup(this, menu, x, y);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return LLUICtrl::handleRightMouseDown(x, y, mask);
|
||||
|
|
@ -2365,7 +2365,7 @@ void LLScrollListCtrl::copySLURLToClipboard(std::string id, bool is_group)
|
|||
|
||||
bool LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
//BOOL handled = FALSE;
|
||||
//bool handled = false;
|
||||
bool handled = handleClick(x, y, mask);
|
||||
|
||||
if (!handled)
|
||||
|
|
@ -2385,16 +2385,16 @@ bool LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
||||
bool LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// which row was clicked on?
|
||||
LLScrollListItem* hit_item = hitItem(x, y);
|
||||
if (!hit_item) return FALSE;
|
||||
if (!hit_item) return false;
|
||||
|
||||
// get appropriate cell from that row
|
||||
S32 column_index = getColumnIndexFromOffset(x);
|
||||
LLScrollListCell* hit_cell = hit_item->getColumn(column_index);
|
||||
if (!hit_cell) return FALSE;
|
||||
if (!hit_cell) return false;
|
||||
|
||||
// if cell handled click directly (i.e. clicked on an embedded checkbox)
|
||||
if (hit_cell->handleClick())
|
||||
|
|
@ -2433,7 +2433,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
|||
onCommit();
|
||||
}
|
||||
// eat click (e.g. do not trigger double click callback)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2442,7 +2442,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
|||
gFocusMgr.setMouseCapture(this);
|
||||
mNeedsScroll = true;
|
||||
// do not eat click (allow double click callback)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2604,9 +2604,9 @@ void LLScrollListCtrl::onMouseLeave(S32 x, S32 y, MASK mask)
|
|||
mouseOverHighlightNthItem(-1);
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
||||
bool LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
|
||||
// not called from parent means we have keyboard focus or a child does
|
||||
if (mCanSelect)
|
||||
|
|
@ -2619,18 +2619,18 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
if (mAllowKeyboardMovement || hasFocus())
|
||||
{
|
||||
// commit implicit in call
|
||||
selectPrevItem(FALSE);
|
||||
selectPrevItem(false);
|
||||
mNeedsScroll = true;
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_DOWN:
|
||||
if (mAllowKeyboardMovement || hasFocus())
|
||||
{
|
||||
// commit implicit in call
|
||||
selectNextItem(FALSE);
|
||||
selectNextItem(false);
|
||||
mNeedsScroll = true;
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
|
|
@ -2655,7 +2655,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
break;
|
||||
}
|
||||
item->setSelectedCell(cell);
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -2681,7 +2681,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
break;
|
||||
}
|
||||
item->setSelectedCell(cell);
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -2695,7 +2695,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_PAGE_DOWN:
|
||||
|
|
@ -2708,7 +2708,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_HOME:
|
||||
|
|
@ -2721,7 +2721,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_END:
|
||||
|
|
@ -2734,7 +2734,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
onCommit();
|
||||
}
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_RETURN:
|
||||
|
|
@ -2745,7 +2745,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
onCommit();
|
||||
mSearchString.clear();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_BACKSPACE:
|
||||
|
|
@ -2765,7 +2765,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), FALSE))
|
||||
else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), false))
|
||||
{
|
||||
mNeedsScroll = true;
|
||||
// update search string only on successful match
|
||||
|
|
@ -2785,7 +2785,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
if (selected_item)
|
||||
{
|
||||
handleRightMouseDown(selected_item->getRect().getCenterX(), selected_item->getRect().getCenterY(), MASK_NONE);
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -2804,7 +2804,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
if (canSelectAll())
|
||||
{
|
||||
selectAll();
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -2829,11 +2829,11 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
auto first = std::find(items.begin(), items.end(), selected_items.front());
|
||||
if (first != items.end() && first > items.begin())
|
||||
{
|
||||
selectItem(*(--first), FALSE);
|
||||
selectItem(*(--first), false);
|
||||
}
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -2851,11 +2851,11 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
auto last = std::find(items.begin(), items.end(), selected_items.back());
|
||||
if (last != items.end() && last < items.end() - 1)
|
||||
{
|
||||
selectItem(*(++last), FALSE);
|
||||
selectItem(*(++last), false);
|
||||
}
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_HOME:
|
||||
|
|
@ -2867,7 +2867,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
if (it <= first)
|
||||
{
|
||||
selectItem(*it, FALSE);
|
||||
selectItem(*it, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2875,7 +2875,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
}
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case KEY_END:
|
||||
|
|
@ -2887,7 +2887,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
{
|
||||
if (it >= last)
|
||||
{
|
||||
selectItem(*it, FALSE);
|
||||
selectItem(*it, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2895,7 +2895,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
|
|||
}
|
||||
}
|
||||
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -3019,11 +3019,11 @@ void LLScrollListCtrl::reportInvalidInput()
|
|||
make_ui_sound("UISndBadKeystroke");
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::isRepeatedChars(const LLWString& string) const
|
||||
bool LLScrollListCtrl::isRepeatedChars(const LLWString& string) const
|
||||
{
|
||||
if (string.empty())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
llwchar first_char = string[0];
|
||||
|
|
@ -3032,14 +3032,14 @@ BOOL LLScrollListCtrl::isRepeatedChars(const LLWString& string) const
|
|||
{
|
||||
if (string[i] != first_char)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, BOOL select_single_item)
|
||||
void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, bool select_single_item)
|
||||
{
|
||||
if (!itemp) return;
|
||||
|
||||
|
|
@ -3055,9 +3055,9 @@ void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, BOOL select
|
|||
}
|
||||
if (select_single_item)
|
||||
{
|
||||
deselectAllItems(TRUE);
|
||||
deselectAllItems(true);
|
||||
}
|
||||
itemp->setSelected(TRUE);
|
||||
itemp->setSelected(true);
|
||||
switch (mSelectionType)
|
||||
{
|
||||
case CELL:
|
||||
|
|
@ -3086,7 +3086,7 @@ void LLScrollListCtrl::deselectItem(LLScrollListItem* itemp)
|
|||
mLastSelected = NULL;
|
||||
}
|
||||
|
||||
itemp->setSelected(FALSE);
|
||||
itemp->setSelected(false);
|
||||
LLScrollListCell* cellp = itemp->getColumn(getSearchColumn());
|
||||
if (cellp)
|
||||
{
|
||||
|
|
@ -3101,7 +3101,7 @@ void LLScrollListCtrl::commitIfChanged()
|
|||
if (mSelectionChanged)
|
||||
{
|
||||
mDirty = true;
|
||||
mSelectionChanged = FALSE;
|
||||
mSelectionChanged = false;
|
||||
onCommit();
|
||||
}
|
||||
}
|
||||
|
|
@ -3111,13 +3111,13 @@ struct SameSortColumn
|
|||
SameSortColumn(S32 column) : mColumn(column) {}
|
||||
S32 mColumn;
|
||||
|
||||
bool operator()(std::pair<S32, BOOL> sort_column) { return sort_column.first == mColumn; }
|
||||
bool operator()(std::pair<S32, bool> sort_column) { return sort_column.first == mColumn; }
|
||||
};
|
||||
|
||||
BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending)
|
||||
bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending)
|
||||
{
|
||||
LLScrollListColumn* sort_column = getColumn(column_idx);
|
||||
if (!sort_column) return FALSE;
|
||||
if (!sort_column) return false;
|
||||
|
||||
sort_column->mSortDirection = ascending ? LLScrollListColumn::ASCENDING : LLScrollListColumn::DESCENDING;
|
||||
|
||||
|
|
@ -3135,7 +3135,7 @@ BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending)
|
|||
if (mSortColumns.empty())
|
||||
{
|
||||
mSortColumns.push_back(new_sort_column);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3173,7 +3173,7 @@ void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar )
|
|||
}
|
||||
|
||||
|
||||
void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending)
|
||||
void LLScrollListCtrl::sortByColumn(const std::string& name, bool ascending)
|
||||
{
|
||||
column_map_t::iterator itor = mColumns.find(name);
|
||||
if (itor != mColumns.end())
|
||||
|
|
@ -3183,7 +3183,7 @@ void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending)
|
|||
}
|
||||
|
||||
// First column is column 0
|
||||
void LLScrollListCtrl::sortByColumnIndex(U32 column, BOOL ascending)
|
||||
void LLScrollListCtrl::sortByColumnIndex(U32 column, bool ascending)
|
||||
{
|
||||
setSort(column, ascending);
|
||||
updateSort();
|
||||
|
|
@ -3214,9 +3214,9 @@ void LLScrollListCtrl::updateSort() const
|
|||
}
|
||||
|
||||
// for one-shot sorts, does not save sort column/order
|
||||
void LLScrollListCtrl::sortOnce(S32 column, BOOL ascending)
|
||||
void LLScrollListCtrl::sortOnce(S32 column, bool ascending)
|
||||
{
|
||||
std::vector<std::pair<S32, BOOL> > sort_column;
|
||||
std::vector<std::pair<S32, bool> > sort_column;
|
||||
sort_column.push_back(std::make_pair(column, ascending));
|
||||
|
||||
// do stable sort to preserve any previous sorts
|
||||
|
|
@ -3319,7 +3319,7 @@ void LLScrollListCtrl::copy()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::canCopy() const
|
||||
bool LLScrollListCtrl::canCopy() const
|
||||
{
|
||||
return (getFirstSelected() != NULL);
|
||||
}
|
||||
|
|
@ -3332,7 +3332,7 @@ void LLScrollListCtrl::cut()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::canCut() const
|
||||
bool LLScrollListCtrl::canCut() const
|
||||
{
|
||||
return canCopy() && canDoDelete();
|
||||
}
|
||||
|
|
@ -3347,7 +3347,7 @@ void LLScrollListCtrl::selectAll()
|
|||
LLScrollListItem *itemp = *iter;
|
||||
if( itemp->getEnabled() )
|
||||
{
|
||||
selectItem(itemp, -1, FALSE);
|
||||
selectItem(itemp, -1, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3358,7 +3358,7 @@ void LLScrollListCtrl::selectAll()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::canSelectAll() const
|
||||
bool LLScrollListCtrl::canSelectAll() const
|
||||
{
|
||||
return getCanSelect() && mAllowMultipleSelection && !(mMaxSelectable > 0 && mItemList.size() > mMaxSelectable);
|
||||
}
|
||||
|
|
@ -3370,7 +3370,7 @@ void LLScrollListCtrl::deselect()
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::canDeselect() const
|
||||
bool LLScrollListCtrl::canDeselect() const
|
||||
{
|
||||
return getCanSelect();
|
||||
}
|
||||
|
|
@ -3559,7 +3559,7 @@ std::string LLScrollListCtrl::getSortColumnName()
|
|||
else return "";
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::hasSortOrder() const
|
||||
bool LLScrollListCtrl::hasSortOrder() const
|
||||
{
|
||||
return !mSortColumns.empty();
|
||||
}
|
||||
|
|
@ -3699,7 +3699,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
&& cell->isText()
|
||||
&& !cell->getValue().asString().empty())
|
||||
{
|
||||
columnp->mHeader->setHasResizableElement(TRUE);
|
||||
columnp->mHeader->setHasResizableElement(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3727,7 +3727,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
&& cell->isText()
|
||||
&& !cell->getValue().asString().empty())
|
||||
{
|
||||
columnp->mHeader->setHasResizableElement(TRUE);
|
||||
columnp->mHeader->setHasResizableElement(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3784,26 +3784,26 @@ LLSD LLScrollListCtrl::getValue() const
|
|||
return item->getValue();
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::operateOnSelection(EOperation op)
|
||||
bool LLScrollListCtrl::operateOnSelection(EOperation op)
|
||||
{
|
||||
if (op == OP_DELETE)
|
||||
{
|
||||
deleteSelectedItems();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (op == OP_DESELECT)
|
||||
{
|
||||
deselectAllItems();
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLScrollListCtrl::operateOnAll(EOperation op)
|
||||
bool LLScrollListCtrl::operateOnAll(EOperation op)
|
||||
{
|
||||
if (op == OP_DELETE)
|
||||
{
|
||||
clearRows();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (op == OP_DESELECT)
|
||||
{
|
||||
|
|
@ -3813,10 +3813,10 @@ BOOL LLScrollListCtrl::operateOnAll(EOperation op)
|
|||
{
|
||||
selectAll();
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
//virtual
|
||||
void LLScrollListCtrl::setFocus(BOOL b)
|
||||
void LLScrollListCtrl::setFocus(bool b)
|
||||
{
|
||||
// for tabbing into pristine scroll lists (Finder)
|
||||
//if (!getFirstSelected())
|
||||
|
|
@ -3830,9 +3830,9 @@ void LLScrollListCtrl::setFocus(BOOL b)
|
|||
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListCtrl::isDirty() const
|
||||
bool LLScrollListCtrl::isDirty() const
|
||||
{
|
||||
BOOL grubby = mDirty;
|
||||
bool grubby = mDirty;
|
||||
if ( !mAllowMultipleSelection )
|
||||
{
|
||||
grubby = (mOriginalSelection != getFirstSelectedIndex());
|
||||
|
|
@ -3843,7 +3843,7 @@ BOOL LLScrollListCtrl::isDirty() const
|
|||
// Clear dirty state
|
||||
void LLScrollListCtrl::resetDirty()
|
||||
{
|
||||
mDirty = FALSE;
|
||||
mDirty = false;
|
||||
mOriginalSelection = getFirstSelectedIndex();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public:
|
|||
|
||||
// Sets an array of column descriptors
|
||||
void setColumnHeadings(const LLSD& headings);
|
||||
void sortByColumnIndex(U32 column, BOOL ascending);
|
||||
void sortByColumnIndex(U32 column, bool ascending);
|
||||
|
||||
// LLCtrlListInterface functions
|
||||
virtual S32 getItemCount() const;
|
||||
|
|
@ -195,7 +195,7 @@ public:
|
|||
// Simple add element. Takes a single array of:
|
||||
// [ "value" => value, "font" => font, "font-style" => style ]
|
||||
virtual void clearRows(); // clears all elements
|
||||
virtual void sortByColumn(const std::string& name, BOOL ascending);
|
||||
virtual void sortByColumn(const std::string& name, bool ascending);
|
||||
|
||||
// These functions take and return an array of arrays of elements, as above
|
||||
virtual void setValue(const LLSD& value );
|
||||
|
|
@ -206,37 +206,37 @@ public:
|
|||
LLCtrlScrollInterface* getScrollInterface() { return (LLCtrlScrollInterface*)this; }
|
||||
|
||||
// DEPRECATED: Use setSelectedByValue() below.
|
||||
BOOL setCurrentByID( const LLUUID& id ) { return selectByID(id); }
|
||||
bool setCurrentByID( const LLUUID& id ) { return selectByID(id); }
|
||||
virtual LLUUID getCurrentID() const { return getStringUUIDSelectedItem(); }
|
||||
|
||||
BOOL operateOnSelection(EOperation op);
|
||||
BOOL operateOnAll(EOperation op);
|
||||
bool operateOnSelection(EOperation op);
|
||||
bool operateOnAll(EOperation op);
|
||||
|
||||
// returns FALSE if unable to set the max count so low
|
||||
BOOL setMaxItemCount(S32 max_count);
|
||||
// returns false if unable to set the max count so low
|
||||
bool setMaxItemCount(S32 max_count);
|
||||
|
||||
BOOL selectByID( const LLUUID& id ); // FALSE if item not found
|
||||
bool selectByID( const LLUUID& id ); // false if item not found
|
||||
|
||||
// Match item by value.asString(), which should work for string, integer, uuid.
|
||||
// Returns FALSE if not found.
|
||||
BOOL setSelectedByValue(const LLSD& value, BOOL selected);
|
||||
// Returns false if not found.
|
||||
bool setSelectedByValue(const LLSD& value, bool selected);
|
||||
|
||||
BOOL isSorted() const { return mSorted; }
|
||||
bool isSorted() const { return mSorted; }
|
||||
|
||||
virtual BOOL isSelected(const LLSD& value) const;
|
||||
virtual bool isSelected(const LLSD& value) const;
|
||||
|
||||
BOOL hasSelectedItem() const;
|
||||
bool hasSelectedItem() const;
|
||||
|
||||
BOOL handleClick(S32 x, S32 y, MASK mask);
|
||||
BOOL selectFirstItem();
|
||||
BOOL selectNthItem( S32 index );
|
||||
BOOL selectItemRange( S32 first, S32 last );
|
||||
BOOL selectItemAt(S32 x, S32 y, MASK mask);
|
||||
bool handleClick(S32 x, S32 y, MASK mask);
|
||||
bool selectFirstItem();
|
||||
bool selectNthItem( S32 index );
|
||||
bool selectItemRange( S32 first, S32 last );
|
||||
bool selectItemAt(S32 x, S32 y, MASK mask);
|
||||
|
||||
void deleteSingleItem( S32 index );
|
||||
void deleteItems(const LLSD& sd);
|
||||
void deleteSelectedItems();
|
||||
void deselectAllItems(BOOL no_commit_on_change = FALSE); // by default, go ahead and commit on selection change
|
||||
void deselectAllItems(bool no_commit_on_change = false); // by default, go ahead and commit on selection change
|
||||
|
||||
void clearHighlightedItems();
|
||||
|
||||
|
|
@ -253,8 +253,8 @@ public:
|
|||
void swapWithNext(S32 index);
|
||||
void swapWithPrevious(S32 index);
|
||||
|
||||
void setCanSelect(BOOL can_select) { mCanSelect = can_select; }
|
||||
virtual BOOL getCanSelect() const { return mCanSelect; }
|
||||
void setCanSelect(bool can_select) { mCanSelect = can_select; }
|
||||
virtual bool getCanSelect() const { return mCanSelect; }
|
||||
|
||||
S32 getItemIndex( LLScrollListItem* item ) const;
|
||||
S32 getItemIndex( const LLUUID& item_id ) const;
|
||||
|
|
@ -269,15 +269,15 @@ public:
|
|||
// one of which can be selected at a time.
|
||||
virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
|
||||
|
||||
BOOL selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 ); // FALSE if item not found
|
||||
BOOL selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE, S32 column = -1);
|
||||
BOOL selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE, S32 column = -1);
|
||||
bool selectItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 ); // false if item not found
|
||||
bool selectItemByPrefix(const std::string& target, bool case_sensitive = true, S32 column = -1);
|
||||
bool selectItemByPrefix(const LLWString& target, bool case_sensitive = true, S32 column = -1);
|
||||
// <FS:Ansariel> Allow selection by substring match
|
||||
BOOL selectItemBySubstring(const std::string& target, BOOL case_sensitive = TRUE);
|
||||
BOOL selectItemBySubstring(const LLWString& target, BOOL case_sensitive = TRUE);
|
||||
BOOL selectItemByStringMatch(const LLWString& target, bool prefix_match, BOOL case_sensitive = TRUE, S32 column = -1);
|
||||
bool selectItemBySubstring(const std::string& target, bool case_sensitive = true);
|
||||
bool selectItemBySubstring(const LLWString& target, bool case_sensitive = true);
|
||||
bool selectItemByStringMatch(const LLWString& target, bool prefix_match, bool case_sensitive = true, S32 column = -1);
|
||||
// </FS:Ansariel>
|
||||
LLScrollListItem* getItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 );
|
||||
LLScrollListItem* getItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 );
|
||||
const std::string getSelectedItemLabel(S32 column = 0) const;
|
||||
LLSD getSelectedValue();
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ public:
|
|||
// DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue().
|
||||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, bool enabled = true);
|
||||
LLUUID getStringUUIDSelectedItem() const;
|
||||
|
||||
LLScrollListItem* getFirstSelected() const;
|
||||
|
|
@ -309,7 +309,7 @@ public:
|
|||
|
||||
LLScrollListItem* getItem(const LLSD& sd) const;
|
||||
|
||||
void setAllowMultipleSelection(BOOL mult ) { mAllowMultipleSelection = mult; }
|
||||
void setAllowMultipleSelection(bool mult ) { mAllowMultipleSelection = mult; }
|
||||
|
||||
void setBgWriteableColor(const LLColor4 &c) { mBgWriteableColor = c; }
|
||||
void setReadOnlyBgColor(const LLColor4 &c) { mBgReadOnlyColor = c; }
|
||||
|
|
@ -321,15 +321,15 @@ public:
|
|||
void setHighlightedColor(const LLColor4 &c) { mHighlightedColor = c; }
|
||||
void setFgDisableColor(const LLColor4 &c) { mFgDisabledColor = c; }
|
||||
|
||||
void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; }
|
||||
void setDrawStripes(BOOL b) { mDrawStripes = b; }
|
||||
void setBackgroundVisible(bool b) { mBackgroundVisible = b; }
|
||||
void setDrawStripes(bool b) { mDrawStripes = b; }
|
||||
void setColumnPadding(const S32 c) { mColumnPadding = c; }
|
||||
S32 getColumnPadding() const { return mColumnPadding; }
|
||||
void setRowPadding(const S32 c) { mColumnPadding = c; }
|
||||
S32 getRowPadding() const { return mColumnPadding; }
|
||||
void setCommitOnKeyboardMovement(BOOL b) { mCommitOnKeyboardMovement = b; }
|
||||
void setCommitOnSelectionChange(BOOL b) { mCommitOnSelectionChange = b; }
|
||||
void setAllowKeyboardMovement(BOOL b) { mAllowKeyboardMovement = b; }
|
||||
void setCommitOnKeyboardMovement(bool b) { mCommitOnKeyboardMovement = b; }
|
||||
void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; }
|
||||
void setAllowKeyboardMovement(bool b) { mAllowKeyboardMovement = b; }
|
||||
|
||||
void setMaxSelectable(U32 max_selected) { mMaxSelectable = max_selected; }
|
||||
S32 getMaxSelectable() { return mMaxSelectable; }
|
||||
|
|
@ -365,26 +365,26 @@ public:
|
|||
/*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 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*/ void setEnabled(BOOL enabled);
|
||||
/*virtual*/ void setFocus( BOOL b );
|
||||
/*virtual*/ void setEnabled(bool enabled);
|
||||
/*virtual*/ void setFocus( bool b );
|
||||
/*virtual*/ void onFocusReceived();
|
||||
/*virtual*/ void onFocusLost();
|
||||
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
virtual BOOL isDirty() const;
|
||||
virtual bool isDirty() const;
|
||||
virtual void resetDirty(); // Clear dirty state
|
||||
|
||||
virtual void updateLayout();
|
||||
virtual void fitContents(S32 max_width, S32 max_height);
|
||||
|
||||
virtual LLRect getRequiredRect();
|
||||
static BOOL rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row);
|
||||
static bool rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row);
|
||||
|
||||
LLRect getItemListRect() { return mItemListRect; }
|
||||
|
||||
|
|
@ -406,28 +406,28 @@ public:
|
|||
* then display all items.
|
||||
*/
|
||||
void setPageLines(S32 page_lines );
|
||||
void setCollapseEmptyColumns(BOOL collapse);
|
||||
void setCollapseEmptyColumns(bool collapse);
|
||||
|
||||
LLScrollListItem* hitItem(S32 x,S32 y);
|
||||
virtual void scrollToShowSelected();
|
||||
|
||||
// LLEditMenuHandler functions
|
||||
virtual void copy();
|
||||
virtual BOOL canCopy() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual void cut();
|
||||
virtual BOOL canCut() const;
|
||||
virtual bool canCut() const;
|
||||
virtual void selectAll();
|
||||
virtual BOOL canSelectAll() const;
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void deselect();
|
||||
virtual BOOL canDeselect() const;
|
||||
virtual bool canDeselect() const;
|
||||
|
||||
void setNumDynamicColumns(S32 num) { mNumDynamicWidthColumns = num; }
|
||||
void updateStaticColumnWidth(LLScrollListColumn* col, S32 new_width);
|
||||
S32 getTotalStaticColumnWidth() { return mTotalStaticColumnWidth; }
|
||||
|
||||
std::string getSortColumnName();
|
||||
BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
|
||||
BOOL hasSortOrder() const;
|
||||
bool getSortAscending() { return mSortColumns.empty() ? true : mSortColumns.back().second; }
|
||||
bool hasSortOrder() const;
|
||||
void clearSortOrder();
|
||||
|
||||
void setAlternateSort() { mAlternateSort = true; }
|
||||
|
|
@ -436,7 +436,7 @@ public:
|
|||
// conceptually const, but mutates mItemList
|
||||
void updateSort() const;
|
||||
// sorts a list without affecting the permanent sort order (so further list insertions can be unsorted, for example)
|
||||
void sortOnce(S32 column, BOOL ascending);
|
||||
void sortOnce(S32 column, bool ascending);
|
||||
|
||||
// manually call this whenever editing list items in place to flag need for resorting
|
||||
// <FS:Beq/> FIRE-30667 et al. Avoid hangs on large list updates
|
||||
|
|
@ -475,8 +475,8 @@ protected:
|
|||
// (except in the case that the addItem() call fails, in which case it is up
|
||||
// to the caller to delete the item)
|
||||
//
|
||||
// returns FALSE if item faile to be added to list, does NOT delete 'item'
|
||||
BOOL addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM, BOOL requires_column = TRUE );
|
||||
// returns false if item faile to be added to list, does NOT delete 'item'
|
||||
bool addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM, bool requires_column = true );
|
||||
|
||||
typedef std::deque<LLScrollListItem *> item_list;
|
||||
item_list& getItemList() { return mItemList; }
|
||||
|
|
@ -487,17 +487,17 @@ public:
|
|||
mutable U32 mLastUpdateFrame;
|
||||
|
||||
private:
|
||||
void selectPrevItem(BOOL extend_selection);
|
||||
void selectNextItem(BOOL extend_selection);
|
||||
void selectPrevItem(bool extend_selection);
|
||||
void selectNextItem(bool extend_selection);
|
||||
void drawItems();
|
||||
|
||||
void updateLineHeightInsert(LLScrollListItem* item);
|
||||
void reportInvalidInput();
|
||||
BOOL isRepeatedChars(const LLWString& string) const;
|
||||
void selectItem(LLScrollListItem* itemp, S32 cell, BOOL single_select = TRUE);
|
||||
bool isRepeatedChars(const LLWString& string) const;
|
||||
void selectItem(LLScrollListItem* itemp, S32 cell, bool single_select = true);
|
||||
void deselectItem(LLScrollListItem* itemp);
|
||||
void commitIfChanged();
|
||||
BOOL setSort(S32 column, BOOL ascending);
|
||||
bool setSort(S32 column, bool ascending);
|
||||
S32 getLinesPerPage();
|
||||
|
||||
// <FS:Ansariel> Persists sort order of scroll lists
|
||||
|
|
@ -545,8 +545,8 @@ private:
|
|||
S32 mColumnPadding;
|
||||
S32 mRowPadding;
|
||||
|
||||
BOOL mBackgroundVisible;
|
||||
BOOL mDrawStripes;
|
||||
bool mBackgroundVisible;
|
||||
bool mDrawStripes;
|
||||
|
||||
LLUIColor mBgWriteableColor;
|
||||
LLUIColor mBgReadOnlyColor;
|
||||
|
|
@ -609,7 +609,7 @@ private:
|
|||
typedef std::vector<LLScrollListColumn*> ordered_columns_t;
|
||||
ordered_columns_t mColumnsIndexed;
|
||||
|
||||
typedef std::pair<S32, BOOL> sort_column_t;
|
||||
typedef std::pair<S32, bool> sort_column_t;
|
||||
std::vector<sort_column_t> mSortColumns;
|
||||
|
||||
sort_signal_t* mSortCallback;
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
LLScrollListItem::LLScrollListItem( const Params& p )
|
||||
: mSelected(FALSE),
|
||||
mHighlighted(FALSE),
|
||||
: mSelected(false),
|
||||
mHighlighted(false),
|
||||
mHoverIndex(-1),
|
||||
mSelectedIndex(-1),
|
||||
mEnabled(p.enabled),
|
||||
|
|
@ -56,13 +56,13 @@ LLScrollListItem::~LLScrollListItem()
|
|||
mColumns.clear();
|
||||
}
|
||||
|
||||
void LLScrollListItem::setSelected(BOOL b)
|
||||
void LLScrollListItem::setSelected(bool b)
|
||||
{
|
||||
mSelected = b;
|
||||
mSelectedIndex = -1;
|
||||
}
|
||||
|
||||
void LLScrollListItem::setHighlighted(BOOL b)
|
||||
void LLScrollListItem::setHighlighted(bool b)
|
||||
{
|
||||
mHighlighted = b;
|
||||
mHoverIndex = -1;
|
||||
|
|
|
|||
|
|
@ -79,14 +79,14 @@ public:
|
|||
|
||||
virtual ~LLScrollListItem();
|
||||
|
||||
void setSelected( BOOL b );
|
||||
BOOL getSelected() const { return mSelected; }
|
||||
void setSelected( bool b );
|
||||
bool getSelected() const { return mSelected; }
|
||||
|
||||
void setEnabled( BOOL b ) { mEnabled = b; }
|
||||
BOOL getEnabled() const { return mEnabled; }
|
||||
void setEnabled( bool b ) { mEnabled = b; }
|
||||
bool getEnabled() const { return mEnabled; }
|
||||
|
||||
void setHighlighted( BOOL b );
|
||||
BOOL getHighlighted() const { return mHighlighted; }
|
||||
void setHighlighted( bool b );
|
||||
bool getHighlighted() const { return mHighlighted; }
|
||||
|
||||
void setSelectedCell( S32 cell );
|
||||
S32 getSelectedCell() const { return mSelectedIndex; }
|
||||
|
|
@ -127,11 +127,11 @@ protected:
|
|||
LLScrollListItem( const Params& );
|
||||
|
||||
private:
|
||||
BOOL mSelected;
|
||||
BOOL mHighlighted;
|
||||
bool mSelected;
|
||||
bool mHighlighted;
|
||||
S32 mHoverIndex;
|
||||
S32 mSelectedIndex;
|
||||
BOOL mEnabled;
|
||||
bool mEnabled;
|
||||
void* mUserdata;
|
||||
LLSD mItemValue;
|
||||
LLSD mItemAltValue;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
|
|||
line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this));
|
||||
|
||||
mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params);
|
||||
mSearchEditor->setPassDelete(TRUE);
|
||||
mSearchEditor->setPassDelete(true);
|
||||
addChild(mSearchEditor);
|
||||
|
||||
if (p.search_button_visible)
|
||||
|
|
@ -140,13 +140,13 @@ LLSD LLSearchEditor::getValue() const
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
return mSearchEditor->setTextArg(key, text);
|
||||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
return mSearchEditor->setLabelArg(key, text);
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ void LLSearchEditor::clear()
|
|||
}
|
||||
|
||||
//virtual
|
||||
void LLSearchEditor::setFocus( BOOL b )
|
||||
void LLSearchEditor::setFocus( bool b )
|
||||
{
|
||||
if (mSearchEditor)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
{}
|
||||
};
|
||||
|
||||
void setCommitOnFocusLost(BOOL b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); }
|
||||
void setCommitOnFocusLost(bool b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); }
|
||||
|
||||
protected:
|
||||
LLSearchEditor(const Params&);
|
||||
|
|
@ -84,11 +84,11 @@ public:
|
|||
// LLUICtrl interface
|
||||
virtual void setValue(const LLSD& value );
|
||||
virtual LLSD getValue() const;
|
||||
virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setTextArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual void setLabel( const LLStringExplicit &new_label );
|
||||
virtual void clear();
|
||||
virtual void setFocus( BOOL b );
|
||||
virtual void setFocus( bool b );
|
||||
|
||||
void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; }
|
||||
void setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; }
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ LLSlider::~LLSlider()
|
|||
delete mMouseUpSignal;
|
||||
}
|
||||
|
||||
void LLSlider::setValue(F32 value, BOOL from_event)
|
||||
void LLSlider::setValue(F32 value, bool from_event)
|
||||
{
|
||||
value = llclamp( value, mMinValue, mMaxValue );
|
||||
|
||||
|
|
@ -256,20 +256,20 @@ bool LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLSlider::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
bool handled = false;
|
||||
switch(key)
|
||||
{
|
||||
case KEY_DOWN:
|
||||
case KEY_LEFT:
|
||||
setValueAndCommit(getValueF32() - getIncrement());
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
case KEY_UP:
|
||||
case KEY_RIGHT:
|
||||
setValueAndCommit(getValueF32() + getIncrement());
|
||||
handled = TRUE;
|
||||
handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ protected:
|
|||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
virtual ~LLSlider();
|
||||
void setValue( F32 value, BOOL from_event = FALSE );
|
||||
void setValue( F32 value, bool from_event = false );
|
||||
// overrides for LLF32UICtrl methods
|
||||
virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); }
|
||||
virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), true); }
|
||||
|
||||
virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); }
|
||||
virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); }
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
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 handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
virtual void draw();
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ private:
|
|||
void setValueAndCommit(F32 value);
|
||||
void updateThumbRect();
|
||||
|
||||
BOOL mVolumeSlider;
|
||||
bool mVolumeSlider;
|
||||
S32 mMouseOffset;
|
||||
LLRect mDragStartThumbRect;
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
|
|||
mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onEditorGainFocus, _1, this ));
|
||||
// don't do this, as selecting the entire text is single clicking in some cases
|
||||
// and double clicking in others
|
||||
//mEditor->setSelectAllonFocusReceived(TRUE);
|
||||
//mEditor->setSelectAllonFocusReceived(true);
|
||||
addChild(mEditor);
|
||||
}
|
||||
else
|
||||
|
|
@ -210,16 +210,16 @@ void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata
|
|||
}
|
||||
|
||||
|
||||
void LLSliderCtrl::setValue(F32 v, BOOL from_event)
|
||||
void LLSliderCtrl::setValue(F32 v, bool from_event)
|
||||
{
|
||||
mSlider->setValue( v, from_event );
|
||||
mValue = mSlider->getValueF32();
|
||||
updateText();
|
||||
}
|
||||
|
||||
BOOL LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
bool LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text )
|
||||
{
|
||||
BOOL res = FALSE;
|
||||
bool res = false;
|
||||
if (mLabelBox)
|
||||
{
|
||||
res = mLabelBox->setTextArg(key, text);
|
||||
|
|
@ -319,7 +319,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
|
|||
if (!self)
|
||||
return;
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
F32 val = self->mValue;
|
||||
F32 saved_val = self->mValue;
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
|
|||
self->setValue( val ); // set the value temporarily so that the callback can retrieve it.
|
||||
if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) )
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -362,14 +362,14 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata )
|
|||
if (!self)
|
||||
return;
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
F32 saved_val = self->mValue;
|
||||
F32 new_val = self->mSlider->getValueF32();
|
||||
|
||||
self->mValue = new_val; // set the value temporarily so that the callback can retrieve it.
|
||||
if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) )
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
}
|
||||
|
||||
if( success )
|
||||
|
|
@ -387,7 +387,7 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata )
|
|||
self->updateText();
|
||||
}
|
||||
|
||||
void LLSliderCtrl::setEnabled(BOOL b)
|
||||
void LLSliderCtrl::setEnabled(bool b)
|
||||
{
|
||||
LLView::setEnabled( b );
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ void LLSliderCtrl::setEnabled(BOOL b)
|
|||
}
|
||||
|
||||
|
||||
void LLSliderCtrl::setTentative(BOOL b)
|
||||
void LLSliderCtrl::setTentative(bool b)
|
||||
{
|
||||
if( mEditor )
|
||||
{
|
||||
|
|
@ -422,11 +422,11 @@ void LLSliderCtrl::setTentative(BOOL b)
|
|||
|
||||
void LLSliderCtrl::onCommit()
|
||||
{
|
||||
setTentative(FALSE);
|
||||
setTentative(false);
|
||||
|
||||
if( mEditor )
|
||||
{
|
||||
mEditor->setTentative(FALSE);
|
||||
mEditor->setTentative(false);
|
||||
}
|
||||
|
||||
setControlValue(getValueF32());
|
||||
|
|
@ -440,7 +440,7 @@ void LLSliderCtrl::setRect(const LLRect& rect)
|
|||
}
|
||||
|
||||
//virtual
|
||||
void LLSliderCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
void LLSliderCtrl::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
LLF32UICtrl::reshape(width, height, called_from_parent);
|
||||
updateSliderRect();
|
||||
|
|
|
|||
|
|
@ -84,17 +84,17 @@ public:
|
|||
virtual ~LLSliderCtrl();
|
||||
|
||||
/*virtual*/ F32 getValueF32() const { return mSlider->getValueF32(); }
|
||||
void setValue(F32 v, BOOL from_event = FALSE);
|
||||
void setValue(F32 v, bool from_event = false);
|
||||
|
||||
/*virtual*/ void setValue(const LLSD& value) { setValue((F32)value.asReal(), TRUE); }
|
||||
/*virtual*/ void setValue(const LLSD& value) { setValue((F32)value.asReal(), true); }
|
||||
/*virtual*/ LLSD getValue() const { return LLSD(getValueF32()); }
|
||||
/*virtual*/ BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
/*virtual*/ bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
BOOL isMouseHeldDown() const { return mSlider->hasMouseCapture(); }
|
||||
bool isMouseHeldDown() const { return mSlider->hasMouseCapture(); }
|
||||
|
||||
virtual void setPrecision(S32 precision);
|
||||
|
||||
/*virtual*/ void setEnabled( BOOL b );
|
||||
/*virtual*/ void setEnabled( bool b );
|
||||
/*virtual*/ void clear();
|
||||
|
||||
/*virtual*/ void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); }
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
/*virtual*/ void onTabInto();
|
||||
|
||||
/*virtual*/ void setTentative(BOOL b); // marks value as tentative
|
||||
/*virtual*/ void setTentative(bool b); // marks value as tentative
|
||||
/*virtual*/ void onCommit(); // mark not tentative, then commit
|
||||
|
||||
/*virtual*/ void setControlName(const std::string& control_name, LLView* context)
|
||||
|
|
@ -126,7 +126,7 @@ public:
|
|||
}
|
||||
|
||||
/*virtual*/ void setRect(const LLRect& rect);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
/*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
static void onSliderCommit(LLUICtrl* caller, const LLSD& userdata);
|
||||
|
||||
|
|
@ -154,8 +154,8 @@ private:
|
|||
|
||||
const LLFontGL* mFont;
|
||||
const LLFontGL* mLabelFont;
|
||||
BOOL mShowText;
|
||||
BOOL mCanEditText;
|
||||
bool mShowText;
|
||||
bool mCanEditText;
|
||||
|
||||
S32 mPrecision;
|
||||
LLTextBox* mLabelBox;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ LLSpinCtrl::Params::Params()
|
|||
LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
|
||||
: LLF32UICtrl(p),
|
||||
mLabelBox(NULL),
|
||||
mbHasBeenSet( FALSE ),
|
||||
mbHasBeenSet( false ),
|
||||
mPrecision(p.decimal_digits),
|
||||
mTextEnabledColor(p.text_enabled_color()),
|
||||
mTextDisabledColor(p.text_disabled_color())
|
||||
|
|
@ -148,12 +148,12 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
|
|||
//RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus
|
||||
// than when it doesn't. Instead, if you always have to double click to select all the text,
|
||||
// it's easier to understand
|
||||
//mEditor->setSelectAllonFocusReceived(TRUE);
|
||||
mEditor->setSelectAllonCommit(FALSE);
|
||||
//mEditor->setSelectAllonFocusReceived(true);
|
||||
mEditor->setSelectAllonCommit(false);
|
||||
addChild(mEditor);
|
||||
|
||||
updateEditor();
|
||||
setUseBoundingRect( TRUE );
|
||||
setUseBoundingRect( true );
|
||||
}
|
||||
|
||||
F32 clamp_precision(F32 value, S32 decimal_precision)
|
||||
|
|
@ -312,7 +312,7 @@ void LLSpinCtrl::setValue(const LLSD& value )
|
|||
F32 v = (F32)value.asReal();
|
||||
if (getValueF32() != v || !mbHasBeenSet)
|
||||
{
|
||||
mbHasBeenSet = TRUE;
|
||||
mbHasBeenSet = true;
|
||||
LLF32UICtrl::setValue(value);
|
||||
|
||||
if (!mEditor->hasFocus())
|
||||
|
|
@ -328,7 +328,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value )
|
|||
F32 v = (F32)value.asReal();
|
||||
if (getValueF32() != v || !mbHasBeenSet)
|
||||
{
|
||||
mbHasBeenSet = TRUE;
|
||||
mbHasBeenSet = true;
|
||||
LLF32UICtrl::setValue(value);
|
||||
|
||||
updateEditor();
|
||||
|
|
@ -340,7 +340,7 @@ void LLSpinCtrl::clear()
|
|||
{
|
||||
setValue(mMinValue);
|
||||
mEditor->clear();
|
||||
mbHasBeenSet = FALSE;
|
||||
mbHasBeenSet = false;
|
||||
}
|
||||
|
||||
void LLSpinCtrl::updateLabelColor()
|
||||
|
|
@ -370,7 +370,7 @@ void LLSpinCtrl::updateEditor()
|
|||
|
||||
void LLSpinCtrl::onEditorCommit( const LLSD& data )
|
||||
{
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
|
||||
if( mEditor->evaluateFloat() )
|
||||
{
|
||||
|
|
@ -386,7 +386,7 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data )
|
|||
setValue(val);
|
||||
if( !mValidateSignal || (*mValidateSignal)( this, val ) )
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
onCommit();
|
||||
}
|
||||
else
|
||||
|
|
@ -415,13 +415,13 @@ void LLSpinCtrl::forceEditorCommit()
|
|||
}
|
||||
|
||||
|
||||
void LLSpinCtrl::setFocus(BOOL b)
|
||||
void LLSpinCtrl::setFocus(bool b)
|
||||
{
|
||||
LLUICtrl::setFocus( b );
|
||||
mEditor->setFocus( b );
|
||||
}
|
||||
|
||||
void LLSpinCtrl::setEnabled(BOOL b)
|
||||
void LLSpinCtrl::setEnabled(bool b)
|
||||
{
|
||||
LLView::setEnabled( b );
|
||||
mEditor->setEnabled( b );
|
||||
|
|
@ -429,14 +429,14 @@ void LLSpinCtrl::setEnabled(BOOL b)
|
|||
}
|
||||
|
||||
|
||||
void LLSpinCtrl::setTentative(BOOL b)
|
||||
void LLSpinCtrl::setTentative(bool b)
|
||||
{
|
||||
mEditor->setTentative(b);
|
||||
LLUICtrl::setTentative(b);
|
||||
}
|
||||
|
||||
|
||||
BOOL LLSpinCtrl::isMouseHeldDown() const
|
||||
bool LLSpinCtrl::isMouseHeldDown() const
|
||||
{
|
||||
return
|
||||
mDownBtn->hasMouseCapture()
|
||||
|
|
@ -445,7 +445,7 @@ BOOL LLSpinCtrl::isMouseHeldDown() const
|
|||
|
||||
void LLSpinCtrl::onCommit()
|
||||
{
|
||||
setTentative(FALSE);
|
||||
setTentative(false);
|
||||
setControlValue(getValueF32());
|
||||
LLF32UICtrl::onCommit();
|
||||
}
|
||||
|
|
@ -477,7 +477,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label)
|
|||
}
|
||||
|
||||
// <FS:Ansariel> Allow setting an argument on the label
|
||||
BOOL LLSpinCtrl::setLabelArg(const std::string& key, const LLStringExplicit& text)
|
||||
bool LLSpinCtrl::setLabelArg(const std::string& key, const LLStringExplicit& text)
|
||||
{
|
||||
if (mLabelBox)
|
||||
{
|
||||
|
|
@ -489,11 +489,11 @@ BOOL LLSpinCtrl::setLabelArg(const std::string& key, const LLStringExplicit& tex
|
|||
}
|
||||
updateLabelColor();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// </FS:Ansariel> Allow setting an argument on the label
|
||||
|
||||
void LLSpinCtrl::setAllowEdit(BOOL allow_edit)
|
||||
void LLSpinCtrl::setAllowEdit(bool allow_edit)
|
||||
{
|
||||
mEditor->setEnabled(allow_edit);
|
||||
mAllowEdit = allow_edit;
|
||||
|
|
@ -529,7 +529,7 @@ bool LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
return true;
|
||||
}
|
||||
|
||||
BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
|
||||
bool LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
if (mEditor->hasFocus())
|
||||
{
|
||||
|
|
@ -539,20 +539,20 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
|
|||
// but not allowing revert on a spinner seems dangerous
|
||||
updateEditor();
|
||||
mEditor->resetScrollPosition();
|
||||
mEditor->setFocus(FALSE);
|
||||
return TRUE;
|
||||
mEditor->setFocus(false);
|
||||
return true;
|
||||
}
|
||||
if(key == KEY_UP)
|
||||
{
|
||||
onUpBtn(getValue());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if(key == KEY_DOWN)
|
||||
{
|
||||
onDownBtn(getValue());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ public:
|
|||
F32 get() const { return getValueF32(); }
|
||||
void set(F32 value) { setValue(value); mInitialValue = value; }
|
||||
|
||||
BOOL isMouseHeldDown() const;
|
||||
bool isMouseHeldDown() const;
|
||||
|
||||
virtual void setEnabled( BOOL b );
|
||||
virtual void setFocus( BOOL b );
|
||||
virtual void setEnabled( bool b );
|
||||
virtual void setFocus( bool b );
|
||||
virtual void clear();
|
||||
virtual BOOL isDirty() const { return( getValueF32() != mInitialValue ); }
|
||||
virtual bool isDirty() const { return( getValueF32() != mInitialValue ); }
|
||||
virtual void resetDirty() { mInitialValue = getValueF32(); }
|
||||
|
||||
virtual void setPrecision(S32 precision);
|
||||
|
|
@ -82,19 +82,19 @@ public:
|
|||
void setLabel(const LLStringExplicit& label);
|
||||
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); }
|
||||
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor();}
|
||||
void setAllowEdit(BOOL allow_edit);
|
||||
void setAllowEdit(bool allow_edit);
|
||||
// <FS:Ansariel> Allow setting an argument on the label
|
||||
virtual BOOL setLabelArg(const std::string& key, const LLStringExplicit& text);
|
||||
virtual bool setLabelArg(const std::string& key, const LLStringExplicit& text);
|
||||
|
||||
virtual void onTabInto();
|
||||
|
||||
virtual void setTentative(BOOL b); // marks value as tentative
|
||||
virtual void setTentative(bool b); // marks value as tentative
|
||||
virtual void onCommit(); // mark not tentative, then commit
|
||||
|
||||
void forceEditorCommit(); // for commit on external button
|
||||
|
||||
virtual bool handleScrollWheel(S32 x,S32 y,S32 clicks);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual bool handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
void onEditorCommit(const LLSD& data);
|
||||
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);
|
||||
|
|
@ -122,8 +122,8 @@ private:
|
|||
class LLButton* mUpBtn;
|
||||
class LLButton* mDownBtn;
|
||||
|
||||
BOOL mbHasBeenSet;
|
||||
BOOL mAllowEdit;
|
||||
bool mbHasBeenSet;
|
||||
bool mAllowEdit;
|
||||
};
|
||||
|
||||
#endif // LL_LLSPINCTRL_H
|
||||
|
|
|
|||
|
|
@ -118,14 +118,14 @@ void LLStatGraph::draw()
|
|||
|
||||
color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
|
||||
gGL.color4fv(color.mV);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
|
||||
|
||||
gGL.color4fv(LLColor4::black.mV);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, FALSE);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, false);
|
||||
|
||||
color = it->mColor;
|
||||
gGL.color4fv(color.mV);
|
||||
gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE);
|
||||
gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, true);
|
||||
}
|
||||
|
||||
void LLStatGraph::setMin(const F32 min)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
private:
|
||||
LLTrace::StatType<LLTrace::CountAccumulator>* mNewStatFloatp;
|
||||
|
||||
BOOL mPerSec;
|
||||
bool mPerSec;
|
||||
|
||||
F32 mValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ LLStatView::LLStatView(const LLStatView::Params& p)
|
|||
: LLContainerView(p),
|
||||
mSetting(p.setting)
|
||||
{
|
||||
BOOL isopen = getDisplayChildren();
|
||||
bool isopen = getDisplayChildren();
|
||||
if (mSetting.length() > 0)
|
||||
{
|
||||
isopen = LLUI::getInstance()->mSettingGroups["config"]->getBOOL(mSetting);
|
||||
|
|
@ -53,7 +53,7 @@ LLStatView::~LLStatView()
|
|||
// Children all cleaned up by default view destructor.
|
||||
if (mSetting.length() > 0)
|
||||
{
|
||||
BOOL isopen = getDisplayChildren();
|
||||
bool isopen = getDisplayChildren();
|
||||
LLUI::getInstance()->mSettingGroups["config"]->setBOOL(mSetting, isopen);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,17 +77,17 @@ void LLStyle::setLinkHREF(const std::string& href)
|
|||
mLink = href;
|
||||
}
|
||||
|
||||
BOOL LLStyle::isLink() const
|
||||
bool LLStyle::isLink() const
|
||||
{
|
||||
return mIsLink;
|
||||
}
|
||||
|
||||
BOOL LLStyle::isVisible() const
|
||||
bool LLStyle::isVisible() const
|
||||
{
|
||||
return mVisible;
|
||||
}
|
||||
|
||||
void LLStyle::setVisible(BOOL is_visible)
|
||||
void LLStyle::setVisible(bool is_visible)
|
||||
{
|
||||
mVisible = is_visible;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public:
|
|||
const LLUIColor& getSelectedColor() const { return mSelectedColor; }
|
||||
void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; }
|
||||
|
||||
BOOL isVisible() const;
|
||||
void setVisible(BOOL is_visible);
|
||||
bool isVisible() const;
|
||||
void setVisible(bool is_visible);
|
||||
|
||||
LLFontGL::ShadowType getShadowType() const { return mDropShadow; }
|
||||
|
||||
|
|
@ -75,13 +75,13 @@ public:
|
|||
|
||||
const std::string& getLinkHREF() const { return mLink; }
|
||||
void setLinkHREF(const std::string& href);
|
||||
BOOL isLink() const;
|
||||
bool isLink() const;
|
||||
|
||||
LLPointer<LLUIImage> getImage() const;
|
||||
void setImage(const LLUUID& src);
|
||||
void setImage(const std::string& name);
|
||||
|
||||
BOOL isImage() const { return mImagep.notNull(); }
|
||||
bool isImage() const { return mImagep.notNull(); }
|
||||
|
||||
bool operator==(const LLStyle &rhs) const
|
||||
{
|
||||
|
|
@ -105,7 +105,7 @@ protected:
|
|||
~LLStyle() { }
|
||||
|
||||
private:
|
||||
BOOL mVisible;
|
||||
bool mVisible;
|
||||
LLUIColor mColor;
|
||||
LLUIColor mReadOnlyColor;
|
||||
LLUIColor mSelectedColor;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue