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
|
#############################################################################
## Name: XS/ImageList.xs
## Purpose: XS for Wx::ImageList
## Author: Mattia Barbon
## Modified by:
## Created: 29/10/2000
## RCS-ID: $Id: ImageList.xs 2057 2007-06-18 23:03:00Z mbarbon $
## Copyright: (c) 2000-2006 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
%{
#include <wx/imaglist.h>
#define wxNullBitmapPtr (wxBitmap*) &wxNullBitmap
%}
%module{Wx};
%name{Wx::ImageList} class wxImageList
{
wxImageList( int width, int height, bool mask = true,
int initialCount = 1 );
%name{AddBitmap} int Add( const wxBitmap& bitmap,
const wxBitmap& mask = wxNullBitmapPtr );
%name{AddWithColourMask} int Add( const wxBitmap& bitmap,
const wxColour& colour );
%name{AddIcon} int Add( const wxIcon& icon );
bool Draw( int index, const wxDC& dc, int x, int y,
int flags = wxIMAGELIST_DRAW_NORMAL,
bool solidBackground = false );
int GetImageCount();
bool Remove( int index );
bool RemoveAll();
#if defined( __WXMSW__ )
%name{ReplaceBitmap} bool Replace( int index, const wxBitmap& bitmap,
const wxBitmap&mask = wxNullBitmapPtr );
#else
%name{ReplaceBitmap} bool Replace( int index, const wxBitmap& bitmap );
#endif
%name{ReplaceIcon} bool Replace( int index, const wxIcon& icon );
#if WXPERL_W_VERSION_GE( 2, 5, 4 )
wxBitmap GetBitmap( int index );
wxIcon GetIcon( int index );
#endif
};
%{
MODULE=Wx PACKAGE=Wx::ImageList
static void
wxImageList::CLONE()
CODE:
wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
## // thread OK
void
DESTROY( THIS )
wxImageList* THIS
CODE:
wxPli_thread_sv_unregister( aTHX_ "Wx::ImageList", THIS, ST(0) );
if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
delete THIS;
void
wxImageList::Add( ... )
PPCODE:
BEGIN_OVERLOAD()
MATCH_REDISP( wxPliOvl_wbmp_wcol, AddWithColourMask )
MATCH_REDISP( wxPliOvl_wico, AddIcon )
MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_wbmp, AddBitmap, 1 )
END_OVERLOAD( Wx::ImageList::Add )
void
wxImageList::GetSize( index )
int index
PREINIT:
int width;
int height;
bool result;
PPCODE:
result = THIS->GetSize( index, width, height );
EXTEND( SP, 3 );
PUSHs( sv_2mortal( newSViv( result ) ) );
PUSHs( sv_2mortal( newSViv( width ) ) );
PUSHs( sv_2mortal( newSViv( height ) ) );
void
wxImageList::Replace( ... )
PPCODE:
BEGIN_OVERLOAD()
MATCH_REDISP( wxPliOvl_n_wico, ReplaceIcon )
MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_wbmp_wbmp, ReplaceBitmap, 2 )
END_OVERLOAD( Wx::ImageList::Replace )
%}
|