#
# $Id: clipboard.icn,v 1.3 2010-11-01 03:48:58 hanibs0 Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#

package gui

global clipboard

#
# Clipboard class
#
class Clipboard(content)
   #
   # Set the clipboard content
   #
   method set_content(o)
      if \o then
      if \ &window then
          WAttrib("selection=" || o)
      else
          content := o
      #write("set clipboard to " || image(o.get_value()))
   end

   #
   # Get the clipboard content
   #
   method get_content()
       if \ &window then return WAttrib("selection")
       else
           return content
   end
end

procedure get_clipboard()
   if /clipboard then
      clipboard := Clipboard()
   return clipboard
end
