Use viewList_t and child_list_t in appropriate places.
Both types are currently the same, but soon they will be made different. Currently they are used a bit mixed up. This patch fixes that.
This commit is contained in:
@@ -302,8 +302,8 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
||||
LLCtrlQuery query = getTabOrderQuery();
|
||||
// sort things such that the default tab group is at the front
|
||||
query.setSorter(DefaultTabGroupFirstSorter::getInstance());
|
||||
child_list_t result = query(this);
|
||||
if(result.size() > 0)
|
||||
viewList_t result = query(this);
|
||||
if(!result.empty())
|
||||
{
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.front());
|
||||
if(!ctrl->hasFocus())
|
||||
@@ -322,7 +322,7 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
||||
{
|
||||
LLCtrlQuery query = getTabOrderQuery();
|
||||
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
|
||||
child_list_t result = query(this);
|
||||
viewList_t result = query(this);
|
||||
if(result.size() > 0)
|
||||
{
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.front());
|
||||
@@ -358,7 +358,7 @@ BOOL LLUICtrl::focusLastItem(BOOL prefer_text_fields)
|
||||
{
|
||||
LLCtrlQuery query = getTabOrderQuery();
|
||||
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
|
||||
child_list_t result = query(this);
|
||||
viewList_t result = query(this);
|
||||
if(result.size() > 0)
|
||||
{
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
|
||||
@@ -372,7 +372,7 @@ BOOL LLUICtrl::focusLastItem(BOOL prefer_text_fields)
|
||||
}
|
||||
}
|
||||
// no text field found, or we don't care about text fields
|
||||
child_list_t result = getTabOrderQuery().run(this);
|
||||
viewList_t result = getTabOrderQuery().run(this);
|
||||
if(result.size() > 0)
|
||||
{
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
|
||||
@@ -395,7 +395,7 @@ BOOL LLUICtrl::focusNextItem(BOOL text_fields_only)
|
||||
{
|
||||
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
|
||||
}
|
||||
child_list_t result = query(this);
|
||||
viewList_t result = query(this);
|
||||
return focusNext(result);
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only)
|
||||
{
|
||||
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
|
||||
}
|
||||
child_list_t result = query(this);
|
||||
viewList_t result = query(this);
|
||||
return focusPrev(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -518,21 +518,21 @@ LLRect LLView::getRequiredRect()
|
||||
|
||||
BOOL LLView::focusNextRoot()
|
||||
{
|
||||
LLView::child_list_t result = LLView::getFocusRootsQuery().run(this);
|
||||
viewList_t result = LLView::getFocusRootsQuery().run(this);
|
||||
return LLView::focusNext(result);
|
||||
}
|
||||
|
||||
BOOL LLView::focusPrevRoot()
|
||||
{
|
||||
LLView::child_list_t result = LLView::getFocusRootsQuery().run(this);
|
||||
viewList_t result = LLView::getFocusRootsQuery().run(this);
|
||||
return LLView::focusPrev(result);
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLView::focusNext(LLView::child_list_t & result)
|
||||
BOOL LLView::focusNext(viewList_t& result)
|
||||
{
|
||||
LLView::child_list_iter_t focused = result.end();
|
||||
for(LLView::child_list_iter_t iter = result.begin();
|
||||
viewList_t::iterator focused = result.end();
|
||||
for(viewList_t::iterator iter = result.begin();
|
||||
iter != result.end();
|
||||
++iter)
|
||||
{
|
||||
@@ -542,7 +542,7 @@ BOOL LLView::focusNext(LLView::child_list_t & result)
|
||||
break;
|
||||
}
|
||||
}
|
||||
LLView::child_list_iter_t next = focused;
|
||||
viewList_t::iterator next = focused;
|
||||
next = (next == result.end()) ? result.begin() : ++next;
|
||||
while(next != focused)
|
||||
{
|
||||
@@ -565,10 +565,10 @@ BOOL LLView::focusNext(LLView::child_list_t & result)
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLView::focusPrev(LLView::child_list_t & result)
|
||||
BOOL LLView::focusPrev(viewList_t& result)
|
||||
{
|
||||
LLView::child_list_reverse_iter_t focused = result.rend();
|
||||
for(LLView::child_list_reverse_iter_t iter = result.rbegin();
|
||||
viewList_t::reverse_iterator focused = result.rend();
|
||||
for(viewList_t::reverse_iterator iter = result.rbegin();
|
||||
iter != result.rend();
|
||||
++iter)
|
||||
{
|
||||
@@ -578,7 +578,7 @@ BOOL LLView::focusPrev(LLView::child_list_t & result)
|
||||
break;
|
||||
}
|
||||
}
|
||||
LLView::child_list_reverse_iter_t next = focused;
|
||||
viewList_t::reverse_iterator next = focused;
|
||||
next = (next == result.rend()) ? result.rbegin() : ++next;
|
||||
while(next != focused)
|
||||
{
|
||||
|
||||
@@ -582,9 +582,9 @@ public:
|
||||
static std::string escapeXML(const std::string& xml, std::string& indent);
|
||||
|
||||
// focuses the item in the list after the currently-focused item, wrapping if necessary
|
||||
static BOOL focusNext(LLView::child_list_t & result);
|
||||
static BOOL focusNext(viewList_t& result);
|
||||
// focuses the item in the list before the currently-focused item, wrapping if necessary
|
||||
static BOOL focusPrev(LLView::child_list_t & result);
|
||||
static BOOL focusPrev(viewList_t& result);
|
||||
|
||||
// returns query for iterating over controls in tab order
|
||||
static const LLCtrlQuery & getTabOrderQuery();
|
||||
|
||||
@@ -113,12 +113,12 @@ viewList_t LLViewQuery::run(LLView* view) const
|
||||
|
||||
void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) const
|
||||
{
|
||||
LLView::child_list_t views(*(view->getChildList()));
|
||||
viewList_t views(*(view->getChildList()));
|
||||
if (mSorterp)
|
||||
{
|
||||
(*mSorterp)(view, views); // sort the children per the sorter
|
||||
}
|
||||
for(LLView::child_list_iter_t iter = views.begin();
|
||||
for(viewList_t::iterator iter = views.begin();
|
||||
iter != views.end();
|
||||
iter++)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children)
|
||||
}
|
||||
}
|
||||
|
||||
filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const
|
||||
filterResult_t LLViewQuery::runFilters(LLView* view, viewList_t const& children, filterList_t const& filters) const
|
||||
{
|
||||
filterResult_t result = filterResult_t(TRUE, TRUE);
|
||||
for(filterList_const_iter_t iter = filters.begin();
|
||||
@@ -143,7 +143,7 @@ filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children,
|
||||
|
||||
class SortByTabOrder : public LLQuerySorter, public LLSingleton<SortByTabOrder>
|
||||
{
|
||||
/*virtual*/ void operator() (LLView * parent, LLView::child_list_t &children) const
|
||||
/*virtual*/ void operator() (LLView* parent, viewList_t& children) const
|
||||
{
|
||||
children.sort(LLCompareByTabOrder(parent->getCtrlOrder()));
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
filterResult_t runFilters(LLView * view, const viewList_t children, const filterList_t filters) const;
|
||||
filterResult_t runFilters(LLView* view, viewList_t const& children, filterList_t const& filters) const;
|
||||
|
||||
filterList_t mPreFilters;
|
||||
filterList_t mPostFilters;
|
||||
|
||||
@@ -56,9 +56,9 @@ void LLFloaterEditUI::navigateHierarchyButtonPressed(void* data)
|
||||
const LLView::child_list_t* viewChildren = view->getChildList();
|
||||
const LLView::child_list_t* parentChildren = parent->getChildList();
|
||||
//LLView::child_list_t::iterator
|
||||
std::list<LLView*>::const_iterator itor;
|
||||
std::list<LLView*>::size_type idx;
|
||||
std::list<LLView*>::size_type sidx;
|
||||
LLView::child_list_t::const_iterator itor;
|
||||
LLView::child_list_t::size_type idx;
|
||||
LLView::child_list_t::size_type sidx;
|
||||
for(idx = 0,itor = parentChildren->begin();itor!=parentChildren->end();itor++,idx++){
|
||||
if((*itor)==view)break;
|
||||
}
|
||||
|
||||
@@ -424,8 +424,8 @@ void LLPanelMediaHUD::setAlpha(F32 alpha)
|
||||
LLViewQuery query;
|
||||
|
||||
LLView* query_view = mMediaFocus ? getChildView("media_focused_controls") : getChildView("media_hover_controls");
|
||||
child_list_t children = query(query_view);
|
||||
for (child_list_iter_t child_iter = children.begin();
|
||||
viewList_t children = query(query_view);
|
||||
for (viewList_t::iterator child_iter = children.begin();
|
||||
child_iter != children.end(); ++child_iter)
|
||||
{
|
||||
LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(*child_iter);
|
||||
|
||||
Reference in New Issue
Block a user