UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZmSelection.H
1 /* ZmSelection.H */
2 /* $Id: ZmSelection.H,v 1.1 2005/02/18 11:22:45 vlad Exp $ */
3 #ifndef __ZmSelection_H
4 #define __ZmSelection_H
5 
6 #include <X11/Xatom.h>
7 #include <X11/Intrinsic.h>
8 
9 #include <mix/AnyValue.hpp>
10 
11 
17 {
18 public:
19 
22  ZmSelection (Widget w, Atom name = XA_PRIMARY);
23 
25  virtual ~ZmSelection ();
26 
30  virtual void highlight_data (bool flag);
31 
35  virtual bool publish_data (const char* text, Time timestamp);
36 
38  virtual void unpublish_data (Time timestamp);
39 
43  virtual bool request_data (char*& text, Time timestamp);
44 
45 
46 protected:
47 
49  struct {
50  Atom type;
51  XtPointer data;
52  unsigned long size;
53  int format;
54  } im_buf, ex_buf;
55 
57  bool bPaste;
58 
60  Atom aName;
61 
63  Atom aData;
64 
66  Widget wToplevel;
67 
68 private:
69 
73  static ZmSelection *pSelManager;
74 
75 
77  static Boolean convert_sel_proc (Widget w,
78  Atom* selection,
79  Atom* target,
80  Atom* type_return,
81  XtPointer* value_return,
82  unsigned long* length_return,
83  int* format_return);
84 
87  static void lose_sel_proc (Widget w,
88  Atom* selection);
89 
92  static void sel_done_proc (Widget w,
93  Atom* selection,
94  Atom* target);
95 
98  static void get_sel_cb_proc (Widget w,
99  XtPointer closure,
100  Atom* selection,
101  Atom* type,
102  XtPointer value,
103  unsigned long* length,
104  int* format);
105 
106 };
107 
108 
109 #endif /* ZmSelection.H */
virtual bool publish_data(const char *text, Time timestamp)
virtual void unpublish_data(Time timestamp)
XtPointer data
Definition: ZmSelection.H:51
Definition: ZmSelection.H:16
Atom aData
Definition: ZmSelection.H:63
virtual void highlight_data(bool flag)
Atom aName
Definition: ZmSelection.H:60
struct ZmSelection::@10 im_buf
virtual ~ZmSelection()
Widget wToplevel
Definition: ZmSelection.H:66
Atom type
Definition: ZmSelection.H:50
int format
Definition: ZmSelection.H:53
unsigned long size
Definition: ZmSelection.H:52
ZmSelection(Widget w, Atom name=XA_PRIMARY)
virtual bool request_data(char *&text, Time timestamp)
bool bPaste
Definition: ZmSelection.H:57