.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.FileDataObject:
==========================================================================================================================================
|phoenix_title| **wx.FileDataObject**
==========================================================================================================================================
:ref:`wx.FileDataObject` is a specialization of :ref:`wx.DataObject` for file names.
The program works with it just as if it were a list of absolute file names, but internally it uses the same format as Explorer and other compatible programs under Windows or GNOME/KDE file manager under Unix which makes it possible to receive files from them using this class.
.. seealso:: :ref:`wx.DataObject`, :ref:`wx.DataObjectSimple`, :ref:`wx.TextDataObject`, :ref:`wx.BitmapDataObject`, :ref:`wx.DataObject`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
Inheritance diagram for class
FileDataObject:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.FileDataObject.__init__` Constructor.
:meth:`~wx.FileDataObject.AddFile` Adds a file to the file list represented by this data object (Windows only).
:meth:`~wx.FileDataObject.GetAllFormats` Returns a list of wx.DataFormat objects which this data object
:meth:`~wx.FileDataObject.GetFilenames` Returns the array of file names.
:meth:`~wx.FileDataObject.SetData`
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.FileDataObject.AllFormats` See :meth:`~wx.FileDataObject.GetAllFormats`
:attr:`~wx.FileDataObject.Filenames` See :meth:`~wx.FileDataObject.GetFilenames`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.FileDataObject(DataObjectSimple)
**Possible constructors**::
FileDataObject()
FileDataObject is a specialization of DataObject for file names.
.. method:: __init__(self)
Constructor.
.. method:: AddFile(self, file)
Adds a file to the file list represented by this data object (Windows only).
:param `file`:
:type `file`: string
.. method:: GetAllFormats(self, dir=DataObject.Get)
Returns a list of wx.DataFormat objects which this data object
supports transferring in the given direction.
.. method:: GetFilenames(self)
Returns the array of file names.
:rtype: `list of strings`
.. method:: SetData(self, format, buf)
:rtype: `bool`
.. attribute:: AllFormats
See :meth:`~wx.FileDataObject.GetAllFormats`
.. attribute:: Filenames
See :meth:`~wx.FileDataObject.GetFilenames`