Re: Clipboard details



> ------------ Original Message -----------
> From: ERDI Gergo <cactus cactus rulez org>
> Date: Fri, 20 Jul 2001 17:02:54 +0200 (CEST)

> So this is for an automatic Edit/Copy and Edit/Cut, right? See below for
> how I would go implementing this inside libbonoboui.

Most of the 2.0 work in bonobo has been to eliminate client-side helper
functions like this that would have to be wrapped by all the language
bindings, etc.  Also, conceptually, I think it makes sense for the Clipboard
implementation to own the UI for manipulating the clipboard.  Container just
sets a UI placeholder and exposes the clipboard data source/target interfaces.
 
> You bring up a good point here -- there has to be a way to notify the
> current data source when the clipboard changes, to enable it to do things
> like freeing up the buffer where it stores the data copied to clipboard
> (in case it doesn't use the ClipboardStore).
> However, I think the fact that the old pasting and linking monikers are
> unref'd by the clipboard when a new one is set is enough to achieve this
> -- just do the disposing in the destructor of your moniker.

The approach I mentioned was admittedly half thrown together, but it has some
hidden virtues.  :-)  Monikers would only be necessary for the linking case,
where they are not even immediately needed.  My Selection::getContent() method
could actually return an activated objref.  The link case would require
another supplementary method that would be informational for the paste link
target, but wouldn't actually be used to activate an object immediately.

> I think this kind of thing would belong in libbonoboui and not Bonobo.
> A very user-friendly API would be possible to be built upon the current
> interfaces:

Maybe I'm wrong, but I think this client-helper approach is contrary to the
current direction.  A nice Clipboard::Source/Clipboard::Target pair of
interfaces which can be implemented in the language of choice with no binding
work seems more in line with what I'm seeing happening in bonobo currently.

Mike






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]