.. 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

   <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" alt="" coords="17,160,157,189"/> <area shape="rect" id="node2" href="wx.DataObjectSimple.html" title="wx.DataObjectSimple" alt="" coords="5,83,168,112"/> <area shape="rect" id="node3" href="wx.DataObject.html" title="wx.DataObject" alt="" coords="27,5,146,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`

