Specify a function COMMAND to call if the X selection owned by this widget is queried by another application. This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking
(self, command, **kw)
| 1142 | return self.tk.call(('selection', 'get') + self._options(kw)) |
| 1143 | |
| 1144 | def selection_handle(self, command, **kw): |
| 1145 | """Specify a function COMMAND to call if the X |
| 1146 | selection owned by this widget is queried by another |
| 1147 | application. |
| 1148 | |
| 1149 | This function must return the contents of the |
| 1150 | selection. The function will be called with the |
| 1151 | arguments OFFSET and LENGTH which allows the chunking |
| 1152 | of very long selections. The following keyword |
| 1153 | parameters can be provided: |
| 1154 | selection - name of the selection (default PRIMARY), |
| 1155 | type - type of the selection (e.g. STRING, FILE_NAME).""" |
| 1156 | name = self._register(command) |
| 1157 | self.tk.call(('selection', 'handle') + self._options(kw) |
| 1158 | + (self._w, name)) |
| 1159 | |
| 1160 | def selection_own(self, **kw): |
| 1161 | """Become owner of X selection. |