Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / DirCtrl.xsp
1 #############################################################################
2 ## Name:        XS/DirCtrl.xsp
3 ## Purpose:     XS+++ for Wx::[Generic]DirCtrl
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     07/10/2007
7 ## RCS-ID:      $Id: DirCtrl.xsp 2241 2007-10-07 19:57:31Z mbarbon $
8 ## Copyright:   (c) 2007 Mattia Barbon
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 %module{Wx};
14
15 %typemap{wxGenericDirCtrl*}{simple};
16 %typemap{const wxTreeItemId&}{reference};
17 %typemap{wxDirFilterListCtrl*}{simple};
18
19 #include <wx/dirctrl.h>
20
21 #define wxPLI_DEFAULT_DIRCTRL_STYLE wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER
22
23 %name{Wx::GenericDirCtrl} class wxGenericDirCtrl
24 {
25 %{
26 void
27 new( ... )
28   PPCODE:
29     BEGIN_OVERLOAD()
30         MATCH_VOIDM_REDISP( newDefault )
31         MATCH_ANY_REDISP( newFull )
32     END_OVERLOAD( "Wx::GenericDirCtrl::new" )
33 %}
34
35     %name{newDefault} wxGenericDirCtrl()
36         %code{% RETVAL = new wxGenericDirCtrl();
37                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
38                 %};
39
40     %name{newFull} wxGenericDirCtrl( wxWindow *parent,
41                                      wxWindowID id = wxID_ANY,
42                                      const wxString &dir = wxDirDialogDefaultFolderStr,
43                                      const wxPoint& pos = wxDefaultPosition,
44                                      const wxSize& size = wxDefaultSize,
45                                      long style = wxPLI_DEFAULT_DIRCTRL_STYLE,
46                                      const wxString& filter = wxEmptyString,
47                                      int defaultFilter = 0,
48                                      const wxString& name = wxTreeCtrlNameStr )
49         %code{% RETVAL = new wxGenericDirCtrl( parent, id, dir, pos, size,
50                                                style, filter, defaultFilter,
51                                                name );
52                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
53                 %};
54
55     bool Create( wxWindow *parent,
56                  wxWindowID id = wxID_ANY,
57                  const wxString &dir = wxDirDialogDefaultFolderStr,
58                  const wxPoint& pos = wxDefaultPosition,
59                  const wxSize& size = wxDefaultSize,
60                  long style = wxPLI_DEFAULT_DIRCTRL_STYLE,
61                  const wxString& filter = wxEmptyString,
62                  int defaultFilter = 0,
63                  const wxString& name = wxTreeCtrlNameStr );
64
65     bool ExpandPath( const wxString& path );
66 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
67     bool CollapsePath( const wxString& path );
68 #endif
69     wxString GetDefaultPath() const;
70     void SetDefaultPath( const wxString& path );
71     wxString GetPath() const;
72     wxString GetFilePath() const;
73     void SetPath( const wxString& path );
74     void ShowHidden( bool show );
75     bool GetShowHidden();
76     wxString GetFilter() const;
77     void SetFilter( const wxString& filter );
78     int GetFilterIndex() const;
79     void SetFilterIndex( int n );
80     const wxTreeItemId& GetRootId();
81     wxTreeCtrl* GetTreeCtrl() const;
82     wxDirFilterListCtrl* GetFilterListCtrl() const;
83     void ReCreateTree();
84 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
85     void CollapseTree();
86 #endif
87 };