Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / IconBundle.xsp
1 #############################################################################
2 ## Name:        XS/IconBundle.xsp
3 ## Purpose:     XS++ for Wx::IconBundle
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     25/03/2003
7 ## RCS-ID:      $Id: IconBundle.xsp 2503 2008-11-06 00:23:45Z mbarbon $
8 ## Copyright:   (c) 2003, 2005, 2007-2008 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 #include <wx/icon.h>
16 #include <wx/iconbndl.h>
17 #include "cpp/overload.h"
18
19 %typemap{wxBitmapType}{simple};
20
21 %name{Wx::IconBundle} class wxIconBundle
22 {
23     %name{newEmpty} wxIconBundle();
24     %name{newFile} wxIconBundle( const wxString& file,
25                                  wxBitmapType type = wxBITMAP_TYPE_ANY );
26     %name{newIcon} wxIconBundle( const wxIcon& icon );
27
28     %name{AddIconFile} void AddIcon( const wxString& filr,
29                                      wxBitmapType type = wxBITMAP_TYPE_ANY );
30     %name{AddIconIcon} void AddIcon( const wxIcon& icon );
31
32     %name{GetIconSize} const wxIcon& GetIcon( const wxSize& size );
33     %name{GetIconCoord} const wxIcon& GetIcon( wxCoord size = -1 );
34
35 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
36     bool IsEmpty();
37
38     %name{GetIconOfExactSizeSize}
39     const wxIcon& GetIconOfExactSize( const wxSize& size );
40     %name{GetIconOfExactSizeCoord}
41     const wxIcon& GetIconOfExactSize( wxCoord size = -1 );
42
43 %{
44
45 void
46 wxIconBundle::GetIconOfExactSize( ... )
47   PPCODE:
48     BEGIN_OVERLOAD()
49         MATCH_REDISP( wxPliOvl_wsiz, GetIconOfExactSizeSize )
50         MATCH_REDISP( wxPliOvl_n, GetIconOfExactSizeCoord )
51     END_OVERLOAD( Wx::IconBundle::GetIconOfExactSize )
52
53 %}
54
55 #endif
56 };
57
58 %{
59
60 void
61 wxIconBundle::new( ... )
62   PPCODE:
63     BEGIN_OVERLOAD()
64         MATCH_VOIDM_REDISP( newEmpty )
65         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, newFile, 1 )
66         MATCH_REDISP( wxPliOvl_wico, newIcon )
67     END_OVERLOAD( Wx::IconBundle::new )
68
69 void
70 wxIconBundle::AddIcon( ... )
71   PPCODE:
72     BEGIN_OVERLOAD()
73         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, AddIconFile, 1 )
74         MATCH_REDISP( wxPliOvl_wico, AddIconIcon )
75     END_OVERLOAD( Wx::IconBundle::AddIcon )
76
77 void
78 wxIconBundle::GetIcon( ... )
79   PPCODE:
80     BEGIN_OVERLOAD()
81         MATCH_REDISP( wxPliOvl_wsiz, GetIconSize )
82         MATCH_REDISP( wxPliOvl_n, GetIconCoord )
83     END_OVERLOAD( Wx::IconBundle::GetIcon )
84
85 %}
86