1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     Clipboard functionality. 
   4 // Author:      Robert Roebling 
   7 // Copyright:   (c) Robert Roebling 
   8 // Licence:     wxWindows licence 
   9 ///////////////////////////////////////////////////////////////////////////// 
  11 #ifndef __X11CLIPBOARDH__ 
  12 #define __X11CLIPBOARDH__ 
  14 #if defined(__GNUG__) && !defined(__APPLE__) 
  20 #include "wx/object.h" 
  22 #include "wx/dataobj.h" 
  23 #include "wx/control.h" 
  24 #include "wx/module.h" 
  26 // ---------------------------------------------------------------------------- 
  28 // ---------------------------------------------------------------------------- 
  30 class wxClipboard 
: public wxClipboardBase
 
  36     // open the clipboard before SetData() and GetData() 
  39     // close the clipboard after SetData() and GetData() 
  42     // query whether the clipboard is opened 
  43     virtual bool IsOpened() const; 
  45     // set the clipboard data. all other formats will be deleted. 
  46     virtual bool SetData( wxDataObject 
*data 
); 
  48     // add to the clipboard data. 
  49     virtual bool AddData( wxDataObject 
*data 
); 
  51     // ask if data in correct format is available 
  52     virtual bool IsSupported( const wxDataFormat
& format 
); 
  54     // fill data with data on the clipboard (if available) 
  55     virtual bool GetData( wxDataObject
& data 
); 
  57     // clears wxTheClipboard and the system's clipboard if possible 
  60     // If primary == TRUE, use primary selection in all further ops, 
  61     // primary == FALSE resets it. 
  62     virtual void UsePrimarySelection(bool primary 
= TRUE
) 
  63         { m_usePrimary 
= primary
; } 
  65     // implementation from now on 
  68     bool              m_ownsPrimarySelection
; 
  71     WXWindow          m_clipboardWidget
;  /* for getting and offering data */ 
  72     WXWindow          m_targetsWidget
;    /* for getting list of supported formats */ 
  73     bool              m_waiting
;          /* querying data or formats is asynchronous */ 
  75     bool              m_formatSupported
; 
  76     Atom              m_targetRequested
; 
  78     wxDataObject     
*m_receivedData
; 
  81     DECLARE_DYNAMIC_CLASS(wxClipboard
)