- %apply SWIGTYPE *DISOWN { wxDataObject *data };
+ %disownarg( wxDataObject *data );
DocDeclStr(
virtual bool , AddData( wxDataObject *data ),
:see: `wx.DataObject`", "");
-
- %clear wxDataObject *data;
+ %cleardisown( wxDataObject *data );
+
DocDeclStr(
virtual bool , IsSupported( const wxDataFormat& format ),
DocDeclStr(
virtual void , UsePrimarySelection( bool primary = true ),
- "On platforms supporting it (the X11 based platforms), selects the
-so called PRIMARY SELECTION as the clipboard as opposed to the
-normal clipboard, if primary is True.", "");
+ "On platforms supporting it (the X11 based platforms), selects the so
+called PRIMARY SELECTION as the clipboard as opposed to the normal
+clipboard, if primary is True. On other platforms all clipboard
+operations fail when using the primary selection. This allows code
+supporting the primary selection to be written without ill effects on
+the other platforms.", "");
+
+ DocDeclStr(
+ bool , IsUsingPrimarySelection() const,
+ "Return true if we're using primary selection", "");
+
DocDeclStr(
static wxClipboard *, Get(),
"Returns global instance (wxTheClipboard) of the object.", "");
-
+
};
self._instance = None
def _checkInstance(self):
if self._instance is None:
- self._instance = self._initfunc(*self._args, **self._kwargs)
+ if wx.GetApp():
+ self._instance = self._initfunc(*self._args, **self._kwargs)
def __getattr__(self, name):
self._checkInstance()
return getattr(self._instance, name)