Define clickable regions on a bitmap for a visual wine rack

Hi all,

I would like to implement a "visual wine rack" control. For the ones of you who are not into wine here a little explanation.

Individual bottle rack:
This is not really a problem as I have prototype implemented using a grid showing a image in each cell were a bottle is stored.

User defined rack:
Here is were I have the problem. Unfortunately (for me) wine racks come in just about any shape, however if I could support some of the most common ones that would be enough for me.

The most common ones are multiple rectangular or square boxes (bins) which can be grouped together into a rack. Often it is possible to sub divide an individual box by adding a vertical, horizontal or diagonal separation.

I either have to allow the user to draw the rack or what I would ideally like to do is for the user to take an image of his/her wine rack and to allow them to define on this image what region is "bin 1", "bin 2" etc. I imagine that the user would define a "bin" by clicking e.g. in a square bin on the four corners, and I would then need to be able to save this information with the definition for this particular rack, so that later on I can display it and if the user clicks or floats the cursor of a particular region (bin) of the rack I can show appropriate information in e.g. a tooltip window.

I am not sure that I explained myself well here, but nevertheless I hope that some of you can give me some pointers on how to go about this.

Werner

Werner F. Bruhin wrote:

I would like to implement a "visual wine rack" control. For the ones of you who are not into wine here a little explanation.

wx.lib.floatcanvas may help you out here. Take a look, and feel free to send any questions to me. While the demo doesn't have have a lot of user-interaction in it, it's actually pretty easy to do, and I have more samples if you want them.

-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