Home | Trees | Index | Help |
|
---|
Package wx :: Class DataFormat |
|
object
--+
|
DataFormat
A wx.DataFormat is an encapsulation of a platform-specific format handle which is used by the system for the clipboard and drag and drop operations. The applications are usually only interested in, for example, pasting data from the clipboard only if the data is in a format the program understands. A data format is is used to uniquely identify this format. On the system level, a data format is usually just a number, (which may be the CLIPFORMAT under Windows or Atom under X11, for example.)
The standard format IDs are:
wx.DF_INVALID An invalid format wx.DF_TEXT Text format wx.DF_BITMAP A bitmap (wx.Bitmap) wx.DF_METAFILE A metafile (wx.Metafile, Windows only) wx.DF_FILENAME A list of filenames wx.DF_HTML An HTML string. This is only valid on Windows and non-unicode builds
Besies the standard formats, the application may also use custom formats which are identified by their names (strings) and not numeric identifiers. Although internally custom format must be created (or registered) first, you shouldn't care about it because it is done automatically the first time the wxDataFormat object corresponding to a given format name is created.
Method Summary | |
---|---|
DataFormat |
Constructs a data format object for one of the standard data formats or an empty data object (use SetType or SetId later in this case) |
__del__(self)
| |
bool |
__eq__(self, DataFormat format) -> bool |
bool |
__ne__(self, DataFormat format) -> bool |
__repr__(self)
| |
String |
Returns the name of a custom format (this function will fail for a standard format). |
int |
Returns the platform-specific number identifying the format. |
Sets the format to be the custom format identified by the given name. | |
Sets the format to the given value, which should be one of wx.DF_XXX constants. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... |
Method Details |
---|
__init__(self,
type)
|
__eq__(self,
format)
|
__ne__(self, format)__ne__(self, DataFormat format) -> bool
|
GetId(self)Returns the name of a custom format (this function will fail for a standard format).
|
GetType(self)Returns the platform-specific number identifying the format.
|
SetId(self, format)Sets the format to be the custom format identified by the given name.
|
SetType(self, format)Sets the format to the given value, which should be one of wx.DF_XXX constants.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:56:54 2007 | http://epydoc.sf.net |