Hi Chris,

On 09/04/2010 21:07, Christopher Barker wrote:
...
>> When you have a moment can you send what you have - you wanted to 
>> attach it to the last message but it isn't(:.
>
> darn! I hate it when I do that!
Yeap, that is why I really like the little reminder one gets in 
Thunderbird 3.x when one uses the work attach.
>
> Here it is this time, though it is pretty non-functional (draw circle 
> mode, works, though)
Can you send me the "Icons" module, I don't seem to have this.
>
> Werner F. Bruhin wrote:
>> Looking at the fc/demo/MouseTest.py sample I just don't get it how 
>> one has e.g. two different OnLeftDown handlers for two different GUI 
>> modes.
>>
>> I naively created a module which contains my two GUIModes which are 
>> sub-classed/inherit from GUIMode.GUIMouse, each with his specific 
>> OnLeftDown handler.  But doing this is still calling the event 
>> handler defined in my application and not the one in the GUIMode.
>
> That should do it -- the trick is setting the mode on the Canvas. Did 
> you call:
>
> FloatCanvas.SetMode()
>
> with your new mode?
Yes I did.
>
> The trick is integrating this with the NavCanvas Toolbar.
I switched from NavCanvas to FloatCanvas and basically copied the 
toolbar stuff from NavCanvas into my own module and then added a couple.
>
>> Should there be a different "Bind" command for the above to work, or 
>> should the one common OnLeftDown handler check the GUIMode the 
>> application is in and call the specific handler?
>
> yup -- that's how it works --
Which one:), the first or the second option?  I.e.:

I see that in EditingModes you call SetMode, UnBindAll or BindAll.  So, 
for each mode one should have an appropriate BindAll or similar?
> No time for more now, but I'll try to do a bit more later.

A friend of ours from Switzerland will arrive tomorrow, so won't spend 
much time in front of the computer during his stay.

Werner

_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to