Re: commit -- more clipboard functionality

Jeff Hostetler (jeff@abisource.com)
Sat, 24 Jul 1999 10:13:32 -0500


Decklin Foster wrote:
>
> Jeff Hostetler writes:
>
> > > What is meant here by "internal clipboard" ? I never use a
> > > clipboard in X, just cut/paste from xterm to xterm or the like.
> >
> > we have an internal data structure to keep the "clipboard" copy data
> > and then use those buffers to paste from. we do not use the system
> > clipboard. so, that means that on unix and beos we cannot yet copy
> > and paste between other applications and abiword. on windows, we
> > can.
>
> In X, the 'clipboard' type stuff is mostly done with selections. When
> the user selects anything, AbiWord should assert ownership of the
> PRIMARY selection so that other programs can request it. The actual
> "copy" or "cut" menu items should place the primary selection onto the
> CLIPBOARD selection. Likewise, the "paste" menu item should insert the
> CLIPBOARD selection, and clicking button2 in a document should insert
> the PRIMARY selections.

yes, this is the next step for the unix version. i have left space
in the xap/unix code to interact with the XSelection mechanism
(instead of and/or in addition to) the internal mechanism. the reason
for the internal approach is that ideally one would like to copy a
region of formatted text and then paste it and get the formatting in
addition to the text. by using an internal format, i can get a loss-less
round trip. from what i've seen of the XSelection mechanism, it's good
for clipping command lines and other plain text, but doesn't do formatted
text (but i could be wrong here).

my thoughts were that i'd copy to the internal clipboard and simultaneously
assert ownership on a copy. on a paste, i query for ownership and paste
from the system or from my internal clipboard depending upon who last asserted.
(handwave, handwave)

>
> A much better explanation can be found in section 2 of the ICCCM
> (Inter-Client Communication Manual), which is at:
>
> http://www.tronche.com/gui/x/icccm/sec-2.html
>
> See especially section 2.6.1. Thank you for listening; If I can get
> som time to read your code I will try to help out with implementation.

cool. thanks for the reference. if you really want to help, that'd be
cool -- i'll send you some design notes in a separate note in a minute.

jeff



This archive was generated by hypermail 1.03b2.