[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] mouseMoveAction - slight inconsistency



the names are confusing:

yes

mouseMoveAction is actually a mouse-drag-action

and

mouseOverAction could be seen as a mouse-move-action (without button being pressed)

also confusing me thinks.  could moveAction be renamed to dragAction or is that too late?  or perhaps it would clash with the beginDragAction.
or add an argument flag for mouse button state?

acceptsMouseOver controls whether mouse-over-events are generated, it doesn't affect mouse-drags.

i think this is consistent in some way.

i don't agree but i won't fight it more.  it's not a major problem.
_f


ciao, -sciss-



Am 27.11.2007 um 13:35 schrieb Fredrik Olofsson:

hi list,
how come mouseMoveAction and mouseOverAction behaves so differently?
couldn't they be generalised?

(
var w= GUI.window.new("mousemovetest", Rect(100, 100, 513, 666), false);
var u= GUI.userView.new(w, Rect(0, 0, w.bounds.width, w.bounds.height));
w.view.background_(Color.grey(0.8));
//w.acceptsMouseOver_(true);
u.mouseMoveAction_{|v, x, y|
[x, y].postln;
};
w.front;
)


(
var w= GUI.window.new("mousemovetest", Rect(100, 100, 513, 666), false);
var u= GUI.userView.new(w, Rect(0, 0, w.bounds.width, w.bounds.height));
w.view.background_(Color.grey(0.8));
w.acceptsMouseOver_(true); //here this is needed
u.mouseOverAction_{|v, x, y|
[x, y].postln;
};
w.front;
)



  #|
     fredrikolofsson.com     klippav.org     musicalfieldsforever.com
  |#

_______________________________________________
Sc-devel mailing list

_______________________________________________
Sc-devel mailing list



  #|

     fredrikolofsson.com     klippav.org     musicalfieldsforever.com

  |#