IUP::Clipboard - [special] allows access to the clipboard
Creates an element that allows access to the clipboard. Each clipboard should be destroyed using Destroy method, but you can use only one for entire application because it does not store any data inside. Or you can simply create and destroy everytime you need to copy or paste.
Example - copy to clipboard:
$text = IUP::Text->new(); #... $clipboard = IUP::Clipboard->new(); $clipboard->TEXT( $text->VALUE ); $clipboard->Destroy(); ###XXX-todo-not-tested
Example - paste from clipboard:
$text = IUP::Text->new(); #... $clipboard = IUP::Clipboard->new(); $text->VALUE( $clipboard->TEXT ); $clipboard->Destroy(); ###XXX-todo-not-tested
$clipboard = IUP::Clipboard->new();
Returns: the identifier of the created element, or undef if an error occurs.
undef
NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
new()
ATTRIBUTE=>'value'
CALLBACKNAME=>\&func
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
(read-only) [Windows Only] informs if there is a Windows Enhanced Metafile available at the clipboard. (Since iup-3.2)
(write-only) name of an image to copy (set) or paste (get), to or from the clipboard. (GTK 2.6)
(read-only) informs if there is an image available at the clipboard. (GTK 2.6)
Native handle of an image to copy or paste, to or from the clipboard.
BEWARE: technically it is a pointer, be carefull when using from perl.
In Win32 is a HANDLE of a DIB.
In GTK is a GdkPixbuf*.
In Motif is a Pixmap.
The returned handle in a paste must be released after used (GlobalFree(handle), g_object_unref(pixbuf) or XFreePixmap(display, pixmap)). After copy, do NOT release the given handle. See IUP-IM Functions for utility functions on image native handles. (GTK 2.6)
(write-only) [Windows Only] saves the EMF from the clipboard to the given filename. (Since iup-3.2)
(write-only) [Windows Only] saves the WMF from the clipboard to the given filename. (Since iup-3.2)
copy or paste text to or from the clipboard.
(read-only) informs if there is a text available at the clipboard.
(read-only) [Windows Only] informs if there is a Windows Metafile available at the clipboard. (Since iup-3.2)
Unfortunately there are no sample scripts using this element.
The original doc: iupclipboard.html
To install IUP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IUP
CPAN shell
perl -MCPAN -e shell install IUP
For more information on module installation, please visit the detailed CPAN module installation guide.