1wxClipboard(3)             Erlang Module Definition             wxClipboard(3)
2
3
4

NAME

6       wxClipboard - Functions for wxClipboard class
7

DESCRIPTION

9       A class for manipulating the clipboard.
10
11       To  use  the clipboard, you call member functions of the global ?wxThe‐
12       Clipboard object.
13
14       See the overview_dataobject for further information.
15
16       Call open/1 to get ownership of the clipboard. If  this  operation  re‐
17       turns  true,  you  now own the clipboard. Call setData/2 to put data on
18       the clipboard, or getData/2 to retrieve data from the  clipboard.  Call
19       close/1  to  close  the  clipboard and relinquish ownership. You should
20       keep the clipboard open only momentarily.
21
22       For example:
23
24       Note: On GTK, the clipboard behavior can vary depending on the configu‐
25       ration  of  the  end-user's machine. In order for the clipboard data to
26       persist after the window closes, a clipboard manager must be installed.
27       Some  clipboard  managers  will automatically flush the clipboard after
28       each new piece of data is added, while others will  not.  The  @Flush()
29       function will force the clipboard manager to flush the data.
30
31       See: Overview dnd, Overview dataobject, wxDataObject
32
33       wxWidgets docs: wxClipboard
34

DATA TYPES

36       wxClipboard() = wx:wx_object()
37

EXPORTS

39       new() -> wxClipboard()
40
41              Default constructor.
42
43       destroy(This :: wxClipboard()) -> ok
44
45              Destructor.
46
47       addData(This, Data) -> boolean()
48
49              Types:
50
51                 This = wxClipboard()
52                 Data = wxDataObject:wxDataObject()
53
54              Call this function to add the data object to the clipboard.
55
56              This is an obsolete synonym for setData/2.
57
58       clear(This) -> ok
59
60              Types:
61
62                 This = wxClipboard()
63
64              Clears the global clipboard object and the system's clipboard if
65              possible.
66
67       close(This) -> ok
68
69              Types:
70
71                 This = wxClipboard()
72
73              Call this function to close the clipboard, having opened it with
74              open/1.
75
76       flush(This) -> boolean()
77
78              Types:
79
80                 This = wxClipboard()
81
82              Flushes  the  clipboard:  this means that the data which is cur‐
83              rently on clipboard will stay available even after the  applica‐
84              tion  exits  (possibly  eating  memory), otherwise the clipboard
85              will be emptied on exit.
86
87              Currently this method is implemented in MSW and GTK  and  always
88              returns false otherwise.
89
90              Note:  On  GTK,  only  the non-primary selection can be flushed.
91              Calling this function when the clipboard is  using  the  primary
92              selection  will return false and not make any data available af‐
93              ter the program exits.
94
95              Return: false if the operation is unsuccessful for any reason.
96
97       getData(This, Data) -> boolean()
98
99              Types:
100
101                 This = wxClipboard()
102                 Data = wxDataObject:wxDataObject()
103
104              Call this function to fill data with data on the  clipboard,  if
105              available in the required format.
106
107              Returns true on success.
108
109       isOpened(This) -> boolean()
110
111              Types:
112
113                 This = wxClipboard()
114
115              Returns true if the clipboard has been opened.
116
117       open(This) -> boolean()
118
119              Types:
120
121                 This = wxClipboard()
122
123              Call  this  function  to  open the clipboard before calling set‐
124              Data/2 and getData/2.
125
126              Call close/1 when you have  finished  with  the  clipboard.  You
127              should keep the clipboard open for only a very short time.
128
129              Return: true on success. This should be tested (as in the sample
130              shown above).
131
132       setData(This, Data) -> boolean()
133
134              Types:
135
136                 This = wxClipboard()
137                 Data = wxDataObject:wxDataObject()
138
139              Call this function to set the data object to the clipboard.
140
141              The new data object replaces any previously set one, so  if  the
142              application wants to provide clipboard data in several different
143              formats, it must use a composite data object supporting  all  of
144              the  formats instead of calling this function several times with
145              different data objects as this would only leave  data  from  the
146              last one in the clipboard.
147
148              After  this  function  has  been  called, the clipboard owns the
149              data, so do not delete the data explicitly.
150
151       usePrimarySelection(This) -> ok
152
153              Types:
154
155                 This = wxClipboard()
156
157       usePrimarySelection(This, Options :: [Option]) -> ok
158
159              Types:
160
161                 This = wxClipboard()
162                 Option = {primary, boolean()}
163
164              On platforms supporting it (all  X11-based  ports),  wxClipboard
165              uses the CLIPBOARD X11 selection by default.
166
167              When this function is called with true, all subsequent clipboard
168              operations will use PRIMARY selection  until  this  function  is
169              called again with false.
170
171              On the other platforms, there is no PRIMARY selection and so all
172              clipboard operations will fail.  This  allows  implementing  the
173              standard X11 handling of the clipboard which consists in copying
174              data to the CLIPBOARD selection only when  the  user  explicitly
175              requests  it  (i.e.  by  selecting  the "Copy" menu command) but
176              putting the currently selected text into the  PRIMARY  selection
177              automatically, without overwriting the normal clipboard contents
178              with the currently selected text on the other platforms.
179
180       isSupported(This, Format) -> boolean()
181
182              Types:
183
184                 This = wxClipboard()
185                 Format = wx:wx_enum()
186
187              Returns true if there is data which matches the data  format  of
188              the given data object currently available on the clipboard.
189
190       get() -> wxClipboard()
191
192              Returns  the  global  instance (wxTheClipboard) of the clipboard
193              object.
194
195
196
197wxWidgets team.                    wx 2.1.4                     wxClipboard(3)
Impressum