UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
ZmSelection Class Reference

#include <ZmSelection.H>

Inheritance diagram for ZmSelection:
ZmTableTool ZmDbTableTool

Public Member Functions

 ZmSelection (Widget w, Atom name=XA_PRIMARY)
 
virtual ~ZmSelection ()
 
virtual void highlight_data (bool flag)
 
virtual bool publish_data (const char *text, Time timestamp)
 
virtual void unpublish_data (Time timestamp)
 
virtual bool request_data (char *&text, Time timestamp)
 

Protected Attributes

struct {
   Atom   type
 
   XtPointer   data
 
   unsigned long   size
 
   int   format
 
im_buf
 
struct {
   Atom   type
 
   XtPointer   data
 
   unsigned long   size
 
   int   format
 
ex_buf
 
bool bPaste
 
Atom aName
 
Atom aData
 
Widget wToplevel
 

Detailed Description

Object for providing and requesting selection (clipboard).

Constructor & Destructor Documentation

ZmSelection::ZmSelection ( Widget  w,
Atom  name = XA_PRIMARY 
)

Create selection provider/requester object. It supposed to be the only one for an application.

virtual ZmSelection::~ZmSelection ( )
virtual

Destroy the object.

Member Function Documentation

virtual void ZmSelection::highlight_data ( bool  flag)
virtual

Method for visual highlighting of selected data. True means an request to highlight, false means to reset highlighting. An application may ignore this order.

Reimplemented in ZmTableTool.

virtual bool ZmSelection::publish_data ( const char *  text,
Time  timestamp 
)
virtual

Make a selection of given text data at given moment (usually, obtained from pCallData->event->xkey.time). Return true in case of success and false otherwise.

virtual bool ZmSelection::request_data ( char *&  text,
Time  timestamp 
)
virtual

Request data of XA_STRING type at given moment (usually, obtained from pCallData->event->xkey.time). In case of success pasted text is allocated by malloc() and zero terminated.

virtual void ZmSelection::unpublish_data ( Time  timestamp)
virtual

Recall published data.

Member Data Documentation

Atom ZmSelection::aData
protected

Atom for property used as a data buffer.

Atom ZmSelection::aName
protected

Stored selection name (XA_PRIMARY or XA_SECONDARY)

bool ZmSelection::bPaste
protected

Flag of the ready pasted data.

XtPointer ZmSelection::data

Data themselves

int ZmSelection::format

8, 16 or 32 depending data

struct { ... } ZmSelection::im_buf

Data prepared for import/export.

unsigned long ZmSelection::size

Size of data in bytes

Atom ZmSelection::type

Type of the data

Widget ZmSelection::wToplevel
protected

Stored top-level widget.


The documentation for this class was generated from the following file: