1. I added a comment to the documentation. We don't use a global attribute
because we would like to concentrate all clipboard support in this element.

2. The documentation is incorrect, just fixed and committed to SVN. The
attribute is write-only, so you can only copy an IupImage to the clipboard,
not paste.

3. The Rich text support in GTK depends on a GtkTextBuffer, that is not
available inside an IupClipboard. It must be associated with an IupText.
And IupText with FORMATTING=Yes already has copy and paste support. So we
opt to let this format as a custom format.

4. Actually it is more safe to do Open+SetData+Close at once, so we do it
when a TEXT or IMAGE attribute is set.

Best,
Scuri


On Fri, Jun 5, 2015 at 9:03 AM, Antonio Scuri <antonio.sc...@gmail.com>
wrote:

>   Hi Denilson,
>
>   Good points. I'm mobile right now so I'll take a look at these issues
> when I got back.
>
>   Thanks for the report.
>
> Best Regards,
> Antonio Scuri
> Em 05/06/2015 07:41, "Denilson das Mercês Amorim" <dma_2...@hotmail.com>
> escreveu:
>
>>  While lurking around IupClipboard functionalities I've found a few
>> inconsistencies, perhaps because it is a new feature, not sure, but I
>> better report it for future proof.
>>
>> 1.
>> It's not clearly documented if ADDFORMAT registration is needed before
>> using FORMAT (from looking in the source code it's not needed for Win32 nor
>> GTK, but I'm not sure about Motif).
>> Also ADDFORMAT could perhaps be a global attribute (ADDCLIPBOARDFORMAT?)
>> as it's not tied to the clipboard object at all?
>>
>> 2. IMAGE says:
>> >* IMAGE* (write-only): name of an image to copy (set) or paste (get),
>> to or from the clipboard. If set to NULL clears the clipboard data. (GTK
>> 2.6)
>>
>> How so 'paste (get)'? It's not quite clear how to paste something into a
>> Image object (or get a pasted one), even more unclear because it's a
>> write-only attribute! From looking in the source code there's no way at the
>> moment to paste/get a image off the clipboard, so that should probably be
>> removed from the documentation or image paste added to IUP.
>>
>> 3. Add RTF
>> I'd suggest to add a attribute to set/get rich text as there's for image
>> and text.
>> Both on Windows and GTK there's a standard way to deal with rich text on
>> the clipboard, not sure about Motif.
>>
>> 4. Too late but...
>> I think the clipboard object could have a better approach, it's now too
>> late to fix it, but just saying. A good one would be it locks the clipboard
>> on construction (e.g. OpenClipboard) and closes it on destroy
>> (CloseClipboard), that way we'd not have any possible clipboard data race
>> between applications eh?
>> Was there a reason for not doing it this way?
>>
>> Bom feriado.
>> Denilson das Mercês Amorim
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
>>
------------------------------------------------------------------------------
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to