aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIBaseContainer.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-01-10 09:51:44 +0000
committerjmarshallnz <jmarshallnz@svn>2010-01-10 09:51:44 +0000
commit6bad1095f41a98b72b9e8e49a2a44ea72508fb7c (patch)
treee7a6466ececbfa2b445fd976557f9601040e75a4 /guilib/GUIBaseContainer.cpp
parent2ebfc8547d04f17a9c21690a4ce49c46d8b4ec48 (diff)
cleanup: Replaced OnMouseClick/DoubleClick/Wheel/Drag with OnMouseEvent
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26626 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIBaseContainer.cpp')
-rw-r--r--guilib/GUIBaseContainer.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp
index bee83b5f20..16c10e65af 100644
--- a/guilib/GUIBaseContainer.cpp
+++ b/guilib/GUIBaseContainer.cpp
@@ -541,21 +541,19 @@ bool CGUIBaseContainer::OnMouseOver(const CPoint &point)
return CGUIControl::OnMouseOver(point);
}
-bool CGUIBaseContainer::OnMouseClick(int button, const CPoint &point)
+bool CGUIBaseContainer::OnMouseEvent(const CPoint &point, const CMouseEvent &event)
{
- if (SelectItemFromPoint(point - CPoint(m_posX, m_posY)))
- { // send click message to window
- OnClick(ACTION_MOUSE_CLICK + button);
- return true;
+ if (event.m_id >= ACTION_MOUSE_LEFT_CLICK && event.m_id <= ACTION_MOUSE_DOUBLE_CLICK)
+ {
+ if (SelectItemFromPoint(point - CPoint(m_posX, m_posY)))
+ {
+ OnClick(event.m_id);
+ return true;
+ }
}
- return false;
-}
-
-bool CGUIBaseContainer::OnMouseDoubleClick(int button, const CPoint &point)
-{
- if (SelectItemFromPoint(point - CPoint(m_posX, m_posY)))
- { // send double click message to window
- OnClick(ACTION_MOUSE_DOUBLE_CLICK + button);
+ else if (event.m_id == ACTION_MOUSE_WHEEL)
+ {
+ Scroll(-event.m_wheel);
return true;
}
return false;
@@ -596,12 +594,6 @@ bool CGUIBaseContainer::OnClick(int actionID)
return SendWindowMessage(msg);
}
-bool CGUIBaseContainer::OnMouseWheel(char wheel, const CPoint &point)
-{
- Scroll(-wheel);
- return true;
-}
-
CStdString CGUIBaseContainer::GetDescription() const
{
CStdString strLabel;