[Sc-devel] [sc-users] relativeOrigin [Re: trouble dragging]
blackrain
blackrain.sc at gmail.com
Mon Feb 18 11:02:42 PST 2008
Commited.
From: e8472 at users.sourceforge.net
To: sc-dev at create.ucsb.edu
Date: Mon, 18 Feb 2008 10:59:27 -0800
Subject: SF.net SVN: supercollider: [7346] trunk/Source/app/SCView.M
Revision: 7346
http://svn.sourceforge.net/supercollider/?rev=7346&view=rev
Author: e8472
Date: 2008-02-18 10:59:27 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
added again drag support to SCUserView::mouseDownAction
Modified Paths:
--------------
trunk/Source/app/SCView.M
Modified: trunk/Source/app/SCView.M
===================================================================
--- trunk/Source/app/SCView.M 2008-02-18 13:56:48 UTC (rev 7345)
+++ trunk/Source/app/SCView.M 2008-02-18 18:59:27 UTC (rev 7346)
@@ -4068,12 +4068,16 @@
void SCUserView::mouseDownAction(SCPoint where, int modifiers,
NSEvent *theEvent)
{
- SCRect bounds = getDrawBounds();
+ if (modifiers & NSCommandKeyMask) {
+ beginDrag(where);
+ }
+ else {
+ SCRect bounds = getDrawBounds();
- mRealtiveMousePoint.x = where.x - bounds.x;
- mRealtiveMousePoint.y = where.y - bounds.y;
- SCView::mouseDownAction(where, modifiers, theEvent);
-
+ mRealtiveMousePoint.x = where.x - bounds.x;
+ mRealtiveMousePoint.y = where.y - bounds.y;
+ SCView::mouseDownAction(where, modifiers, theEvent);
+ }
}
void SCUserView::mouseMoveAction(SCPoint where, int modifiers,
NSEvent *theEvent)
On Feb 15, 2008 12:01 PM, Jan Trutzschler <sc3 at sampleandhold.org> wrote:
> looks alright
>
>
> On Feb 15, 2008, at 6:57 PM, blackrain wrote:
>
> > thats the code there, all I add is this:
> >
> > void SCUserView::mouseDownAction(SCPoint where, int modifiers,
> > NSEvent *theEvent)
> > {
> > SCRect bounds = getDrawBounds();
> >
> > + if (modifiers & NSCommandKeyMask) {
> > + beginDrag(where);
> > + }
> >
> > + else {
> > mRealtiveMousePoint.x = where.x - bounds.x;
> > mRealtiveMousePoint.y = where.y - bounds.y;
> > SCView::mouseDownAction(where, modifiers, theEvent);
> > + }
> >
> > }
> >
> > x
> >
> > On Fri, Feb 15, 2008 at 11:54 AM, James Harkins
> > <jamshark70 at gmail.com> wrote:
> >> mRealtiveMousePoint...?? Don't tell me it's actually defined that
> >> way elsewhere.
> >> hjh
> >>
> >>
> >> On Fri, Feb 15, 2008 at 12:51 PM, blackrain
> >> <blackrain.sc at gmail.com> wrote:
> >>> Roger!
> >>> no touchee, so here it is:
> >>> SCView.M @ line 4069
> >>>
> >>> void SCUserView::mouseDownAction(SCPoint where, int modifiers,
> >>> NSEvent
> >>> *theEvent)
> >>> {
> >>> SCRect bounds = getDrawBounds();
> >>>
> >>> if (modifiers & NSCommandKeyMask) {
> >>> beginDrag(where);
> >>> }
> >>>
> >>> else {
> >>> mRealtiveMousePoint.x = where.x - bounds.x;
> >>> mRealtiveMousePoint.y = where.y - bounds.y;
> >>> SCView::mouseDownAction(where, modifiers, theEvent);
> >>> }
> >>>
> >>> }
> >>>
> >>> ah and there is a duplicate entry for Klang in UGenCategories.sc @
> >>> line 98 - comment / take that one line out also. Please?
> >>>
> >>> Thanks!
> >>
> >>
> >> --
> >>
> >> James Harkins /// dewdrop world
> >> jamshark70 at dewdrop-world.net
> >> http://www.dewdrop-world.net
> >>
> >> "Come said the Muse,
> >> Sing me a song no poet has yet chanted,
> >> Sing me the universal." -- Whitman
> >> _______________________________________________
> >>
> >>
> >> Sc-devel mailing list
> >> Sc-devel at create.ucsb.edu
> >> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
> >>
> > _______________________________________________
> > Sc-devel mailing list
> > Sc-devel at create.ucsb.edu
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>
> _______________________________________________
> Sc-devel mailing list
> Sc-devel at create.ucsb.edu
> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>
More information about the Sc-devel
mailing list