File: BitmapBundle.xsp

package info (click to toggle)
libwx-perl 1%3A0.9932-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,300 kB
  • sloc: cpp: 11,064; perl: 8,603; ansic: 711; makefile: 53
file content (76 lines) | stat: -rw-r--r-- 3,065 bytes parent folder | download | duplicates (2)
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
#############################################################################
## Name:        XS/BitmapBundle.xsp
## Purpose:     XS for Wx::BitmapBundle
## Author:      Scott Talbert
## Modified by:
## Created:     12/12/2022
## Copyright:   (c) 2022 Scott Talbert
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%{
#include <wx/bmpbndl.h>
%}

%module{Wx};

%name{Wx::BitmapBundle} class wxBitmapBundle
{
    %name{newNull} wxBitmapBundle();
    %name{newBitmap} wxBitmapBundle(const wxBitmap& bitmap);
    %name{newIcon} wxBitmapBundle(const wxIcon& icon);
    %name{newImage} wxBitmapBundle(const wxImage& image);
##    wxBitmapBundle(const char* const* xpm);
##    wxBitmapBundle(const wxBitmapBundle& other);
##    wxBitmapBundle& operator=(const wxBitmapBundle& other);
##    static wxBitmapBundle FromBitmaps(const wxVector<wxBitmap>& bitmaps);
    static wxBitmapBundle FromBitmaps(const wxBitmap& bitmap1,
                                      const wxBitmap& bitmap2);
    static wxBitmapBundle FromBitmap(const wxBitmap& bitmap);
    static wxBitmapBundle FromIconBundle(const wxIconBundle& iconBundle);
    static wxBitmapBundle FromImage(const wxImage& image);
##    static wxBitmapBundle FromImpl(wxBitmapBundleImpl* impl);
    static wxBitmapBundle FromResources(const wxString& name);
    %name{FromFiles3} wxBitmapBundle FromFiles(const wxString& path, const wxString& filename, const wxString& extension = "png");
    %name{FromFiles1} wxBitmapBundle FromFiles(const wxString& fullpathname);
##    static wxBitmapBundle FromSVG(char* data, const wxSize& sizeDef);
    static wxBitmapBundle FromSVG(const char* data, const wxSize& sizeDef);
    static wxBitmapBundle FromSVGFile(const wxString& path, const wxSize& sizeDef);
    static wxBitmapBundle FromSVGResource(const wxString& name, const wxSize& sizeDef);
    void Clear();
    bool IsOk() const;
    wxSize GetDefaultSize() const;
    wxSize GetPreferredBitmapSizeAtScale(double scale) const;
    wxSize GetPreferredBitmapSizeFor(const wxWindow* window) const;
    wxSize GetPreferredLogicalSizeFor(const wxWindow* window) const;
    wxBitmap GetBitmap(const wxSize& size) const;
    wxBitmap GetBitmapFor(const wxWindow* window) const;
    wxIcon GetIcon(const wxSize& size) const;
    wxIcon GetIconFor(const wxWindow* window) const;
    bool IsSameAs(const wxBitmapBundle& other) const;
};

%{

MODULE=Wx PACKAGE=Wx::BitmapBundle

void
new( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_VOIDM_REDISP( newNull )
        MATCH_REDISP( wxPliOvl_wbmp, newBitmap )
	MATCH_REDISP( wxPliOvl_wico, newIcon )
        MATCH_REDISP( wxPliOvl_wimg, newImage )
    END_OVERLOAD( "Wx::BitmapBundle::new" )

void
wxBitmapBundle::FromFiles( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_REDISP( wxPliOvl_s_s_s, FromFiles3 )
        MATCH_REDISP( wxPliOvl_s, FromFiles1 )
    END_OVERLOAD( Wx::BitmapBundle::FromFiles )

%}