File: wx.FileTypeInfo.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (503 lines) | stat: -rw-r--r-- 11,912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
.. 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.FileTypeInfo:

==========================================================================================================================================
|phoenix_title|  **wx.FileTypeInfo**
==========================================================================================================================================

Container of information about :ref:`wx.FileType`.          

This class simply stores information associated with the file type. It doesn't do anything on its own and is used only to allow constructing :ref:`wx.FileType`  from it (instead of specifying all the constituent pieces separately) and also with :meth:`wx.MimeTypesManager.AddFallbacks` .           




|

|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>FileTypeInfo</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.FileTypeInfo_inheritance.png" alt="Inheritance diagram of FileTypeInfo" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FileTypeInfo.html" title="wx.FileTypeInfo" alt="" coords="5,5,117,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.FileTypeInfo.__init__`                                                Default constructor creates an invalid file type info object.
:meth:`~wx.FileTypeInfo.AddExtension`                                            Add another extension associated with this file type.
:meth:`~wx.FileTypeInfo.GetDescription`                                          Get the long, user visible description.
:meth:`~wx.FileTypeInfo.GetExtensions`                                           Get the array of all extensions.
:meth:`~wx.FileTypeInfo.GetExtensionsCount`                                      Get the number of extensions.
:meth:`~wx.FileTypeInfo.GetIconFile`                                             Get the icon filename.
:meth:`~wx.FileTypeInfo.GetIconIndex`                                            Get the index of the icon within the icon file.
:meth:`~wx.FileTypeInfo.GetMimeType`                                             Get the MIME type.
:meth:`~wx.FileTypeInfo.GetOpenCommand`                                          Get the open command.
:meth:`~wx.FileTypeInfo.GetPrintCommand`                                         Get the print command.
:meth:`~wx.FileTypeInfo.GetShortDesc`                                            Get the short description (only used under Win32 so far)
:meth:`~wx.FileTypeInfo.SetDescription`                                          Set the file type description.
:meth:`~wx.FileTypeInfo.SetIcon`                                                 Set the icon information.
:meth:`~wx.FileTypeInfo.SetOpenCommand`                                          Set the command to be used for opening files of this type.
:meth:`~wx.FileTypeInfo.SetPrintCommand`                                         Set the command to be used for printing files of this type.
:meth:`~wx.FileTypeInfo.SetShortDesc`                                            Set the short description for the files of this type.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.FileTypeInfo.Description`                                             See :meth:`~wx.FileTypeInfo.GetDescription` and :meth:`~wx.FileTypeInfo.SetDescription`
:attr:`~wx.FileTypeInfo.Extensions`                                              See :meth:`~wx.FileTypeInfo.GetExtensions`
:attr:`~wx.FileTypeInfo.ExtensionsCount`                                         See :meth:`~wx.FileTypeInfo.GetExtensionsCount`
:attr:`~wx.FileTypeInfo.IconFile`                                                See :meth:`~wx.FileTypeInfo.GetIconFile`
:attr:`~wx.FileTypeInfo.IconIndex`                                               See :meth:`~wx.FileTypeInfo.GetIconIndex`
:attr:`~wx.FileTypeInfo.MimeType`                                                See :meth:`~wx.FileTypeInfo.GetMimeType`
:attr:`~wx.FileTypeInfo.OpenCommand`                                             See :meth:`~wx.FileTypeInfo.GetOpenCommand` and :meth:`~wx.FileTypeInfo.SetOpenCommand`
:attr:`~wx.FileTypeInfo.PrintCommand`                                            See :meth:`~wx.FileTypeInfo.GetPrintCommand` and :meth:`~wx.FileTypeInfo.SetPrintCommand`
:attr:`~wx.FileTypeInfo.ShortDesc`                                               See :meth:`~wx.FileTypeInfo.GetShortDesc` and :meth:`~wx.FileTypeInfo.SetShortDesc`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.FileTypeInfo(object)

   **Possible constructors**::

       FileTypeInfo()
       
       FileTypeInfo(mimeType)
       
       FileTypeInfo(mimeType, openCmd, printCmd, description, extension)
       
       FileTypeInfo(sArray)
       
   
   Container of information about FileType.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      Default constructor creates an invalid file type info object.                  
      
      Such invalid/empty object should be used to terminate the list of file types passed to :meth:`wx.MimeTypesManager.AddFallbacks` .                   
      
      
      
      
      **~~~**

      
      **__init__** `(self, mimeType)`
      
      Constructor specifying just the MIME type name.                  
      
      Use the various setter methods below to fully initialize the object. 
      
                      
      
      
      :param `mimeType`: 
      :type `mimeType`: string
      
      
      
      
      
      
      .. versionadded:: 2.9.2 
           
      
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, mimeType, openCmd, printCmd, description, extension)`
      
      Constructor allowing to specify all the fields at once.                  
      
      This is a vararg constructor taking an arbitrary number of extensions after the first four required parameters. The list must be terminated by  ``NullPtr`` , notice that   ``NULL``   can't be used here in portable code (C++0x   ``nullptr``   can be used as well if your compiler supports it).                   
      
      
      :param `mimeType`: 
      :type `mimeType`: string
      :param `openCmd`: 
      :type `openCmd`: string
      :param `printCmd`: 
      :type `printCmd`: string
      :param `description`: 
      :type `description`: string
      :param `extension`: 
      :type `extension`: string
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, sArray)`
      
      Constuctor using an array of string elements corresponding to the parameters of the constructor above in the same order.                  
      
      
      :param `sArray`: 
      :type `sArray`: list of strings
      
      
      
      
      
      
      **~~~**






   .. method:: AddExtension(self, ext)

      Add another extension associated with this file type.                  

                


      :param `ext`: 
      :type `ext`: string






      .. versionadded:: 2.9.2 
     








   .. method:: GetDescription(self)

      Get the long, user visible description.                  

      :rtype: `string`








   .. method:: GetExtensions(self)

      Get the array of all extensions.                  

      :rtype: `list of strings`








   .. method:: GetExtensionsCount(self)

      Get the number of extensions.                  

      :rtype: `int`








   .. method:: GetIconFile(self)

      Get the icon filename.                  

      :rtype: `string`








   .. method:: GetIconIndex(self)

      Get the index of the icon within the icon file.                  

      :rtype: `int`








   .. method:: GetMimeType(self)

      Get the MIME type.                  

      :rtype: `string`








   .. method:: GetOpenCommand(self)

      Get the open command.                  

      :rtype: `string`








   .. method:: GetPrintCommand(self)

      Get the print command.                  

      :rtype: `string`








   .. method:: GetShortDesc(self)

      Get the short description (only used under Win32 so far)                  

      :rtype: `string`








   .. method:: SetDescription(self, description)

      Set the file type description.                  

                


      :param `description`: 
      :type `description`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetIcon(self, iconFile, iconIndex=0)

      Set the icon information.                  


      :param `iconFile`: 
      :type `iconFile`: string
      :param `iconIndex`: 
      :type `iconIndex`: int







   .. method:: SetOpenCommand(self, command)

      Set the command to be used for opening files of this type.                  

                


      :param `command`: 
      :type `command`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetPrintCommand(self, command)

      Set the command to be used for printing files of this type.                  

                


      :param `command`: 
      :type `command`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetShortDesc(self, shortDesc)

      Set the short description for the files of this type.                  

      This is only used under MSW for some of the registry keys used for the file type registration.                  


      :param `shortDesc`: 
      :type `shortDesc`: string







   .. attribute:: Description

      See :meth:`~wx.FileTypeInfo.GetDescription` and :meth:`~wx.FileTypeInfo.SetDescription`


   .. attribute:: Extensions

      See :meth:`~wx.FileTypeInfo.GetExtensions`


   .. attribute:: ExtensionsCount

      See :meth:`~wx.FileTypeInfo.GetExtensionsCount`


   .. attribute:: IconFile

      See :meth:`~wx.FileTypeInfo.GetIconFile`


   .. attribute:: IconIndex

      See :meth:`~wx.FileTypeInfo.GetIconIndex`


   .. attribute:: MimeType

      See :meth:`~wx.FileTypeInfo.GetMimeType`


   .. attribute:: OpenCommand

      See :meth:`~wx.FileTypeInfo.GetOpenCommand` and :meth:`~wx.FileTypeInfo.SetOpenCommand`


   .. attribute:: PrintCommand

      See :meth:`~wx.FileTypeInfo.GetPrintCommand` and :meth:`~wx.FileTypeInfo.SetPrintCommand`


   .. attribute:: ShortDesc

      See :meth:`~wx.FileTypeInfo.GetShortDesc` and :meth:`~wx.FileTypeInfo.SetShortDesc`