aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIBaseContainer.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-01-06 04:46:12 +0000
committerjmarshallnz <jmarshallnz@svn>2010-01-06 04:46:12 +0000
commit5da130fb49b997deea4845b4d665f3ddd9ac15a0 (patch)
tree445d4cfa0a6aa5c5e499554b0defc5378bbff7a4 /guilib/GUIBaseContainer.cpp
parent0498d2938afb198acf3226ce842ed1174aba49b6 (diff)
cleanup: removed unused function, and moved the list implementation of SelectItemFromPoint out of CGUIBaseContainer
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26447 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIBaseContainer.cpp')
-rw-r--r--guilib/GUIBaseContainer.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp
index de742e3fe7..5ede559196 100644
--- a/guilib/GUIBaseContainer.cpp
+++ b/guilib/GUIBaseContainer.cpp
@@ -534,40 +534,6 @@ CGUIListItemLayout *CGUIBaseContainer::GetFocusedLayout() const
return NULL;
}
-bool CGUIBaseContainer::SelectItemFromPoint(const CPoint &point)
-{
- if (!m_focusedLayout || !m_layout)
- return false;
-
- int row = 0;
- float pos = (m_orientation == VERTICAL) ? point.y : point.x;
- while (row < m_itemsPerPage + 1) // 1 more to ensure we get the (possible) half item at the end.
- {
- const CGUIListItemLayout *layout = (row == m_cursor) ? m_focusedLayout : m_layout;
- if (pos < layout->Size(m_orientation) && row + m_offset < (int)m_items.size())
- { // found correct "row" -> check horizontal
- if (!InsideLayout(layout, point))
- return false;
-
- MoveToItem(row);
- CGUIListItemLayout *focusedLayout = GetFocusedLayout();
- if (focusedLayout)
- {
- CPoint pt(point);
- if (m_orientation == VERTICAL)
- pt.y = pos;
- else
- pt.x = pos;
- focusedLayout->SelectItemFromPoint(pt);
- }
- return true;
- }
- row++;
- pos -= layout->Size(m_orientation);
- }
- return false;
-}
-
bool CGUIBaseContainer::OnMouseOver(const CPoint &point)
{
// select the item under the pointer
@@ -1010,11 +976,6 @@ void CGUIBaseContainer::SetType(VIEW_TYPE type, const CStdString &label)
m_label = label;
}
-void CGUIBaseContainer::MoveToItem(int item)
-{
- m_cursor = item;
-}
-
void CGUIBaseContainer::FreeMemory(int keepStart, int keepEnd)
{
if (keepStart < keepEnd)