File: IconBundle.xsp

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (86 lines) | stat: -rw-r--r-- 2,515 bytes parent folder | download | duplicates (6)
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
#############################################################################
## Name:        XS/IconBundle.xsp
## Purpose:     XS++ for Wx::IconBundle
## Author:      Mattia Barbon
## Modified by:
## Created:     25/03/2003
## RCS-ID:      $Id: IconBundle.xsp 2968 2010-08-28 10:52:46Z mbarbon $
## Copyright:   (c) 2003, 2005, 2007-2008, 2010 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%module{Wx};

#include <wx/icon.h>
#include <wx/iconbndl.h>
#include "cpp/overload.h"

%typemap{wxBitmapType}{simple};

%name{Wx::IconBundle} class wxIconBundle
{
    %name{newEmpty} wxIconBundle();
    %name{newFile} wxIconBundle( const wxString& file,
                                 wxBitmapType type = wxBITMAP_TYPE_ANY );
    %name{newIcon} wxIconBundle( const wxIcon& icon );

    %name{AddIconFile} void AddIcon( const wxString& filr,
                                     wxBitmapType type = wxBITMAP_TYPE_ANY );
    %name{AddIconIcon} void AddIcon( const wxIcon& icon );

    %name{GetIconSize} const wxIcon& GetIcon( const wxSize& size );
    %name{GetIconCoord} const wxIcon& GetIcon( wxCoord size = -1 );

#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    bool IsEmpty();

    %name{GetIconOfExactSizeSize}
    const wxIcon& GetIconOfExactSize( const wxSize& size );
    %name{GetIconOfExactSizeCoord}
    const wxIcon& GetIconOfExactSize( wxCoord size = -1 );

%{

void
wxIconBundle::GetIconOfExactSize( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_REDISP( wxPliOvl_wsiz, GetIconOfExactSizeSize )
        MATCH_REDISP( wxPliOvl_n, GetIconOfExactSizeCoord )
    END_OVERLOAD( Wx::IconBundle::GetIconOfExactSize )

%}

#endif
};

%{

void
wxIconBundle::new( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_VOIDM_REDISP( newEmpty )
        MATCH_REDISP( wxPliOvl_wico, newIcon )
        MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, newFile, 1 )
    END_OVERLOAD( Wx::IconBundle::new )

void
wxIconBundle::AddIcon( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_REDISP( wxPliOvl_wico, AddIconIcon )
        MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, AddIconFile, 1 )
    END_OVERLOAD( Wx::IconBundle::AddIcon )

void
wxIconBundle::GetIcon( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_REDISP( wxPliOvl_wsiz, GetIconSize )
        MATCH_REDISP( wxPliOvl_n, GetIconCoord )
    END_OVERLOAD( Wx::IconBundle::GetIcon )

%}