.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2018 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 filemanager under Unix which makes it possible to receive files from them using this class. .. warning:: Under all non-Windows platforms this class is currently "input-only", i.e. you can receive the files from another application, but copying (or dragging) file(s) from a wxWidgets application is not currently supported. ``PS``: GTK2 should work as well. .. seealso:: :ref:`wx.DataObject`, :ref:`wx.DataObjectSimple`, :ref:`wx.TextDataObject`, :ref:`wx.BitmapDataObject`, :ref:`wx.DataObject` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;"> <img id="toggleBlock-trigger" src="_static/images/closed.png"/> Inheritance diagram for class <strong>FileDataObject</strong>: </div> <div id="toggleBlock-summary" style="display:block;"></div> <div id="toggleBlock-content" style="display:none;"> <p class="graphviz"> <center><img src="_static/images/inheritance/wx.FileDataObject_inheritance.png" alt="Inheritance diagram of FileDataObject" usemap="#dummy" class="inheritance"/></center> <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script> <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FileDataObject.html" title="wx.FileDataObject is a specialization of wx.DataObject for file names." alt="" coords="16,160,160,189"/> <area shape="rect" id="node2" href="wx.DataObjectSimple.html" title="This is the simplest possible implementation of the wx.DataObject class." alt="" coords="5,83,171,112"/> <area shape="rect" id="node3" href="wx.DataObject.html" title="A wx.DataObject represents data that can be copied to or from the clipboard, or dragged and dropped." alt="" coords="28,5,148,35"/> </map> </p> </div> | |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`