> Every inset with an associated popup needs to know which buffer it belongs
> to so the popup can talk to it (eg. get/set data).  I haven't given much
> thought to removing this requirement but I am certainly open to
> suggestions.

Precisely, the Inset's need to know the BufferView where the
click comes from!

Therefor, when we invoke the "Click" method of an inset, we
will pass along the correspoding BufferView.  Then the inset will 
be able to get to the hosting Buffer, because a BufferView contains
a Buffer.

This is exactly similar to the way we handle the Painter
issue:  When we request an Inset to draw something, we
pass it the painter to use for the drawing.

So, Insets (in general) do not need to maintain ownership for
this reason.

Greets,

Asger

Reply via email to