mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Internal refactoring of mouse-event classes, as the first step towards multi-touch support.
This commit is contained in:
parent
80afd8aee7
commit
9657241c10
35 changed files with 2785 additions and 2684 deletions
|
|
@ -83,12 +83,8 @@ public:
|
|||
else
|
||||
selectBasedOnModifiers (item, e.mods);
|
||||
|
||||
MouseEvent e2 (e);
|
||||
e2.x -= pos.getX();
|
||||
e2.y -= pos.getY();
|
||||
|
||||
if (e2.x >= 0)
|
||||
item->itemClicked (e2);
|
||||
if (e.x >= pos.getX())
|
||||
item->itemClicked (e.withNewPosition (e.getPosition() - pos.getPosition()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -114,12 +110,7 @@ public:
|
|||
TreeViewItem* const item = findItemAt (e.y, pos);
|
||||
|
||||
if (item != 0 && (e.x >= pos.getX() || ! owner->openCloseButtonsVisible))
|
||||
{
|
||||
MouseEvent e2 (e);
|
||||
e2.x -= pos.getX();
|
||||
e2.y -= pos.getY();
|
||||
item->itemDoubleClicked (e2);
|
||||
}
|
||||
item->itemDoubleClicked (e.withNewPosition (e.getPosition() - pos.getPosition()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue