Interconnecting shapes on a canvas

Hi all,

I want to create a new project where the main window contains a canvas
and a bar containing shapes.
Each shape is a bitmap with one or multiple connector-areas.
The user can drag a set of shapes onto the canvas.
Subsequently the shapes can be interconnected by drawing lines between
the connector points of shapes.
From the final drawing that is created I want to generate an XML file
defining the shapes and their interconnections.

I'm not sure on how I should start on this using wxPython.
First thing would be to learn how to:
* Create a canvas to drag and drop shapes onto
* Howto create customized bitmap objects which would react on mouse-
events when you hover over a certain location on the bitmap (the
connectors)
* How to interconnect those shapes (e.g. draw a line from
Shape_A_Connector_1 to Shape_B_Connector_1)

So if anyone can point me to some classes/libraries/documentation/
examples it is much appreciated.

Best regards,
Tom.

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

See wx.lib.ogl and wx.lib.floatcanvas, and their samples in the demo. Each of those will help you get a long ways towards your goal.

···

On 4/16/10 7:42 AM, Tom wrote:

Hi all,

I want to create a new project where the main window contains a canvas
and a bar containing shapes.
Each shape is a bitmap with one or multiple connector-areas.
The user can drag a set of shapes onto the canvas.
Subsequently the shapes can be interconnected by drawing lines between
the connector points of shapes.
From the final drawing that is created I want to generate an XML file
defining the shapes and their interconnections.

I'm not sure on how I should start on this using wxPython.
First thing would be to learn how to:
* Create a canvas to drag and drop shapes onto
* Howto create customized bitmap objects which would react on mouse-
events when you hover over a certain location on the bitmap (the
connectors)
* How to interconnect those shapes (e.g. draw a line from
Shape_A_Connector_1 to Shape_B_Connector_1)

So if anyone can point me to some classes/libraries/documentation/
examples it is much appreciated.

--
Robin Dunn
Software Craftsman

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en