Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CXWindowsClipboard Class Reference

X11 clipboard implementation. More...

#include <CXWindowsClipboard.h>

Inherits IClipboard.

Inheritance diagram for CXWindowsClipboard:

Inheritance graph
[legend]
Collaboration diagram for CXWindowsClipboard:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CXWindowsClipboard (Display *, Window window, ClipboardID id)
void lost (Time)
 Notify clipboard was lost.
void addRequest (Window owner, Window requestor, Atom target,::Time time, Atom property)
 Add clipboard request.
bool processRequest (Window requestor,::Time time, Atom property)
 Process clipboard request.
bool destroyRequest (Window requestor)
 Cancel clipboard request.
Window getWindow () const
 Get window.
Atom getSelection () const
 Get selection atom.
virtual bool empty ()
 Empty clipboard.
virtual void add (EFormat, const CString &data)
 Add data.
virtual bool open (Time) const
 Open clipboard.
virtual void close () const
 Close clipboard.
virtual Time getTime () const
 Get time.
virtual bool has (EFormat) const
 Check for data.
virtual CString get (EFormat) const
 Get data.

Detailed Description

X11 clipboard implementation.

Definition at line 32 of file CXWindowsClipboard.h.


Constructor & Destructor Documentation

CXWindowsClipboard::CXWindowsClipboard Display *  ,
Window  window,
ClipboardID  id
 

Use window as the window that owns or interacts with the clipboard identified by id.

Definition at line 34 of file CXWindowsClipboard.cpp.


Member Function Documentation

void CXWindowsClipboard::add EFormat  ,
const CString &  data
[virtual]
 

Add data.

Add data in the given format to the clipboard. May only be called after a successful empty().

Implements IClipboard.

Definition at line 295 of file CXWindowsClipboard.cpp.

void CXWindowsClipboard::addRequest Window  owner,
Window  requestor,
Atom  target,
::Time  time,
Atom  property
 

Add clipboard request.

Adds a selection request to the request list. If the given owner window isn't this clipboard's window then this simply sends a failure event to the requestor.

Definition at line 111 of file CXWindowsClipboard.cpp.

Referenced by CXWindowsScreen::handleSystemEvent().

void CXWindowsClipboard::close  )  const [virtual]
 

Close clipboard.

Close the clipboard. close() must match a preceding successful open(). This signals that the clipboard has been filled with all the necessary data or all data has been read. It does not mean the clipboard ownership should be released (if it was taken).

Implements IClipboard.

Definition at line 344 of file CXWindowsClipboard.cpp.

Referenced by CXWindowsScreen::setClipboard().

bool CXWindowsClipboard::destroyRequest Window  requestor  ) 
 

Cancel clipboard request.

Terminate a selection request. Returns true iff the request was known and handled.

Definition at line 231 of file CXWindowsClipboard.cpp.

bool CXWindowsClipboard::empty  )  [virtual]
 

Empty clipboard.

Take ownership of the clipboard and clear all data from it. This must be called between a successful open() and close(). Return false if the clipboard ownership could not be taken; the clipboard should not be emptied in this case.

Implements IClipboard.

Definition at line 262 of file CXWindowsClipboard.cpp.

Referenced by CXWindowsScreen::setClipboard().

CString CXWindowsClipboard::get EFormat   )  const [virtual]
 

Get data.

Return the data in the given format. Returns the empty string if there is no data in that format. Must be called between a successful open() and close().

Implements IClipboard.

Definition at line 376 of file CXWindowsClipboard.cpp.

Atom CXWindowsClipboard::getSelection  )  const
 

Get selection atom.

Returns the selection atom that identifies the clipboard to X11 (e.g. XA_PRIMARY).

Definition at line 256 of file CXWindowsClipboard.cpp.

IClipboard::Time CXWindowsClipboard::getTime  )  const [virtual]
 

Get time.

Return the timestamp passed to the last successful open().

Implements IClipboard.

Definition at line 360 of file CXWindowsClipboard.cpp.

Window CXWindowsClipboard::getWindow  )  const
 

Get window.

Returns the clipboard's window (passed the c'tor).

Definition at line 250 of file CXWindowsClipboard.cpp.

bool CXWindowsClipboard::has EFormat   )  const [virtual]
 

Check for data.

Return true iff the clipboard contains data in the given format. Must be called between a successful open() and close().

Implements IClipboard.

Definition at line 367 of file CXWindowsClipboard.cpp.

void CXWindowsClipboard::lost Time   ) 
 

Notify clipboard was lost.

Tells clipboard it lost ownership at the given time.

Definition at line 100 of file CXWindowsClipboard.cpp.

Referenced by CXWindowsScreen::handleSystemEvent().

bool CXWindowsClipboard::open Time   )  const [virtual]
 

Open clipboard.

Open the clipboard. Return true iff the clipboard could be opened. If open() returns true then the client must call close() at some later time; if it returns false then close() must not be called. time should be the current time or a time in the past when the open should effectively have taken place.

Implements IClipboard.

Definition at line 309 of file CXWindowsClipboard.cpp.

Referenced by CXWindowsScreen::setClipboard().

bool CXWindowsClipboard::processRequest Window  requestor,
::Time  time,
Atom  property
 

Process clipboard request.

Continues processing a selection request. Returns true if the request was handled, false if the request was unknown.

Definition at line 203 of file CXWindowsClipboard.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Nov 6 00:21:32 2009 for synergy-plus by  doxygen 1.3.9.1