<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxClipboard</title>
</header>
<module>wxClipboard</module>
<modulesummary>Functions for wxClipboard class</modulesummary>
<description><p>A class for manipulating the clipboard.
      </p><p>To use the clipboard, you call member functions of the global ?wxTheClipboard object.
      </p><p>See the overview_dataobject for further information.
      </p><p>Call <seemfa marker="#open/1"><c>open/1</c></seemfa> to get ownership of the clipboard. If this operation returns true, you now own the clipboard. Call <seemfa marker="#setData/2"><c>setData/2</c></seemfa> to put data on the clipboard, or <seemfa marker="#getData/2"><c>getData/2</c></seemfa> to retrieve data from the clipboard. Call <seemfa marker="#close/1"><c>close/1</c></seemfa> to close the clipboard and relinquish ownership. You should keep the clipboard open only momentarily.
      </p><p>For example:
      </p><p>Note: On GTK, the clipboard behavior can vary depending on the configuration of the end-user's machine. In order for the clipboard data to persist after the window closes, a clipboard manager must be installed. Some clipboard managers will automatically flush the clipboard after each new piece of data is added, while others will not. The @Flush() function will force the clipboard manager to flush the data.
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/overview_dnd.html#overview_dnd">Overview dnd</url>, <url href="https://docs.wxwidgets.org/3.1/overview_dataobject.html#overview_dataobject">Overview dataobject</url>, <seeerl marker="wxDataObject"><c>wxDataObject</c></seeerl>
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_clipboard.html">wxClipboard</url></p>
  </description>
<datatypes><datatype><name name="wxClipboard"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="addData" arity="2" clause_i="1" since=""/>
    <fsummary>Call this function to add the data object to the clipboard. </fsummary>
    <desc><p>Call this function to add the data object to the clipboard. 
      </p><p>This is an obsolete synonym for <seemfa marker="#setData/2"><c>setData/2</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="clear" arity="1" clause_i="1" since=""/>
    <fsummary>Clears the global clipboard object and the system's clipboard if possible. </fsummary>
    <desc><p>Clears the global clipboard object and the system's clipboard if possible. 
      </p></desc>
  </func>
  
  <func>
    <name name="close" arity="1" clause_i="1" since=""/>
    <fsummary>Call this function to close the clipboard, having opened it with <c>open/1</c>. </fsummary>
    <desc><p>Call this function to close the clipboard, having opened it with <seemfa marker="#open/1"><c>open/1</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="flush" arity="1" clause_i="1" since=""/>
    <fsummary>Flushes the clipboard: this means that the data which is currently on clipboard will stay available even after the application exits (possibly eating memory), otherwise the clipboard will be emptied on exit. </fsummary>
    <desc><p>Flushes the clipboard: this means that the data which is currently on clipboard will stay available even after the application exits (possibly eating memory), otherwise the clipboard will be emptied on exit. 
      </p><p>Currently this method is implemented in MSW and GTK and always returns false otherwise.
      </p><p>Note: On GTK, only the non-primary selection can be flushed. Calling this function when the clipboard is using the primary selection will return false and not make any data available after the program exits.
      </p><p>Return: false if the operation is unsuccessful for any reason. 
      </p></desc>
  </func>
  
  <func>
    <name name="getData" arity="2" clause_i="1" since=""/>
    <fsummary>Call this function to fill <c>data</c> with data on the clipboard, if available in the required format. </fsummary>
    <desc><p>Call this function to fill <c>data</c> with data on the clipboard, if available in the required format. 
      </p><p>Returns true on success. 
      </p></desc>
  </func>
  
  <func>
    <name name="isOpened" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the clipboard has been opened. </fsummary>
    <desc><p>Returns true if the clipboard has been opened. 
      </p></desc>
  </func>
  
  <func>
    <name name="open" arity="1" clause_i="1" since=""/>
    <fsummary>Call this function to open the clipboard before calling <c>setData/2</c> and <c>getData/2</c>. </fsummary>
    <desc><p>Call this function to open the clipboard before calling <seemfa marker="#setData/2"><c>setData/2</c></seemfa> and <seemfa marker="#getData/2"><c>getData/2</c></seemfa>. 
      </p><p>Call <seemfa marker="#close/1"><c>close/1</c></seemfa> when you have finished with the clipboard. You should keep the clipboard open for only a very short time.
      </p><p>Return: true on success. This should be tested (as in the sample shown above). 
      </p></desc>
  </func>
  
  <func>
    <name name="setData" arity="2" clause_i="1" since=""/>
    <fsummary>Call this function to set the data object to the clipboard. </fsummary>
    <desc><p>Call this function to set the data object to the clipboard. 
      </p><p>The new data object replaces any previously set one, so if the application wants to provide clipboard data in several different formats, it must use a composite data object supporting all of the formats instead of calling this function several times with different data objects as this would only leave data from the last one in the clipboard.
      </p><p>After this function has been called, the clipboard owns the data, so do not delete the data explicitly. 
      </p></desc>
  </func>
  
  <func>
    <name name="usePrimarySelection" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>usePrimarySelection/2</c></fsummary>
  </func>
  
  <func>
    <name name="usePrimarySelection" arity="2" clause_i="1" since=""/>
    <fsummary>On platforms supporting it (all X11-based ports), <c>wxClipboard</c> uses the CLIPBOARD X11 selection by default. </fsummary>
    <desc><p>On platforms supporting it (all X11-based ports), <seeerl marker="wxClipboard"><c>wxClipboard</c></seeerl> uses the CLIPBOARD X11 selection by default. 
      </p><p>When this function is called with true, all subsequent clipboard operations will use PRIMARY selection until this function is called again with false.
      </p><p>On the other platforms, there is no PRIMARY selection and so all clipboard operations will fail. This allows implementing the standard X11 handling of the clipboard which consists in copying data to the CLIPBOARD selection only when the user explicitly requests it (i.e. by selecting the "Copy" menu command) but putting the currently selected text into the PRIMARY selection automatically, without overwriting the normal clipboard contents with the currently selected text on the other platforms. 
      </p></desc>
  </func>
  
  <func>
    <name name="isSupported" arity="2" clause_i="1" since=""/>
    <fsummary>Returns true if there is data which matches the data format of the given data object currently <c>available</c> on the clipboard. </fsummary>
    <desc><p>Returns true if there is data which matches the data format of the given data object currently <c>available</c> on the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="get" arity="0" clause_i="1" since=""/>
    <fsummary>Returns the global instance (wxTheClipboard) of the clipboard object. </fsummary>
    <desc><p>Returns the global instance (wxTheClipboard) of the clipboard object. 
      </p></desc>
  </func>
  </funcs>
</erlref>
