device context : manage object

Hi,

I’m searching methods that let us manage object in a device context. For example, Tkinter let us find (find_closest) object in a canvas. Is there similar methods for wxPython?

Greets.

Francis

TheMoon Seeker wrote:

I'm searching methods that let us manage object in a device context. For example, Tkinter let us find (find_closest) object in a canvas. Is there similar methods for wxPython?

wxWidgets does not provide anything like the TK Canvas.

However, there are tow options for wxPython:

OGL and FloatCanvas.

OGL is designed to support "boxes and arrows" type diagrams, but looks to be flexible enough to support other uses.

FloatCanvas is designed to support interactive graphics in arbitrary floating point coordinates, including built-in zooming and panning. It's in:

wx.lib.floatcanvas, and there is a demo included with the wxPython demo (required numpy). There is a newer version available from me, you can send questions to me and/or the floatcanvas mailing list:

http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

In regards to your specific question -- FloatCanvas has no "find_closest", but does have hit-testing, so you can bind an function call to a mouse event on an objects, and, to some degree, define how close you need to be to an object to hit it.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Hi chris,

OGL seem to be dead, i have found this on the wiki site :

Development Status

     * OGL development appears to be dead.
     * There does not appear to be OGL maintenance.
     * There is no OGL community, outside of what you might find on the wxPython channels.

I think that I could not use OGL for my project.

Where is the wxPython demo?

I think floatcanvas in interessant! But the documentation is not complete.. For example.. But some classe like drawRectancle are not available.. Why?! Have you some example using float canvas? I'd like to try it

Thank you for support!

-Francis

···

Le 26 oct. 06 à 18:37, Christopher Barker a écrit :

TheMoon Seeker wrote:

I'm searching methods that let us manage object in a device context. For example, Tkinter let us find (find_closest) object in a canvas. Is there similar methods for wxPython?

wxWidgets does not provide anything like the TK Canvas.

However, there are tow options for wxPython:

OGL and FloatCanvas.

OGL is designed to support "boxes and arrows" type diagrams, but looks to be flexible enough to support other uses.

FloatCanvas is designed to support interactive graphics in arbitrary floating point coordinates, including built-in zooming and panning. It's in:

wx.lib.floatcanvas, and there is a demo included with the wxPython demo (required numpy). There is a newer version available from me, you can send questions to me and/or the floatcanvas mailing list:

http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

In regards to your specific question -- FloatCanvas has no "find_closest", but does have hit-testing, so you can bind an function call to a mouse event on an objects, and, to some degree, define how close you need to be to an object to hit it.

-Chris

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

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

The MoonSeeker wrote:

Hi chris,

OGL seem to be dead, i have found this on the wiki site :

There is a python version that is distributed with wxPython, and I'm pretty sure it's being maintained.

I think floatcanvas in interessant! But the documentation is not complete..

No, it's very poorly documented, but there is the source and the source to the demo.

> For example.. But some classe like drawRectancle are not

available.. Why?!

There is a pretty complete set of DrawObjects, Rectangle Among them. They are all defined in floatcanvas/FloatCanvas.py (they should live in their own module -- some day)

> Have you some example using float canvas? I'd like to try it

I'll send you the latest version with some additional samples, offline.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov