This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_picker.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
/////////////////////////////////////////////////////////////////////////////
// Name:        _picker.i
// Purpose:     SWIG interface for Colour, Dir, File, Font picker controls
//
// Author:      Robin Dunn
//
// Created:     6-June-2006
// RCS-ID:      $Id$
// Copyright:   (c) 2006 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// Not a %module


//---------------------------------------------------------------------------
%newgroup

enum {
     wxPB_USE_TEXTCTRL,
 };


DocStr(wxPickerBase,
"Base abstract class for all pickers which support an auxiliary text
control. This class handles all positioning and sizing of the text
control like a horizontal `wx.BoxSizer` would do, with the text
control on the left of the picker button and the proportion of the
picker fixed to value 1.", "");

class wxPickerBase : public wxControl
{
public:
    // This class is an ABC, can't be instantiated from Python.
    //wxPickerBase() : m_text(NULL), m_picker(NULL),
    //                 m_margin(5), m_textProportion(2) {}
    //virtual ~wxPickerBase();


    // if present, intercepts wxPB_USE_TEXTCTRL style and creates the text control
    // The 3rd argument is the initial wxString to display in the text control
    bool CreateBase(wxWindow *parent, wxWindowID id,
        const wxString& text = wxEmptyString,
        const wxPoint& pos = wxDefaultPosition,
        const wxSize& size = wxDefaultSize, long style = 0,
        const wxValidator& validator = wxDefaultValidator,
        const wxString& name = wxButtonNameStr);



    DocDeclStr(
        void , SetInternalMargin(int newmargin),
        "Sets the margin (in pixels) between the picker and the text control.", "");

    DocDeclStr(
        int , GetInternalMargin() const,
        "Returns the margin (in pixels) between the picker and the text
control.", "");


    DocDeclStr(
        void , SetTextCtrlProportion(int prop),
        "Sets the proportion between the text control and the picker button.
This is used to set relative sizes of the text contorl and the picker.
The value passed to this function must be >= 1.", "");

    DocDeclStr(
        int , GetTextCtrlProportion() const,
        "Returns the proportion between the text control and the picker.", "");


    DocDeclStr(
        void , SetPickerCtrlProportion(int prop),
        "Sets the proportion value of the picker.", "");
    
    DocDeclStr(
        int , GetPickerCtrlProportion() const,
        "Gets the proportion value of the picker.", "");
    
    
    DocDeclStr(
        bool , IsTextCtrlGrowable() const,
        "", "");

    DocDeclStr(
        void , SetTextCtrlGrowable(bool grow = true),
        "", "");
    

    DocDeclStr(
        bool , IsPickerCtrlGrowable() const,
        "", "");
    
    DocDeclStr(
        void , SetPickerCtrlGrowable(bool grow = true),
        "", "");
        

    DocDeclStr(
        bool , HasTextCtrl() const,
        "Returns true if this class has a valid text control (i.e. if the
wx.PB_USE_TEXTCTRL style was given when creating this control).", "");

    DocDeclStr(
        wxTextCtrl *, GetTextCtrl(),
        "Returns a pointer to the text control handled by this class or None if
the wx.PB_USE_TEXTCTRL style was not specified when this control was
created.

Very important: the contents of the text control could be containing
an invalid representation of the entity which can be chosen through
the picker (e.g. the user entered an invalid colour syntax because of
a typo). Thus you should never parse the content of the textctrl to
get the user's input; rather use the derived-class getter
(e.g. `wx.ColourPickerCtrl.GetColour`, `wx.FilePickerCtrl.GetPath`,
etc).", "");

    DocDeclStr(
        wxControl *, GetPickerCtrl(),
        "", "");


    %property(InternalMargin, GetInternalMargin, SetInternalMargin, doc="See `GetInternalMargin` and `SetInternalMargin`");
    %property(PickerCtrl, GetPickerCtrl, doc="See `GetPickerCtrl`");
    %property(PickerCtrlProportion, GetPickerCtrlProportion, SetPickerCtrlProportion, doc="See `GetPickerCtrlProportion` and `SetPickerCtrlProportion`");
    %property(TextCtrl, GetTextCtrl, doc="See `GetTextCtrl`");
    %property(TextCtrlProportion, GetTextCtrlProportion, SetTextCtrlProportion, doc="See `GetTextCtrlProportion` and `SetTextCtrlProportion`");

    %property(TextCtrlGrowable, IsTextCtrlGrowable, SetTextCtrlGrowable, doc="See `IsTextCtrlGrowable` and `SetTextCtrlGrowable`");
    %property(PickerCtrlGrowable, IsPickerCtrlGrowable, SetPickerCtrlGrowable, doc="See `IsPickerCtrlGrowable` and `SetPickerCtrlGrowable`");
    
};

//---------------------------------------------------------------------------
// PyPickerBase

%{
// C++ implementation with Python plumbing    
class wxPyPickerBase : public wxPickerBase {
public: 
    wxPyPickerBase() {}
    wxPyPickerBase(wxWindow *parent,
                   wxWindowID id = -1,
                   const wxString& text = wxEmptyString,
                   const wxPoint& pos = wxDefaultPosition,
                   const wxSize& size = wxDefaultSize,
                   long style = 0,
                   const wxValidator& validator = wxDefaultValidator,
                   const wxString& name = wxButtonNameStr)
    {
        CreateBase(parent, id, text, pos, size, style, validator, name);
    }

    void SetTextCtrl(wxTextCtrl* text) { m_text = text; }
    void SetPickerCtrl(wxControl* picker) { m_picker = picker; }

    void PostCreation() { wxPickerBase::PostCreation(); }

    DEC_PYCALLBACK_VOID_pure(UpdatePickerFromTextCtrl);
    DEC_PYCALLBACK_VOID_pure(UpdateTextCtrlFromPicker);

    DEC_PYCALLBACK_LONG_LONG_const(GetTextCtrlStyle);
    DEC_PYCALLBACK_LONG_LONG_const(GetPickerStyle);
    
    PYPRIVATE;
};

IMP_PYCALLBACK_VOID_pure(wxPyPickerBase, wxPickerBase, UpdatePickerFromTextCtrl);
IMP_PYCALLBACK_VOID_pure(wxPyPickerBase, wxPickerBase, UpdateTextCtrlFromPicker);
IMP_PYCALLBACK_LONG_LONG_const(wxPyPickerBase, wxPickerBase, GetTextCtrlStyle);
IMP_PYCALLBACK_LONG_LONG_const(wxPyPickerBase, wxPickerBase, GetPickerStyle);
%}


class wxPyPickerBase : public wxPickerBase {
public:
    %pythonAppend wxPyPickerBase      "self._setOORInfo(self);" setCallbackInfo(PyPickerBase)
    %pythonAppend wxPyPickerBase()    ""
    %typemap(out) wxPyPickerBase*;    // turn off this typemap
   
    wxPyPickerBase(wxWindow *parent,
                   wxWindowID id = -1,
                   const wxString& text = wxEmptyString,
                   const wxPoint& pos = wxDefaultPosition,
                   const wxSize& size = wxDefaultSize,
                   long style = 0,
                   const wxValidator& validator = wxDefaultValidator,
                   const wxString& name = wxButtonNameStr);
    %RenameCtor(PrePyPickerBase, wxPyPickerBase());

    void _setCallbackInfo(PyObject* self, PyObject* _class);
        
    // Turn it back on again
    %typemap(out) wxPyPickerBase* { $result = wxPyMake_wxObject($1, $owner); }

    virtual void UpdatePickerFromTextCtrl();
    virtual void UpdateTextCtrlFromPicker();
    virtual long GetTextCtrlStyle(long style) const;
    virtual long GetPickerStyle(long style) const;

    void SetTextCtrl(wxTextCtrl* text);
    void SetPickerCtrl(wxControl* picker);
    void PostCreation();
};

//---------------------------------------------------------------------------
%newgroup

MAKE_CONST_WXSTRING(ColourPickerCtrlNameStr);

enum {
    wxCLRP_SHOW_LABEL,
    wxCLRP_USE_TEXTCTRL,
    wxCLRP_DEFAULT_STYLE,
};



// The C++ wxColourPickerCtrl uses a wx.Button for the implementation,
// but that looks and works very badly on Mac because the native
// button can't change color.  So for the Mac we'll implement our own
// picker using a wx.BitmapButton instead.
#ifdef __WXMAC__

%pythoncode %{
# ColourData object to be shared by all colour pickers
_colourData = None

class ColourPickerCtrl(PyPickerBase):
    """
    This control allows the user to select a colour. The
    implementation varies by platform but is usually a button which
    brings up a `wx.ColourDialog` when clicked.


    Window Styles
    -------------

        ======================  ============================================
        wx.CLRP_DEFAULT         Default style.
        wx.CLRP_USE_TEXTCTRL    Creates a text control to the left of the
                                picker button which is completely managed
                                by the `wx.ColourPickerCtrl` and which can
                                be used by the user to specify a colour.
                                The text control is automatically synchronized
                                with the button's value. Use functions defined in
                                `wx.PickerBase` to modify the text control.
        wx.CLRP_SHOW_LABEL      Shows the colour in HTML form (AABBCC) as the
                                colour button label (instead of no label at all).
        ======================  ============================================

    Events
    ------

        ========================  ==========================================
        EVT_COLOURPICKER_CHANGED  The user changed the colour selected in the
                                  control either using the button or using the
                                  text control (see wx.CLRP_USE_TEXTCTRL; note
                                  that in this case the event is fired only if
                                  the user's input is valid, i.e. recognizable).
        ========================  ==========================================
    """
    #--------------------------------------------------
    class ColourPickerButton(BitmapButton):
        def __init__(self, parent, id=-1, col=wx.BLACK,
                     pos=wx.DefaultPosition, size=wx.DefaultSize,
                     style = CLRP_DEFAULT_STYLE,
                     validator = wx.DefaultValidator,
                     name = "colourpickerwidget"):
            
            wx.BitmapButton.__init__(self, parent, id, wx.EmptyBitmap(1,1), 
                                     pos, size, style, validator, name)
            self.SetColour(col)
            self.InvalidateBestSize()
            self.SetInitialSize(size)
            self.Bind(wx.EVT_BUTTON, self.OnButtonClick)
            
            
            global _colourData
            if _colourData is None:
                _colourData = wx.ColourData()
                _colourData.SetChooseFull(True)
                grey = 0
                for i in range(16):
                    c = wx.Colour(grey, grey, grey)
                    _colourData.SetCustomColour(i, c)
                    grey += 16                                            
                        
        def SetColour(self, col):
            self.colour = col
            bmp = self._makeBitmap()
            self.SetBitmapLabel(bmp)
        
        def GetColour(self):
            return self.colour
        
        def OnButtonClick(self, evt):
            global _colourData
            _colourData.SetColour(self.colour)
            dlg = wx.ColourDialog(self, _colourData)
            if dlg.ShowModal() == wx.ID_OK:
                _colourData = dlg.GetColourData()
                self.SetColour(_colourData.GetColour())
                evt = wx.ColourPickerEvent(self, self.GetId(), self.GetColour())
                self.GetEventHandler().ProcessEvent(evt)
                            
        def _makeBitmap(self):
            width = height = 22
            bg = self.GetColour()
            if self.HasFlag(CLRP_SHOW_LABEL):
                w, h = self.GetTextExtent(bg.GetAsString(wx.C2S_HTML_SYNTAX))
                width += w
            bmp = wx.EmptyBitmap(width, height)
            dc = wx.MemoryDC(bmp)
            dc.SetBackground(wx.Brush(self.colour))
            dc.Clear()
            if self.HasFlag(CLRP_SHOW_LABEL):
                from wx.lib.colourutils import BestLabelColour
                fg = BestLabelColour(bg)
                dc.SetTextForeground(fg)
                dc.DrawText(bg.GetAsString(wx.C2S_HTML_SYNTAX),
                            (width - w)/2, (height - h)/2)
            return bmp
    
    
    #--------------------------------------------------

    def __init__(self, parent, id=-1, col=wx.BLACK,
                 pos=wx.DefaultPosition, size=wx.DefaultSize,
                 style = CLRP_DEFAULT_STYLE,
                 validator = wx.DefaultValidator,
                 name = "colourpicker"):
        if type(col) != wx.Colour:
            col = wx.NamedColour(col)
        wx.PyPickerBase.__init__(self, parent, id, col.GetAsString(),
                                 pos, size, style, validator, name)
        widget = ColourPickerCtrl.ColourPickerButton(
            self, -1, col, style=self.GetPickerStyle(style))
        self.SetPickerCtrl(widget)
        widget.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChange)
        self.PostCreation()
        
        
    def GetColour(self):
        """Set the displayed colour."""
        return self.GetPickerCtrl().GetColour()


    def SetColour(self, col):
        """Returns the currently selected colour."""
        self.GetPickerCtrl().SetColour(col)
        self.UpdateTextCtrlFromPicker()

        
    def UpdatePickerFromTextCtrl(self):
        col = wx.NamedColour(self.GetTextCtrl().GetValue())
        if not col.Ok():
            return
        if self.GetColour() != col:
            self.GetPickerCtrl().SetColour(col)
            evt = wx.ColourPickerEvent(self, self.GetId(), self.GetColour())
            self.GetEventHandler().ProcessEvent(evt)
    
    def UpdateTextCtrlFromPicker(self):
        if not self.GetTextCtrl():
            return
        self.GetTextCtrl().SetValue(self.GetColour().GetAsString())
        
    def GetPickerStyle(self, style):
        return style & CLRP_SHOW_LABEL

    def OnColourChange(self, evt):
        self.UpdateTextCtrlFromPicker()
        evt = wx.ColourPickerEvent(self, self.GetId(), self.GetColour())
        self.GetEventHandler().ProcessEvent(evt)
        
%}

#else
// If not Mac then tell SWIG about the C++ implementation

MustHaveApp(wxColourPickerCtrl);
DocStr(wxColourPickerCtrl,
"This control allows the user to select a colour. The implementation
varies by platform but is usually a button which brings up a
`wx.ColourDialog` when clicked.",

"
Window Styles
-------------

    ======================  ============================================
    wx.CLRP_DEFAULT         Default style.
    wx.CLRP_USE_TEXTCTRL    Creates a text control to the left of the
                            picker button which is completely managed
                            by the `wx.ColourPickerCtrl` and which can
                            be used by the user to specify a colour.
                            The text control is automatically synchronized
                            with the button's value. Use functions defined in
                            `wx.PickerBase` to modify the text control.
    wx.CLRP_SHOW_LABEL      Shows the colour in HTML form (AABBCC) as the
                            colour button label (instead of no label at all).
    ======================  ============================================

Events
------

    ========================  ==========================================
    EVT_COLOURPICKER_CHANGED  The user changed the colour selected in the
                              control either using the button or using the
                              text control (see wx.CLRP_USE_TEXTCTRL; note
                              that in this case the event is fired only if
                              the user's input is valid, i.e. recognizable).
    ========================  ==========================================
");

class wxColourPickerCtrl : public wxPickerBase
{
public:
    %pythonAppend wxColourPickerCtrl      "self._setOORInfo(self)"
    %pythonAppend wxColourPickerCtrl()    ""

    wxColourPickerCtrl(wxWindow *parent, wxWindowID id=-1,
                       const wxColour& col = *wxBLACK,
                       const wxPoint& pos = wxDefaultPosition,
                       const wxSize& size = wxDefaultSize,
                       long style = wxCLRP_DEFAULT_STYLE,
                       const wxValidator& validator = wxDefaultValidator,
                       const wxString& name = wxPyColourPickerCtrlNameStr);
    %RenameCtor(PreColourPickerCtrl, wxColourPickerCtrl());

    bool Create(wxWindow *parent, wxWindowID id,
                const wxColour& col = *wxBLACK,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxCLRP_DEFAULT_STYLE,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyColourPickerCtrlNameStr);


    DocDeclStr(
        wxColour , GetColour() const,
        "Returns the currently selected colour.", "");


    DocDeclStr(
        void , SetColour(const wxColour& col),
        "Set the displayed colour.", "");

    %property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`");
};
#endif



%constant wxEventType wxEVT_COMMAND_COLOURPICKER_CHANGED;
%pythoncode {
    EVT_COLOURPICKER_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_COLOURPICKER_CHANGED, 1 )
}

class wxColourPickerEvent : public wxCommandEvent
{
public:
    wxColourPickerEvent(wxObject *generator, int id, const wxColour &col);

    wxColour GetColour() const;
    void SetColour(const wxColour &c);

    %property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`");
};


//---------------------------------------------------------------------------
%newgroup

MAKE_CONST_WXSTRING(FilePickerCtrlNameStr);
MAKE_CONST_WXSTRING(FileSelectorPromptStr);
MAKE_CONST_WXSTRING(DirPickerCtrlNameStr);
MAKE_CONST_WXSTRING(DirSelectorPromptStr);
MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr);


enum {
    wxFLP_OPEN,
    wxFLP_SAVE,
    wxFLP_OVERWRITE_PROMPT,
    wxFLP_FILE_MUST_EXIST,
    wxFLP_CHANGE_DIR,
    wxFLP_SMALL,
    
    wxDIRP_DIR_MUST_EXIST,
    wxDIRP_CHANGE_DIR,
    wxDIRP_SMALL,

    wxFLP_USE_TEXTCTRL,
    wxFLP_DEFAULT_STYLE,
    
    wxDIRP_USE_TEXTCTRL,
    wxDIRP_DEFAULT_STYLE,
};



MustHaveApp(wxFilePickerCtrl);
DocStr(wxFilePickerCtrl,
    "", "");

class wxFilePickerCtrl : public wxPickerBase
{
public:
    %pythonAppend wxFilePickerCtrl      "self._setOORInfo(self)"
    %pythonAppend wxFilePickerCtrl()    ""

    wxFilePickerCtrl(wxWindow *parent,
                     wxWindowID id=-1,
                     const wxString& path = wxPyEmptyString,
                     const wxString& message = wxPyFileSelectorPromptStr,
                     const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = wxFLP_DEFAULT_STYLE,
                     const wxValidator& validator = wxDefaultValidator,
                     const wxString& name = wxPyFilePickerCtrlNameStr);
    %RenameCtor(PreFilePickerCtrl, wxFilePickerCtrl());

    bool Create(wxWindow *parent,
                wxWindowID id=-1,
                const wxString& path = wxPyEmptyString,
                const wxString& message = wxPyFileSelectorPromptStr,
                const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxFLP_DEFAULT_STYLE,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyFilePickerCtrlNameStr);

    wxString GetPath() const;
    void SetPath(const wxString &str);

    // return true if the given path is valid for this control
    // ?? bool CheckPath(const wxString& path) const;

    // Returns the filtered value currently placed in the text control (if present).
    wxString GetTextCtrlValue() const;

    void SetInitialDirectory(const wxString& dir);

    %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
    %property(TextCtrlValue, GetTextCtrlValue, doc="See `GetTextCtrlValue`");
};




MustHaveApp(wxDirPickerCtrl);
DocStr(wxDirPickerCtrl,
    "", "");

class wxDirPickerCtrl : public wxPickerBase
{
public:
    %pythonAppend wxDirPickerCtrl      "self._setOORInfo(self)"
    %pythonAppend wxDirPickerCtrl()    ""

    wxDirPickerCtrl(wxWindow *parent, wxWindowID id=-1,
                    const wxString& path = wxPyEmptyString,
                    const wxString& message = wxPyDirSelectorPromptStr,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    long style = wxDIRP_DEFAULT_STYLE,
                    const wxValidator& validator = wxDefaultValidator,
                    const wxString& name = wxPyDirPickerCtrlNameStr);
    %RenameCtor(PreDirPickerCtrl, wxDirPickerCtrl());

    bool Create(wxWindow *parent, wxWindowID id=-1,
                const wxString& path = wxPyEmptyString,
                const wxString& message = wxPyDirSelectorPromptStr,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxDIRP_DEFAULT_STYLE,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyDirPickerCtrlNameStr);

    wxString GetPath() const;
    void SetPath(const wxString &str);
    
    // return true if the given path is valid for this control
    // ?? bool CheckPath(const wxString& path) const;

    // Returns the filtered value currently placed in the text control (if present).
    wxString GetTextCtrlValue() const;

    %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
    %property(TextCtrlValue, GetTextCtrlValue, doc="See `GetTextCtrlValue`");
    
};


%constant wxEventType wxEVT_COMMAND_FILEPICKER_CHANGED;
%constant wxEventType wxEVT_COMMAND_DIRPICKER_CHANGED;

%pythoncode {
EVT_FILEPICKER_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_FILEPICKER_CHANGED, 1 )
EVT_DIRPICKER_CHANGED  = wx.PyEventBinder( wxEVT_COMMAND_DIRPICKER_CHANGED,  1 )
}

class wxFileDirPickerEvent : public wxCommandEvent
{
public:
    wxFileDirPickerEvent(wxEventType type, wxObject *generator, int id, const wxString &path);

    wxString GetPath() const { return m_path; }
    void SetPath(const wxString &p) { m_path = p; }

    %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
};


//---------------------------------------------------------------------------
%newgroup

MAKE_CONST_WXSTRING(FontPickerCtrlNameStr);

enum {
    wxFNTP_FONTDESC_AS_LABEL,
    wxFNTP_USEFONT_FOR_LABEL,
    wxFNTP_USE_TEXTCTRL,
    wxFNTP_DEFAULT_STYLE,
};


MustHaveApp(wxFontPickerCtrl);
DocStr(wxFontPickerCtrl,
    "", "");


class wxFontPickerCtrl : public wxPickerBase
{
public:
    %pythonAppend wxFontPickerCtrl      "self._setOORInfo(self)"
    %pythonAppend wxFontPickerCtrl()    ""


    wxFontPickerCtrl(wxWindow *parent,
                     wxWindowID id=-1,
                     const wxFont& initial = wxNullFont,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = wxFNTP_DEFAULT_STYLE,
                     const wxValidator& validator = wxDefaultValidator,
                     const wxString& name = wxPyFontPickerCtrlNameStr);
    %RenameCtor(PreFontPickerCtrl, wxFontPickerCtrl());

    bool Create(wxWindow *parent,
                wxWindowID id=-1,
                const wxFont& initial = wxNullFont,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxFNTP_DEFAULT_STYLE,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxPyFontPickerCtrlNameStr);


    // get the font chosen
    wxFont GetSelectedFont() const;

    // sets currently displayed font
    void SetSelectedFont(const wxFont& f);

    // set/get the max pointsize
    void SetMaxPointSize(unsigned int max);
    unsigned int GetMaxPointSize() const;
    
    %property(MaxPointSize, GetMaxPointSize, SetMaxPointSize, doc="See `GetMaxPointSize` and `SetMaxPointSize`");
    %property(SelectedFont, GetSelectedFont, SetSelectedFont, doc="See `GetSelectedFont` and `SetSelectedFont`");
};

 
%constant wxEventType wxEVT_COMMAND_FONTPICKER_CHANGED;

%pythoncode {
EVT_FONTPICKER_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_FONTPICKER_CHANGED, 1 )
}


class wxFontPickerEvent : public wxCommandEvent
{
public:
    wxFontPickerEvent(wxObject *generator, int id, const wxFont &f);

    wxFont GetFont() const;
    void SetFont(const wxFont &c);
    
    %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
};

//---------------------------------------------------------------------------