Mouse Gestures

Hey all,

    I've written a class to facilitate adding Mouse Gestures to a
wxPython window. How does one go about submitting this? Should I
just upload a zip file as a patch?

Should I write a demo panel first to go along with it?

Basically it handles the actual recognition of gestures, and the
execution of associated functions.

Should a MouseGestures Class also provide a mechanism for recording
new gestures?

Best,

Dan

That sounds like a nifty thing.... see if you can make it into a mixin.... create a Demo panel where people could associate gestures with words (upon gesture the word gets written).... and have a list of "available gestures" that they can alter.... I suggest defining gestures based on a predefined infrastructure... I mean... new gestures should be declared like "ULDR" ... in my view this would provide "general" solution... not a solution based on user mouse movement habits.

I don't think there is a formal way to get the code in. You could just post it here and if it provides enough value... someone with CVS write access will enter it into main.

I must say.... it would be great to see gestures as a service available in wx.Window.

···

On Wed, 22 Dec 2004 22:42:44 -0600, Daniel Pozmanter <drpython@bluebottle.com> wrote:

Hey all,

    I've written a class to facilitate adding Mouse Gestures to a
wxPython window. How does one go about submitting this? Should I
just upload a zip file as a patch?

Should I write a demo panel first to go along with it?

Basically it handles the actual recognition of gestures, and the
execution of associated functions.

Should a MouseGestures Class also provide a mechanism for recording
new gestures?

Best,

Dan

--
Peter Damoc
jack of all trades, master of none
http://www.sigmacore.net/

Daniel Pozmanter wrote:

Hey all,

    I've written a class to facilitate adding Mouse Gestures to a
wxPython window.

Nice!

How does one go about submitting this? Should I
just upload a zip file as a patch?

See http://wxpython.org/codeguidelines.php

Should I write a demo panel first to go along with it?

Yes.

Basically it handles the actual recognition of gestures, and the
execution of associated functions.

Should a MouseGestures Class also provide a mechanism for recording
new gestures?

That would be nice to have too, but it could be added later.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hey,

I am printing out the code guidlines :slight_smile:

I am attaching a zip in case anyone wants to check out the code
itself.
It uses spaces for indentation, is under the wxWidgets license, etc,
so it shouldn't be too hard on the eyes.

The zip file includes the MouseGestures class, and a demo panel.
Just plop both in the demo dir, and add it in Main.py, and you should
be good to go (just to tryit out, I will go over the guidelines when
I am ready to submit.

This is not fully finished, but the meat is done (I think), which is
recognizing the actual mouse gestures, and executing an associated
function. I still have quite few methods to implement, and some
polishing to do (especially making the gesture visible).

I look forward to your comments/suggestions/questions.
Especially on the method of recognizing gestures (too precise or
liberal?).

This is all in python, so it should work on all wxPython ports
(hopefully).

Best,
Dan

Quoting Robin Dunn <robin@alldunn.com>:

Daniel Pozmanter wrote:
> Hey all,
>
> I've written a class to facilitate adding Mouse Gestures to
a
> wxPython window.

Nice!

:slight_smile:

MouseGestures.zip (4.06 KB)

···

> How does one go about submitting this? Should I
> just upload a zip file as a patch?

See http://wxpython.org/codeguidelines.php

>
> Should I write a demo panel first to go along with it?

Yes.

>
> Basically it handles the actual recognition of gestures, and the
> execution of associated functions.
>
> Should a MouseGestures Class also provide a mechanism for
recording
> new gestures?

That would be nice to have too, but it could be added later.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------

To unsubscribe, e-mail:
wxPython-dev-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-dev-help@lists.wxwidgets.org

Daniel Pozmanter wrote:

Attached is 0.0.0.

Automatic Mode is implemented.
You can change the Mouse Button / Keyboard Modifier at runtime,
whether gestures are visible (the refresh now occurs on end),
and what colour and width pen is used.
I believe I even adhered somewhat to the style guidelines :).

The demo lets you add new gestures, change the colour, toggle
visibility,
change the mouse button, and change the modifiers.

Drop the MouseGestures.py file in wx/lib/mixins/,
and MouseGesturesDemo into the demo directory.
(You'll just need to add "MouseGesturesDemo" at the appropriate
place in Main.py).

I just went to look at this finally and found that the attachment was a zero-byte file! (Maybe because of all those zeros in the version number. :wink: )

Can you send it to me again please?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Daniel Pozmanter wrote:

Attached is 0.0.0.

Automatic Mode is implemented.
You can change the Mouse Button / Keyboard Modifier at runtime,
whether gestures are visible (the refresh now occurs on end),
and what colour and width pen is used.
I believe I even adhered somewhat to the style guidelines :).

The demo lets you add new gestures, change the colour, toggle
visibility,
change the mouse button, and change the modifiers.

Drop the MouseGestures.py file in wx/lib/mixins/,
and MouseGesturesDemo into the demo directory.
(You'll just need to add "MouseGesturesDemo" at the appropriate
place in Main.py).

I just went to look at this finally and found that the attachment was a
zero-byte file! (Maybe because of all those zeros in the version
number. :wink: )

no way... it works like a charm here :slight_smile:

Can you send it to me again please?

Just in case time is an issue and Daniel sees this too late I will reattach the original.

this is from gmane cache :slight_smile: a simple rename to zip will do the trick :slight_smile:
http://cache.gmane.org//gmane/comp/python/wxpython/devel/1171-001.bin

And.... yeah... I really want to see this in wxpython demo :wink:

MouseGestures.zip (4.06 KB)

···

On Tue, 15 Feb 2005 15:42:14 -0800, Robin Dunn <robin@alldunn.com> wrote:

--
Peter Damoc
Warrior Of The Light
http://www.sigmacore.net/